Skip to main content
Api

Routing

List permanently routed contacts

GET
/projects/{projectId}/permanent-routes

Authorization

bearerClerk
AuthorizationBearer <token>

Clerk session JWT from an authenticated dashboard user. Format: Bearer eyJ....

In: header

Path Parameters

projectId*string

Response Body

application/json

application/problem+json

curl -X GET "https://loading/api/v1/projects/string/permanent-routes"
{
  "$schema": "/api/v1/schemas/ListPermanentRoutesResponse.json",
  "routes": [
    {
      "$schema": "/api/v1/schemas/PermanentRouteBody.json",
      "agent_id": "string",
      "classified_at": "2019-08-24T14:15:22Z",
      "contact_name": "string",
      "id": "string",
      "overridden": true,
      "override_agent_id": "string",
      "project_id": "string",
      "tier": "string",
      "user_id": "string"
    }
  ],
  "total": 0
}
{
  "$schema": "/api/v1/schemas/ErrorModel.json",
  "detail": "Property foo is required but is missing.",
  "errors": [
    {
      "location": "string",
      "message": "string",
      "value": null
    }
  ],
  "instance": "https://example.com/error-log/abc123",
  "status": 400,
  "title": "Bad Request",
  "type": "https://example.com/errors/example"
}

Classify a contact and set permanent route

POST
/projects/{projectId}/permanent-routes

Authorization

bearerClerk
AuthorizationBearer <token>

Clerk session JWT from an authenticated dashboard user. Format: Bearer eyJ....

In: header

Path Parameters

projectId*string

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/problem+json

curl -X POST "https://loading/api/v1/projects/string/permanent-routes" \  -H "Content-Type: application/json" \  -d '{    "agent_id": "string",    "contact_name": "string",    "tier": "string",    "user_id": "string"  }'
{
  "$schema": "/api/v1/schemas/PermanentRouteBody.json",
  "agent_id": "string",
  "classified_at": "2019-08-24T14:15:22Z",
  "contact_name": "string",
  "id": "string",
  "overridden": true,
  "override_agent_id": "string",
  "project_id": "string",
  "tier": "string",
  "user_id": "string"
}
{
  "$schema": "/api/v1/schemas/ErrorModel.json",
  "detail": "Property foo is required but is missing.",
  "errors": [
    {
      "location": "string",
      "message": "string",
      "value": null
    }
  ],
  "instance": "https://example.com/error-log/abc123",
  "status": 400,
  "title": "Bad Request",
  "type": "https://example.com/errors/example"
}

Override a contact's permanent route

POST
/projects/{projectId}/permanent-routes/{userId}/override

Authorization

bearerClerk
AuthorizationBearer <token>

Clerk session JWT from an authenticated dashboard user. Format: Bearer eyJ....

In: header

Path Parameters

projectId*string
userId*string

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

agent_id*string

The override agent ID

Response Body

application/json

application/problem+json

curl -X POST "https://loading/api/v1/projects/string/permanent-routes/string/override" \  -H "Content-Type: application/json" \  -d '{    "agent_id": "string"  }'
{
  "$schema": "/api/v1/schemas/PermanentRouteBody.json",
  "agent_id": "string",
  "classified_at": "2019-08-24T14:15:22Z",
  "contact_name": "string",
  "id": "string",
  "overridden": true,
  "override_agent_id": "string",
  "project_id": "string",
  "tier": "string",
  "user_id": "string"
}
{
  "$schema": "/api/v1/schemas/ErrorModel.json",
  "detail": "Property foo is required but is missing.",
  "errors": [
    {
      "location": "string",
      "message": "string",
      "value": null
    }
  ],
  "instance": "https://example.com/error-log/abc123",
  "status": 400,
  "title": "Bad Request",
  "type": "https://example.com/errors/example"
}

Get routing configuration for a project

GET
/projects/{projectId}/routing-config

Authorization

bearerClerk
AuthorizationBearer <token>

Clerk session JWT from an authenticated dashboard user. Format: Bearer eyJ....

In: header

Path Parameters

projectId*string

Response Body

application/json

application/problem+json

curl -X GET "https://loading/api/v1/projects/string/routing-config"
{
  "$schema": "/api/v1/schemas/Config.json",
  "guide_agent": {
    "agent_id": "string",
    "agent_name": "string",
    "criteria": [
      "string"
    ],
    "questions": [
      "string"
    ]
  },
  "handoffs": [
    {
      "carry": [
        "string"
      ],
      "from": "string",
      "mode": "string",
      "to": "string",
      "when": "string"
    }
  ],
  "tiers": [
    {
      "agent_id": "string",
      "agent_name": "string",
      "criteria": null,
      "label": "string",
      "name": "string",
      "prompt": "string"
    }
  ]
}
{
  "$schema": "/api/v1/schemas/ErrorModel.json",
  "detail": "Property foo is required but is missing.",
  "errors": [
    {
      "location": "string",
      "message": "string",
      "value": null
    }
  ],
  "instance": "https://example.com/error-log/abc123",
  "status": 400,
  "title": "Bad Request",
  "type": "https://example.com/errors/example"
}

Update routing configuration for a project

PUT
/projects/{projectId}/routing-config

Authorization

bearerClerk
AuthorizationBearer <token>

Clerk session JWT from an authenticated dashboard user. Format: Bearer eyJ....

In: header

Path Parameters

projectId*string

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/problem+json

curl -X PUT "https://loading/api/v1/projects/string/routing-config" \  -H "Content-Type: application/json" \  -d '{    "guide_agent": {      "agent_id": "string",      "agent_name": "string",      "criteria": [        "string"      ],      "questions": [        "string"      ]    },    "handoffs": [      {        "carry": [          "string"        ],        "from": "string",        "mode": "string",        "to": "string",        "when": "string"      }    ],    "tiers": [      {        "agent_id": "string",        "agent_name": "string",        "criteria": null,        "label": "string",        "name": "string",        "prompt": "string"      }    ]  }'
{
  "$schema": "/api/v1/schemas/Config.json",
  "guide_agent": {
    "agent_id": "string",
    "agent_name": "string",
    "criteria": [
      "string"
    ],
    "questions": [
      "string"
    ]
  },
  "handoffs": [
    {
      "carry": [
        "string"
      ],
      "from": "string",
      "mode": "string",
      "to": "string",
      "when": "string"
    }
  ],
  "tiers": [
    {
      "agent_id": "string",
      "agent_name": "string",
      "criteria": null,
      "label": "string",
      "name": "string",
      "prompt": "string"
    }
  ]
}
{
  "$schema": "/api/v1/schemas/ErrorModel.json",
  "detail": "Property foo is required but is missing.",
  "errors": [
    {
      "location": "string",
      "message": "string",
      "value": null
    }
  ],
  "instance": "https://example.com/error-log/abc123",
  "status": 400,
  "title": "Bad Request",
  "type": "https://example.com/errors/example"
}