Talkstack
  • System architecture
  • Getting Started With Talkstack's API
  • Authentication
    • Signup
    • Verify Email
    • Resend email verification code
    • Login
    • Refresh Token
    • Change Password
    • Forgot Password
    • Reset Password
  • User
    • Generate API key
    • Set active Project
    • Get active Project
  • Project
    • Creating a new project
    • Get Project
    • Getting list of projects
    • Update a project
    • Delete Project
    • Webhook
    • Get Active Agent
    • Set Active Agent
    • Remove Active Agent
  • Agent
    • Create a new Agent
    • Get Agent Details
    • Update Agent
    • Delete an agent
    • Get All agents
  • Call
    • Make phone call
    • Get call data
    • Get call history
    • Get call analysis
    • Batch calls
  • Voices
    • List Voices
    • Get Voice data
  • Phone Number
    • Get phone number data
    • Assign Number to Agent
  • Hubspot
    • HubSpot Integration
Powered by GitBook
On this page
  1. Agent

Get All agents

This section provides instructions on using the /agent/:projectId endpoint to fetch a list of all agents in the project.

Step1: Prepare Your Request

  • Endpoint: /agent/:projectId

  • Method: GET

  • URL: https://api.talkstackai.com/agent/:projectId

  • Headers: Include Content-Type: application/json.

  • Authorization: Bearer token or x-api-key in headers

Step2: Setting Request parameters

  • projectId: The id of the project from which you want to fetch a list of agents.

{
    "projectId": "XXXXXXXXXXXXXXXXXXXXXXXXXXXX"
}

Step 3: Send the Request

Use your preferred HTTP client to send the GET request with route params.

Step 4: Handle the request

The response will show a detailed list of all active agents in the project.

Success Response:

  • Status Code: 200 OK

  • Body: The response gives a list of all agents.

[
    {
        "name": "John",
        "projectId": "XXXXXXXXXXXXXXXXXXX",
        "systemInstruction": "Instructions given to the agent.".
        "id": "XXXXXXXXXXXXXXXXXXXXXXXX"
    },
    {
        "name": "Jack",
        "projectId": "XXXXXXXXXXXXXXXXXXX",
        "systemInstruction": "Instructions given to the agent.".
        "id": "XXXXXXXXXXXXXXXXXXXXXXXX"
    },
]

Troubleshooting

  • 400 Bad Request: If the projectId is missing in the request.

  • 404 Not Found: If there are no agents.

  • 500 Internal Server Error: For errors in getting the agent list

Last updated 15 hours ago

PreviousDelete an agentNextMake phone call

Last updated 3 months ago