Reference
REST API
All 81 operations at https://sitecall.ai, generated from the contract the routes validate with. Each names its operation id, the method the typed client calls by. See the overview for authentication, idempotency, pagination and errors, and the event schemas for webhook payloads.
- Sessions
- Application users
- Devices
- Credentials
- Routing plans
- Schedules
- Queues
- AI minutes
- AI agents
- Agents
- Calls
- Recordings
- Voicemails
- Transcripts
- Messages
- Team metrics
- Emergency locations
- Webhooks
- Event log
- Numbers
- Verification codes
- Provisioning
Sessions
Mint a 15-minute end-user token for an application user (application key) or a member (their SiteCall session).
- Scope
- none
- Credentials
application_key,user_session- Workspace
- None (named in the body, or not needed)
- Idempotency
- No Idempotency-Key: safe to repeat
- Success
- 200
- Errors
{ error: { code, message } }- Retry
- Safe with the same Idempotency-Key
The workspace is in the body (workspaceId, or the application's externalWorkspaceId). scopes defaults to everything the caller may grant and is refused if it asks for more. A removed application user gets no new token; revoking the key stops refreshes at once.
Request body
{
"type": "object",
"properties": {
"workspaceId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"externalWorkspaceId": {
"type": "string",
"minLength": 1,
"maxLength": 200
},
"externalUserId": {
"type": "string",
"minLength": 1,
"maxLength": 200
},
"scopes": {
"minItems": 1,
"maxItems": 9,
"type": "array",
"items": {
"type": "string",
"enum": [
"numbers:*",
"routing:*",
"calls:*",
"calls:supervise",
"devices:*",
"messages:*",
"media:read",
"webhooks:*",
"metrics:read"
]
}
}
}
}Response 200
{
"type": "object",
"properties": {
"token": {
"type": "string",
"minLength": 1
},
"expiresAt": {
"type": "string",
"format": "date-time",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
},
"applicationId": {
"anyOf": [
{
"type": "string",
"minLength": 1,
"pattern": "^[a-z][a-z0-9_-]{1,63}$"
},
{
"type": "null"
}
]
},
"workspaceId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"externalWorkspaceId": {
"anyOf": [
{
"type": "string",
"minLength": 1,
"maxLength": 200
},
{
"type": "null"
}
]
},
"externalUserId": {
"type": "string",
"minLength": 1,
"maxLength": 200
},
"memberId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"scopes": {
"minItems": 1,
"maxItems": 9,
"type": "array",
"items": {
"type": "string",
"enum": [
"numbers:*",
"routing:*",
"calls:*",
"calls:supervise",
"devices:*",
"messages:*",
"media:read",
"webhooks:*",
"metrics:read"
]
}
}
},
"required": [
"token",
"expiresAt",
"applicationId",
"workspaceId",
"externalWorkspaceId",
"scopes"
]
}Application users
Create or update an application user by your own user id; numberIds sets the numbers it may call from.
- Scope
devices:*- Credentials
application_key- Workspace
- x-sitecall-workspace-id (or x-sitecall-external-workspace-id with a key)
- Idempotency
- Idempotency-Key required
- Success
- 201, 200
- Errors
{ error: { code, message } }- Retry
- Safe with the same Idempotency-Key
Request body
{
"type": "object",
"properties": {
"externalUserId": {
"type": "string",
"minLength": 1,
"maxLength": 200
},
"displayName": {
"anyOf": [
{
"type": "string",
"minLength": 1,
"maxLength": 120
},
{
"type": "null"
}
]
},
"role": {
"default": "agent",
"type": "string",
"enum": [
"agent",
"supervisor",
"admin"
]
},
"numberIds": {
"maxItems": 100,
"type": "array",
"items": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
}
}
},
"required": [
"externalUserId"
],
"additionalProperties": false
}Response 201
{
"type": "object",
"properties": {
"id": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"applicationId": {
"type": "string",
"minLength": 1
},
"workspaceId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"externalUserId": {
"type": "string",
"minLength": 1,
"maxLength": 200
},
"displayName": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"role": {
"anyOf": [
{
"type": "string",
"enum": [
"agent",
"supervisor",
"admin"
]
},
{
"type": "string",
"minLength": 1,
"maxLength": 100
}
]
},
"availability": {
"anyOf": [
{
"type": "string",
"enum": [
"available",
"away",
"offline"
]
},
{
"type": "string",
"minLength": 1,
"maxLength": 100
}
]
},
"active": {
"type": "boolean"
},
"revokedAt": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"createdAt": {
"type": "string"
},
"updatedAt": {
"type": "string"
},
"numberIds": {
"default": [],
"type": "array",
"items": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
}
}
},
"required": [
"id",
"applicationId",
"workspaceId",
"externalUserId",
"displayName",
"role",
"availability",
"active",
"revokedAt",
"createdAt",
"updatedAt",
"numberIds"
]
}List the workspace's application users (by id).
- Scope
devices:*- Credentials
application_key- Workspace
- x-sitecall-workspace-id (or x-sitecall-external-workspace-id with a key)
- Idempotency
- No Idempotency-Key: safe to repeat
- Success
- 200 · pages { data, nextCursor }
- Errors
{ error: { code, message } }- Retry
- Safe with the same Idempotency-Key
Query
{
"type": "object",
"properties": {
"limit": {
"type": "integer",
"minimum": 1,
"maximum": 200
},
"cursor": {
"type": "string",
"minLength": 1
},
"externalUserId": {
"type": "string",
"minLength": 1,
"maxLength": 200
}
}
}Response 200
{
"type": "object",
"properties": {
"data": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"applicationId": {
"type": "string",
"minLength": 1
},
"workspaceId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"externalUserId": {
"type": "string",
"minLength": 1,
"maxLength": 200
},
"displayName": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"role": {
"anyOf": [
{
"type": "string",
"enum": [
"agent",
"supervisor",
"admin"
]
},
{
"type": "string",
"minLength": 1,
"maxLength": 100
}
]
},
"availability": {
"anyOf": [
{
"type": "string",
"enum": [
"available",
"away",
"offline"
]
},
{
"type": "string",
"minLength": 1,
"maxLength": 100
}
]
},
"active": {
"type": "boolean"
},
"revokedAt": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"createdAt": {
"type": "string"
},
"updatedAt": {
"type": "string"
},
"numberIds": {
"default": [],
"type": "array",
"items": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
}
}
},
"required": [
"id",
"applicationId",
"workspaceId",
"externalUserId",
"displayName",
"role",
"availability",
"active",
"revokedAt",
"createdAt",
"updatedAt",
"numberIds"
]
}
},
"nextCursor": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
}
},
"required": [
"data",
"nextCursor"
]
}Read one application user.
- Scope
devices:*- Credentials
application_key- Workspace
- x-sitecall-workspace-id (or x-sitecall-external-workspace-id with a key)
- Idempotency
- No Idempotency-Key: safe to repeat
- Success
- 200
- Errors
{ error: { code, message } }- Retry
- Safe with the same Idempotency-Key
Response 200
{
"type": "object",
"properties": {
"id": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"applicationId": {
"type": "string",
"minLength": 1
},
"workspaceId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"externalUserId": {
"type": "string",
"minLength": 1,
"maxLength": 200
},
"displayName": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"role": {
"anyOf": [
{
"type": "string",
"enum": [
"agent",
"supervisor",
"admin"
]
},
{
"type": "string",
"minLength": 1,
"maxLength": 100
}
]
},
"availability": {
"anyOf": [
{
"type": "string",
"enum": [
"available",
"away",
"offline"
]
},
{
"type": "string",
"minLength": 1,
"maxLength": 100
}
]
},
"active": {
"type": "boolean"
},
"revokedAt": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"createdAt": {
"type": "string"
},
"updatedAt": {
"type": "string"
},
"numberIds": {
"default": [],
"type": "array",
"items": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
}
}
},
"required": [
"id",
"applicationId",
"workspaceId",
"externalUserId",
"displayName",
"role",
"availability",
"active",
"revokedAt",
"createdAt",
"updatedAt",
"numberIds"
]
}Remove an application user: its devices and credentials are revoked, its tokens stop refreshing, nothing rings it again.
- Scope
devices:*- Credentials
application_key- Workspace
- x-sitecall-workspace-id (or x-sitecall-external-workspace-id with a key)
- Idempotency
- Idempotency-Key required
- Success
- 200
- Errors
{ error: { code, message } }- Retry
- Safe with the same Idempotency-Key
Response 200
{
"type": "object",
"properties": {
"id": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"applicationId": {
"type": "string",
"minLength": 1
},
"workspaceId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"externalUserId": {
"type": "string",
"minLength": 1,
"maxLength": 200
},
"displayName": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"role": {
"anyOf": [
{
"type": "string",
"enum": [
"agent",
"supervisor",
"admin"
]
},
{
"type": "string",
"minLength": 1,
"maxLength": 100
}
]
},
"availability": {
"anyOf": [
{
"type": "string",
"enum": [
"available",
"away",
"offline"
]
},
{
"type": "string",
"minLength": 1,
"maxLength": 100
}
]
},
"active": {
"type": "boolean"
},
"revokedAt": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"createdAt": {
"type": "string"
},
"updatedAt": {
"type": "string"
},
"numberIds": {
"default": [],
"type": "array",
"items": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
}
}
},
"required": [
"id",
"applicationId",
"workspaceId",
"externalUserId",
"displayName",
"role",
"availability",
"active",
"revokedAt",
"createdAt",
"updatedAt",
"numberIds"
]
}Devices
Register (or refresh) the token user's device and its push tokens; registering again is the heartbeat.
- Scope
devices:*- Credentials
user_token- Workspace
- x-sitecall-workspace-id (or x-sitecall-external-workspace-id with a key)
- Idempotency
- Idempotency-Key required
- Success
- 200
- Errors
{ error: { code, message } }- Retry
- Safe with the same Idempotency-Key
Request body
{
"type": "object",
"properties": {
"deviceId": {
"type": "string",
"pattern": "^[A-Za-z0-9_.:-]{1,128}$"
},
"platform": {
"type": "string",
"enum": [
"ios",
"android",
"web"
]
},
"pushToken": {
"type": "string",
"minLength": 16,
"maxLength": 4096
},
"voipToken": {
"type": "string",
"minLength": 16,
"maxLength": 4096
},
"bundleId": {
"type": "string",
"pattern": "^[A-Za-z0-9][A-Za-z0-9.-]{0,154}$"
},
"appVersion": {
"type": "string",
"minLength": 1,
"maxLength": 80
}
},
"required": [
"deviceId",
"platform"
]
}Response 200
{
"type": "object",
"properties": {
"id": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"deviceId": {
"type": "string",
"pattern": "^[A-Za-z0-9_.:-]{1,128}$"
},
"userId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"workspaceId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"platform": {
"type": "string",
"enum": [
"ios",
"android",
"web"
]
},
"bundleId": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"appVersion": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"lastSeenAt": {
"type": "string"
},
"revokedAt": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"createdAt": {
"type": "string"
}
},
"required": [
"id",
"deviceId",
"userId",
"workspaceId",
"platform",
"bundleId",
"appVersion",
"lastSeenAt",
"revokedAt",
"createdAt"
]
}Stop a device ringing (sign-out) and revoke its credential; deviceId is its install id.
- Scope
devices:*- Credentials
user_token- Workspace
- x-sitecall-workspace-id (or x-sitecall-external-workspace-id with a key)
- Idempotency
- Idempotency-Key required
- Success
- 200
- Errors
{ error: { code, message } }- Retry
- Safe with the same Idempotency-Key
Response 200
{
"type": "object",
"properties": {
"id": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"deviceId": {
"type": "string",
"pattern": "^[A-Za-z0-9_.:-]{1,128}$"
},
"userId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"workspaceId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"platform": {
"type": "string",
"enum": [
"ios",
"android",
"web"
]
},
"bundleId": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"appVersion": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"lastSeenAt": {
"type": "string"
},
"revokedAt": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"createdAt": {
"type": "string"
}
},
"required": [
"id",
"deviceId",
"userId",
"workspaceId",
"platform",
"bundleId",
"appVersion",
"lastSeenAt",
"revokedAt",
"createdAt"
]
}The calls ringing this web device now (a web device gets no ring push; poll while registered).
- Scope
calls:*- Credentials
user_token- Workspace
- x-sitecall-workspace-id (or x-sitecall-external-workspace-id with a key)
- Idempotency
- No Idempotency-Key: safe to repeat
- Success
- 200
- Errors
{ error: { code, message } }- Retry
- Safe with the same Idempotency-Key
Response 200
{
"type": "object",
"properties": {
"data": {
"type": "array",
"items": {
"type": "object",
"properties": {
"callId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"workspaceId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"workspaceName": {
"type": "string"
},
"from": {
"type": "string"
},
"callerName": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"expiresAt": {
"type": "string",
"minLength": 1
},
"ringMode": {
"anyOf": [
{
"type": "string",
"enum": [
"ring",
"silent"
]
},
{
"type": "string",
"minLength": 1,
"maxLength": 100
}
]
}
},
"required": [
"callId",
"workspaceId",
"workspaceName",
"from",
"expiresAt",
"ringMode"
]
}
}
},
"required": [
"data"
]
}Credentials
A 30-minute SIP/WebRTC credential for one of the token user's devices (reused while it has 5 minutes left).
- Scope
devices:*- Credentials
user_token- Workspace
- x-sitecall-workspace-id (or x-sitecall-external-workspace-id with a key)
- Idempotency
- No Idempotency-Key: safe to repeat
- Success
- 200
- Errors
{ error: { code, message } }- Retry
- Safe with the same Idempotency-Key
The answer is a secret, so it is never stored for replay: a retry gets the live credential.
Request body
{
"type": "object",
"properties": {
"deviceId": {
"type": "string",
"pattern": "^[A-Za-z0-9_.:-]{1,128}$"
}
},
"required": [
"deviceId"
]
}Response 200
{
"type": "object",
"properties": {
"deviceId": {
"type": "string",
"pattern": "^[A-Za-z0-9_.:-]{1,128}$"
},
"sipUsername": {
"type": "string",
"minLength": 1
},
"sipPassword": {
"type": "string",
"minLength": 1
},
"expiresAt": {
"type": "string",
"minLength": 1
}
},
"required": [
"deviceId",
"sipUsername",
"sipPassword",
"expiresAt"
]
}Routing plans
List routing plans, newest first.
- Scope
routing:*- Credentials
application_key,member_token,user_token- Workspace
- x-sitecall-workspace-id (or x-sitecall-external-workspace-id with a key)
- Idempotency
- No Idempotency-Key: safe to repeat
- Success
- 200 · pages { data, nextCursor }
- Errors
{ error: { code, message } }- Retry
- Safe with the same Idempotency-Key
Query
{
"type": "object",
"properties": {
"limit": {
"type": "integer",
"minimum": 1,
"maximum": 200
},
"cursor": {
"type": "string",
"minLength": 1
}
}
}Response 200
{
"type": "object",
"properties": {
"data": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"name": {
"type": "string"
},
"activeVersionId": {
"anyOf": [
{
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
{
"type": "null"
}
]
},
"latestVersionId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"phoneNumberIds": {
"type": "array",
"items": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
}
},
"createdAt": {
"type": "string",
"minLength": 1
},
"updatedAt": {
"type": "string",
"minLength": 1
}
},
"required": [
"id",
"name",
"activeVersionId",
"latestVersionId",
"phoneNumberIds",
"createdAt",
"updatedAt"
]
}
},
"nextCursor": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
}
},
"required": [
"data",
"nextCursor"
]
}Create a plan and its first version (a draft unless publish); the definition is validated against the workspace.
- Scope
routing:*- Credentials
application_key,member_token,user_token- Workspace
- x-sitecall-workspace-id (or x-sitecall-external-workspace-id with a key)
- Idempotency
- Idempotency-Key required
- Success
- 201
- Errors
{ error: { code, message } }- Retry
- Safe with the same Idempotency-Key
An invalid definition is a 422 invalid_plan whose envelope carries issues.
Request body
{
"type": "object",
"properties": {
"name": {
"type": "string",
"minLength": 1,
"maxLength": 120
},
"definition": {},
"publish": {
"default": false,
"type": "boolean"
}
},
"required": [
"name",
"definition"
],
"additionalProperties": false
}Response 201
{
"type": "object",
"properties": {
"id": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"name": {
"type": "string"
},
"activeVersionId": {
"anyOf": [
{
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
{
"type": "null"
}
]
},
"latestVersionId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"phoneNumberIds": {
"type": "array",
"items": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
}
},
"createdAt": {
"type": "string",
"minLength": 1
},
"updatedAt": {
"type": "string",
"minLength": 1
},
"definition": {},
"publishedDefinition": {
"anyOf": [
{},
{
"type": "null"
}
]
},
"versions": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"createdAt": {
"type": "string",
"minLength": 1
},
"published": {
"type": "boolean"
}
},
"required": [
"id",
"createdAt",
"published"
]
}
}
},
"required": [
"id",
"name",
"activeVersionId",
"latestVersionId",
"phoneNumberIds",
"createdAt",
"updatedAt",
"definition",
"publishedDefinition",
"versions"
]
}Check a definition against the workspace without saving it.
- Scope
routing:*- Credentials
application_key,member_token,user_token- Workspace
- x-sitecall-workspace-id (or x-sitecall-external-workspace-id with a key)
- Idempotency
- No Idempotency-Key: safe to repeat
- Success
- 200
- Errors
{ error: { code, message } }- Retry
- Safe with the same Idempotency-Key
Request body
{
"type": "object",
"properties": {
"definition": {}
},
"required": [
"definition"
],
"additionalProperties": false
}Response 200
{
"type": "object",
"properties": {
"valid": {
"type": "boolean"
},
"issues": {
"type": "array",
"items": {
"type": "object",
"properties": {
"stepId": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"code": {
"type": "string"
},
"message": {
"type": "string"
}
},
"required": [
"stepId",
"code",
"message"
]
}
}
},
"required": [
"valid",
"issues"
]
}Read a plan: its newest and published definitions and its versions.
- Scope
routing:*- Credentials
application_key,member_token,user_token- Workspace
- x-sitecall-workspace-id (or x-sitecall-external-workspace-id with a key)
- Idempotency
- No Idempotency-Key: safe to repeat
- Success
- 200
- Errors
{ error: { code, message } }- Retry
- Safe with the same Idempotency-Key
Response 200
{
"type": "object",
"properties": {
"id": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"name": {
"type": "string"
},
"activeVersionId": {
"anyOf": [
{
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
{
"type": "null"
}
]
},
"latestVersionId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"phoneNumberIds": {
"type": "array",
"items": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
}
},
"createdAt": {
"type": "string",
"minLength": 1
},
"updatedAt": {
"type": "string",
"minLength": 1
},
"definition": {},
"publishedDefinition": {
"anyOf": [
{},
{
"type": "null"
}
]
},
"versions": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"createdAt": {
"type": "string",
"minLength": 1
},
"published": {
"type": "boolean"
}
},
"required": [
"id",
"createdAt",
"published"
]
}
}
},
"required": [
"id",
"name",
"activeVersionId",
"latestVersionId",
"phoneNumberIds",
"createdAt",
"updatedAt",
"definition",
"publishedDefinition",
"versions"
]
}Rename a plan and/or save a new version (a draft unless publish).
- Scope
routing:*- Credentials
application_key,member_token,user_token- Workspace
- x-sitecall-workspace-id (or x-sitecall-external-workspace-id with a key)
- Idempotency
- Idempotency-Key required
- Success
- 200
- Errors
{ error: { code, message } }- Retry
- Safe with the same Idempotency-Key
Request body
{
"type": "object",
"properties": {
"name": {
"type": "string",
"minLength": 1,
"maxLength": 120
},
"definition": {},
"publish": {
"default": false,
"type": "boolean"
}
},
"additionalProperties": false
}Response 200
{
"type": "object",
"properties": {
"id": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"name": {
"type": "string"
},
"activeVersionId": {
"anyOf": [
{
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
{
"type": "null"
}
]
},
"latestVersionId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"phoneNumberIds": {
"type": "array",
"items": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
}
},
"createdAt": {
"type": "string",
"minLength": 1
},
"updatedAt": {
"type": "string",
"minLength": 1
},
"definition": {},
"publishedDefinition": {
"anyOf": [
{},
{
"type": "null"
}
]
},
"versions": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"createdAt": {
"type": "string",
"minLength": 1
},
"published": {
"type": "boolean"
}
},
"required": [
"id",
"createdAt",
"published"
]
}
}
},
"required": [
"id",
"name",
"activeVersionId",
"latestVersionId",
"phoneNumberIds",
"createdAt",
"updatedAt",
"definition",
"publishedDefinition",
"versions"
]
}Archive a plan (409 in_use while a number routes through it).
- Scope
routing:*- Credentials
application_key,member_token,user_token- Workspace
- x-sitecall-workspace-id (or x-sitecall-external-workspace-id with a key)
- Idempotency
- Idempotency-Key required
- Success
- 204
- Errors
{ error: { code, message } }- Retry
- Safe with the same Idempotency-Key
204 No Content
Publish a version (default the newest): new calls run it. It is validated again first.
- Scope
routing:*- Credentials
application_key,member_token,user_token- Workspace
- x-sitecall-workspace-id (or x-sitecall-external-workspace-id with a key)
- Idempotency
- Idempotency-Key required
- Success
- 200
- Errors
{ error: { code, message } }- Retry
- Safe with the same Idempotency-Key
Request body
{
"type": "object",
"properties": {
"versionId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
}
},
"additionalProperties": false
}Response 200
{
"type": "object",
"properties": {
"id": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"name": {
"type": "string"
},
"activeVersionId": {
"anyOf": [
{
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
{
"type": "null"
}
]
},
"latestVersionId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"phoneNumberIds": {
"type": "array",
"items": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
}
},
"createdAt": {
"type": "string",
"minLength": 1
},
"updatedAt": {
"type": "string",
"minLength": 1
},
"definition": {},
"publishedDefinition": {
"anyOf": [
{},
{
"type": "null"
}
]
},
"versions": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"createdAt": {
"type": "string",
"minLength": 1
},
"published": {
"type": "boolean"
}
},
"required": [
"id",
"createdAt",
"published"
]
}
}
},
"required": [
"id",
"name",
"activeVersionId",
"latestVersionId",
"phoneNumberIds",
"createdAt",
"updatedAt",
"definition",
"publishedDefinition",
"versions"
]
}Route a number's calls with this plan (409 not_published until a version is published).
- Scope
routing:*- Credentials
application_key,member_token,user_token- Workspace
- x-sitecall-workspace-id (or x-sitecall-external-workspace-id with a key)
- Idempotency
- Idempotency-Key required
- Success
- 200
- Errors
{ error: { code, message } }- Retry
- Safe with the same Idempotency-Key
Request body
{
"type": "object",
"properties": {
"phoneNumberId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
}
},
"required": [
"phoneNumberId"
],
"additionalProperties": false
}Response 200
{
"type": "object",
"properties": {
"id": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"name": {
"type": "string"
},
"activeVersionId": {
"anyOf": [
{
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
{
"type": "null"
}
]
},
"latestVersionId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"phoneNumberIds": {
"type": "array",
"items": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
}
},
"createdAt": {
"type": "string",
"minLength": 1
},
"updatedAt": {
"type": "string",
"minLength": 1
},
"definition": {},
"publishedDefinition": {
"anyOf": [
{},
{
"type": "null"
}
]
},
"versions": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"createdAt": {
"type": "string",
"minLength": 1
},
"published": {
"type": "boolean"
}
},
"required": [
"id",
"createdAt",
"published"
]
}
}
},
"required": [
"id",
"name",
"activeVersionId",
"latestVersionId",
"phoneNumberIds",
"createdAt",
"updatedAt",
"definition",
"publishedDefinition",
"versions"
]
}Take a number off this plan.
- Scope
routing:*- Credentials
application_key,member_token,user_token- Workspace
- x-sitecall-workspace-id (or x-sitecall-external-workspace-id with a key)
- Idempotency
- Idempotency-Key required
- Success
- 200
- Errors
{ error: { code, message } }- Retry
- Safe with the same Idempotency-Key
Request body
{
"type": "object",
"properties": {
"phoneNumberId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
}
},
"required": [
"phoneNumberId"
],
"additionalProperties": false
}Response 200
{
"type": "object",
"properties": {
"id": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"name": {
"type": "string"
},
"activeVersionId": {
"anyOf": [
{
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
{
"type": "null"
}
]
},
"latestVersionId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"phoneNumberIds": {
"type": "array",
"items": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
}
},
"createdAt": {
"type": "string",
"minLength": 1
},
"updatedAt": {
"type": "string",
"minLength": 1
},
"definition": {},
"publishedDefinition": {
"anyOf": [
{},
{
"type": "null"
}
]
},
"versions": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"createdAt": {
"type": "string",
"minLength": 1
},
"published": {
"type": "boolean"
}
},
"required": [
"id",
"createdAt",
"published"
]
}
}
},
"required": [
"id",
"name",
"activeVersionId",
"latestVersionId",
"phoneNumberIds",
"createdAt",
"updatedAt",
"definition",
"publishedDefinition",
"versions"
]
}Schedules
List business-hours schedules.
- Scope
routing:*- Credentials
application_key,member_token,user_token- Workspace
- x-sitecall-workspace-id (or x-sitecall-external-workspace-id with a key)
- Idempotency
- No Idempotency-Key: safe to repeat
- Success
- 200 · pages { data, nextCursor }
- Errors
{ error: { code, message } }- Retry
- Safe with the same Idempotency-Key
Query
{
"type": "object",
"properties": {
"limit": {
"type": "integer",
"minimum": 1,
"maximum": 200
},
"cursor": {
"type": "string",
"minLength": 1
}
}
}Response 200
{
"type": "object",
"properties": {
"data": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"name": {
"type": "string"
},
"timeZone": {
"type": "string"
},
"weekly": {
"type": "array",
"items": {
"type": "object",
"properties": {
"day": {
"type": "integer",
"minimum": 0,
"maximum": 6
},
"open": {
"type": "string",
"pattern": "^([01]\\d|2[0-3]):[0-5]\\d$"
},
"close": {
"type": "string",
"pattern": "^([01]\\d|2[0-4]):[0-5]\\d$"
}
},
"required": [
"day",
"open",
"close"
]
}
},
"holidays": {
"type": "array",
"items": {
"type": "string",
"pattern": "^\\d{4}-\\d{2}-\\d{2}$"
}
},
"createdAt": {
"type": "string",
"minLength": 1
},
"updatedAt": {
"type": "string",
"minLength": 1
}
},
"required": [
"id",
"name",
"timeZone",
"weekly",
"holidays",
"createdAt",
"updatedAt"
]
}
},
"nextCursor": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
}
},
"required": [
"data",
"nextCursor"
]
}Create a schedule (weekly windows and holidays in a time zone).
- Scope
routing:*- Credentials
application_key,member_token,user_token- Workspace
- x-sitecall-workspace-id (or x-sitecall-external-workspace-id with a key)
- Idempotency
- Idempotency-Key required
- Success
- 201
- Errors
{ error: { code, message } }- Retry
- Safe with the same Idempotency-Key
Request body
{
"type": "object",
"properties": {
"name": {
"type": "string",
"minLength": 1,
"maxLength": 120
},
"timeZone": {
"type": "string",
"minLength": 1,
"maxLength": 100
},
"weekly": {
"default": [],
"maxItems": 50,
"type": "array",
"items": {
"type": "object",
"properties": {
"day": {
"type": "integer",
"minimum": 0,
"maximum": 6
},
"open": {
"type": "string",
"pattern": "^([01]\\d|2[0-3]):[0-5]\\d$"
},
"close": {
"type": "string",
"pattern": "^([01]\\d|2[0-4]):[0-5]\\d$"
}
},
"required": [
"day",
"open",
"close"
],
"additionalProperties": false
}
},
"holidays": {
"default": [],
"maxItems": 366,
"type": "array",
"items": {
"type": "string",
"pattern": "^\\d{4}-\\d{2}-\\d{2}$"
}
}
},
"required": [
"name",
"timeZone"
],
"additionalProperties": false
}Response 201
{
"type": "object",
"properties": {
"id": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"name": {
"type": "string"
},
"timeZone": {
"type": "string"
},
"weekly": {
"type": "array",
"items": {
"type": "object",
"properties": {
"day": {
"type": "integer",
"minimum": 0,
"maximum": 6
},
"open": {
"type": "string",
"pattern": "^([01]\\d|2[0-3]):[0-5]\\d$"
},
"close": {
"type": "string",
"pattern": "^([01]\\d|2[0-4]):[0-5]\\d$"
}
},
"required": [
"day",
"open",
"close"
]
}
},
"holidays": {
"type": "array",
"items": {
"type": "string",
"pattern": "^\\d{4}-\\d{2}-\\d{2}$"
}
},
"createdAt": {
"type": "string",
"minLength": 1
},
"updatedAt": {
"type": "string",
"minLength": 1
}
},
"required": [
"id",
"name",
"timeZone",
"weekly",
"holidays",
"createdAt",
"updatedAt"
]
}Read a schedule.
- Scope
routing:*- Credentials
application_key,member_token,user_token- Workspace
- x-sitecall-workspace-id (or x-sitecall-external-workspace-id with a key)
- Idempotency
- No Idempotency-Key: safe to repeat
- Success
- 200
- Errors
{ error: { code, message } }- Retry
- Safe with the same Idempotency-Key
Response 200
{
"type": "object",
"properties": {
"id": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"name": {
"type": "string"
},
"timeZone": {
"type": "string"
},
"weekly": {
"type": "array",
"items": {
"type": "object",
"properties": {
"day": {
"type": "integer",
"minimum": 0,
"maximum": 6
},
"open": {
"type": "string",
"pattern": "^([01]\\d|2[0-3]):[0-5]\\d$"
},
"close": {
"type": "string",
"pattern": "^([01]\\d|2[0-4]):[0-5]\\d$"
}
},
"required": [
"day",
"open",
"close"
]
}
},
"holidays": {
"type": "array",
"items": {
"type": "string",
"pattern": "^\\d{4}-\\d{2}-\\d{2}$"
}
},
"createdAt": {
"type": "string",
"minLength": 1
},
"updatedAt": {
"type": "string",
"minLength": 1
}
},
"required": [
"id",
"name",
"timeZone",
"weekly",
"holidays",
"createdAt",
"updatedAt"
]
}Change the fields sent.
- Scope
routing:*- Credentials
application_key,member_token,user_token- Workspace
- x-sitecall-workspace-id (or x-sitecall-external-workspace-id with a key)
- Idempotency
- Idempotency-Key required
- Success
- 200
- Errors
{ error: { code, message } }- Retry
- Safe with the same Idempotency-Key
Request body
{
"type": "object",
"properties": {
"name": {
"type": "string",
"minLength": 1,
"maxLength": 120
},
"timeZone": {
"type": "string",
"minLength": 1,
"maxLength": 100
},
"weekly": {
"maxItems": 50,
"type": "array",
"items": {
"type": "object",
"properties": {
"day": {
"type": "integer",
"minimum": 0,
"maximum": 6
},
"open": {
"type": "string",
"pattern": "^([01]\\d|2[0-3]):[0-5]\\d$"
},
"close": {
"type": "string",
"pattern": "^([01]\\d|2[0-4]):[0-5]\\d$"
}
},
"required": [
"day",
"open",
"close"
],
"additionalProperties": false
}
},
"holidays": {
"maxItems": 366,
"type": "array",
"items": {
"type": "string",
"pattern": "^\\d{4}-\\d{2}-\\d{2}$"
}
}
},
"additionalProperties": false
}Response 200
{
"type": "object",
"properties": {
"id": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"name": {
"type": "string"
},
"timeZone": {
"type": "string"
},
"weekly": {
"type": "array",
"items": {
"type": "object",
"properties": {
"day": {
"type": "integer",
"minimum": 0,
"maximum": 6
},
"open": {
"type": "string",
"pattern": "^([01]\\d|2[0-3]):[0-5]\\d$"
},
"close": {
"type": "string",
"pattern": "^([01]\\d|2[0-4]):[0-5]\\d$"
}
},
"required": [
"day",
"open",
"close"
]
}
},
"holidays": {
"type": "array",
"items": {
"type": "string",
"pattern": "^\\d{4}-\\d{2}-\\d{2}$"
}
},
"createdAt": {
"type": "string",
"minLength": 1
},
"updatedAt": {
"type": "string",
"minLength": 1
}
},
"required": [
"id",
"name",
"timeZone",
"weekly",
"holidays",
"createdAt",
"updatedAt"
]
}Delete a schedule (409 in_use while routing uses it).
- Scope
routing:*- Credentials
application_key,member_token,user_token- Workspace
- x-sitecall-workspace-id (or x-sitecall-external-workspace-id with a key)
- Idempotency
- Idempotency-Key required
- Success
- 204
- Errors
{ error: { code, message } }- Retry
- Safe with the same Idempotency-Key
204 No Content
Queues
List call queues with their members and service-level targets.
- Scope
routing:*- Credentials
application_key,member_token,user_token- Workspace
- x-sitecall-workspace-id (or x-sitecall-external-workspace-id with a key)
- Idempotency
- No Idempotency-Key: safe to repeat
- Success
- 200 · pages { data, nextCursor }
- Errors
{ error: { code, message } }- Retry
- Safe with the same Idempotency-Key
Query
{
"type": "object",
"properties": {
"limit": {
"type": "integer",
"minimum": 1,
"maximum": 200
},
"cursor": {
"type": "string",
"minLength": 1
}
}
}Response 200
{
"type": "object",
"properties": {
"data": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"name": {
"type": "string"
},
"maxWaitSecs": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
"wrapUpSecs": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
"requiredSkills": {
"type": "array",
"items": {
"type": "string"
}
},
"awayOnMiss": {
"type": "boolean"
},
"holdAudioUrl": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"supervisionEnabled": {
"type": "boolean"
},
"answerTargetSecs": {
"default": 20,
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
"serviceLevelGoalPct": {
"default": 80,
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
"members": {
"type": "array",
"items": {
"type": "object",
"properties": {
"memberId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"skills": {
"type": "array",
"items": {
"type": "string"
}
},
"priority": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
}
},
"required": [
"memberId",
"skills",
"priority"
]
}
},
"createdAt": {
"type": "string",
"minLength": 1
},
"updatedAt": {
"type": "string",
"minLength": 1
}
},
"required": [
"id",
"name",
"maxWaitSecs",
"wrapUpSecs",
"requiredSkills",
"awayOnMiss",
"holdAudioUrl",
"supervisionEnabled",
"answerTargetSecs",
"serviceLevelGoalPct",
"members",
"createdAt",
"updatedAt"
]
}
},
"nextCursor": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
}
},
"required": [
"data",
"nextCursor"
]
}Create a queue.
- Scope
routing:*- Credentials
application_key,member_token,user_token- Workspace
- x-sitecall-workspace-id (or x-sitecall-external-workspace-id with a key)
- Idempotency
- Idempotency-Key required
- Success
- 201
- Errors
{ error: { code, message } }- Retry
- Safe with the same Idempotency-Key
Request body
{
"type": "object",
"properties": {
"name": {
"type": "string",
"minLength": 1,
"maxLength": 120
},
"maxWaitSecs": {
"default": 300,
"type": "integer",
"minimum": 30,
"maximum": 3600
},
"wrapUpSecs": {
"default": 30,
"type": "integer",
"minimum": 0,
"maximum": 600
},
"requiredSkills": {
"default": [],
"maxItems": 50,
"type": "array",
"items": {
"type": "string",
"minLength": 1,
"maxLength": 60
}
},
"awayOnMiss": {
"default": true,
"type": "boolean"
},
"holdAudioUrl": {
"default": null,
"anyOf": [
{
"type": "string",
"maxLength": 2000,
"pattern": "^https:\\/\\/"
},
{
"type": "null"
}
]
},
"supervisionEnabled": {
"default": false,
"type": "boolean"
},
"members": {
"default": [],
"maxItems": 500,
"type": "array",
"items": {
"type": "object",
"properties": {
"memberId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"skills": {
"default": [],
"maxItems": 50,
"type": "array",
"items": {
"type": "string",
"minLength": 1,
"maxLength": 60
}
},
"priority": {
"default": 100,
"type": "integer",
"minimum": 0,
"maximum": 1000
}
},
"required": [
"memberId"
],
"additionalProperties": false
}
}
},
"required": [
"name"
],
"additionalProperties": false
}Response 201
{
"type": "object",
"properties": {
"id": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"name": {
"type": "string"
},
"maxWaitSecs": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
"wrapUpSecs": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
"requiredSkills": {
"type": "array",
"items": {
"type": "string"
}
},
"awayOnMiss": {
"type": "boolean"
},
"holdAudioUrl": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"supervisionEnabled": {
"type": "boolean"
},
"answerTargetSecs": {
"default": 20,
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
"serviceLevelGoalPct": {
"default": 80,
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
"members": {
"type": "array",
"items": {
"type": "object",
"properties": {
"memberId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"skills": {
"type": "array",
"items": {
"type": "string"
}
},
"priority": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
}
},
"required": [
"memberId",
"skills",
"priority"
]
}
},
"createdAt": {
"type": "string",
"minLength": 1
},
"updatedAt": {
"type": "string",
"minLength": 1
}
},
"required": [
"id",
"name",
"maxWaitSecs",
"wrapUpSecs",
"requiredSkills",
"awayOnMiss",
"holdAudioUrl",
"supervisionEnabled",
"answerTargetSecs",
"serviceLevelGoalPct",
"members",
"createdAt",
"updatedAt"
]
}Read a queue.
- Scope
routing:*- Credentials
application_key,member_token,user_token- Workspace
- x-sitecall-workspace-id (or x-sitecall-external-workspace-id with a key)
- Idempotency
- No Idempotency-Key: safe to repeat
- Success
- 200
- Errors
{ error: { code, message } }- Retry
- Safe with the same Idempotency-Key
Response 200
{
"type": "object",
"properties": {
"id": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"name": {
"type": "string"
},
"maxWaitSecs": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
"wrapUpSecs": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
"requiredSkills": {
"type": "array",
"items": {
"type": "string"
}
},
"awayOnMiss": {
"type": "boolean"
},
"holdAudioUrl": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"supervisionEnabled": {
"type": "boolean"
},
"answerTargetSecs": {
"default": 20,
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
"serviceLevelGoalPct": {
"default": 80,
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
"members": {
"type": "array",
"items": {
"type": "object",
"properties": {
"memberId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"skills": {
"type": "array",
"items": {
"type": "string"
}
},
"priority": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
}
},
"required": [
"memberId",
"skills",
"priority"
]
}
},
"createdAt": {
"type": "string",
"minLength": 1
},
"updatedAt": {
"type": "string",
"minLength": 1
}
},
"required": [
"id",
"name",
"maxWaitSecs",
"wrapUpSecs",
"requiredSkills",
"awayOnMiss",
"holdAudioUrl",
"supervisionEnabled",
"answerTargetSecs",
"serviceLevelGoalPct",
"members",
"createdAt",
"updatedAt"
]
}Change the fields sent; members, when sent, replaces the whole list.
- Scope
routing:*- Credentials
application_key,member_token,user_token- Workspace
- x-sitecall-workspace-id (or x-sitecall-external-workspace-id with a key)
- Idempotency
- Idempotency-Key required
- Success
- 200
- Errors
{ error: { code, message } }- Retry
- Safe with the same Idempotency-Key
Request body
{
"type": "object",
"properties": {
"name": {
"type": "string",
"minLength": 1,
"maxLength": 120
},
"maxWaitSecs": {
"type": "integer",
"minimum": 30,
"maximum": 3600
},
"wrapUpSecs": {
"type": "integer",
"minimum": 0,
"maximum": 600
},
"requiredSkills": {
"maxItems": 50,
"type": "array",
"items": {
"type": "string",
"minLength": 1,
"maxLength": 60
}
},
"awayOnMiss": {
"type": "boolean"
},
"holdAudioUrl": {
"anyOf": [
{
"type": "string",
"maxLength": 2000,
"pattern": "^https:\\/\\/"
},
{
"type": "null"
}
]
},
"supervisionEnabled": {
"type": "boolean"
},
"answerTargetSecs": {
"type": "integer",
"minimum": 5,
"maximum": 600
},
"serviceLevelGoalPct": {
"type": "integer",
"minimum": 1,
"maximum": 100
},
"members": {
"maxItems": 500,
"type": "array",
"items": {
"type": "object",
"properties": {
"memberId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"skills": {
"default": [],
"maxItems": 50,
"type": "array",
"items": {
"type": "string",
"minLength": 1,
"maxLength": 60
}
},
"priority": {
"default": 100,
"type": "integer",
"minimum": 0,
"maximum": 1000
}
},
"required": [
"memberId"
],
"additionalProperties": false
}
}
},
"additionalProperties": false
}Response 200
{
"type": "object",
"properties": {
"id": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"name": {
"type": "string"
},
"maxWaitSecs": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
"wrapUpSecs": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
"requiredSkills": {
"type": "array",
"items": {
"type": "string"
}
},
"awayOnMiss": {
"type": "boolean"
},
"holdAudioUrl": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"supervisionEnabled": {
"type": "boolean"
},
"answerTargetSecs": {
"default": 20,
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
"serviceLevelGoalPct": {
"default": 80,
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
"members": {
"type": "array",
"items": {
"type": "object",
"properties": {
"memberId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"skills": {
"type": "array",
"items": {
"type": "string"
}
},
"priority": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
}
},
"required": [
"memberId",
"skills",
"priority"
]
}
},
"createdAt": {
"type": "string",
"minLength": 1
},
"updatedAt": {
"type": "string",
"minLength": 1
}
},
"required": [
"id",
"name",
"maxWaitSecs",
"wrapUpSecs",
"requiredSkills",
"awayOnMiss",
"holdAudioUrl",
"supervisionEnabled",
"answerTargetSecs",
"serviceLevelGoalPct",
"members",
"createdAt",
"updatedAt"
]
}Delete a queue (409 in_use while a plan routes to it or calls wait in it).
- Scope
routing:*- Credentials
application_key,member_token,user_token- Workspace
- x-sitecall-workspace-id (or x-sitecall-external-workspace-id with a key)
- Idempotency
- Idempotency-Key required
- Success
- 204
- Errors
{ error: { code, message } }- Retry
- Safe with the same Idempotency-Key
204 No Content
AI minutes
The workspace's AI-minute entitlement: cap, usage and period (one cap for every AI provider).
- Scope
routing:*- Credentials
application_key,member_token,user_token- Workspace
- x-sitecall-workspace-id (or x-sitecall-external-workspace-id with a key)
- Idempotency
- No Idempotency-Key: safe to repeat
- Success
- 200
- Errors
{ error: { code, message } }- Retry
- Safe with the same Idempotency-Key
Response 200
{
"type": "object",
"properties": {
"source": {
"anyOf": [
{
"type": "string",
"enum": [
"application",
"subscription"
]
},
{
"type": "string",
"minLength": 1,
"maxLength": 100
}
]
},
"monthlySecondsCap": {
"anyOf": [
{
"type": "integer",
"minimum": 0,
"maximum": 9007199254740991
},
{
"type": "null"
}
]
},
"usedSeconds": {
"type": "number",
"minimum": 0
},
"capReached": {
"type": "boolean"
},
"periodStart": {
"anyOf": [
{
"type": "string",
"minLength": 1
},
{
"type": "null"
}
]
},
"periodEnd": {
"anyOf": [
{
"type": "string",
"minLength": 1
},
{
"type": "null"
}
]
}
},
"required": [
"source",
"monthlySecondsCap",
"usedSeconds",
"capReached",
"periodStart",
"periodEnd"
]
}Set the monthly AI-seconds cap of a workspace your application manages.
- Scope
routing:*- Credentials
application_key- Workspace
- x-sitecall-workspace-id (or x-sitecall-external-workspace-id with a key)
- Idempotency
- Idempotency-Key required
- Success
- 200
- Errors
{ error: { code, message } }- Retry
- Safe with the same Idempotency-Key
Request body
{
"type": "object",
"properties": {
"monthlySecondsCap": {
"type": "integer",
"minimum": 0,
"maximum": 2678400
}
},
"required": [
"monthlySecondsCap"
],
"additionalProperties": false
}Response 200
{
"type": "object",
"properties": {
"source": {
"anyOf": [
{
"type": "string",
"enum": [
"application",
"subscription"
]
},
{
"type": "string",
"minLength": 1,
"maxLength": 100
}
]
},
"monthlySecondsCap": {
"anyOf": [
{
"type": "integer",
"minimum": 0,
"maximum": 9007199254740991
},
{
"type": "null"
}
]
},
"usedSeconds": {
"type": "number",
"minimum": 0
},
"capReached": {
"type": "boolean"
},
"periodStart": {
"anyOf": [
{
"type": "string",
"minLength": 1
},
{
"type": "null"
}
]
},
"periodEnd": {
"anyOf": [
{
"type": "string",
"minLength": 1
},
{
"type": "null"
}
]
}
},
"required": [
"source",
"monthlySecondsCap",
"usedSeconds",
"capReached",
"periodStart",
"periodEnd"
]
}AI agents
List the workspace's AI agents (a plan's ai_answer step names one by id).
- Scope
routing:*- Credentials
application_key,member_token,user_token- Workspace
- x-sitecall-workspace-id (or x-sitecall-external-workspace-id with a key)
- Idempotency
- No Idempotency-Key: safe to repeat
- Success
- 200 · pages { data, nextCursor }
- Errors
{ error: { code, message } }- Retry
- Safe with the same Idempotency-Key
Query
{
"type": "object",
"properties": {
"limit": {
"type": "integer",
"minimum": 1,
"maximum": 200
},
"cursor": {
"type": "string",
"minLength": 1
}
}
}Response 200
{
"type": "object",
"properties": {
"data": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"name": {
"type": "string"
},
"provider": {
"anyOf": [
{
"type": "string",
"enum": [
"sitecall",
"gemini",
"elevenlabs"
]
},
{
"type": "string",
"minLength": 1,
"maxLength": 100
}
]
},
"status": {
"anyOf": [
{
"type": "string",
"enum": [
"draft",
"active",
"paused"
]
},
{
"type": "string",
"minLength": 1,
"maxLength": 100
}
]
},
"createdAt": {
"type": "string",
"minLength": 1
}
},
"required": [
"id",
"name",
"provider",
"status",
"createdAt"
]
}
},
"nextCursor": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
}
},
"required": [
"data",
"nextCursor"
]
}Provision a Gemini receptionist or an ElevenLabs agent.
- Scope
routing:*- Credentials
application_key- Workspace
- x-sitecall-workspace-id (or x-sitecall-external-workspace-id with a key)
- Idempotency
- Idempotency-Key required
- Success
- 201
- Errors
{ error: { code, message } }- Retry
- Safe with the same Idempotency-Key
Request body
{
"type": "object",
"properties": {
"name": {
"type": "string",
"minLength": 1,
"maxLength": 120
},
"provider": {
"type": "string",
"enum": [
"gemini",
"elevenlabs"
]
},
"status": {
"type": "string",
"enum": [
"active",
"paused"
]
}
},
"required": [
"name",
"provider"
],
"additionalProperties": false
}Response 201
{
"type": "object",
"properties": {
"id": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"name": {
"type": "string"
},
"provider": {
"anyOf": [
{
"type": "string",
"enum": [
"sitecall",
"gemini",
"elevenlabs"
]
},
{
"type": "string",
"minLength": 1,
"maxLength": 100
}
]
},
"status": {
"anyOf": [
{
"type": "string",
"enum": [
"draft",
"active",
"paused"
]
},
{
"type": "string",
"minLength": 1,
"maxLength": 100
}
]
},
"createdAt": {
"type": "string",
"minLength": 1
}
},
"required": [
"id",
"name",
"provider",
"status",
"createdAt"
]
}Rename, pause or resume an AI agent (SiteCall's own agents answer 403).
- Scope
routing:*- Credentials
application_key- Workspace
- x-sitecall-workspace-id (or x-sitecall-external-workspace-id with a key)
- Idempotency
- Idempotency-Key required
- Success
- 200
- Errors
{ error: { code, message } }- Retry
- Safe with the same Idempotency-Key
Request body
{
"type": "object",
"properties": {
"name": {
"type": "string",
"minLength": 1,
"maxLength": 120
},
"status": {
"type": "string",
"enum": [
"active",
"paused"
]
}
},
"additionalProperties": false
}Response 200
{
"type": "object",
"properties": {
"id": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"name": {
"type": "string"
},
"provider": {
"anyOf": [
{
"type": "string",
"enum": [
"sitecall",
"gemini",
"elevenlabs"
]
},
{
"type": "string",
"minLength": 1,
"maxLength": 100
}
]
},
"status": {
"anyOf": [
{
"type": "string",
"enum": [
"draft",
"active",
"paused"
]
},
{
"type": "string",
"minLength": 1,
"maxLength": 100
}
]
},
"createdAt": {
"type": "string",
"minLength": 1
}
},
"required": [
"id",
"name",
"provider",
"status",
"createdAt"
]
}Agents
List agents (members and active application users) with their live state.
- Scope
calls:*- Credentials
application_key,member_token,user_token- Workspace
- x-sitecall-workspace-id (or x-sitecall-external-workspace-id with a key)
- Idempotency
- No Idempotency-Key: safe to repeat
- Success
- 200 · pages { data, nextCursor }
- Errors
{ error: { code, message } }- Retry
- Safe with the same Idempotency-Key
Query
{
"type": "object",
"properties": {
"limit": {
"type": "integer",
"minimum": 1,
"maximum": 200
},
"cursor": {
"type": "string",
"minLength": 1
}
}
}Response 200
{
"type": "object",
"properties": {
"data": {
"type": "array",
"items": {
"type": "object",
"properties": {
"memberId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"kind": {
"anyOf": [
{
"type": "string",
"enum": [
"member",
"user"
]
},
{
"type": "string",
"minLength": 1,
"maxLength": 100
}
]
},
"externalUserId": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"role": {
"anyOf": [
{
"type": "string",
"enum": [
"owner",
"admin",
"supervisor",
"agent"
]
},
{
"type": "string",
"minLength": 1,
"maxLength": 100
}
]
},
"state": {
"anyOf": [
{
"type": "string",
"enum": [
"offline",
"available",
"offered",
"on_call",
"wrap_up",
"away"
]
},
{
"type": "string",
"minLength": 1,
"maxLength": 100
}
]
},
"since": {
"anyOf": [
{
"type": "string",
"minLength": 1
},
{
"type": "null"
}
]
},
"lastCallEndedAt": {
"anyOf": [
{
"type": "string",
"minLength": 1
},
{
"type": "null"
}
]
},
"createdAt": {
"type": "string",
"minLength": 1
}
},
"required": [
"memberId",
"role",
"state",
"since",
"lastCallEndedAt",
"createdAt"
]
}
},
"nextCursor": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
}
},
"required": [
"data",
"nextCursor"
]
}Read one agent.
- Scope
calls:*- Credentials
application_key,member_token,user_token- Workspace
- x-sitecall-workspace-id (or x-sitecall-external-workspace-id with a key)
- Idempotency
- No Idempotency-Key: safe to repeat
- Success
- 200
- Errors
{ error: { code, message } }- Retry
- Safe with the same Idempotency-Key
Response 200
{
"type": "object",
"properties": {
"memberId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"kind": {
"anyOf": [
{
"type": "string",
"enum": [
"member",
"user"
]
},
{
"type": "string",
"minLength": 1,
"maxLength": 100
}
]
},
"externalUserId": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"role": {
"anyOf": [
{
"type": "string",
"enum": [
"owner",
"admin",
"supervisor",
"agent"
]
},
{
"type": "string",
"minLength": 1,
"maxLength": 100
}
]
},
"state": {
"anyOf": [
{
"type": "string",
"enum": [
"offline",
"available",
"offered",
"on_call",
"wrap_up",
"away"
]
},
{
"type": "string",
"minLength": 1,
"maxLength": 100
}
]
},
"since": {
"anyOf": [
{
"type": "string",
"minLength": 1
},
{
"type": "null"
}
]
},
"lastCallEndedAt": {
"anyOf": [
{
"type": "string",
"minLength": 1
},
{
"type": "null"
}
]
},
"createdAt": {
"type": "string",
"minLength": 1
}
},
"required": [
"memberId",
"role",
"state",
"since",
"lastCallEndedAt",
"createdAt"
]
}Set an agent available, away or offline (system states such as on_call stay).
- Scope
calls:*+calls:supervisewithapplication_key;calls:*withmember_token- Credentials
application_key,member_token- Workspace
- x-sitecall-workspace-id (or x-sitecall-external-workspace-id with a key)
- Idempotency
- Idempotency-Key required
- Success
- 200
- Errors
{ error: { code, message } }- Retry
- Safe with the same Idempotency-Key
A member sets their own state with calls:*; setting anyone else's, an application key included, needs calls:supervise.
Request body
{
"type": "object",
"properties": {
"state": {
"type": "string",
"enum": [
"available",
"away",
"offline"
]
}
},
"required": [
"state"
],
"additionalProperties": false
}Response 200
{
"type": "object",
"properties": {
"memberId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"changed": {
"type": "boolean"
},
"state": {
"anyOf": [
{
"type": "string",
"enum": [
"offline",
"available",
"offered",
"on_call",
"wrap_up",
"away"
]
},
{
"type": "string",
"minLength": 1,
"maxLength": 100
}
]
},
"previous": {
"anyOf": [
{
"anyOf": [
{
"type": "string",
"enum": [
"offline",
"available",
"offered",
"on_call",
"wrap_up",
"away"
]
},
{
"type": "string",
"minLength": 1,
"maxLength": 100
}
]
},
{
"type": "null"
}
]
},
"deferred": {
"type": "boolean"
},
"stuck": {
"type": "boolean"
}
},
"required": [
"memberId",
"changed",
"state",
"previous"
]
}Calls
List calls, newest first; state=live|ended filters.
- Scope
calls:*- Credentials
application_key,member_token,user_token- Workspace
- x-sitecall-workspace-id (or x-sitecall-external-workspace-id with a key)
- Idempotency
- No Idempotency-Key: safe to repeat
- Success
- 200 · pages { data, nextCursor }
- Errors
{ error: { code, message } }- Retry
- Safe with the same Idempotency-Key
Query
{
"type": "object",
"properties": {
"limit": {
"type": "integer",
"minimum": 1,
"maximum": 200
},
"cursor": {
"type": "string",
"minLength": 1
},
"state": {
"type": "string",
"enum": [
"live",
"ended"
]
}
}
}Response 200
{
"type": "object",
"properties": {
"data": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"direction": {
"anyOf": [
{
"type": "string",
"enum": [
"inbound",
"outbound"
]
},
{
"type": "string",
"minLength": 1,
"maxLength": 100
}
]
},
"from": {
"type": "string"
},
"to": {
"type": "string"
},
"phoneNumberId": {
"anyOf": [
{
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
{
"type": "null"
}
]
},
"state": {
"anyOf": [
{
"type": "string",
"enum": [
"initiated",
"routing",
"queued",
"offering",
"connected",
"voicemail",
"ended"
]
},
{
"type": "string",
"minLength": 1,
"maxLength": 100
}
]
},
"endReason": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"createdAt": {
"type": "string",
"minLength": 1
},
"answeredAt": {
"anyOf": [
{
"type": "string",
"minLength": 1
},
{
"type": "null"
}
]
},
"endedAt": {
"anyOf": [
{
"type": "string",
"minLength": 1
},
{
"type": "null"
}
]
}
},
"required": [
"id",
"direction",
"from",
"to",
"phoneNumberId",
"state",
"endReason",
"createdAt",
"answeredAt",
"endedAt"
]
}
},
"nextCursor": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
}
},
"required": [
"data",
"nextCursor"
]
}Read a call with its legs.
- Scope
calls:*- Credentials
application_key,member_token,user_token- Workspace
- x-sitecall-workspace-id (or x-sitecall-external-workspace-id with a key)
- Idempotency
- No Idempotency-Key: safe to repeat
- Success
- 200
- Errors
{ error: { code, message } }- Retry
- Safe with the same Idempotency-Key
Response 200
{
"type": "object",
"properties": {
"id": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"direction": {
"anyOf": [
{
"type": "string",
"enum": [
"inbound",
"outbound"
]
},
{
"type": "string",
"minLength": 1,
"maxLength": 100
}
]
},
"from": {
"type": "string"
},
"to": {
"type": "string"
},
"phoneNumberId": {
"anyOf": [
{
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
{
"type": "null"
}
]
},
"state": {
"anyOf": [
{
"type": "string",
"enum": [
"initiated",
"routing",
"queued",
"offering",
"connected",
"voicemail",
"ended"
]
},
{
"type": "string",
"minLength": 1,
"maxLength": 100
}
]
},
"endReason": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"createdAt": {
"type": "string",
"minLength": 1
},
"answeredAt": {
"anyOf": [
{
"type": "string",
"minLength": 1
},
{
"type": "null"
}
]
},
"endedAt": {
"anyOf": [
{
"type": "string",
"minLength": 1
},
{
"type": "null"
}
]
},
"legs": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"role": {
"anyOf": [
{
"type": "string",
"enum": [
"caller",
"agent",
"cell",
"forward",
"ai",
"consult",
"supervisor",
"callee"
]
},
{
"type": "string",
"minLength": 1,
"maxLength": 100
}
]
},
"state": {
"anyOf": [
{
"type": "string",
"enum": [
"dialing",
"ringing",
"answered",
"confirmed",
"bridged",
"ended"
]
},
{
"type": "string",
"minLength": 1,
"maxLength": 100
}
]
},
"memberId": {
"anyOf": [
{
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
{
"type": "null"
}
]
},
"deviceId": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"createdAt": {
"type": "string",
"minLength": 1
},
"answeredAt": {
"anyOf": [
{
"type": "string",
"minLength": 1
},
{
"type": "null"
}
]
},
"endedAt": {
"anyOf": [
{
"type": "string",
"minLength": 1
},
{
"type": "null"
}
]
}
},
"required": [
"id",
"role",
"state",
"memberId",
"deviceId",
"createdAt",
"answeredAt",
"endedAt"
]
}
}
},
"required": [
"id",
"direction",
"from",
"to",
"phoneNumberId",
"state",
"endReason",
"createdAt",
"answeredAt",
"endedAt",
"legs"
]
}Place an outbound call: the engine rings the agent's device first, then the destination.
- Scope
calls:*- Credentials
application_key,member_token,user_token- Workspace
- x-sitecall-workspace-id (or x-sitecall-external-workspace-id with a key)
- Idempotency
- Idempotency-Key required
- Success
- 201, 200
- Errors
{ error: { code, message } }- Retry
- Safe with the same Idempotency-Key
A token's own subject is the agent; an application key names agent (a member or an application user). The call id is callId, else derived from the Idempotency-Key, and every refusal after it is fixed carries callId beside the envelope.
Request body
{
"type": "object",
"properties": {
"callId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"to": {
"type": "string",
"minLength": 1,
"maxLength": 40
},
"from": {
"anyOf": [
{
"type": "object",
"properties": {
"phoneNumberId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
}
},
"required": [
"phoneNumberId"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"e164": {
"type": "string",
"pattern": "^\\+[1-9]\\d{7,14}$"
}
},
"required": [
"e164"
],
"additionalProperties": false
}
]
},
"agent": {
"anyOf": [
{
"type": "object",
"properties": {
"memberId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"deviceId": {
"type": "string",
"pattern": "^[A-Za-z0-9_.:-]{1,128}$"
}
},
"required": [
"memberId"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"externalUserId": {
"type": "string",
"minLength": 1,
"maxLength": 255
},
"deviceId": {
"type": "string",
"pattern": "^[A-Za-z0-9_.:-]{1,128}$"
}
},
"required": [
"externalUserId"
],
"additionalProperties": false
}
]
},
"deviceId": {
"type": "string",
"pattern": "^[A-Za-z0-9_.:-]{1,128}$"
},
"machineDetection": {
"default": "off",
"type": "string",
"enum": [
"premium",
"off"
]
}
},
"required": [
"to",
"from"
],
"additionalProperties": false
}Response 201
{
"type": "object",
"properties": {
"mode": {
"type": "string",
"const": "server_originated"
},
"callId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"from": {
"type": "string",
"pattern": "^\\+[1-9]\\d{7,14}$"
},
"to": {
"anyOf": [
{
"type": "string",
"pattern": "^\\+[1-9]\\d{7,14}$"
},
{
"type": "string",
"enum": [
"911",
"933"
]
}
]
},
"callToken": {
"type": "string",
"minLength": 1
},
"agentAnswerDeadlineAt": {
"type": "string",
"format": "date-time",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
}
},
"required": [
"mode",
"callId",
"from",
"to"
]
}Hang up a call (no body).
- Scope
calls:*- Credentials
application_key,member_token,user_token- Workspace
- x-sitecall-workspace-id (or x-sitecall-external-workspace-id with a key)
- Idempotency
- Idempotency-Key required
- Success
- 202, 200
- Errors
{ error: { code, message } }- Retry
- Safe with the same Idempotency-Key
202: the engine has the command (200 when the same command was already accepted); the outcome arrives as events.
Response 202
{
"type": "object",
"properties": {
"accepted": {
"type": "boolean",
"const": true
},
"commandId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"duplicate": {
"type": "boolean"
}
},
"required": [
"accepted",
"commandId",
"duplicate"
]
}Transfer a call to a number, a queue or a member, blind or warm.
- Scope
calls:*- Credentials
application_key,member_token,user_token- Workspace
- x-sitecall-workspace-id (or x-sitecall-external-workspace-id with a key)
- Idempotency
- Idempotency-Key required
- Success
- 202, 200
- Errors
{ error: { code, message } }- Retry
- Safe with the same Idempotency-Key
Request body
{
"type": "object",
"properties": {
"target": {
"anyOf": [
{
"type": "object",
"properties": {
"e164": {
"type": "string",
"pattern": "^\\+[1-9]\\d{7,14}$"
}
},
"required": [
"e164"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"queueId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
}
},
"required": [
"queueId"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"memberId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
}
},
"required": [
"memberId"
],
"additionalProperties": false
}
]
},
"warm": {
"default": false,
"type": "boolean"
}
},
"required": [
"target"
],
"additionalProperties": false
}Response 202
{
"type": "object",
"properties": {
"accepted": {
"type": "boolean",
"const": true
},
"commandId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"duplicate": {
"type": "boolean"
}
},
"required": [
"accepted",
"commandId",
"duplicate"
]
}Hold a call: the remote party hears hold audio, and so does the agent's leg (hold it locally too).
- Scope
calls:*- Credentials
application_key,member_token,user_token- Workspace
- x-sitecall-workspace-id (or x-sitecall-external-workspace-id with a key)
- Idempotency
- Idempotency-Key required
- Success
- 202, 200
- Errors
{ error: { code, message } }- Retry
- Safe with the same Idempotency-Key
Response 202
{
"type": "object",
"properties": {
"accepted": {
"type": "boolean",
"const": true
},
"commandId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"duplicate": {
"type": "boolean"
}
},
"required": [
"accepted",
"commandId",
"duplicate"
]
}Resume a held call, holding the device's other call first (one active leg per device).
- Scope
calls:*- Credentials
application_key,member_token,user_token- Workspace
- x-sitecall-workspace-id (or x-sitecall-external-workspace-id with a key)
- Idempotency
- Idempotency-Key required
- Success
- 202, 200
- Errors
{ error: { code, message } }- Retry
- Safe with the same Idempotency-Key
409 device_busy: a call on the device cannot be held now (mid transfer, still being set up); nothing changed.
Response 202
{
"type": "object",
"properties": {
"accepted": {
"type": "boolean",
"const": true
},
"commandId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"duplicate": {
"type": "boolean"
}
},
"required": [
"accepted",
"commandId",
"duplicate"
]
}Swap the device's live and held calls.
- Scope
calls:*- Credentials
application_key,member_token,user_token- Workspace
- x-sitecall-workspace-id (or x-sitecall-external-workspace-id with a key)
- Idempotency
- Idempotency-Key required
- Success
- 202, 200
- Errors
{ error: { code, message } }- Retry
- Safe with the same Idempotency-Key
Response 202
{
"type": "object",
"properties": {
"accepted": {
"type": "boolean",
"const": true
},
"commandId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"duplicate": {
"type": "boolean"
}
},
"required": [
"accepted",
"commandId",
"duplicate"
]
}Dial a supervisor in to listen, whisper or barge, or change a supervisor leg's role.
- Scope
calls:supervise- Credentials
application_key,member_token- Workspace
- x-sitecall-workspace-id (or x-sitecall-external-workspace-id with a key)
- Idempotency
- Idempotency-Key required
- Success
- 202, 200
- Errors
{ error: { code, message } }- Retry
- Safe with the same Idempotency-Key
Request body
{
"type": "object",
"properties": {
"role": {
"type": "string",
"enum": [
"monitor",
"whisper",
"barge"
]
},
"supervisorMemberId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"deviceId": {
"type": "string",
"pattern": "^[A-Za-z0-9_.:-]{1,128}$"
},
"supervisorLegId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
}
},
"required": [
"role"
],
"additionalProperties": false
}Response 202
{
"type": "object",
"properties": {
"accepted": {
"type": "boolean",
"const": true
},
"commandId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"duplicate": {
"type": "boolean"
}
},
"required": [
"accepted",
"commandId",
"duplicate"
]
}Answer a ringing call on the token user's device; SiteCall hands it to the device's credential.
- Scope
calls:*- Credentials
user_token- Workspace
- x-sitecall-workspace-id (or x-sitecall-external-workspace-id with a key)
- Idempotency
- Idempotency-Key required
- Success
- 200
- Errors
{ error: { code, message } }- Retry
- Safe with the same Idempotency-Key
409 agent_unreachable: the device's credential expires within 30 s; mint a new one, then retry.
Request body
{
"type": "object",
"properties": {
"deviceId": {
"type": "string",
"pattern": "^[A-Za-z0-9_.:-]{1,128}$"
}
},
"required": [
"deviceId"
],
"additionalProperties": false
}Response 200
{
"type": "object",
"properties": {
"accepted": {
"type": "boolean",
"const": true
},
"callId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"deviceId": {
"type": "string"
}
},
"required": [
"accepted",
"callId",
"deviceId"
]
}Decline a ringing call for this user.
- Scope
calls:*- Credentials
user_token- Workspace
- x-sitecall-workspace-id (or x-sitecall-external-workspace-id with a key)
- Idempotency
- Idempotency-Key required
- Success
- 200
- Errors
{ error: { code, message } }- Retry
- Safe with the same Idempotency-Key
Request body
{
"type": "object",
"properties": {
"deviceId": {
"type": "string",
"pattern": "^[A-Za-z0-9_.:-]{1,128}$"
}
},
"required": [
"deviceId"
],
"additionalProperties": false
}Response 200
{
"type": "object",
"properties": {
"accepted": {
"type": "boolean",
"const": true
},
"callId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"deviceId": {
"type": "string"
}
},
"required": [
"accepted",
"callId",
"deviceId"
]
}Recordings
List recordings (call recordings and voicemails); callId filters.
- Scope
media:read- Credentials
application_key,member_token,user_token- Workspace
- x-sitecall-workspace-id (or x-sitecall-external-workspace-id with a key)
- Idempotency
- No Idempotency-Key: safe to repeat
- Success
- 200 · pages { data, nextCursor }
- Errors
{ error: { code, message } }- Retry
- Safe with the same Idempotency-Key
Query
{
"type": "object",
"properties": {
"limit": {
"type": "integer",
"minimum": 1,
"maximum": 200
},
"cursor": {
"type": "string",
"minLength": 1
},
"callId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
}
}
}Response 200
{
"type": "object",
"properties": {
"data": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"callId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"kind": {
"anyOf": [
{
"type": "string",
"enum": [
"voicemail",
"call"
]
},
{
"type": "string",
"minLength": 1,
"maxLength": 100
}
]
},
"durationSecs": {
"anyOf": [
{
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
{
"type": "null"
}
]
},
"createdAt": {
"type": "string",
"minLength": 1
}
},
"required": [
"id",
"callId",
"kind",
"durationSecs",
"createdAt"
]
}
},
"nextCursor": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
}
},
"required": [
"data",
"nextCursor"
]
}Read a recording.
- Scope
media:read- Credentials
application_key,member_token,user_token- Workspace
- x-sitecall-workspace-id (or x-sitecall-external-workspace-id with a key)
- Idempotency
- No Idempotency-Key: safe to repeat
- Success
- 200
- Errors
{ error: { code, message } }- Retry
- Safe with the same Idempotency-Key
Response 200
{
"type": "object",
"properties": {
"id": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"callId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"kind": {
"anyOf": [
{
"type": "string",
"enum": [
"voicemail",
"call"
]
},
{
"type": "string",
"minLength": 1,
"maxLength": 100
}
]
},
"durationSecs": {
"anyOf": [
{
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
{
"type": "null"
}
]
},
"createdAt": {
"type": "string",
"minLength": 1
}
},
"required": [
"id",
"callId",
"kind",
"durationSecs",
"createdAt"
]
}A short-lived (about 15 minutes) download URL for the audio.
- Scope
media:read- Credentials
application_key,member_token,user_token- Workspace
- x-sitecall-workspace-id (or x-sitecall-external-workspace-id with a key)
- Idempotency
- No Idempotency-Key: safe to repeat
- Success
- 200
- Errors
{ error: { code, message } }- Retry
- Safe with the same Idempotency-Key
Response 200
{
"type": "object",
"properties": {
"url": {
"type": "string",
"format": "uri"
},
"expiresAt": {
"type": "string",
"minLength": 1
}
},
"required": [
"url",
"expiresAt"
]
}Delete a recording: SiteCall's audio (and an imported recording's original) first, then the row.
- Scope
calls:*- Credentials
application_key- Workspace
- x-sitecall-workspace-id (or x-sitecall-external-workspace-id with a key)
- Idempotency
- Idempotency-Key required
- Success
- 200
- Errors
{ error: { code, message } }- Retry
- Safe with the same Idempotency-Key
404 only when the workspace holds no such recording. Any gateway failure is a 503: retry with the same Idempotency-Key.
Response 200
{
"type": "object",
"properties": {
"id": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"deleted": {
"type": "boolean",
"const": true
}
},
"required": [
"id",
"deleted"
]
}Voicemails
List voicemails, newest first.
- Scope
media:read- Credentials
application_key,member_token,user_token- Workspace
- x-sitecall-workspace-id (or x-sitecall-external-workspace-id with a key)
- Idempotency
- No Idempotency-Key: safe to repeat
- Success
- 200 · pages { data, nextCursor }
- Errors
{ error: { code, message } }- Retry
- Safe with the same Idempotency-Key
Query
{
"type": "object",
"properties": {
"limit": {
"type": "integer",
"minimum": 1,
"maximum": 200
},
"cursor": {
"type": "string",
"minLength": 1
}
}
}Response 200
{
"type": "object",
"properties": {
"data": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"callId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"recordingId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"from": {
"type": "string"
},
"durationSecs": {
"anyOf": [
{
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
{
"type": "null"
}
]
},
"heardAt": {
"anyOf": [
{
"type": "string",
"minLength": 1
},
{
"type": "null"
}
]
},
"createdAt": {
"type": "string",
"minLength": 1
}
},
"required": [
"id",
"callId",
"recordingId",
"from",
"durationSecs",
"heardAt",
"createdAt"
]
}
},
"nextCursor": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
}
},
"required": [
"data",
"nextCursor"
]
}Read a voicemail.
- Scope
media:read- Credentials
application_key,member_token,user_token- Workspace
- x-sitecall-workspace-id (or x-sitecall-external-workspace-id with a key)
- Idempotency
- No Idempotency-Key: safe to repeat
- Success
- 200
- Errors
{ error: { code, message } }- Retry
- Safe with the same Idempotency-Key
Response 200
{
"type": "object",
"properties": {
"id": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"callId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"recordingId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"from": {
"type": "string"
},
"durationSecs": {
"anyOf": [
{
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
{
"type": "null"
}
]
},
"heardAt": {
"anyOf": [
{
"type": "string",
"minLength": 1
},
{
"type": "null"
}
]
},
"createdAt": {
"type": "string",
"minLength": 1
}
},
"required": [
"id",
"callId",
"recordingId",
"from",
"durationSecs",
"heardAt",
"createdAt"
]
}A short-lived download URL for the voicemail's audio.
- Scope
media:read- Credentials
application_key,member_token,user_token- Workspace
- x-sitecall-workspace-id (or x-sitecall-external-workspace-id with a key)
- Idempotency
- No Idempotency-Key: safe to repeat
- Success
- 200
- Errors
{ error: { code, message } }- Retry
- Safe with the same Idempotency-Key
Response 200
{
"type": "object",
"properties": {
"url": {
"type": "string",
"format": "uri"
},
"expiresAt": {
"type": "string",
"minLength": 1
}
},
"required": [
"url",
"expiresAt"
]
}Transcripts
List transcripts with their status (no text); one per recording, callId filters.
- Scope
media:read- Credentials
application_key,member_token,user_token- Workspace
- x-sitecall-workspace-id (or x-sitecall-external-workspace-id with a key)
- Idempotency
- No Idempotency-Key: safe to repeat
- Success
- 200 · pages { data, nextCursor }
- Errors
{ error: { code, message } }- Retry
- Safe with the same Idempotency-Key
Query
{
"type": "object",
"properties": {
"limit": {
"type": "integer",
"minimum": 1,
"maximum": 200
},
"cursor": {
"type": "string",
"minLength": 1
},
"callId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
}
}
}Response 200
{
"type": "object",
"properties": {
"data": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"callId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"recordingId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"kind": {
"anyOf": [
{
"type": "string",
"enum": [
"call",
"voicemail"
]
},
{
"type": "string",
"minLength": 1,
"maxLength": 100
}
]
},
"status": {
"anyOf": [
{
"type": "string",
"enum": [
"pending",
"processing",
"completed",
"empty",
"failed"
]
},
{
"type": "string",
"minLength": 1,
"maxLength": 100
}
]
},
"language": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"durationSecs": {
"anyOf": [
{
"type": "number",
"minimum": 0
},
{
"type": "null"
}
]
},
"model": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"createdAt": {
"type": "string",
"minLength": 1
},
"completedAt": {
"anyOf": [
{
"type": "string",
"minLength": 1
},
{
"type": "null"
}
]
}
},
"required": [
"id",
"callId",
"recordingId",
"kind",
"status",
"language",
"durationSecs",
"model",
"createdAt",
"completedAt"
]
}
},
"nextCursor": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
}
},
"required": [
"data",
"nextCursor"
]
}Read a transcript: the text, per-party segments in time order, and channels.
- Scope
media:read- Credentials
application_key,member_token,user_token- Workspace
- x-sitecall-workspace-id (or x-sitecall-external-workspace-id with a key)
- Idempotency
- No Idempotency-Key: safe to repeat
- Success
- 200
- Errors
{ error: { code, message } }- Retry
- Safe with the same Idempotency-Key
Response 200
{
"type": "object",
"properties": {
"id": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"callId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"recordingId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"kind": {
"anyOf": [
{
"type": "string",
"enum": [
"call",
"voicemail"
]
},
{
"type": "string",
"minLength": 1,
"maxLength": 100
}
]
},
"status": {
"anyOf": [
{
"type": "string",
"enum": [
"pending",
"processing",
"completed",
"empty",
"failed"
]
},
{
"type": "string",
"minLength": 1,
"maxLength": 100
}
]
},
"language": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"durationSecs": {
"anyOf": [
{
"type": "number",
"minimum": 0
},
{
"type": "null"
}
]
},
"model": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"createdAt": {
"type": "string",
"minLength": 1
},
"completedAt": {
"anyOf": [
{
"type": "string",
"minLength": 1
},
{
"type": "null"
}
]
},
"text": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"segments": {
"type": "array",
"items": {
"type": "object",
"properties": {
"channel": {
"type": "integer",
"minimum": 0,
"maximum": 9007199254740991
},
"speaker": {
"type": "string"
},
"start": {
"type": "number",
"minimum": 0
},
"end": {
"type": "number",
"minimum": 0
},
"text": {
"type": "string"
}
},
"required": [
"start",
"end",
"text"
]
}
},
"channels": {
"type": "array",
"items": {
"type": "object",
"properties": {
"channel": {
"type": "integer",
"minimum": 0,
"maximum": 9007199254740991
},
"party": {
"anyOf": [
{
"type": "string",
"enum": [
"external",
"workspace"
]
},
{
"type": "string",
"minLength": 1,
"maxLength": 100
}
]
},
"address": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
}
},
"required": [
"channel",
"party",
"address"
]
}
}
},
"required": [
"id",
"callId",
"recordingId",
"kind",
"status",
"language",
"durationSecs",
"model",
"createdAt",
"completedAt",
"text",
"segments",
"channels"
]
}Messages
Send one SMS or MMS from a workspace number or the application's system sender.
- Scope
messages:*- Credentials
application_key- Workspace
- x-sitecall-workspace-id (or x-sitecall-external-workspace-id with a key)
- Idempotency
- Idempotency-Key required
- Success
- 202
- Errors
{ error: { code, message } }- Retry
- Safe with the same Idempotency-Key
The message id derives from the Idempotency-Key, so a retry is the same message, never a second text. Progress arrives as message.status events; every refusal after the id is fixed carries messageId.
Request body
{
"type": "object",
"properties": {
"to": {
"type": "string",
"pattern": "^\\+[1-9]\\d{7,14}$"
},
"from": {
"anyOf": [
{
"type": "object",
"properties": {
"phoneNumberId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
}
},
"required": [
"phoneNumberId"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"e164": {
"type": "string",
"pattern": "^\\+[1-9]\\d{7,14}$"
}
},
"required": [
"e164"
],
"additionalProperties": false
}
]
},
"sender": {
"type": "string",
"const": "system"
},
"externalUserId": {
"type": "string",
"minLength": 1,
"maxLength": 200
},
"text": {
"type": "string",
"maxLength": 1600
},
"media": {
"maxItems": 10,
"type": "array",
"items": {
"type": "object",
"properties": {
"url": {
"type": "string",
"maxLength": 2000,
"format": "uri"
}
},
"required": [
"url"
],
"additionalProperties": false
}
}
},
"required": [
"to"
],
"additionalProperties": false
}Response 202
{
"type": "object",
"properties": {
"id": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"status": {
"type": "string",
"minLength": 1
},
"from": {
"type": "string",
"pattern": "^\\+[1-9]\\d{7,14}$"
},
"to": {
"type": "string",
"pattern": "^\\+[1-9]\\d{7,14}$"
},
"phoneNumberId": {
"anyOf": [
{
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
{
"type": "null"
}
]
}
},
"required": [
"id",
"status",
"from",
"to",
"phoneNumberId"
]
}List messages, newest first; filter by number or conversation.
- Scope
messages:*- Credentials
application_key- Workspace
- x-sitecall-workspace-id (or x-sitecall-external-workspace-id with a key)
- Idempotency
- No Idempotency-Key: safe to repeat
- Success
- 200 · pages { data, nextCursor }
- Errors
{ error: { code, message } }- Retry
- Safe with the same Idempotency-Key
Query
{
"type": "object",
"properties": {
"limit": {
"type": "integer",
"minimum": 1,
"maximum": 200
},
"cursor": {
"type": "string",
"minLength": 1
},
"phoneNumberId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"conversationId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
}
}
}Response 200
{
"type": "object",
"properties": {
"data": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"conversationId": {
"anyOf": [
{
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
{
"type": "null"
}
]
},
"phoneNumberId": {
"anyOf": [
{
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
{
"type": "null"
}
]
},
"direction": {
"anyOf": [
{
"type": "string",
"enum": [
"inbound",
"outbound"
]
},
{
"type": "string",
"minLength": 1,
"maxLength": 100
}
]
},
"from": {
"type": "string",
"minLength": 1
},
"to": {
"type": "string",
"minLength": 1
},
"text": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"media": {
"type": "array",
"items": {
"type": "object",
"properties": {
"index": {
"type": "integer",
"minimum": 0,
"maximum": 9007199254740991
},
"contentType": {
"type": "string",
"minLength": 1
},
"path": {
"type": "string"
},
"sourceUrl": {
"type": "string"
}
},
"required": [
"index",
"contentType"
]
}
},
"status": {
"anyOf": [
{
"type": "string",
"enum": [
"queued",
"sent",
"delivered",
"failed",
"received"
]
},
{
"type": "string",
"minLength": 1,
"maxLength": 100
}
]
},
"errorCode": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"createdAt": {
"type": "string",
"minLength": 1
}
},
"required": [
"id",
"conversationId",
"phoneNumberId",
"direction",
"from",
"to",
"text",
"media",
"status",
"errorCode",
"createdAt"
]
}
},
"nextCursor": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
}
},
"required": [
"data",
"nextCursor"
]
}Read a message.
- Scope
messages:*- Credentials
application_key- Workspace
- x-sitecall-workspace-id (or x-sitecall-external-workspace-id with a key)
- Idempotency
- No Idempotency-Key: safe to repeat
- Success
- 200
- Errors
{ error: { code, message } }- Retry
- Safe with the same Idempotency-Key
Response 200
{
"type": "object",
"properties": {
"id": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"conversationId": {
"anyOf": [
{
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
{
"type": "null"
}
]
},
"phoneNumberId": {
"anyOf": [
{
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
{
"type": "null"
}
]
},
"direction": {
"anyOf": [
{
"type": "string",
"enum": [
"inbound",
"outbound"
]
},
{
"type": "string",
"minLength": 1,
"maxLength": 100
}
]
},
"from": {
"type": "string",
"minLength": 1
},
"to": {
"type": "string",
"minLength": 1
},
"text": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"media": {
"type": "array",
"items": {
"type": "object",
"properties": {
"index": {
"type": "integer",
"minimum": 0,
"maximum": 9007199254740991
},
"contentType": {
"type": "string",
"minLength": 1
},
"path": {
"type": "string"
},
"sourceUrl": {
"type": "string"
}
},
"required": [
"index",
"contentType"
]
}
},
"status": {
"anyOf": [
{
"type": "string",
"enum": [
"queued",
"sent",
"delivered",
"failed",
"received"
]
},
{
"type": "string",
"minLength": 1,
"maxLength": 100
}
]
},
"errorCode": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"createdAt": {
"type": "string",
"minLength": 1
}
},
"required": [
"id",
"conversationId",
"phoneNumberId",
"direction",
"from",
"to",
"text",
"media",
"status",
"errorCode",
"createdAt"
]
}A 15-minute download link for one stored attachment.
- Scope
media:read- Credentials
application_key- Workspace
- x-sitecall-workspace-id (or x-sitecall-external-workspace-id with a key)
- Idempotency
- No Idempotency-Key: safe to repeat
- Success
- 200
- Errors
{ error: { code, message } }- Retry
- Safe with the same Idempotency-Key
Response 200
{
"type": "object",
"properties": {
"url": {
"type": "string",
"format": "uri"
},
"expiresAt": {
"type": "string",
"minLength": 1
},
"contentType": {
"type": "string",
"minLength": 1
}
},
"required": [
"url",
"expiresAt",
"contentType"
]
}Team metrics
Team performance numbers per workspace, agent, queue or number over workspace-local days.
- Scope
metrics:read- Credentials
application_key,member_token- Workspace
- x-sitecall-workspace-id (or x-sitecall-external-workspace-id with a key)
- Idempotency
- No Idempotency-Key: safe to repeat
- Success
- 200 · pages { data, nextCursor }
- Errors
{ error: { code, message } }- Retry
- Safe with the same Idempotency-Key
An application key reads the whole workspace; a member's token reads as that member (an agent sees only their own row). A cursor belongs to its date range.
Query
{
"type": "object",
"properties": {
"limit": {
"type": "integer",
"minimum": 1,
"maximum": 200
},
"cursor": {
"type": "string",
"minLength": 1
},
"from": {
"type": "string",
"pattern": "^\\d{4}-\\d{2}-\\d{2}$"
},
"to": {
"type": "string",
"pattern": "^\\d{4}-\\d{2}-\\d{2}$"
},
"days": {
"type": "integer",
"minimum": 1,
"maximum": 366
},
"dimension": {
"type": "string",
"enum": [
"workspace",
"agent",
"queue",
"number"
]
},
"id": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
}
}
}Response 200
{
"type": "object",
"properties": {
"from": {
"type": "string",
"pattern": "^\\d{4}-\\d{2}-\\d{2}$"
},
"to": {
"type": "string",
"pattern": "^\\d{4}-\\d{2}-\\d{2}$"
},
"timeZone": {
"type": "string"
},
"dimension": {
"anyOf": [
{
"type": "string",
"enum": [
"workspace",
"agent",
"queue",
"number"
]
},
{
"type": "string",
"minLength": 1,
"maxLength": 100
}
]
},
"data": {
"type": "array",
"items": {
"type": "object",
"properties": {
"dimension": {
"anyOf": [
{
"type": "string",
"enum": [
"workspace",
"agent",
"queue",
"number"
]
},
{
"type": "string",
"minLength": 1,
"maxLength": 100
}
]
},
"dimensionId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"days": {
"type": "integer",
"minimum": 0,
"maximum": 9007199254740991
},
"refreshedAt": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"metrics": {
"type": "object",
"propertyNames": {
"type": "string"
},
"additionalProperties": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
}
},
"subject": {
"anyOf": [
{
"type": "object",
"properties": {
"kind": {
"anyOf": [
{
"type": "string",
"enum": [
"workspace",
"member",
"application_user",
"queue",
"number"
]
},
{
"type": "string",
"minLength": 1,
"maxLength": 100
}
]
},
"name": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"e164": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"externalUserId": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
}
},
"required": [
"kind",
"name",
"e164",
"externalUserId"
]
},
{
"type": "null"
}
]
}
},
"required": [
"dimension",
"dimensionId",
"days",
"refreshedAt",
"metrics",
"subject"
]
}
},
"nextCursor": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
}
},
"required": [
"from",
"to",
"timeZone",
"dimension",
"data",
"nextCursor"
]
}Offers nobody answered, newest first (the first 500 of the range).
- Scope
metrics:read- Credentials
application_key,member_token- Workspace
- x-sitecall-workspace-id (or x-sitecall-external-workspace-id with a key)
- Idempotency
- No Idempotency-Key: safe to repeat
- Success
- 200 · pages { data, nextCursor }
- Errors
{ error: { code, message } }- Retry
- Safe with the same Idempotency-Key
Query
{
"type": "object",
"properties": {
"limit": {
"type": "integer",
"minimum": 1,
"maximum": 200
},
"cursor": {
"type": "string",
"minLength": 1
},
"from": {
"type": "string",
"pattern": "^\\d{4}-\\d{2}-\\d{2}$"
},
"to": {
"type": "string",
"pattern": "^\\d{4}-\\d{2}-\\d{2}$"
},
"days": {
"type": "integer",
"minimum": 1,
"maximum": 366
},
"memberId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
}
}
}Response 200
{
"type": "object",
"properties": {
"from": {
"type": "string",
"pattern": "^\\d{4}-\\d{2}-\\d{2}$"
},
"to": {
"type": "string",
"pattern": "^\\d{4}-\\d{2}-\\d{2}$"
},
"data": {
"type": "array",
"items": {
"type": "object",
"properties": {
"offerId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"source": {
"type": "string"
},
"callId": {
"anyOf": [
{
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
{
"type": "null"
}
]
},
"memberId": {
"anyOf": [
{
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
{
"type": "null"
}
]
},
"queueId": {
"anyOf": [
{
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
{
"type": "null"
}
]
},
"phoneNumberId": {
"anyOf": [
{
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
{
"type": "null"
}
]
},
"fromE164": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"offeredAt": {
"type": "string"
},
"resolvedAt": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"whileAvailable": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "null"
}
]
}
},
"required": [
"offerId",
"source",
"callId",
"memberId",
"queueId",
"phoneNumberId",
"fromE164",
"offeredAt",
"resolvedAt",
"whileAvailable"
]
}
},
"nextCursor": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
}
},
"required": [
"from",
"to",
"data",
"nextCursor"
]
}Callers still waiting for a call back, longest waiting first.
- Scope
metrics:read- Credentials
application_key,member_token- Workspace
- x-sitecall-workspace-id (or x-sitecall-external-workspace-id with a key)
- Idempotency
- No Idempotency-Key: safe to repeat
- Success
- 200 · pages { data, nextCursor }
- Errors
{ error: { code, message } }- Retry
- Safe with the same Idempotency-Key
Query
{
"type": "object",
"properties": {
"limit": {
"type": "integer",
"minimum": 1,
"maximum": 200
},
"cursor": {
"type": "string",
"minLength": 1
},
"from": {
"type": "string",
"pattern": "^\\d{4}-\\d{2}-\\d{2}$"
},
"to": {
"type": "string",
"pattern": "^\\d{4}-\\d{2}-\\d{2}$"
},
"days": {
"type": "integer",
"minimum": 1,
"maximum": 366
},
"phoneNumberId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
}
}
}Response 200
{
"type": "object",
"properties": {
"from": {
"type": "string",
"pattern": "^\\d{4}-\\d{2}-\\d{2}$"
},
"to": {
"type": "string",
"pattern": "^\\d{4}-\\d{2}-\\d{2}$"
},
"data": {
"type": "array",
"items": {
"type": "object",
"properties": {
"fromE164": {
"type": "string"
},
"missedCalls": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
"voicemail": {
"type": "boolean"
},
"phoneNumberId": {
"anyOf": [
{
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
{
"type": "null"
}
]
},
"lastCallId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"firstMissedAt": {
"type": "string"
},
"lastMissedAt": {
"type": "string"
},
"waitingSecs": {
"type": "number"
}
},
"required": [
"fromE164",
"missedCalls",
"voicemail",
"phoneNumberId",
"lastCallId",
"firstMissedAt",
"lastMissedAt",
"waitingSecs"
]
}
},
"nextCursor": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
}
},
"required": [
"from",
"to",
"data",
"nextCursor"
]
}Text threads waiting for a person's reply, longest waiting first.
- Scope
metrics:read- Credentials
application_key,member_token- Workspace
- x-sitecall-workspace-id (or x-sitecall-external-workspace-id with a key)
- Idempotency
- No Idempotency-Key: safe to repeat
- Success
- 200 · pages { data, nextCursor }
- Errors
{ error: { code, message } }- Retry
- Safe with the same Idempotency-Key
Query
{
"type": "object",
"properties": {
"limit": {
"type": "integer",
"minimum": 1,
"maximum": 200
},
"cursor": {
"type": "string",
"minLength": 1
},
"phoneNumberId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
}
}
}Response 200
{
"type": "object",
"properties": {
"data": {
"type": "array",
"items": {
"type": "object",
"properties": {
"conversationId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"phoneNumberId": {
"anyOf": [
{
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
{
"type": "null"
}
]
},
"externalE164": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"waitingSince": {
"type": "string"
},
"waitingSecs": {
"type": "number"
}
},
"required": [
"conversationId",
"phoneNumberId",
"externalE164",
"waitingSince",
"waitingSecs"
]
}
},
"nextCursor": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
}
},
"required": [
"data",
"nextCursor"
]
}Emergency locations
Set a dispatchable location for the workspace, a member, an application user or one device.
- Scope
devices:*- Credentials
application_key,member_token,user_token- Workspace
- x-sitecall-workspace-id (or x-sitecall-external-workspace-id with a key)
- Idempotency
- Idempotency-Key required
- Success
- 200
- Errors
{ error: { code, message } }- Retry
- Safe with the same Idempotency-Key
The address is validated by the carrier first; an address it cannot validate is a 422 emergency_address_invalid. A token sets only its own subject's locations.
Request body
{
"type": "object",
"properties": {
"target": {
"oneOf": [
{
"type": "object",
"properties": {
"kind": {
"type": "string",
"const": "workspace"
}
},
"required": [
"kind"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"kind": {
"type": "string",
"const": "member"
},
"memberId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
}
},
"required": [
"kind"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"kind": {
"type": "string",
"const": "user"
},
"userId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
}
},
"required": [
"kind"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"kind": {
"type": "string",
"const": "device"
},
"deviceId": {
"type": "string",
"pattern": "^[A-Za-z0-9_.:-]{1,128}$"
},
"memberId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"userId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
}
},
"required": [
"kind",
"deviceId"
],
"additionalProperties": false
}
]
},
"address": {
"type": "object",
"properties": {
"streetAddress": {
"type": "string",
"minLength": 3,
"maxLength": 200,
"pattern": "^\\d"
},
"extendedAddress": {
"type": "string",
"minLength": 1,
"maxLength": 60
},
"locality": {
"type": "string",
"minLength": 1,
"maxLength": 100
},
"administrativeArea": {
"type": "string",
"pattern": "^[A-Za-z]{2}$"
},
"postalCode": {
"type": "string",
"pattern": "^[A-Za-z0-9 -]{3,10}$"
},
"countryCode": {
"type": "string",
"enum": [
"US",
"CA",
"PR"
]
}
},
"required": [
"streetAddress",
"locality",
"administrativeArea",
"postalCode",
"countryCode"
],
"additionalProperties": false
},
"callbackNumber": {
"type": "string",
"pattern": "^\\+[1-9]\\d{7,14}$"
},
"callerName": {
"type": "string",
"minLength": 1,
"maxLength": 50
}
},
"required": [
"target",
"address"
],
"additionalProperties": false
}Response 200
{
"type": "object",
"properties": {
"id": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"workspaceId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"target": {
"anyOf": [
{
"type": "object",
"properties": {
"kind": {
"type": "string",
"const": "workspace"
}
},
"required": [
"kind"
]
},
{
"type": "object",
"properties": {
"kind": {
"type": "string",
"const": "member"
},
"memberId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
}
},
"required": [
"kind",
"memberId"
]
},
{
"type": "object",
"properties": {
"kind": {
"type": "string",
"const": "user"
},
"userId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"externalUserId": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
}
},
"required": [
"kind",
"userId"
]
},
{
"type": "object",
"properties": {
"kind": {
"type": "string",
"const": "device"
},
"deviceId": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"registryDeviceId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
}
},
"required": [
"kind",
"deviceId"
]
},
{
"type": "object",
"properties": {
"kind": {
"type": "string",
"minLength": 1,
"maxLength": 100
}
},
"required": [
"kind"
],
"additionalProperties": {}
}
]
},
"address": {
"type": "object",
"properties": {
"streetAddress": {
"type": "string",
"minLength": 3,
"maxLength": 200,
"pattern": "^\\d"
},
"extendedAddress": {
"type": "string",
"minLength": 1,
"maxLength": 60
},
"locality": {
"type": "string",
"minLength": 1,
"maxLength": 100
},
"administrativeArea": {
"type": "string",
"pattern": "^[A-Za-z]{2}$"
},
"postalCode": {
"type": "string",
"pattern": "^[A-Za-z0-9 -]{3,10}$"
},
"countryCode": {
"type": "string",
"enum": [
"US",
"CA",
"PR"
]
}
},
"required": [
"streetAddress",
"locality",
"administrativeArea",
"postalCode",
"countryCode"
]
},
"callbackNumber": {
"type": "string",
"pattern": "^\\+[1-9]\\d{7,14}$"
},
"callerName": {
"type": "string"
},
"providerStatus": {
"anyOf": [
{
"type": "string",
"enum": [
"not_provisioned",
"pending",
"activated",
"rejected",
"error"
]
},
{
"type": "string",
"minLength": 1,
"maxLength": 100
}
]
},
"source": {
"anyOf": [
{
"type": "string",
"enum": [
"typed",
"business_profile"
]
},
{
"type": "string",
"minLength": 1,
"maxLength": 100
}
]
},
"dispatchable": {
"type": "boolean"
},
"routesWithLocation": {
"type": "boolean"
},
"validatedAt": {
"type": "string",
"minLength": 1
},
"createdAt": {
"type": "string",
"minLength": 1
},
"updatedAt": {
"type": "string",
"minLength": 1
}
},
"required": [
"id",
"workspaceId",
"target",
"address",
"callbackNumber",
"callerName",
"providerStatus",
"dispatchable",
"routesWithLocation",
"validatedAt",
"createdAt",
"updatedAt"
]
}List the workspace's stored locations.
- Scope
devices:*- Credentials
application_key- Workspace
- x-sitecall-workspace-id (or x-sitecall-external-workspace-id with a key)
- Idempotency
- No Idempotency-Key: safe to repeat
- Success
- 200
- Errors
{ error: { code, message } }- Retry
- Safe with the same Idempotency-Key
Response 200
{
"type": "object",
"properties": {
"data": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"workspaceId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"target": {
"anyOf": [
{
"type": "object",
"properties": {
"kind": {
"type": "string",
"const": "workspace"
}
},
"required": [
"kind"
]
},
{
"type": "object",
"properties": {
"kind": {
"type": "string",
"const": "member"
},
"memberId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
}
},
"required": [
"kind",
"memberId"
]
},
{
"type": "object",
"properties": {
"kind": {
"type": "string",
"const": "user"
},
"userId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"externalUserId": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
}
},
"required": [
"kind",
"userId"
]
},
{
"type": "object",
"properties": {
"kind": {
"type": "string",
"const": "device"
},
"deviceId": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"registryDeviceId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
}
},
"required": [
"kind",
"deviceId"
]
},
{
"type": "object",
"properties": {
"kind": {
"type": "string",
"minLength": 1,
"maxLength": 100
}
},
"required": [
"kind"
],
"additionalProperties": {}
}
]
},
"address": {
"type": "object",
"properties": {
"streetAddress": {
"type": "string",
"minLength": 3,
"maxLength": 200,
"pattern": "^\\d"
},
"extendedAddress": {
"type": "string",
"minLength": 1,
"maxLength": 60
},
"locality": {
"type": "string",
"minLength": 1,
"maxLength": 100
},
"administrativeArea": {
"type": "string",
"pattern": "^[A-Za-z]{2}$"
},
"postalCode": {
"type": "string",
"pattern": "^[A-Za-z0-9 -]{3,10}$"
},
"countryCode": {
"type": "string",
"enum": [
"US",
"CA",
"PR"
]
}
},
"required": [
"streetAddress",
"locality",
"administrativeArea",
"postalCode",
"countryCode"
]
},
"callbackNumber": {
"type": "string",
"pattern": "^\\+[1-9]\\d{7,14}$"
},
"callerName": {
"type": "string"
},
"providerStatus": {
"anyOf": [
{
"type": "string",
"enum": [
"not_provisioned",
"pending",
"activated",
"rejected",
"error"
]
},
{
"type": "string",
"minLength": 1,
"maxLength": 100
}
]
},
"source": {
"anyOf": [
{
"type": "string",
"enum": [
"typed",
"business_profile"
]
},
{
"type": "string",
"minLength": 1,
"maxLength": 100
}
]
},
"dispatchable": {
"type": "boolean"
},
"routesWithLocation": {
"type": "boolean"
},
"validatedAt": {
"type": "string",
"minLength": 1
},
"createdAt": {
"type": "string",
"minLength": 1
},
"updatedAt": {
"type": "string",
"minLength": 1
}
},
"required": [
"id",
"workspaceId",
"target",
"address",
"callbackNumber",
"callerName",
"providerStatus",
"dispatchable",
"routesWithLocation",
"validatedAt",
"createdAt",
"updatedAt"
]
}
},
"nextCursor": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
}
},
"required": [
"data",
"nextCursor"
]
}The location one endpoint resolves to, and whether it may place outbound calls.
- Scope
devices:*- Credentials
application_key,member_token,user_token- Workspace
- x-sitecall-workspace-id (or x-sitecall-external-workspace-id with a key)
- Idempotency
- No Idempotency-Key: safe to repeat
- Success
- 200
- Errors
{ error: { code, message } }- Retry
- Safe with the same Idempotency-Key
Query
{
"type": "object",
"properties": {
"deviceId": {
"type": "string",
"pattern": "^[A-Za-z0-9_.:-]{1,128}$"
},
"memberId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"userId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
}
}
}Response 200
{
"type": "object",
"properties": {
"location": {
"anyOf": [
{
"type": "object",
"properties": {
"id": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"workspaceId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"target": {
"anyOf": [
{
"type": "object",
"properties": {
"kind": {
"type": "string",
"const": "workspace"
}
},
"required": [
"kind"
]
},
{
"type": "object",
"properties": {
"kind": {
"type": "string",
"const": "member"
},
"memberId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
}
},
"required": [
"kind",
"memberId"
]
},
{
"type": "object",
"properties": {
"kind": {
"type": "string",
"const": "user"
},
"userId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"externalUserId": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
}
},
"required": [
"kind",
"userId"
]
},
{
"type": "object",
"properties": {
"kind": {
"type": "string",
"const": "device"
},
"deviceId": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"registryDeviceId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
}
},
"required": [
"kind",
"deviceId"
]
},
{
"type": "object",
"properties": {
"kind": {
"type": "string",
"minLength": 1,
"maxLength": 100
}
},
"required": [
"kind"
],
"additionalProperties": {}
}
]
},
"address": {
"type": "object",
"properties": {
"streetAddress": {
"type": "string",
"minLength": 3,
"maxLength": 200,
"pattern": "^\\d"
},
"extendedAddress": {
"type": "string",
"minLength": 1,
"maxLength": 60
},
"locality": {
"type": "string",
"minLength": 1,
"maxLength": 100
},
"administrativeArea": {
"type": "string",
"pattern": "^[A-Za-z]{2}$"
},
"postalCode": {
"type": "string",
"pattern": "^[A-Za-z0-9 -]{3,10}$"
},
"countryCode": {
"type": "string",
"enum": [
"US",
"CA",
"PR"
]
}
},
"required": [
"streetAddress",
"locality",
"administrativeArea",
"postalCode",
"countryCode"
]
},
"callbackNumber": {
"type": "string",
"pattern": "^\\+[1-9]\\d{7,14}$"
},
"callerName": {
"type": "string"
},
"providerStatus": {
"anyOf": [
{
"type": "string",
"enum": [
"not_provisioned",
"pending",
"activated",
"rejected",
"error"
]
},
{
"type": "string",
"minLength": 1,
"maxLength": 100
}
]
},
"source": {
"anyOf": [
{
"type": "string",
"enum": [
"typed",
"business_profile"
]
},
{
"type": "string",
"minLength": 1,
"maxLength": 100
}
]
},
"dispatchable": {
"type": "boolean"
},
"routesWithLocation": {
"type": "boolean"
},
"validatedAt": {
"type": "string",
"minLength": 1
},
"createdAt": {
"type": "string",
"minLength": 1
},
"updatedAt": {
"type": "string",
"minLength": 1
}
},
"required": [
"id",
"workspaceId",
"target",
"address",
"callbackNumber",
"callerName",
"providerStatus",
"dispatchable",
"routesWithLocation",
"validatedAt",
"createdAt",
"updatedAt"
]
},
{
"type": "null"
}
]
},
"outboundEnabled": {
"type": "boolean"
},
"routingEnabled": {
"type": "boolean"
}
},
"required": [
"location",
"outboundEnabled",
"routingEnabled"
]
}Remove a stored location override.
- Scope
devices:*- Credentials
application_key,member_token,user_token- Workspace
- x-sitecall-workspace-id (or x-sitecall-external-workspace-id with a key)
- Idempotency
- Idempotency-Key required
- Success
- 204
- Errors
{ error: { code, message } }- Retry
- Safe with the same Idempotency-Key
204 No Content
Webhooks
List the application's webhook endpoints.
- Scope
webhooks:*- Credentials
application_key- Workspace
- Optional: a workspace header narrows
- Idempotency
- No Idempotency-Key: safe to repeat
- Success
- 200
- Errors
{ error: { code, message } }- Retry
- Safe with the same Idempotency-Key
Response 200
{
"type": "object",
"properties": {
"data": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"applicationId": {
"type": "string",
"minLength": 1,
"pattern": "^[a-z][a-z0-9_-]{1,63}$"
},
"url": {
"type": "string"
},
"description": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"eventTypes": {
"anyOf": [
{
"type": "array",
"items": {
"type": "string",
"enum": [
"call.started",
"call.ringing",
"call.answered",
"call.connected",
"call.transferred",
"call.ended",
"queue.entered",
"queue.left",
"agent.state_changed",
"recording.ready",
"transcript.ready",
"voicemail.ready",
"message.received",
"message.status",
"number.updated"
]
}
},
{
"type": "null"
}
]
},
"enabled": {
"type": "boolean"
},
"secretRotatedAt": {
"anyOf": [
{
"type": "string",
"format": "date-time",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
},
{
"type": "null"
}
]
},
"previousSecretExpiresAt": {
"anyOf": [
{
"type": "string",
"format": "date-time",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
},
{
"type": "null"
}
]
},
"createdAt": {
"type": "string",
"format": "date-time",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
},
"updatedAt": {
"type": "string",
"format": "date-time",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
},
"deliveries": {
"type": "object",
"properties": {
"pending": {
"type": "integer",
"minimum": 0,
"maximum": 9007199254740991
},
"parked": {
"type": "integer",
"minimum": 0,
"maximum": 9007199254740991
},
"lastDeliveredAt": {
"anyOf": [
{
"type": "string",
"format": "date-time",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
},
{
"type": "null"
}
]
},
"lastError": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
}
},
"required": [
"pending",
"parked",
"lastDeliveredAt",
"lastError"
]
}
},
"required": [
"id",
"applicationId",
"url",
"description",
"eventTypes",
"enabled",
"secretRotatedAt",
"previousSecretExpiresAt",
"createdAt",
"updatedAt"
]
}
},
"nextCursor": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
}
},
"required": [
"data",
"nextCursor"
]
}Register an https endpoint (all event types unless eventTypes); the signing secret is shown once.
- Scope
webhooks:*- Credentials
application_key- Workspace
- Optional: a workspace header narrows
- Idempotency
- Idempotency-Key required
- Success
- 201
- Errors
{ error: { code, message } }- Retry
- Safe with the same Idempotency-Key
Request body
{
"type": "object",
"properties": {
"url": {
"type": "string"
},
"description": {
"type": "string",
"maxLength": 200
},
"eventTypes": {
"minItems": 1,
"maxItems": 15,
"type": "array",
"items": {
"type": "string",
"enum": [
"call.started",
"call.ringing",
"call.answered",
"call.connected",
"call.transferred",
"call.ended",
"queue.entered",
"queue.left",
"agent.state_changed",
"recording.ready",
"transcript.ready",
"voicemail.ready",
"message.received",
"message.status",
"number.updated"
]
}
},
"enabled": {
"type": "boolean"
}
},
"required": [
"url"
],
"additionalProperties": false
}Response 201
{
"type": "object",
"properties": {
"endpoint": {
"type": "object",
"properties": {
"id": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"applicationId": {
"type": "string",
"minLength": 1,
"pattern": "^[a-z][a-z0-9_-]{1,63}$"
},
"url": {
"type": "string"
},
"description": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"eventTypes": {
"anyOf": [
{
"type": "array",
"items": {
"type": "string",
"enum": [
"call.started",
"call.ringing",
"call.answered",
"call.connected",
"call.transferred",
"call.ended",
"queue.entered",
"queue.left",
"agent.state_changed",
"recording.ready",
"transcript.ready",
"voicemail.ready",
"message.received",
"message.status",
"number.updated"
]
}
},
{
"type": "null"
}
]
},
"enabled": {
"type": "boolean"
},
"secretRotatedAt": {
"anyOf": [
{
"type": "string",
"format": "date-time",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
},
{
"type": "null"
}
]
},
"previousSecretExpiresAt": {
"anyOf": [
{
"type": "string",
"format": "date-time",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
},
{
"type": "null"
}
]
},
"createdAt": {
"type": "string",
"format": "date-time",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
},
"updatedAt": {
"type": "string",
"format": "date-time",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
},
"deliveries": {
"type": "object",
"properties": {
"pending": {
"type": "integer",
"minimum": 0,
"maximum": 9007199254740991
},
"parked": {
"type": "integer",
"minimum": 0,
"maximum": 9007199254740991
},
"lastDeliveredAt": {
"anyOf": [
{
"type": "string",
"format": "date-time",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
},
{
"type": "null"
}
]
},
"lastError": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
}
},
"required": [
"pending",
"parked",
"lastDeliveredAt",
"lastError"
]
}
},
"required": [
"id",
"applicationId",
"url",
"description",
"eventTypes",
"enabled",
"secretRotatedAt",
"previousSecretExpiresAt",
"createdAt",
"updatedAt"
]
},
"signingSecret": {
"type": "string",
"pattern": "^whsec_[A-Za-z0-9_-]{43}$"
}
},
"required": [
"endpoint",
"signingSecret"
]
}Read an endpoint with its delivery counts (pending, parked, last error).
- Scope
webhooks:*- Credentials
application_key- Workspace
- Optional: a workspace header narrows
- Idempotency
- No Idempotency-Key: safe to repeat
- Success
- 200
- Errors
{ error: { code, message } }- Retry
- Safe with the same Idempotency-Key
Response 200
{
"type": "object",
"properties": {
"id": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"applicationId": {
"type": "string",
"minLength": 1,
"pattern": "^[a-z][a-z0-9_-]{1,63}$"
},
"url": {
"type": "string"
},
"description": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"eventTypes": {
"anyOf": [
{
"type": "array",
"items": {
"type": "string",
"enum": [
"call.started",
"call.ringing",
"call.answered",
"call.connected",
"call.transferred",
"call.ended",
"queue.entered",
"queue.left",
"agent.state_changed",
"recording.ready",
"transcript.ready",
"voicemail.ready",
"message.received",
"message.status",
"number.updated"
]
}
},
{
"type": "null"
}
]
},
"enabled": {
"type": "boolean"
},
"secretRotatedAt": {
"anyOf": [
{
"type": "string",
"format": "date-time",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
},
{
"type": "null"
}
]
},
"previousSecretExpiresAt": {
"anyOf": [
{
"type": "string",
"format": "date-time",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
},
{
"type": "null"
}
]
},
"createdAt": {
"type": "string",
"format": "date-time",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
},
"updatedAt": {
"type": "string",
"format": "date-time",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
},
"deliveries": {
"type": "object",
"properties": {
"pending": {
"type": "integer",
"minimum": 0,
"maximum": 9007199254740991
},
"parked": {
"type": "integer",
"minimum": 0,
"maximum": 9007199254740991
},
"lastDeliveredAt": {
"anyOf": [
{
"type": "string",
"format": "date-time",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
},
{
"type": "null"
}
]
},
"lastError": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
}
},
"required": [
"pending",
"parked",
"lastDeliveredAt",
"lastError"
]
}
},
"required": [
"id",
"applicationId",
"url",
"description",
"eventTypes",
"enabled",
"secretRotatedAt",
"previousSecretExpiresAt",
"createdAt",
"updatedAt"
]
}Change the URL, description, event types or enabled flag.
- Scope
webhooks:*- Credentials
application_key- Workspace
- Optional: a workspace header narrows
- Idempotency
- No Idempotency-Key: safe to repeat
- Success
- 200
- Errors
{ error: { code, message } }- Retry
- Safe with the same Idempotency-Key
Request body
{
"type": "object",
"properties": {
"url": {
"type": "string"
},
"description": {
"anyOf": [
{
"type": "string",
"maxLength": 200
},
{
"type": "null"
}
]
},
"eventTypes": {
"anyOf": [
{
"minItems": 1,
"maxItems": 15,
"type": "array",
"items": {
"type": "string",
"enum": [
"call.started",
"call.ringing",
"call.answered",
"call.connected",
"call.transferred",
"call.ended",
"queue.entered",
"queue.left",
"agent.state_changed",
"recording.ready",
"transcript.ready",
"voicemail.ready",
"message.received",
"message.status",
"number.updated"
]
}
},
{
"type": "null"
}
]
},
"enabled": {
"type": "boolean"
}
},
"additionalProperties": false
}Response 200
{
"type": "object",
"properties": {
"id": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"applicationId": {
"type": "string",
"minLength": 1,
"pattern": "^[a-z][a-z0-9_-]{1,63}$"
},
"url": {
"type": "string"
},
"description": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"eventTypes": {
"anyOf": [
{
"type": "array",
"items": {
"type": "string",
"enum": [
"call.started",
"call.ringing",
"call.answered",
"call.connected",
"call.transferred",
"call.ended",
"queue.entered",
"queue.left",
"agent.state_changed",
"recording.ready",
"transcript.ready",
"voicemail.ready",
"message.received",
"message.status",
"number.updated"
]
}
},
{
"type": "null"
}
]
},
"enabled": {
"type": "boolean"
},
"secretRotatedAt": {
"anyOf": [
{
"type": "string",
"format": "date-time",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
},
{
"type": "null"
}
]
},
"previousSecretExpiresAt": {
"anyOf": [
{
"type": "string",
"format": "date-time",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
},
{
"type": "null"
}
]
},
"createdAt": {
"type": "string",
"format": "date-time",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
},
"updatedAt": {
"type": "string",
"format": "date-time",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
},
"deliveries": {
"type": "object",
"properties": {
"pending": {
"type": "integer",
"minimum": 0,
"maximum": 9007199254740991
},
"parked": {
"type": "integer",
"minimum": 0,
"maximum": 9007199254740991
},
"lastDeliveredAt": {
"anyOf": [
{
"type": "string",
"format": "date-time",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
},
{
"type": "null"
}
]
},
"lastError": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
}
},
"required": [
"pending",
"parked",
"lastDeliveredAt",
"lastError"
]
}
},
"required": [
"id",
"applicationId",
"url",
"description",
"eventTypes",
"enabled",
"secretRotatedAt",
"previousSecretExpiresAt",
"createdAt",
"updatedAt"
]
}Delete an endpoint; its pending deliveries stop.
- Scope
webhooks:*- Credentials
application_key- Workspace
- Optional: a workspace header narrows
- Idempotency
- No Idempotency-Key: safe to repeat
- Success
- 204
- Errors
{ error: { code, message } }- Retry
- Safe with the same Idempotency-Key
204 No Content
Issue a new signing secret; the outgoing one keeps signing too for overlapSeconds (default 24 h).
- Scope
webhooks:*- Credentials
application_key- Workspace
- Optional: a workspace header narrows
- Idempotency
- Idempotency-Key required
- Success
- 200
- Errors
{ error: { code, message } }- Retry
- Safe with the same Idempotency-Key
Request body
{
"type": "object",
"properties": {
"overlapSeconds": {
"type": "integer",
"minimum": 0,
"maximum": 604800
}
},
"additionalProperties": false
}Response 200
{
"type": "object",
"properties": {
"endpoint": {
"type": "object",
"properties": {
"id": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"applicationId": {
"type": "string",
"minLength": 1,
"pattern": "^[a-z][a-z0-9_-]{1,63}$"
},
"url": {
"type": "string"
},
"description": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"eventTypes": {
"anyOf": [
{
"type": "array",
"items": {
"type": "string",
"enum": [
"call.started",
"call.ringing",
"call.answered",
"call.connected",
"call.transferred",
"call.ended",
"queue.entered",
"queue.left",
"agent.state_changed",
"recording.ready",
"transcript.ready",
"voicemail.ready",
"message.received",
"message.status",
"number.updated"
]
}
},
{
"type": "null"
}
]
},
"enabled": {
"type": "boolean"
},
"secretRotatedAt": {
"anyOf": [
{
"type": "string",
"format": "date-time",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
},
{
"type": "null"
}
]
},
"previousSecretExpiresAt": {
"anyOf": [
{
"type": "string",
"format": "date-time",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
},
{
"type": "null"
}
]
},
"createdAt": {
"type": "string",
"format": "date-time",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
},
"updatedAt": {
"type": "string",
"format": "date-time",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
},
"deliveries": {
"type": "object",
"properties": {
"pending": {
"type": "integer",
"minimum": 0,
"maximum": 9007199254740991
},
"parked": {
"type": "integer",
"minimum": 0,
"maximum": 9007199254740991
},
"lastDeliveredAt": {
"anyOf": [
{
"type": "string",
"format": "date-time",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
},
{
"type": "null"
}
]
},
"lastError": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
}
},
"required": [
"pending",
"parked",
"lastDeliveredAt",
"lastError"
]
}
},
"required": [
"id",
"applicationId",
"url",
"description",
"eventTypes",
"enabled",
"secretRotatedAt",
"previousSecretExpiresAt",
"createdAt",
"updatedAt"
]
},
"signingSecret": {
"type": "string",
"pattern": "^whsec_[A-Za-z0-9_-]{43}$"
}
},
"required": [
"endpoint",
"signingSecret"
]
}Redeliver parked streams (default) or a time range or list of events, in order per stream.
- Scope
webhooks:*- Credentials
application_key- Workspace
- Optional: a workspace header narrows
- Idempotency
- Idempotency-Key required
- Success
- 202
- Errors
{ error: { code, message } }- Retry
- Safe with the same Idempotency-Key
Request body
{
"type": "object",
"properties": {
"scope": {
"default": "parked",
"type": "string",
"enum": [
"parked",
"range"
]
},
"since": {
"type": "string",
"format": "date-time",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
},
"until": {
"type": "string",
"format": "date-time",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
},
"eventIds": {
"minItems": 1,
"maxItems": 100,
"type": "array",
"items": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
}
},
"streamKey": {
"type": "string",
"pattern": "^(call|number|agent):[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"
}
},
"additionalProperties": false
}Response 202
{
"type": "object",
"properties": {
"replayId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"requeued": {
"type": "integer",
"minimum": 0,
"maximum": 9007199254740991
}
},
"required": [
"replayId",
"requeued"
]
}Event log
Page the application's event log after a cursor or an event id (gap recovery and polling).
- Scope
webhooks:*- Credentials
application_key- Workspace
- Optional: a workspace header narrows
- Idempotency
- No Idempotency-Key: safe to repeat
- Success
- 200 · pages { data, nextCursor, hasMore } after `after`
- Errors
{ error: { code, message } }- Retry
- Safe with the same Idempotency-Key
Log order is commit order by writing transaction; order one stream by sequence and dedupe by id. A workspace header narrows the log to that workspace.
Query
{
"type": "object",
"properties": {
"after": {
"type": "string",
"minLength": 1
},
"limit": {
"type": "integer",
"minimum": 1,
"maximum": 500
},
"type": {
"minItems": 1,
"type": "array",
"items": {
"type": "string",
"enum": [
"call.started",
"call.ringing",
"call.answered",
"call.connected",
"call.transferred",
"call.ended",
"queue.entered",
"queue.left",
"agent.state_changed",
"recording.ready",
"transcript.ready",
"voicemail.ready",
"message.received",
"message.status",
"number.updated"
]
}
}
}
}Response 200
{
"type": "object",
"properties": {
"data": {
"type": "array",
"items": {
"oneOf": [
{
"type": "object",
"properties": {
"id": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"occurredAt": {
"type": "string",
"format": "date-time",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
},
"applicationId": {
"type": "string",
"minLength": 1,
"pattern": "^[a-z][a-z0-9_-]{1,63}$"
},
"workspaceId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"externalWorkspaceId": {
"type": "string",
"minLength": 1,
"maxLength": 200
},
"sequence": {
"type": "integer",
"exclusiveMinimum": 0,
"maximum": 9007199254740991
},
"type": {
"type": "string",
"const": "call.started"
},
"callId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"call": {
"type": "object",
"properties": {
"id": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"direction": {
"anyOf": [
{
"type": "string",
"enum": [
"inbound",
"outbound"
]
},
{
"type": "string",
"minLength": 1,
"maxLength": 100
}
]
},
"from": {
"type": "string",
"minLength": 1,
"maxLength": 64
},
"to": {
"type": "string",
"minLength": 1,
"maxLength": 64
},
"phoneNumberId": {
"anyOf": [
{
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
{
"type": "null"
}
]
},
"state": {
"anyOf": [
{
"type": "string",
"enum": [
"initiated",
"routing",
"queued",
"offering",
"connected",
"voicemail",
"ended"
]
},
{
"type": "string",
"minLength": 1,
"maxLength": 100
}
]
},
"startedAt": {
"type": "string",
"format": "date-time",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
},
"answeredAt": {
"anyOf": [
{
"type": "string",
"format": "date-time",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
},
{
"type": "null"
}
]
},
"endedAt": {
"anyOf": [
{
"type": "string",
"format": "date-time",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
},
{
"type": "null"
}
]
},
"endReason": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"agent": {
"anyOf": [
{
"type": "object",
"properties": {
"memberId": {
"anyOf": [
{
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
{
"type": "null"
}
]
},
"externalUserId": {
"anyOf": [
{
"type": "string",
"minLength": 1,
"maxLength": 200
},
{
"type": "null"
}
]
}
},
"required": [
"memberId",
"externalUserId"
]
},
{
"type": "null"
}
]
}
},
"required": [
"id",
"direction",
"from",
"to",
"phoneNumberId",
"state",
"startedAt",
"answeredAt",
"endedAt",
"endReason"
]
}
},
"required": [
"id",
"occurredAt",
"applicationId",
"workspaceId",
"externalWorkspaceId",
"sequence",
"type",
"callId",
"call"
]
},
{
"type": "object",
"properties": {
"id": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"occurredAt": {
"type": "string",
"format": "date-time",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
},
"applicationId": {
"type": "string",
"minLength": 1,
"pattern": "^[a-z][a-z0-9_-]{1,63}$"
},
"workspaceId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"externalWorkspaceId": {
"type": "string",
"minLength": 1,
"maxLength": 200
},
"sequence": {
"type": "integer",
"exclusiveMinimum": 0,
"maximum": 9007199254740991
},
"type": {
"type": "string",
"const": "call.ringing"
},
"callId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"call": {
"type": "object",
"properties": {
"id": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"direction": {
"anyOf": [
{
"type": "string",
"enum": [
"inbound",
"outbound"
]
},
{
"type": "string",
"minLength": 1,
"maxLength": 100
}
]
},
"from": {
"type": "string",
"minLength": 1,
"maxLength": 64
},
"to": {
"type": "string",
"minLength": 1,
"maxLength": 64
},
"phoneNumberId": {
"anyOf": [
{
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
{
"type": "null"
}
]
},
"state": {
"anyOf": [
{
"type": "string",
"enum": [
"initiated",
"routing",
"queued",
"offering",
"connected",
"voicemail",
"ended"
]
},
{
"type": "string",
"minLength": 1,
"maxLength": 100
}
]
},
"startedAt": {
"type": "string",
"format": "date-time",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
},
"answeredAt": {
"anyOf": [
{
"type": "string",
"format": "date-time",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
},
{
"type": "null"
}
]
},
"endedAt": {
"anyOf": [
{
"type": "string",
"format": "date-time",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
},
{
"type": "null"
}
]
},
"endReason": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"agent": {
"anyOf": [
{
"type": "object",
"properties": {
"memberId": {
"anyOf": [
{
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
{
"type": "null"
}
]
},
"externalUserId": {
"anyOf": [
{
"type": "string",
"minLength": 1,
"maxLength": 200
},
{
"type": "null"
}
]
}
},
"required": [
"memberId",
"externalUserId"
]
},
{
"type": "null"
}
]
}
},
"required": [
"id",
"direction",
"from",
"to",
"phoneNumberId",
"state",
"startedAt",
"answeredAt",
"endedAt",
"endReason"
]
},
"ring": {
"type": "object",
"properties": {
"ringSeq": {
"type": "integer",
"exclusiveMinimum": 0,
"maximum": 9007199254740991
},
"memberIds": {
"type": "array",
"items": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
}
},
"externalUserIds": {
"type": "array",
"items": {
"type": "string",
"minLength": 1,
"maxLength": 200
}
},
"offerId": {
"anyOf": [
{
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
{
"type": "null"
}
]
},
"expiresAt": {
"type": "string",
"format": "date-time",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
}
},
"required": [
"ringSeq",
"memberIds",
"offerId",
"expiresAt"
]
}
},
"required": [
"id",
"occurredAt",
"applicationId",
"workspaceId",
"externalWorkspaceId",
"sequence",
"type",
"callId",
"call",
"ring"
]
},
{
"type": "object",
"properties": {
"id": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"occurredAt": {
"type": "string",
"format": "date-time",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
},
"applicationId": {
"type": "string",
"minLength": 1,
"pattern": "^[a-z][a-z0-9_-]{1,63}$"
},
"workspaceId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"externalWorkspaceId": {
"type": "string",
"minLength": 1,
"maxLength": 200
},
"sequence": {
"type": "integer",
"exclusiveMinimum": 0,
"maximum": 9007199254740991
},
"type": {
"type": "string",
"const": "call.answered"
},
"callId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"call": {
"type": "object",
"properties": {
"id": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"direction": {
"anyOf": [
{
"type": "string",
"enum": [
"inbound",
"outbound"
]
},
{
"type": "string",
"minLength": 1,
"maxLength": 100
}
]
},
"from": {
"type": "string",
"minLength": 1,
"maxLength": 64
},
"to": {
"type": "string",
"minLength": 1,
"maxLength": 64
},
"phoneNumberId": {
"anyOf": [
{
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
{
"type": "null"
}
]
},
"state": {
"anyOf": [
{
"type": "string",
"enum": [
"initiated",
"routing",
"queued",
"offering",
"connected",
"voicemail",
"ended"
]
},
{
"type": "string",
"minLength": 1,
"maxLength": 100
}
]
},
"startedAt": {
"type": "string",
"format": "date-time",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
},
"answeredAt": {
"anyOf": [
{
"type": "string",
"format": "date-time",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
},
{
"type": "null"
}
]
},
"endedAt": {
"anyOf": [
{
"type": "string",
"format": "date-time",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
},
{
"type": "null"
}
]
},
"endReason": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"agent": {
"anyOf": [
{
"type": "object",
"properties": {
"memberId": {
"anyOf": [
{
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
{
"type": "null"
}
]
},
"externalUserId": {
"anyOf": [
{
"type": "string",
"minLength": 1,
"maxLength": 200
},
{
"type": "null"
}
]
}
},
"required": [
"memberId",
"externalUserId"
]
},
{
"type": "null"
}
]
}
},
"required": [
"id",
"direction",
"from",
"to",
"phoneNumberId",
"state",
"startedAt",
"answeredAt",
"endedAt",
"endReason"
]
}
},
"required": [
"id",
"occurredAt",
"applicationId",
"workspaceId",
"externalWorkspaceId",
"sequence",
"type",
"callId",
"call"
]
},
{
"type": "object",
"properties": {
"id": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"occurredAt": {
"type": "string",
"format": "date-time",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
},
"applicationId": {
"type": "string",
"minLength": 1,
"pattern": "^[a-z][a-z0-9_-]{1,63}$"
},
"workspaceId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"externalWorkspaceId": {
"type": "string",
"minLength": 1,
"maxLength": 200
},
"sequence": {
"type": "integer",
"exclusiveMinimum": 0,
"maximum": 9007199254740991
},
"type": {
"type": "string",
"const": "call.connected"
},
"callId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"call": {
"type": "object",
"properties": {
"id": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"direction": {
"anyOf": [
{
"type": "string",
"enum": [
"inbound",
"outbound"
]
},
{
"type": "string",
"minLength": 1,
"maxLength": 100
}
]
},
"from": {
"type": "string",
"minLength": 1,
"maxLength": 64
},
"to": {
"type": "string",
"minLength": 1,
"maxLength": 64
},
"phoneNumberId": {
"anyOf": [
{
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
{
"type": "null"
}
]
},
"state": {
"anyOf": [
{
"type": "string",
"enum": [
"initiated",
"routing",
"queued",
"offering",
"connected",
"voicemail",
"ended"
]
},
{
"type": "string",
"minLength": 1,
"maxLength": 100
}
]
},
"startedAt": {
"type": "string",
"format": "date-time",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
},
"answeredAt": {
"anyOf": [
{
"type": "string",
"format": "date-time",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
},
{
"type": "null"
}
]
},
"endedAt": {
"anyOf": [
{
"type": "string",
"format": "date-time",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
},
{
"type": "null"
}
]
},
"endReason": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"agent": {
"anyOf": [
{
"type": "object",
"properties": {
"memberId": {
"anyOf": [
{
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
{
"type": "null"
}
]
},
"externalUserId": {
"anyOf": [
{
"type": "string",
"minLength": 1,
"maxLength": 200
},
{
"type": "null"
}
]
}
},
"required": [
"memberId",
"externalUserId"
]
},
{
"type": "null"
}
]
}
},
"required": [
"id",
"direction",
"from",
"to",
"phoneNumberId",
"state",
"startedAt",
"answeredAt",
"endedAt",
"endReason"
]
},
"leg": {
"type": "object",
"properties": {
"id": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"role": {
"type": "string",
"minLength": 1,
"maxLength": 100
},
"memberId": {
"anyOf": [
{
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
{
"type": "null"
}
]
},
"externalUserId": {
"anyOf": [
{
"type": "string",
"minLength": 1,
"maxLength": 200
},
{
"type": "null"
}
]
}
},
"required": [
"id",
"role",
"memberId",
"externalUserId"
]
}
},
"required": [
"id",
"occurredAt",
"applicationId",
"workspaceId",
"externalWorkspaceId",
"sequence",
"type",
"callId",
"call",
"leg"
]
},
{
"type": "object",
"properties": {
"id": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"occurredAt": {
"type": "string",
"format": "date-time",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
},
"applicationId": {
"type": "string",
"minLength": 1,
"pattern": "^[a-z][a-z0-9_-]{1,63}$"
},
"workspaceId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"externalWorkspaceId": {
"type": "string",
"minLength": 1,
"maxLength": 200
},
"sequence": {
"type": "integer",
"exclusiveMinimum": 0,
"maximum": 9007199254740991
},
"type": {
"type": "string",
"const": "call.transferred"
},
"callId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"call": {
"type": "object",
"properties": {
"id": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"direction": {
"anyOf": [
{
"type": "string",
"enum": [
"inbound",
"outbound"
]
},
{
"type": "string",
"minLength": 1,
"maxLength": 100
}
]
},
"from": {
"type": "string",
"minLength": 1,
"maxLength": 64
},
"to": {
"type": "string",
"minLength": 1,
"maxLength": 64
},
"phoneNumberId": {
"anyOf": [
{
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
{
"type": "null"
}
]
},
"state": {
"anyOf": [
{
"type": "string",
"enum": [
"initiated",
"routing",
"queued",
"offering",
"connected",
"voicemail",
"ended"
]
},
{
"type": "string",
"minLength": 1,
"maxLength": 100
}
]
},
"startedAt": {
"type": "string",
"format": "date-time",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
},
"answeredAt": {
"anyOf": [
{
"type": "string",
"format": "date-time",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
},
{
"type": "null"
}
]
},
"endedAt": {
"anyOf": [
{
"type": "string",
"format": "date-time",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
},
{
"type": "null"
}
]
},
"endReason": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"agent": {
"anyOf": [
{
"type": "object",
"properties": {
"memberId": {
"anyOf": [
{
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
{
"type": "null"
}
]
},
"externalUserId": {
"anyOf": [
{
"type": "string",
"minLength": 1,
"maxLength": 200
},
{
"type": "null"
}
]
}
},
"required": [
"memberId",
"externalUserId"
]
},
{
"type": "null"
}
]
}
},
"required": [
"id",
"direction",
"from",
"to",
"phoneNumberId",
"state",
"startedAt",
"answeredAt",
"endedAt",
"endReason"
]
},
"transfer": {
"type": "object",
"properties": {
"target": {
"anyOf": [
{
"type": "object",
"properties": {
"e164": {
"type": "string",
"minLength": 1,
"maxLength": 32
}
},
"required": [
"e164"
]
},
{
"type": "object",
"properties": {
"queueId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
}
},
"required": [
"queueId"
]
},
{
"type": "object",
"properties": {
"memberId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
}
},
"required": [
"memberId"
]
}
]
},
"warm": {
"type": "boolean"
},
"actor": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
}
},
"required": [
"target",
"warm",
"actor"
]
}
},
"required": [
"id",
"occurredAt",
"applicationId",
"workspaceId",
"externalWorkspaceId",
"sequence",
"type",
"callId",
"call",
"transfer"
]
},
{
"type": "object",
"properties": {
"id": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"occurredAt": {
"type": "string",
"format": "date-time",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
},
"applicationId": {
"type": "string",
"minLength": 1,
"pattern": "^[a-z][a-z0-9_-]{1,63}$"
},
"workspaceId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"externalWorkspaceId": {
"type": "string",
"minLength": 1,
"maxLength": 200
},
"sequence": {
"type": "integer",
"exclusiveMinimum": 0,
"maximum": 9007199254740991
},
"type": {
"type": "string",
"const": "call.ended"
},
"callId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"call": {
"type": "object",
"properties": {
"id": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"direction": {
"anyOf": [
{
"type": "string",
"enum": [
"inbound",
"outbound"
]
},
{
"type": "string",
"minLength": 1,
"maxLength": 100
}
]
},
"from": {
"type": "string",
"minLength": 1,
"maxLength": 64
},
"to": {
"type": "string",
"minLength": 1,
"maxLength": 64
},
"phoneNumberId": {
"anyOf": [
{
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
{
"type": "null"
}
]
},
"state": {
"anyOf": [
{
"type": "string",
"enum": [
"initiated",
"routing",
"queued",
"offering",
"connected",
"voicemail",
"ended"
]
},
{
"type": "string",
"minLength": 1,
"maxLength": 100
}
]
},
"startedAt": {
"type": "string",
"format": "date-time",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
},
"answeredAt": {
"anyOf": [
{
"type": "string",
"format": "date-time",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
},
{
"type": "null"
}
]
},
"endedAt": {
"anyOf": [
{
"type": "string",
"format": "date-time",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
},
{
"type": "null"
}
]
},
"endReason": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"agent": {
"anyOf": [
{
"type": "object",
"properties": {
"memberId": {
"anyOf": [
{
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
{
"type": "null"
}
]
},
"externalUserId": {
"anyOf": [
{
"type": "string",
"minLength": 1,
"maxLength": 200
},
{
"type": "null"
}
]
}
},
"required": [
"memberId",
"externalUserId"
]
},
{
"type": "null"
}
]
}
},
"required": [
"id",
"direction",
"from",
"to",
"phoneNumberId",
"state",
"startedAt",
"answeredAt",
"endedAt",
"endReason"
]
},
"previousState": {
"anyOf": [
{
"type": "string",
"enum": [
"initiated",
"routing",
"queued",
"offering",
"connected",
"voicemail",
"ended"
]
},
{
"type": "string",
"minLength": 1,
"maxLength": 100
}
]
},
"connected": {
"type": "boolean"
},
"durationSeconds": {
"anyOf": [
{
"type": "integer",
"minimum": 0,
"maximum": 9007199254740991
},
{
"type": "null"
}
]
}
},
"required": [
"id",
"occurredAt",
"applicationId",
"workspaceId",
"externalWorkspaceId",
"sequence",
"type",
"callId",
"call",
"previousState",
"connected",
"durationSeconds"
]
},
{
"type": "object",
"properties": {
"id": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"occurredAt": {
"type": "string",
"format": "date-time",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
},
"applicationId": {
"type": "string",
"minLength": 1,
"pattern": "^[a-z][a-z0-9_-]{1,63}$"
},
"workspaceId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"externalWorkspaceId": {
"type": "string",
"minLength": 1,
"maxLength": 200
},
"sequence": {
"type": "integer",
"exclusiveMinimum": 0,
"maximum": 9007199254740991
},
"type": {
"type": "string",
"const": "queue.entered"
},
"callId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"queue": {
"type": "object",
"properties": {
"queueId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"entryId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"state": {
"anyOf": [
{
"type": "string",
"enum": [
"waiting",
"offered",
"connected",
"abandoned",
"overflowed",
"callback"
]
},
{
"type": "string",
"minLength": 1,
"maxLength": 100
}
]
},
"priority": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
"enqueuedAt": {
"type": "string",
"format": "date-time",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
}
},
"required": [
"queueId",
"entryId",
"state",
"priority",
"enqueuedAt"
]
}
},
"required": [
"id",
"occurredAt",
"applicationId",
"workspaceId",
"externalWorkspaceId",
"sequence",
"type",
"callId",
"queue"
]
},
{
"type": "object",
"properties": {
"id": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"occurredAt": {
"type": "string",
"format": "date-time",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
},
"applicationId": {
"type": "string",
"minLength": 1,
"pattern": "^[a-z][a-z0-9_-]{1,63}$"
},
"workspaceId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"externalWorkspaceId": {
"type": "string",
"minLength": 1,
"maxLength": 200
},
"sequence": {
"type": "integer",
"exclusiveMinimum": 0,
"maximum": 9007199254740991
},
"type": {
"type": "string",
"const": "queue.left"
},
"callId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"queue": {
"type": "object",
"properties": {
"queueId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"entryId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"state": {
"anyOf": [
{
"type": "string",
"enum": [
"waiting",
"offered",
"connected",
"abandoned",
"overflowed",
"callback"
]
},
{
"type": "string",
"minLength": 1,
"maxLength": 100
}
]
},
"priority": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
"enqueuedAt": {
"type": "string",
"format": "date-time",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
}
},
"required": [
"queueId",
"entryId",
"state",
"priority",
"enqueuedAt"
]
}
},
"required": [
"id",
"occurredAt",
"applicationId",
"workspaceId",
"externalWorkspaceId",
"sequence",
"type",
"callId",
"queue"
]
},
{
"type": "object",
"properties": {
"id": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"occurredAt": {
"type": "string",
"format": "date-time",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
},
"applicationId": {
"type": "string",
"minLength": 1,
"pattern": "^[a-z][a-z0-9_-]{1,63}$"
},
"workspaceId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"externalWorkspaceId": {
"type": "string",
"minLength": 1,
"maxLength": 200
},
"sequence": {
"type": "integer",
"exclusiveMinimum": 0,
"maximum": 9007199254740991
},
"type": {
"type": "string",
"const": "agent.state_changed"
},
"externalUserId": {
"type": "string",
"minLength": 1,
"maxLength": 200
},
"agent": {
"type": "object",
"properties": {
"memberId": {
"anyOf": [
{
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
{
"type": "null"
}
]
},
"state": {
"anyOf": [
{
"type": "string",
"enum": [
"offline",
"available",
"offered",
"on_call",
"wrap_up",
"away"
]
},
{
"type": "string",
"minLength": 1,
"maxLength": 100
}
]
},
"previousState": {
"anyOf": [
{
"anyOf": [
{
"type": "string",
"enum": [
"offline",
"available",
"offered",
"on_call",
"wrap_up",
"away"
]
},
{
"type": "string",
"minLength": 1,
"maxLength": 100
}
]
},
{
"type": "null"
}
]
},
"reason": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"actor": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"changedAt": {
"type": "string",
"format": "date-time",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
}
},
"required": [
"memberId",
"state",
"previousState",
"reason",
"actor",
"changedAt"
]
}
},
"required": [
"id",
"occurredAt",
"applicationId",
"workspaceId",
"externalWorkspaceId",
"sequence",
"type",
"agent"
]
},
{
"type": "object",
"properties": {
"id": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"occurredAt": {
"type": "string",
"format": "date-time",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
},
"applicationId": {
"type": "string",
"minLength": 1,
"pattern": "^[a-z][a-z0-9_-]{1,63}$"
},
"workspaceId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"externalWorkspaceId": {
"type": "string",
"minLength": 1,
"maxLength": 200
},
"sequence": {
"type": "integer",
"exclusiveMinimum": 0,
"maximum": 9007199254740991
},
"type": {
"type": "string",
"const": "recording.ready"
},
"callId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"recording": {
"type": "object",
"properties": {
"id": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"kind": {
"anyOf": [
{
"type": "string",
"enum": [
"call",
"voicemail"
]
},
{
"type": "string",
"minLength": 1,
"maxLength": 100
}
]
},
"durationSeconds": {
"anyOf": [
{
"type": "integer",
"minimum": 0,
"maximum": 9007199254740991
},
{
"type": "null"
}
]
},
"createdAt": {
"type": "string",
"format": "date-time",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
}
},
"required": [
"id",
"kind",
"durationSeconds",
"createdAt"
]
}
},
"required": [
"id",
"occurredAt",
"applicationId",
"workspaceId",
"externalWorkspaceId",
"sequence",
"type",
"callId",
"recording"
]
},
{
"type": "object",
"properties": {
"id": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"occurredAt": {
"type": "string",
"format": "date-time",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
},
"applicationId": {
"type": "string",
"minLength": 1,
"pattern": "^[a-z][a-z0-9_-]{1,63}$"
},
"workspaceId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"externalWorkspaceId": {
"type": "string",
"minLength": 1,
"maxLength": 200
},
"sequence": {
"type": "integer",
"exclusiveMinimum": 0,
"maximum": 9007199254740991
},
"type": {
"type": "string",
"const": "transcript.ready"
},
"callId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"transcript": {
"type": "object",
"properties": {
"id": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"recordingId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"kind": {
"anyOf": [
{
"type": "string",
"enum": [
"call",
"voicemail"
]
},
{
"type": "string",
"minLength": 1,
"maxLength": 100
}
]
},
"language": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"text": {
"type": "string"
},
"segments": {
"type": "array",
"items": {
"type": "object",
"properties": {
"channel": {
"type": "integer",
"minimum": 0,
"maximum": 9007199254740991
},
"speaker": {
"type": "string"
},
"start": {
"type": "number",
"minimum": 0
},
"end": {
"type": "number",
"minimum": 0
},
"text": {
"type": "string"
}
},
"required": [
"start",
"end",
"text"
]
}
},
"segmentsTruncated": {
"type": "boolean"
},
"channels": {
"type": "array",
"items": {
"type": "object",
"properties": {
"channel": {
"type": "integer",
"minimum": 0,
"maximum": 9007199254740991
},
"party": {
"anyOf": [
{
"type": "string",
"enum": [
"external",
"workspace"
]
},
{
"type": "string",
"minLength": 1,
"maxLength": 100
}
]
},
"address": {
"anyOf": [
{
"type": "string",
"minLength": 1,
"maxLength": 64
},
{
"type": "null"
}
]
}
},
"required": [
"channel",
"party",
"address"
]
}
},
"durationSeconds": {
"anyOf": [
{
"type": "number",
"minimum": 0
},
{
"type": "null"
}
]
},
"model": {
"type": "string"
},
"createdAt": {
"type": "string",
"format": "date-time",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
}
},
"required": [
"id",
"recordingId",
"text",
"segments",
"createdAt"
]
}
},
"required": [
"id",
"occurredAt",
"applicationId",
"workspaceId",
"externalWorkspaceId",
"sequence",
"type",
"callId",
"transcript"
]
},
{
"type": "object",
"properties": {
"id": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"occurredAt": {
"type": "string",
"format": "date-time",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
},
"applicationId": {
"type": "string",
"minLength": 1,
"pattern": "^[a-z][a-z0-9_-]{1,63}$"
},
"workspaceId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"externalWorkspaceId": {
"type": "string",
"minLength": 1,
"maxLength": 200
},
"sequence": {
"type": "integer",
"exclusiveMinimum": 0,
"maximum": 9007199254740991
},
"type": {
"type": "string",
"const": "voicemail.ready"
},
"callId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"voicemail": {
"type": "object",
"properties": {
"id": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"recordingId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"from": {
"type": "string",
"minLength": 1,
"maxLength": 64
},
"durationSeconds": {
"anyOf": [
{
"type": "integer",
"minimum": 0,
"maximum": 9007199254740991
},
{
"type": "null"
}
]
},
"createdAt": {
"type": "string",
"format": "date-time",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
}
},
"required": [
"id",
"recordingId",
"from",
"durationSeconds",
"createdAt"
]
}
},
"required": [
"id",
"occurredAt",
"applicationId",
"workspaceId",
"externalWorkspaceId",
"sequence",
"type",
"callId",
"voicemail"
]
},
{
"type": "object",
"properties": {
"id": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"occurredAt": {
"type": "string",
"format": "date-time",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
},
"applicationId": {
"type": "string",
"minLength": 1,
"pattern": "^[a-z][a-z0-9_-]{1,63}$"
},
"workspaceId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"externalWorkspaceId": {
"type": "string",
"minLength": 1,
"maxLength": 200
},
"sequence": {
"type": "integer",
"exclusiveMinimum": 0,
"maximum": 9007199254740991
},
"type": {
"type": "string",
"const": "message.received"
},
"message": {
"type": "object",
"properties": {
"id": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"conversationId": {
"anyOf": [
{
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
{
"type": "null"
}
]
},
"phoneNumberId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"direction": {
"anyOf": [
{
"type": "string",
"enum": [
"inbound",
"outbound"
]
},
{
"type": "string",
"minLength": 1,
"maxLength": 100
}
]
},
"from": {
"type": "string",
"minLength": 1,
"maxLength": 64
},
"to": {
"type": "string",
"minLength": 1,
"maxLength": 64
},
"text": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"media": {
"type": "array",
"items": {
"type": "object",
"properties": {
"index": {
"type": "integer",
"minimum": 0,
"maximum": 9007199254740991
},
"contentType": {
"type": "string",
"minLength": 1
},
"path": {
"type": "string",
"pattern": "^\\/api\\/v1\\/messages\\/.*"
},
"sourceUrl": {
"type": "string"
}
},
"required": [
"index",
"contentType"
]
}
},
"status": {
"type": "string",
"minLength": 1
},
"errorCode": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"createdAt": {
"type": "string",
"format": "date-time",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
}
},
"required": [
"id",
"phoneNumberId",
"direction",
"from",
"to",
"text",
"status",
"createdAt"
]
}
},
"required": [
"id",
"occurredAt",
"applicationId",
"workspaceId",
"externalWorkspaceId",
"sequence",
"type",
"message"
]
},
{
"type": "object",
"properties": {
"id": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"occurredAt": {
"type": "string",
"format": "date-time",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
},
"applicationId": {
"type": "string",
"minLength": 1,
"pattern": "^[a-z][a-z0-9_-]{1,63}$"
},
"workspaceId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"externalWorkspaceId": {
"type": "string",
"minLength": 1,
"maxLength": 200
},
"sequence": {
"type": "integer",
"exclusiveMinimum": 0,
"maximum": 9007199254740991
},
"type": {
"type": "string",
"const": "message.status"
},
"message": {
"type": "object",
"properties": {
"id": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"conversationId": {
"anyOf": [
{
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
{
"type": "null"
}
]
},
"phoneNumberId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"direction": {
"anyOf": [
{
"type": "string",
"enum": [
"inbound",
"outbound"
]
},
{
"type": "string",
"minLength": 1,
"maxLength": 100
}
]
},
"from": {
"type": "string",
"minLength": 1,
"maxLength": 64
},
"to": {
"type": "string",
"minLength": 1,
"maxLength": 64
},
"text": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"media": {
"type": "array",
"items": {
"type": "object",
"properties": {
"index": {
"type": "integer",
"minimum": 0,
"maximum": 9007199254740991
},
"contentType": {
"type": "string",
"minLength": 1
},
"path": {
"type": "string",
"pattern": "^\\/api\\/v1\\/messages\\/.*"
},
"sourceUrl": {
"type": "string"
}
},
"required": [
"index",
"contentType"
]
}
},
"status": {
"type": "string",
"minLength": 1
},
"errorCode": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"createdAt": {
"type": "string",
"format": "date-time",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
}
},
"required": [
"id",
"phoneNumberId",
"direction",
"from",
"to",
"text",
"status",
"createdAt"
]
}
},
"required": [
"id",
"occurredAt",
"applicationId",
"workspaceId",
"externalWorkspaceId",
"sequence",
"type",
"message"
]
},
{
"type": "object",
"properties": {
"id": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"type": {
"type": "string",
"const": "number.updated"
},
"occurredAt": {
"type": "string",
"format": "date-time",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
},
"applicationId": {
"type": "string",
"minLength": 1,
"pattern": "^[a-z][a-z0-9_-]{1,63}$"
},
"number": {
"type": "object",
"properties": {
"sitecallNumberId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"phoneNumber": {
"type": "string",
"pattern": "^\\+[1-9]\\d{6,14}$"
},
"applicationId": {
"anyOf": [
{
"type": "string",
"minLength": 1,
"pattern": "^[a-z][a-z0-9_-]{1,63}$"
},
{
"type": "null"
}
]
},
"externalWorkspaceId": {
"anyOf": [
{
"type": "string",
"minLength": 1,
"maxLength": 200
},
{
"type": "null"
}
]
},
"externalNumberId": {
"anyOf": [
{
"type": "string",
"minLength": 1,
"maxLength": 200
},
{
"type": "null"
}
]
},
"status": {
"anyOf": [
{
"type": "string",
"enum": [
"provisioning",
"active",
"suspended",
"released"
]
},
{
"type": "string",
"minLength": 1,
"maxLength": 100
}
]
},
"inventoryState": {
"anyOf": [
{
"anyOf": [
{
"type": "string",
"enum": [
"grace",
"pool"
]
},
{
"type": "string",
"minLength": 1,
"maxLength": 100
}
]
},
{
"type": "null"
}
]
},
"graceUntil": {
"anyOf": [
{
"type": "string",
"format": "date-time",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
},
{
"type": "null"
}
]
},
"messagingLane": {
"anyOf": [
{
"type": "string",
"enum": [
"sitecall",
"atriam"
]
},
{
"type": "string",
"minLength": 1,
"maxLength": 100
}
]
},
"voiceLane": {
"anyOf": [
{
"type": "string",
"enum": [
"sitecall",
"atriam"
]
},
{
"type": "string",
"minLength": 1,
"maxLength": 100
}
]
},
"carrierNumberId": {
"anyOf": [
{
"type": "string",
"minLength": 1
},
{
"type": "null"
}
]
},
"messagingProfileId": {
"anyOf": [
{
"type": "string",
"minLength": 1
},
{
"type": "null"
}
]
},
"billingGroupId": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"texting": {
"type": "object",
"properties": {
"campaignId": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"assignmentStatus": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"targetCampaignId": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"targetStatus": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
}
},
"required": [
"campaignId",
"assignmentStatus",
"targetCampaignId",
"targetStatus"
]
},
"updatedAt": {
"type": "string",
"format": "date-time",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
}
},
"required": [
"sitecallNumberId",
"phoneNumber",
"applicationId",
"externalWorkspaceId",
"externalNumberId",
"status",
"inventoryState",
"graceUntil",
"messagingLane",
"billingGroupId",
"texting",
"updatedAt"
]
},
"workspaceId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"externalWorkspaceId": {
"anyOf": [
{
"type": "string",
"minLength": 1,
"maxLength": 200
},
{
"type": "null"
}
]
},
"sequence": {
"type": "integer",
"exclusiveMinimum": 0,
"maximum": 9007199254740991
}
},
"required": [
"id",
"type",
"occurredAt",
"applicationId",
"number",
"workspaceId",
"externalWorkspaceId",
"sequence"
]
}
]
}
},
"nextCursor": {
"anyOf": [
{
"type": "string",
"pattern": "^c1\\.\\d{1,20}\\.\\d{1,19}$"
},
{
"type": "null"
}
]
},
"hasMore": {
"type": "boolean"
}
},
"required": [
"data",
"nextCursor",
"hasMore"
]
}Numbers
Numbers for an application's workspaces: search, acquire, release, reclaim, transfer, list, caller name, E911 address, voice lane, business identity.
- Scope
numbers:*- Credentials
application_key,application_secret- Workspace
- None (named in the body, or not needed)
- Idempotency
- No Idempotency-Key: safe to repeat
- Success
- 200
- Errors
{ error: "<message>", code }- Retry
- Never automatically: a person decides
One JSON command per request, named by type; workspaces are named by your own id (externalWorkspaceId). acquire_number and transfer_number carry their own idempotencyKey: after an uncertain answer retry the same command. carrier_ambiguous: retry the same command after a minute.
Request body
{
"oneOf": [
{
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "submit_business_identity"
},
"externalWorkspaceId": {
"type": "string",
"minLength": 1,
"maxLength": 200
},
"identity": {
"type": "object",
"properties": {
"businessName": {
"type": "string",
"minLength": 1,
"maxLength": 120
},
"ein": {
"type": "string"
},
"firstName": {
"type": "string",
"maxLength": 60
},
"lastName": {
"type": "string",
"maxLength": 60
},
"email": {
"type": "string",
"format": "email",
"pattern": "^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"
},
"phone": {
"type": "string",
"pattern": "^\\+1\\d{10}$"
},
"mobilePhone": {
"type": "string",
"pattern": "^\\+1\\d{10}$"
},
"street": {
"type": "string",
"minLength": 1,
"maxLength": 120
},
"city": {
"type": "string",
"minLength": 1,
"maxLength": 80
},
"state": {
"type": "string",
"minLength": 2,
"maxLength": 2
},
"postalCode": {
"type": "string",
"pattern": "^\\d{5}(-\\d{4})?$"
},
"website": {
"anyOf": [
{
"type": "string",
"format": "uri"
},
{
"type": "string",
"const": ""
}
]
}
},
"required": [
"businessName",
"email",
"phone",
"street",
"city",
"state",
"postalCode"
]
}
},
"required": [
"type",
"externalWorkspaceId",
"identity"
]
},
{
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "get_business_registration"
},
"externalWorkspaceId": {
"type": "string",
"minLength": 1,
"maxLength": 200
}
},
"required": [
"type",
"externalWorkspaceId"
]
},
{
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "ensure_workspace"
},
"externalWorkspaceId": {
"type": "string",
"minLength": 1,
"maxLength": 200
},
"name": {
"type": "string",
"minLength": 1,
"maxLength": 120
},
"billingGroupId": {
"type": "string",
"minLength": 1,
"maxLength": 100
}
},
"required": [
"type",
"externalWorkspaceId",
"name"
]
},
{
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "search_numbers"
},
"externalWorkspaceId": {
"type": "string",
"minLength": 1,
"maxLength": 200
},
"areaCode": {
"type": "string",
"pattern": "^\\d{3}$"
},
"country": {
"default": "US",
"type": "string",
"minLength": 2,
"maxLength": 2
},
"limit": {
"default": 10,
"type": "integer",
"minimum": 1,
"maximum": 50
}
},
"required": [
"type",
"externalWorkspaceId"
]
},
{
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "acquire_number"
},
"externalWorkspaceId": {
"type": "string",
"minLength": 1,
"maxLength": 200
},
"phoneNumber": {
"type": "string",
"pattern": "^\\+[1-9]\\d{6,14}$"
},
"idempotencyKey": {
"type": "string",
"minLength": 8,
"maxLength": 200
},
"externalNumberId": {
"type": "string",
"minLength": 1,
"maxLength": 200
}
},
"required": [
"type",
"externalWorkspaceId",
"phoneNumber",
"idempotencyKey"
]
},
{
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "release_number"
},
"externalWorkspaceId": {
"type": "string",
"minLength": 1,
"maxLength": 200
},
"phoneNumber": {
"type": "string",
"pattern": "^\\+[1-9]\\d{6,14}$"
},
"graceDays": {
"default": 30,
"type": "integer",
"minimum": 0,
"maximum": 90
}
},
"required": [
"type",
"externalWorkspaceId",
"phoneNumber"
]
},
{
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "reclaim_number"
},
"externalWorkspaceId": {
"type": "string",
"minLength": 1,
"maxLength": 200
},
"phoneNumber": {
"type": "string",
"pattern": "^\\+[1-9]\\d{6,14}$"
}
},
"required": [
"type",
"externalWorkspaceId",
"phoneNumber"
]
},
{
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "transfer_number"
},
"fromExternalWorkspaceId": {
"type": "string",
"minLength": 1,
"maxLength": 200
},
"toExternalWorkspaceId": {
"type": "string",
"minLength": 1,
"maxLength": 200
},
"phoneNumber": {
"type": "string",
"pattern": "^\\+[1-9]\\d{6,14}$"
},
"idempotencyKey": {
"type": "string",
"minLength": 8,
"maxLength": 200
}
},
"required": [
"type",
"fromExternalWorkspaceId",
"toExternalWorkspaceId",
"phoneNumber",
"idempotencyKey"
]
},
{
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "list_numbers"
},
"externalWorkspaceId": {
"type": "string",
"minLength": 1,
"maxLength": 200
}
},
"required": [
"type",
"externalWorkspaceId"
]
},
{
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "get_number"
},
"phoneNumber": {
"type": "string",
"pattern": "^\\+[1-9]\\d{6,14}$"
}
},
"required": [
"type",
"phoneNumber"
]
},
{
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "set_emergency_address"
},
"externalWorkspaceId": {
"type": "string",
"minLength": 1,
"maxLength": 200
},
"phoneNumber": {
"type": "string",
"pattern": "^\\+[1-9]\\d{6,14}$"
},
"address": {
"type": "object",
"properties": {
"streetAddress": {
"type": "string",
"minLength": 1,
"maxLength": 200
},
"extendedAddress": {
"type": "string",
"maxLength": 200
},
"locality": {
"type": "string",
"minLength": 1,
"maxLength": 100
},
"administrativeArea": {
"type": "string",
"minLength": 2,
"maxLength": 2
},
"postalCode": {
"type": "string",
"minLength": 3,
"maxLength": 20
},
"countryCode": {
"type": "string",
"const": "US"
},
"businessName": {
"type": "string",
"minLength": 1,
"maxLength": 100
}
},
"required": [
"streetAddress",
"locality",
"administrativeArea",
"postalCode",
"countryCode",
"businessName"
]
}
},
"required": [
"type",
"externalWorkspaceId",
"phoneNumber",
"address"
]
},
{
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "set_caller_name"
},
"externalWorkspaceId": {
"type": "string",
"minLength": 1,
"maxLength": 200
},
"phoneNumber": {
"type": "string",
"pattern": "^\\+[1-9]\\d{6,14}$"
},
"displayName": {
"type": "string",
"minLength": 1,
"maxLength": 15
}
},
"required": [
"type",
"externalWorkspaceId",
"phoneNumber",
"displayName"
]
},
{
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "set_voice_lane"
},
"externalWorkspaceId": {
"type": "string",
"minLength": 1,
"maxLength": 200
},
"phoneNumber": {
"type": "string",
"pattern": "^\\+[1-9]\\d{6,14}$"
},
"lane": {
"type": "string",
"enum": [
"sitecall",
"atriam"
]
}
},
"required": [
"type",
"externalWorkspaceId",
"phoneNumber",
"lane"
]
},
{
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "set_messaging_lane"
},
"externalWorkspaceId": {
"type": "string",
"minLength": 1,
"maxLength": 200
},
"phoneNumber": {
"type": "string",
"pattern": "^\\+[1-9]\\d{6,14}$"
},
"lane": {
"type": "string",
"enum": [
"sitecall",
"atriam"
]
}
},
"required": [
"type",
"externalWorkspaceId",
"phoneNumber",
"lane"
]
},
{
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "import_number"
},
"externalWorkspaceId": {
"anyOf": [
{
"type": "string",
"minLength": 1,
"maxLength": 200
},
{
"type": "null"
}
]
},
"workspaceName": {
"type": "string",
"minLength": 1,
"maxLength": 120
},
"phoneNumber": {
"type": "string",
"pattern": "^\\+[1-9]\\d{6,14}$"
},
"externalNumberId": {
"type": "string",
"minLength": 1,
"maxLength": 200
},
"inventoryState": {
"anyOf": [
{
"type": "string",
"enum": [
"grace",
"pool"
]
},
{
"type": "null"
}
]
},
"graceUntil": {
"default": null,
"anyOf": [
{
"type": "string",
"format": "date-time",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
},
{
"type": "null"
}
]
}
},
"required": [
"type",
"externalWorkspaceId",
"phoneNumber",
"externalNumberId",
"inventoryState"
]
}
]
}Response 200
{
"oneOf": [
{
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "business_identity"
},
"businessIdentity": {
"type": "object",
"properties": {
"externalWorkspaceId": {
"type": "string",
"minLength": 1,
"maxLength": 200
},
"path": {
"type": "string",
"enum": [
"standard",
"sole_prop"
]
},
"submittedAt": {
"type": "string",
"format": "date-time",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
},
"registrationStatus": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"appliedToRegistration": {
"type": "boolean"
}
},
"required": [
"externalWorkspaceId",
"path",
"submittedAt",
"registrationStatus",
"appliedToRegistration"
]
}
},
"required": [
"type",
"businessIdentity"
]
},
{
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "business_registration"
},
"businessRegistration": {
"type": "object",
"properties": {
"externalWorkspaceId": {
"type": "string",
"minLength": 1,
"maxLength": 200
},
"identity": {
"anyOf": [
{
"type": "object",
"properties": {
"path": {
"type": "string",
"enum": [
"standard",
"sole_prop"
]
},
"submittedAt": {
"type": "string",
"format": "date-time",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
}
},
"required": [
"path",
"submittedAt"
]
},
{
"type": "null"
}
]
},
"registration": {
"anyOf": [
{
"type": "object",
"properties": {
"status": {
"type": "string"
},
"path": {
"type": "string",
"enum": [
"standard",
"sole_prop"
]
},
"needsAttention": {
"type": "boolean"
},
"holdCode": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"updatedAt": {
"type": "string",
"format": "date-time",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
}
},
"required": [
"status",
"path",
"needsAttention",
"holdCode",
"updatedAt"
]
},
{
"type": "null"
}
]
}
},
"required": [
"externalWorkspaceId",
"identity",
"registration"
]
}
},
"required": [
"type",
"businessRegistration"
]
},
{
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "workspace"
},
"workspace": {
"type": "object",
"properties": {
"sitecallWorkspaceId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"externalWorkspaceId": {
"type": "string",
"minLength": 1,
"maxLength": 200
},
"billingGroupId": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
}
},
"required": [
"sitecallWorkspaceId",
"externalWorkspaceId",
"billingGroupId"
]
}
},
"required": [
"type",
"workspace"
]
},
{
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "search"
},
"result": {
"type": "object",
"properties": {
"numbers": {
"maxItems": 50,
"type": "array",
"items": {
"type": "object",
"properties": {
"phoneNumber": {
"type": "string",
"pattern": "^\\+[1-9]\\d{6,14}$"
},
"source": {
"type": "string",
"enum": [
"pool",
"carrier"
]
},
"locality": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"region": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
}
},
"required": [
"phoneNumber",
"source",
"locality",
"region"
]
}
}
},
"required": [
"numbers"
]
}
},
"required": [
"type",
"result"
]
},
{
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "number"
},
"number": {
"type": "object",
"properties": {
"sitecallNumberId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"phoneNumber": {
"type": "string",
"pattern": "^\\+[1-9]\\d{6,14}$"
},
"applicationId": {
"anyOf": [
{
"type": "string",
"minLength": 1,
"pattern": "^[a-z][a-z0-9_-]{1,63}$"
},
{
"type": "null"
}
]
},
"externalWorkspaceId": {
"anyOf": [
{
"type": "string",
"minLength": 1,
"maxLength": 200
},
{
"type": "null"
}
]
},
"externalNumberId": {
"anyOf": [
{
"type": "string",
"minLength": 1,
"maxLength": 200
},
{
"type": "null"
}
]
},
"status": {
"type": "string",
"enum": [
"provisioning",
"active",
"suspended",
"released"
]
},
"inventoryState": {
"anyOf": [
{
"type": "string",
"enum": [
"grace",
"pool"
]
},
{
"type": "null"
}
]
},
"graceUntil": {
"anyOf": [
{
"type": "string",
"format": "date-time",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
},
{
"type": "null"
}
]
},
"messagingLane": {
"type": "string",
"enum": [
"sitecall",
"atriam"
]
},
"voiceLane": {
"type": "string",
"enum": [
"sitecall",
"atriam"
]
},
"carrierNumberId": {
"anyOf": [
{
"type": "string",
"minLength": 1
},
{
"type": "null"
}
]
},
"messagingProfileId": {
"anyOf": [
{
"type": "string",
"minLength": 1
},
{
"type": "null"
}
]
},
"billingGroupId": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"texting": {
"type": "object",
"properties": {
"campaignId": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"assignmentStatus": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"targetCampaignId": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"targetStatus": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
}
},
"required": [
"campaignId",
"assignmentStatus",
"targetCampaignId",
"targetStatus"
]
},
"updatedAt": {
"type": "string",
"format": "date-time",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
}
},
"required": [
"sitecallNumberId",
"phoneNumber",
"applicationId",
"externalWorkspaceId",
"externalNumberId",
"status",
"inventoryState",
"graceUntil",
"messagingLane",
"billingGroupId",
"texting",
"updatedAt"
]
}
},
"required": [
"type",
"number"
]
},
{
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "numbers"
},
"numbers": {
"maxItems": 500,
"type": "array",
"items": {
"type": "object",
"properties": {
"sitecallNumberId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"phoneNumber": {
"type": "string",
"pattern": "^\\+[1-9]\\d{6,14}$"
},
"applicationId": {
"anyOf": [
{
"type": "string",
"minLength": 1,
"pattern": "^[a-z][a-z0-9_-]{1,63}$"
},
{
"type": "null"
}
]
},
"externalWorkspaceId": {
"anyOf": [
{
"type": "string",
"minLength": 1,
"maxLength": 200
},
{
"type": "null"
}
]
},
"externalNumberId": {
"anyOf": [
{
"type": "string",
"minLength": 1,
"maxLength": 200
},
{
"type": "null"
}
]
},
"status": {
"type": "string",
"enum": [
"provisioning",
"active",
"suspended",
"released"
]
},
"inventoryState": {
"anyOf": [
{
"type": "string",
"enum": [
"grace",
"pool"
]
},
{
"type": "null"
}
]
},
"graceUntil": {
"anyOf": [
{
"type": "string",
"format": "date-time",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
},
{
"type": "null"
}
]
},
"messagingLane": {
"type": "string",
"enum": [
"sitecall",
"atriam"
]
},
"voiceLane": {
"type": "string",
"enum": [
"sitecall",
"atriam"
]
},
"carrierNumberId": {
"anyOf": [
{
"type": "string",
"minLength": 1
},
{
"type": "null"
}
]
},
"messagingProfileId": {
"anyOf": [
{
"type": "string",
"minLength": 1
},
{
"type": "null"
}
]
},
"billingGroupId": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"texting": {
"type": "object",
"properties": {
"campaignId": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"assignmentStatus": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"targetCampaignId": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"targetStatus": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
}
},
"required": [
"campaignId",
"assignmentStatus",
"targetCampaignId",
"targetStatus"
]
},
"updatedAt": {
"type": "string",
"format": "date-time",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
}
},
"required": [
"sitecallNumberId",
"phoneNumber",
"applicationId",
"externalWorkspaceId",
"externalNumberId",
"status",
"inventoryState",
"graceUntil",
"messagingLane",
"billingGroupId",
"texting",
"updatedAt"
]
}
}
},
"required": [
"type",
"numbers"
]
}
]
}Verification codes
Text a one-time code from your company's approved sender (workspace key) or your application's OTP sender (application key).
- Scope
verify:sendwithworkspace_key;messages:*withapplication_key- Credentials
workspace_key,application_key- Workspace
- None (named in the body, or not needed)
- Idempotency
- Idempotency-Key honored when sent (a UUID)
- Success
- 200
- Errors
{ error: "<code>" }- Retry
- Never automatically: a person decides
Refusals are flat ({ error: "rate_limited" }): invalid_key 401, not_approved 403, rate_limited 429 (with Retry-After), idempotency_conflict 409, voip_not_supported 422, send_failed 502. The Idempotency-Key, when sent, is a UUID.
Request body
{
"type": "object",
"properties": {
"to": {
"type": "string",
"pattern": "^\\+1[2-9]\\d{2}[2-9]\\d{6}$"
},
"code": {
"type": "string",
"pattern": "^\\d{4,8}$"
},
"voipCheck": {
"type": "string",
"enum": [
"block",
"skip"
]
}
},
"required": [
"to",
"code"
]
}Response 200
{
"type": "object",
"properties": {
"status": {
"type": "string",
"const": "sent"
}
},
"required": [
"status"
]
}Provisioning
A workspace's activation progress: missing company facts and each number's voice and texting state.
- Scope
- none
- Credentials
user_session- Workspace
- x-sitecall-workspace-id (or x-sitecall-external-workspace-id with a key)
- Idempotency
- No Idempotency-Key: safe to repeat
- Success
- 200
- Errors
{ error: "<message>" }- Retry
- Safe with the same Idempotency-Key
Response 200
{
"type": "object",
"properties": {
"version": {
"type": "number",
"const": 1
},
"workspaceId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"generatedAt": {
"type": "string"
},
"company": {
"type": "object",
"properties": {
"ready": {
"type": "boolean"
},
"missingFields": {
"type": "array",
"items": {
"type": "string"
}
}
},
"required": [
"ready",
"missingFields"
]
},
"numbers": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"phoneE164": {
"type": "string"
},
"voice": {
"type": "string",
"enum": [
"connecting",
"routing_required",
"configured",
"inactive"
]
},
"texting": {
"type": "string",
"enum": [
"not_started",
"pending",
"needs_attention",
"ready",
"inactive"
]
},
"registration": {
"type": "string",
"enum": [
"toll_free",
"10dlc"
]
},
"nextAction": {
"type": "string",
"enum": [
"wait",
"contact_support",
"configure_routing",
"submit_texting",
"review_texting",
"none"
]
}
},
"required": [
"id",
"phoneE164",
"voice",
"texting",
"registration",
"nextAction"
]
}
},
"nextAction": {
"type": "string",
"enum": [
"complete_company",
"choose_number",
"activate_numbers",
"none"
]
}
},
"required": [
"version",
"workspaceId",
"generatedAt",
"company",
"numbers",
"nextAction"
]
}Run one provisioning command: company profile, number search, quote, purchase, routing, caller name, texting registration.
- Scope
- none
- Credentials
user_session- Workspace
- x-sitecall-workspace-id (or x-sitecall-external-workspace-id with a key)
- Idempotency
- No Idempotency-Key: safe to repeat
- Success
- 200
- Errors
{ error: "<message>" }- Retry
- Never automatically: a person decides
Only the provisioning commands are accepted here. A purchase is never retried automatically: after an uncertain answer, read the activation and decide.
Request body
{
"oneOf": [
{
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "quote_number"
},
"phoneE164": {
"type": "string",
"pattern": "^\\+[1-9]\\d{7,14}$"
},
"temporaryForPortRequestId": {
"anyOf": [
{
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
{
"type": "null"
}
]
}
},
"required": [
"type",
"phoneE164",
"temporaryForPortRequestId"
]
},
{
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "submit_toll_free"
},
"phoneNumberId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"details": {
"type": "object",
"properties": {
"contactFirstName": {
"type": "string",
"minLength": 1,
"maxLength": 160
},
"contactLastName": {
"type": "string",
"minLength": 1,
"maxLength": 160
},
"stateName": {
"type": "string",
"minLength": 2,
"maxLength": 100
},
"entityType": {
"type": "string",
"enum": [
"SOLE_PROPRIETOR",
"PRIVATE_PROFIT",
"PUBLIC_PROFIT",
"NON_PROFIT",
"GOVERNMENT"
]
},
"messageVolume": {
"type": "string",
"enum": [
"10",
"100",
"1,000",
"10,000",
"100,000",
"250,000",
"500,000",
"750,000",
"1,000,000",
"5,000,000",
"10,000,000+"
]
},
"useCase": {
"type": "string",
"enum": [
"2FA",
"Conversational / Alerts",
"App Notifications",
"Mixed"
]
},
"useCaseSummary": {
"type": "string",
"minLength": 20,
"maxLength": 500
},
"productionMessageContent": {
"type": "string",
"minLength": 10,
"maxLength": 1000
},
"optInWorkflow": {
"type": "string",
"minLength": 20,
"maxLength": 500
},
"optInWorkflowImageURLs": {
"minItems": 1,
"maxItems": 5,
"type": "array",
"items": {
"type": "string",
"maxLength": 500,
"format": "uri"
}
},
"privacyPolicyURL": {
"type": "string",
"maxLength": 500,
"format": "uri"
},
"termsAndConditionURL": {
"type": "string",
"maxLength": 500,
"format": "uri"
},
"additionalInformation": {
"type": "string",
"maxLength": 500
},
"confirmed": {
"type": "boolean",
"const": true
}
},
"required": [
"contactFirstName",
"contactLastName",
"stateName",
"entityType",
"messageVolume",
"useCase",
"useCaseSummary",
"productionMessageContent",
"optInWorkflow",
"optInWorkflowImageURLs",
"privacyPolicyURL",
"termsAndConditionURL",
"additionalInformation",
"confirmed"
]
}
},
"required": [
"type",
"phoneNumberId",
"details"
]
},
{
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "refresh_toll_free"
},
"phoneNumberId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
}
},
"required": [
"type",
"phoneNumberId"
]
},
{
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "save_company_profile"
},
"profile": {
"type": "object",
"properties": {
"legalName": {
"type": "string",
"maxLength": 160
},
"businessType": {
"type": "string",
"enum": [
"registered",
"sole_proprietor"
]
},
"registrationNumber": {
"type": "string",
"maxLength": 80
},
"registrationType": {
"type": "string",
"maxLength": 40
},
"registrationCountry": {
"type": "string",
"maxLength": 2
},
"website": {
"type": "string",
"maxLength": 500
},
"contactName": {
"type": "string",
"maxLength": 160
},
"contactEmail": {
"type": "string",
"maxLength": 254
},
"contactPhone": {
"type": "string",
"maxLength": 20
},
"streetAddress": {
"type": "string",
"maxLength": 200
},
"extendedAddress": {
"type": "string",
"maxLength": 120
},
"locality": {
"type": "string",
"maxLength": 120
},
"administrativeArea": {
"type": "string",
"maxLength": 80
},
"postalCode": {
"type": "string",
"maxLength": 20
},
"countryCode": {
"type": "string",
"maxLength": 2
}
},
"required": [
"legalName",
"businessType",
"registrationNumber",
"registrationType",
"registrationCountry",
"website",
"contactName",
"contactEmail",
"contactPhone",
"streetAddress",
"extendedAddress",
"locality",
"administrativeArea",
"postalCode",
"countryCode"
]
},
"confirmed": {
"type": "boolean",
"const": true
}
},
"required": [
"type",
"profile",
"confirmed"
]
},
{
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "create_workspace"
},
"name": {
"type": "string",
"minLength": 1,
"maxLength": 120
},
"timezone": {
"type": "string",
"minLength": 1,
"maxLength": 100
}
},
"required": [
"type",
"name",
"timezone"
]
},
{
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "join_workspace"
},
"workspaceId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
}
},
"required": [
"type",
"workspaceId"
]
},
{
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "send_message"
},
"commandId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"conversationId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"text": {
"type": "string",
"minLength": 1,
"maxLength": 4096
}
},
"required": [
"type",
"commandId",
"conversationId",
"text"
]
},
{
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "start_call"
},
"commandId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"phoneNumberId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"destinationE164": {
"type": "string",
"pattern": "^\\+[1-9]\\d{7,14}$"
}
},
"required": [
"type",
"commandId",
"phoneNumberId",
"destinationE164"
]
},
{
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "hangup_call"
},
"callId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
}
},
"required": [
"type",
"callId"
]
},
{
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "route_call"
},
"callId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"route": {
"type": "string",
"enum": [
"ai",
"human"
]
}
},
"required": [
"type",
"callId",
"route"
]
},
{
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "create_campaign"
},
"name": {
"type": "string",
"minLength": 1,
"maxLength": 120
},
"aiAgentId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"phoneNumberId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"callsPerHour": {
"type": "integer",
"minimum": 1,
"maximum": 500
},
"maxAttempts": {
"type": "integer",
"minimum": 1,
"maximum": 5
},
"quietHoursStart": {
"type": "integer",
"minimum": 0,
"maximum": 23
},
"quietHoursEnd": {
"type": "integer",
"minimum": 0,
"maximum": 23
},
"timezone": {
"type": "string",
"minLength": 1,
"maxLength": 100
},
"targets": {
"type": "string",
"maxLength": 200000
}
},
"required": [
"type",
"name",
"aiAgentId",
"phoneNumberId",
"callsPerHour",
"maxAttempts",
"quietHoursStart",
"quietHoursEnd",
"timezone",
"targets"
]
},
{
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "set_campaign_status"
},
"campaignId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"status": {
"type": "string",
"enum": [
"running",
"paused"
]
}
},
"required": [
"type",
"campaignId",
"status"
]
},
{
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "upsert_agent"
},
"agentId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"input": {
"type": "object",
"properties": {
"name": {
"type": "string",
"minLength": 1,
"maxLength": 120
},
"description": {
"anyOf": [
{
"type": "string",
"maxLength": 500
},
{
"type": "null"
}
]
},
"instructions": {
"type": "string",
"minLength": 1,
"maxLength": 10000
},
"voiceId": {
"anyOf": [
{
"type": "string",
"maxLength": 120
},
{
"type": "null"
}
]
},
"configuration": {
"type": "object",
"properties": {
"firstMessage": {
"anyOf": [
{
"type": "string",
"maxLength": 1000
},
{
"type": "null"
}
]
},
"llm": {
"type": "string",
"minLength": 1,
"maxLength": 120
},
"reasoningEffort": {
"type": "string",
"enum": [
"none",
"minimal",
"low",
"medium",
"high",
"xhigh",
"max"
]
},
"temperature": {
"type": "number",
"minimum": 0,
"maximum": 1
},
"maxCallSeconds": {
"type": "integer",
"minimum": 30,
"maximum": 3600
},
"language": {
"type": "string",
"minLength": 2,
"maxLength": 10
},
"providerDestinationE164": {
"type": "string",
"pattern": "^\\+[1-9]\\d{7,14}$"
}
},
"required": [
"firstMessage",
"llm",
"reasoningEffort",
"temperature",
"maxCallSeconds",
"language",
"providerDestinationE164"
]
}
},
"required": [
"name",
"description",
"instructions",
"voiceId",
"configuration"
]
}
},
"required": [
"type",
"input"
]
},
{
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "update_workspace"
},
"name": {
"type": "string",
"minLength": 1,
"maxLength": 120
},
"timezone": {
"type": "string",
"minLength": 1,
"maxLength": 100
}
},
"required": [
"type",
"name",
"timezone"
]
},
{
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "update_notifications"
},
"calls": {
"type": "boolean"
},
"messages": {
"type": "boolean"
}
},
"required": [
"type",
"calls",
"messages"
]
},
{
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "update_presence"
},
"phoneE164": {
"anyOf": [
{
"type": "string",
"pattern": "^\\+[1-9]\\d{7,14}$"
},
{
"type": "null"
}
]
},
"availability": {
"type": "string",
"enum": [
"offline",
"available",
"busy",
"away"
]
}
},
"required": [
"type",
"phoneE164",
"availability"
]
},
{
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "create_invite"
},
"email": {
"type": "string",
"format": "email",
"pattern": "^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"
},
"role": {
"type": "string",
"enum": [
"admin",
"agent"
]
}
},
"required": [
"type",
"email",
"role"
]
},
{
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "accept_invite"
},
"inviteToken": {
"type": "string",
"minLength": 16,
"maxLength": 512
}
},
"required": [
"type",
"inviteToken"
]
},
{
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "save_routing"
},
"phoneNumberId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"inboxId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"aiAgentId": {
"anyOf": [
{
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
{
"type": "null"
}
]
},
"mode": {
"type": "string",
"enum": [
"human",
"ai",
"hybrid"
]
},
"aiShare": {
"type": "integer",
"minimum": 0,
"maximum": 100
}
},
"required": [
"type",
"phoneNumberId",
"inboxId",
"aiAgentId",
"mode",
"aiShare"
]
},
{
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "set_caller_name"
},
"phoneNumberId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"callerName": {
"anyOf": [
{
"type": "string",
"minLength": 1,
"maxLength": 15
},
{
"type": "null"
}
]
}
},
"required": [
"type",
"phoneNumberId",
"callerName"
]
},
{
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "search_numbers"
},
"areaCode": {
"type": "string",
"pattern": "^\\d{3}$"
},
"numberType": {
"type": "string",
"enum": [
"toll_free",
"local"
]
}
},
"required": [
"type"
]
},
{
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "buy_number"
},
"quoteId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"phoneE164": {
"type": "string",
"pattern": "^\\+[1-9]\\d{7,14}$"
},
"temporaryForPortRequestId": {
"anyOf": [
{
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
{
"type": "null"
}
]
}
},
"required": [
"type",
"phoneE164",
"temporaryForPortRequestId"
]
},
{
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "submit_dlc_identity"
},
"identity": {
"type": "object",
"properties": {
"businessName": {
"type": "string",
"minLength": 1,
"maxLength": 120
},
"ein": {
"anyOf": [
{
"type": "string",
"pattern": "^\\d{9}$"
},
{
"type": "null"
}
]
},
"firstName": {
"anyOf": [
{
"type": "string",
"minLength": 1,
"maxLength": 60
},
{
"type": "null"
}
]
},
"lastName": {
"anyOf": [
{
"type": "string",
"minLength": 1,
"maxLength": 60
},
{
"type": "null"
}
]
},
"email": {
"type": "string",
"format": "email",
"pattern": "^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"
},
"phone": {
"type": "string",
"pattern": "^\\+[1-9]\\d{7,14}$"
},
"mobilePhone": {
"anyOf": [
{
"type": "string",
"pattern": "^\\+[1-9]\\d{7,14}$"
},
{
"type": "null"
}
]
},
"street": {
"type": "string",
"minLength": 1,
"maxLength": 160
},
"city": {
"type": "string",
"minLength": 1,
"maxLength": 80
},
"state": {
"type": "string",
"minLength": 2,
"maxLength": 2
},
"postalCode": {
"type": "string",
"pattern": "^\\d{5}(-\\d{4})?$"
},
"website": {
"anyOf": [
{
"type": "string",
"format": "uri"
},
{
"type": "null"
}
]
},
"path": {
"type": "string",
"enum": [
"sole_prop",
"standard"
]
}
},
"required": [
"businessName",
"ein",
"firstName",
"lastName",
"email",
"phone",
"mobilePhone",
"street",
"city",
"state",
"postalCode",
"website",
"path"
]
}
},
"required": [
"type",
"identity"
]
},
{
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "verify_dlc_otp"
},
"otpPin": {
"type": "string",
"pattern": "^\\d{4,8}$"
}
},
"required": [
"type",
"otpPin"
]
},
{
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "resolve_port_number"
},
"phoneE164": {
"type": "string",
"pattern": "^\\+[1-9]\\d{7,14}$"
}
},
"required": [
"type",
"phoneE164"
]
},
{
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "start_port"
},
"phoneE164": {
"type": "string",
"pattern": "^\\+[1-9]\\d{7,14}$"
},
"losingProvider": {
"type": "string",
"enum": [
"housecall_pro",
"service_titan",
"dialpad",
"quo",
"google_voice",
"ringcentral",
"twilio",
"other"
]
}
},
"required": [
"type",
"phoneE164",
"losingProvider"
]
},
{
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "create_port_upload_grant"
},
"portRequestId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"fileName": {
"type": "string",
"minLength": 1,
"maxLength": 240
},
"contentType": {
"type": "string",
"enum": [
"application/pdf",
"image/jpeg",
"image/png"
]
}
},
"required": [
"type",
"portRequestId",
"fileName",
"contentType"
]
},
{
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "submit_port"
},
"portRequestId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"invoiceDocumentId": {
"type": "string",
"minLength": 1,
"maxLength": 180
},
"entityName": {
"type": "string",
"minLength": 1,
"maxLength": 160
},
"authorizedPersonName": {
"type": "string",
"minLength": 1,
"maxLength": 160
},
"accountNumber": {
"type": "string",
"minLength": 1,
"maxLength": 120
},
"pin": {
"anyOf": [
{
"type": "string",
"maxLength": 40
},
{
"type": "null"
}
]
},
"billingPhoneNumber": {
"type": "string",
"pattern": "^\\+[1-9]\\d{7,14}$"
},
"streetAddress": {
"type": "string",
"minLength": 1,
"maxLength": 200
},
"extendedAddress": {
"anyOf": [
{
"type": "string",
"maxLength": 120
},
{
"type": "null"
}
]
},
"locality": {
"type": "string",
"minLength": 1,
"maxLength": 120
},
"administrativeArea": {
"type": "string",
"minLength": 2,
"maxLength": 80
},
"postalCode": {
"type": "string",
"minLength": 5,
"maxLength": 20
},
"signerName": {
"type": "string",
"minLength": 1,
"maxLength": 160
},
"authorization": {
"type": "string",
"const": "I authorize Sitecall to transfer this number and certify that I can act for this business."
}
},
"required": [
"type",
"portRequestId",
"invoiceDocumentId",
"entityName",
"authorizedPersonName",
"accountNumber",
"pin",
"billingPhoneNumber",
"streetAddress",
"extendedAddress",
"locality",
"administrativeArea",
"postalCode",
"signerName",
"authorization"
]
},
{
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "cancel_port"
},
"portRequestId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"confirmation": {
"type": "string",
"const": "I want to stop this number transfer."
}
},
"required": [
"type",
"portRequestId",
"confirmation"
]
},
{
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "verify_port"
},
"portRequestId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"capability": {
"type": "string",
"enum": [
"voice",
"messaging"
]
}
},
"required": [
"type",
"portRequestId",
"capability"
]
},
{
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "release_temporary_number"
},
"portRequestId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"confirmPhoneE164": {
"type": "string",
"pattern": "^\\+[1-9]\\d{7,14}$"
}
},
"required": [
"type",
"portRequestId",
"confirmPhoneE164"
]
},
{
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "activate_fast_port"
},
"portRequestId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
}
},
"required": [
"type",
"portRequestId"
]
},
{
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "start_checkout"
},
"plan": {
"type": "string",
"minLength": 1,
"maxLength": 80
}
},
"required": [
"type",
"plan"
]
},
{
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "open_billing_portal"
}
},
"required": [
"type"
]
}
]
}Response 200
{
"type": "object",
"properties": {
"quote": {
"type": "object",
"properties": {
"id": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"workspaceId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"workspaceName": {
"type": "string",
"maxLength": 120
},
"phoneE164": {
"type": "string",
"pattern": "^\\+[1-9]\\d{7,14}$"
},
"companyName": {
"type": "string",
"maxLength": 160
},
"monthlyAmountMinor": {
"type": "integer",
"minimum": 0,
"maximum": 9007199254740991
},
"currency": {
"type": "string",
"pattern": "^[A-Z]{3}$"
},
"billable": {
"type": "boolean"
},
"expiresAt": {
"type": "string",
"format": "date-time",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
}
},
"required": [
"id",
"workspaceId",
"workspaceName",
"phoneE164",
"companyName",
"monthlyAmountMinor",
"currency",
"billable",
"expiresAt"
]
},
"ok": {
"type": "boolean"
},
"message": {
"type": "string",
"maxLength": 1000
},
"resourceId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"phoneNumber": {
"type": "string",
"pattern": "^\\+[1-9]\\d{7,14}$"
},
"billable": {
"type": "boolean"
},
"requiresDocumentUpload": {
"type": "boolean"
},
"safeToReleaseTemporaryNumber": {
"type": "boolean"
},
"url": {
"type": "string",
"format": "uri"
},
"availableNumbers": {
"maxItems": 20,
"type": "array",
"items": {
"type": "object",
"properties": {
"phoneNumber": {
"type": "string",
"pattern": "^\\+[1-9]\\d{7,14}$"
},
"type": {
"type": "string",
"maxLength": 80
},
"region": {
"type": "string",
"maxLength": 120
},
"monthlyCost": {
"type": "string",
"maxLength": 40
},
"upfrontCost": {
"type": "string",
"maxLength": 40
},
"currency": {
"type": "string",
"maxLength": 12
}
},
"required": [
"phoneNumber"
]
}
},
"resolution": {
"oneOf": [
{
"type": "object",
"properties": {
"kind": {
"type": "string",
"const": "area_code"
},
"areaCode": {
"type": "string",
"pattern": "^\\d{3}$"
},
"available": {
"maxItems": 20,
"type": "array",
"items": {
"type": "object",
"properties": {
"phoneNumber": {
"type": "string",
"pattern": "^\\+[1-9]\\d{7,14}$"
},
"type": {
"type": "string",
"maxLength": 80
},
"region": {
"type": "string",
"maxLength": 120
},
"monthlyCost": {
"type": "string",
"maxLength": 40
},
"upfrontCost": {
"type": "string",
"maxLength": 40
},
"currency": {
"type": "string",
"maxLength": 12
}
},
"required": [
"phoneNumber"
]
}
}
},
"required": [
"kind",
"areaCode",
"available"
]
},
{
"type": "object",
"properties": {
"kind": {
"type": "string",
"const": "connected"
},
"phoneNumber": {
"type": "string",
"pattern": "^\\+[1-9]\\d{7,14}$"
}
},
"required": [
"kind",
"phoneNumber"
]
},
{
"type": "object",
"properties": {
"phoneNumber": {
"type": "string",
"pattern": "^\\+[1-9]\\d{7,14}$"
},
"type": {
"type": "string",
"maxLength": 80
},
"region": {
"type": "string",
"maxLength": 120
},
"monthlyCost": {
"type": "string",
"maxLength": 40
},
"upfrontCost": {
"type": "string",
"maxLength": 40
},
"currency": {
"type": "string",
"maxLength": 12
},
"kind": {
"type": "string",
"const": "available"
}
},
"required": [
"phoneNumber",
"kind"
]
},
{
"type": "object",
"properties": {
"kind": {
"type": "string",
"const": "portable"
},
"phoneNumber": {
"type": "string",
"pattern": "^\\+[1-9]\\d{7,14}$"
},
"fastPortable": {
"type": "boolean"
},
"messagingCapable": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "null"
}
]
}
},
"required": [
"kind",
"phoneNumber",
"fastPortable",
"messagingCapable"
]
},
{
"type": "object",
"properties": {
"kind": {
"type": "string",
"const": "unavailable"
},
"phoneNumber": {
"type": "string",
"pattern": "^\\+[1-9]\\d{7,14}$"
},
"reason": {
"type": "string",
"minLength": 1,
"maxLength": 1000
}
},
"required": [
"kind",
"phoneNumber",
"reason"
]
},
{
"type": "object",
"properties": {
"kind": {
"type": "string",
"const": "invalid"
},
"message": {
"type": "string",
"minLength": 1,
"maxLength": 1000
}
},
"required": [
"kind",
"message"
]
}
]
},
"uploadGrant": {
"type": "object",
"properties": {
"uploadUrl": {
"type": "string",
"format": "uri"
},
"uploadToken": {
"type": "string",
"minLength": 1,
"maxLength": 2048
},
"expiresAt": {
"type": "integer",
"exclusiveMinimum": 0,
"maximum": 9007199254740991
},
"maxBytes": {
"type": "integer",
"exclusiveMinimum": 0,
"maximum": 9007199254740991
},
"allowedTypes": {
"maxItems": 3,
"type": "array",
"items": {
"type": "string",
"enum": [
"application/pdf",
"image/jpeg",
"image/png"
]
}
}
},
"required": [
"uploadUrl",
"uploadToken",
"expiresAt",
"maxBytes",
"allowedTypes"
]
}
},
"required": [
"ok"
]
}The provisioning commands' JSON Schemas.
- Scope
- none
- Credentials
public- Workspace
- None (named in the body, or not needed)
- Idempotency
- No Idempotency-Key: safe to repeat
- Success
- 200
- Errors
{ error: "<message>" }- Retry
- Safe with the same Idempotency-Key
Response 200
{
"type": "object",
"properties": {
"version": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
"endpoint": {
"type": "string"
}
},
"required": [
"version",
"endpoint"
],
"additionalProperties": {}
}