Gets a specific agent by its ID for the specified account with all its versions. Returns complete agent metadata and all non-deleted versions (draft, staging, production). locationId is required parameter. The agent must have active status.

http
GET https://services.leadconnectorhq.com/agent-studio/agent/{agentId}

Authorization

NameTypeRequiredExampleDescription
AuthorizationstringYesBearer token generated from the Leadway portal. See Authentication.
VersionstringYes2021-07-28API version.

Path parameters

NameTypeRequiredExampleDescription
agentIdstringYesp1q2r3s4t5u6v7w8x9y0z1a2

Query parameters

NameTypeRequiredExampleDescription
locationIdstringYesC2QujeCh8ZnC7al2InWR
sourcestringNoapi

Responses

200 - Agent retrieved successfully
  • success (boolean, required): Success status Example: True

  • message (string, required): Response message Example: Agent retrieved successfully

  • agent (object, required): Agent metadata with all active versions

  • traceId (string): Request trace ID for debugging Example: 22dbda99-13d3-4b4d-a30e-c468334e2178

json
{
  "success": true,
  "message": "Agent retrieved successfully",
  "agent": {
    "id": "d6a6792d-0d50-4e8f-9c3b-ecd8096d0bdd",
    "agentId": "AgfS2JXWsSN8aXb5c4d2",
    "name": "Customer Support Agent",
    "description": "AI agent for customer support",
    "agencyId": "5DP4iH6HLkQsiKESj6rh",
    "locationId": "C2QujeCh8ZnC7al2InWR",
    "productSlug": "agent_studio",
    "productId": "agent_studio",
    "authorId": "usr_123",
    "status": "active",
    "folderId": "vEoIigWSAw1BQA9DEchD",
    "folderName": "Default Agents",
    "createdAt": "2026-03-06T10:37:01.013Z",
    "updatedAt": "2026-03-06T10:37:01.014Z",
    "deleted": false,
    "productionVersion": {
      "versionId": "Ver1K8sSF2nC7al5InWz",
      "versionName": "Content Creation Agent v1",
      "isPublished": true,
      "inputVariables": [],
      "updatedAt": "2026-03-02T06:53:40.570Z"
    },
    "versions": [
      {
        "id": "3f9d9ab7-5ca4-4e64-8472-eab9e77a0fe3",
        "versionId": "Ver1K8sSF2nC7al5InWz",
        "agentId": "AgfS2JXWsSN8aXb5c4d2",
        "agencyId": "5DP4iH6HLkQsiKESj6rh",
        "locationId": "C2QujeCh8ZnC7al2InWR",
        "versionName": "v1",
        "description": "AI agent for customer support",
        "state": "staging",
        "isPublished": false,
        "scopes": [],
        "nodes": [],
  // truncado: 22 lineas mas
}
400 - Bad Request - locationId is required
json
{}
401 - Unauthorized
json
{}
404 - Agent not found or not available
422 - Unprocessable Entity
json
{}
500 - Internal Server Error
  • statusCode (number): Example: 500

  • message (string): Example: Internal Server Error

json
{
  "statusCode": 500,
  "message": "Internal Server Error"
}

Example

curl -X GET 'https://services.leadconnectorhq.com/agent-studio/agent/YOUR_agentId' \
  -H 'Authorization: Bearer YOUR_TOKEN' \
  -H 'Version: 2021-07-28'

Last updated October 26, 2026

Was this page helpful?