Reference
REST API
All 106 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
- Usage limits
- AI agents
- Agents
- Calls
- Recordings
- Voicemails
- Transcripts
- Messages
- Team metrics
- Emergency locations
- Webhooks
- Event log
- Numbers
- Verification codes
- Provisioning
- More
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": 10,
"type": "array",
"items": {
"type": "string",
"enum": [
"numbers:*",
"routing:*",
"calls:*",
"calls:supervise",
"devices:*",
"messages:*",
"media:read",
"webhooks:*",
"metrics:read",
"notifications:send"
]
}
}
}
}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": 10,
"type": "array",
"items": {
"type": "string",
"enum": [
"numbers:*",
"routing:*",
"calls:*",
"calls:supervise",
"devices:*",
"messages:*",
"media:read",
"webhooks:*",
"metrics:read",
"notifications:send"
]
}
}
},
"required": [
"token",
"expiresAt",
"applicationId",
"workspaceId",
"externalWorkspaceId",
"scopes"
]
}Application users
Create or update an application user by your own user id (role agent, supervisor, admin or viewer); numberIds sets the numbers it may call from beyond its lines.
- 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",
"viewer"
]
},
"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": {
"type": [
"string",
"null"
]
},
"role": {
"anyOf": [
{
"type": "string",
"enum": [
"agent",
"supervisor",
"admin",
"viewer"
]
},
{
"type": "string",
"minLength": 1,
"maxLength": 100
}
]
},
"availability": {
"anyOf": [
{
"type": "string",
"enum": [
"available",
"away",
"offline"
]
},
{
"type": "string",
"minLength": 1,
"maxLength": 100
}
]
},
"active": {
"type": "boolean"
},
"revokedAt": {
"type": [
"string",
"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": {
"type": [
"string",
"null"
]
},
"role": {
"anyOf": [
{
"type": "string",
"enum": [
"agent",
"supervisor",
"admin",
"viewer"
]
},
{
"type": "string",
"minLength": 1,
"maxLength": 100
}
]
},
"availability": {
"anyOf": [
{
"type": "string",
"enum": [
"available",
"away",
"offline"
]
},
{
"type": "string",
"minLength": 1,
"maxLength": 100
}
]
},
"active": {
"type": "boolean"
},
"revokedAt": {
"type": [
"string",
"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": {
"type": [
"string",
"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": {
"type": [
"string",
"null"
]
},
"role": {
"anyOf": [
{
"type": "string",
"enum": [
"agent",
"supervisor",
"admin",
"viewer"
]
},
{
"type": "string",
"minLength": 1,
"maxLength": 100
}
]
},
"availability": {
"anyOf": [
{
"type": "string",
"enum": [
"available",
"away",
"offline"
]
},
{
"type": "string",
"minLength": 1,
"maxLength": 100
}
]
},
"active": {
"type": "boolean"
},
"revokedAt": {
"type": [
"string",
"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": {
"type": [
"string",
"null"
]
},
"role": {
"anyOf": [
{
"type": "string",
"enum": [
"agent",
"supervisor",
"admin",
"viewer"
]
},
{
"type": "string",
"minLength": 1,
"maxLength": 100
}
]
},
"availability": {
"anyOf": [
{
"type": "string",
"enum": [
"available",
"away",
"offline"
]
},
{
"type": "string",
"minLength": 1,
"maxLength": 100
}
]
},
"active": {
"type": "boolean"
},
"revokedAt": {
"type": [
"string",
"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"
]
}Set an application user's lines at once: set, or add and/or remove; lines it keeps keep their ring mode.
- Scope
routing:*- 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
Request body
{
"anyOf": [
{
"type": "object",
"properties": {
"set": {
"maxItems": 200,
"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": [
"set"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"add": {
"maxItems": 200,
"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)$"
}
},
"remove": {
"maxItems": 200,
"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)$"
}
}
},
"additionalProperties": false
}
]
}Response 200
{
"type": "object",
"properties": {
"lines": {
"type": "array",
"items": {
"type": "object",
"properties": {
"numberId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"ringMode": {
"type": "string",
"minLength": 1
}
},
"required": [
"numberId",
"ringMode"
]
}
},
"numbers": {
"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",
"aging",
"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"
}
]
},
"carrierNumberId": {
"anyOf": [
{
"type": "string",
"minLength": 1
},
{
"type": "null"
}
]
},
"messagingProfileId": {
"anyOf": [
{
"type": "string",
"minLength": 1
},
{
"type": "null"
}
]
},
"billingGroupId": {
"type": [
"string",
"null"
]
},
"texting": {
"type": "object",
"properties": {
"campaignId": {
"type": [
"string",
"null"
]
},
"assignmentStatus": {
"type": [
"string",
"null"
]
},
"targetCampaignId": {
"type": [
"string",
"null"
]
},
"targetStatus": {
"type": [
"string",
"null"
]
},
"ownCampaign": {
"type": "boolean"
}
},
"required": [
"campaignId",
"assignmentStatus",
"targetCampaignId",
"targetStatus"
]
},
"isDefault": {
"type": "boolean"
},
"emergency": {
"type": "object",
"properties": {
"status": {
"anyOf": [
{
"type": "string",
"enum": [
"unset",
"pending",
"enabled",
"failed",
"unsupported"
]
},
{
"type": "string",
"minLength": 1,
"maxLength": 100
}
]
},
"reason": {
"anyOf": [
{
"type": "string",
"maxLength": 200
},
{
"type": "null"
}
]
},
"updatedAt": {
"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": [
"status",
"updatedAt"
]
},
"line": {
"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)$"
},
"phoneNumber": {
"type": "string",
"pattern": "^\\+[1-9]\\d{6,14}$"
},
"label": {
"type": [
"string",
"null"
]
},
"muted": {
"type": "boolean"
},
"recording": {
"type": "object",
"properties": {
"enabled": {
"type": "boolean"
},
"disclosure": {
"type": "boolean"
}
},
"required": [
"enabled",
"disclosure"
]
},
"voicemail": {
"type": "boolean"
},
"receptionist": {
"type": "object",
"properties": {
"enabled": {
"type": "boolean"
},
"afterSecs": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
}
},
"required": [
"enabled",
"afterSecs"
]
},
"ringTimeoutSecs": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
"receptionistAgentId": {
"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"
}
]
},
"members": {
"type": "array",
"items": {
"type": "object",
"properties": {
"appUserId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-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",
"minLength": 1,
"maxLength": 200
},
{
"type": "null"
}
]
},
"role": {
"type": "string",
"minLength": 1
},
"ringMode": {
"type": "string",
"minLength": 1
},
"addedAt": {
"type": "string",
"minLength": 1
}
},
"required": [
"appUserId",
"externalUserId",
"role",
"ringMode",
"addedAt"
]
}
},
"planId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"planVersionId": {
"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"
}
]
},
"revision": {
"type": "integer",
"exclusiveMinimum": 0,
"maximum": 9007199254740991
},
"createdAt": {
"type": "string",
"minLength": 1
},
"updatedAt": {
"type": "string",
"minLength": 1
}
},
"required": [
"phoneNumberId",
"phoneNumber",
"label",
"muted",
"recording",
"voicemail",
"receptionist",
"ringTimeoutSecs",
"receptionistAgentId",
"members",
"planId",
"planVersionId",
"revision",
"createdAt",
"updatedAt"
]
},
{
"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": [
"sitecallNumberId",
"phoneNumber",
"applicationId",
"externalWorkspaceId",
"externalNumberId",
"status",
"inventoryState",
"graceUntil",
"billingGroupId",
"texting",
"updatedAt"
]
}
}
},
"required": [
"lines",
"numbers"
]
}Devices
Register (or refresh) the token user's device and its push tokens; registering again is the heartbeat. credentialLive false: log in again. An Atriam phone below its app's floor (or naming no appVersion) is 426 update_required.
- 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": {
"type": [
"string",
"null"
]
},
"appVersion": {
"type": [
"string",
"null"
]
},
"lastSeenAt": {
"type": "string"
},
"revokedAt": {
"type": [
"string",
"null"
]
},
"createdAt": {
"type": "string"
},
"credentialLive": {
"type": "boolean"
}
},
"required": [
"id",
"deviceId",
"userId",
"workspaceId",
"platform",
"bundleId",
"appVersion",
"lastSeenAt",
"revokedAt",
"createdAt",
"credentialLive"
]
}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": {
"type": [
"string",
"null"
]
},
"appVersion": {
"type": [
"string",
"null"
]
},
"lastSeenAt": {
"type": "string"
},
"revokedAt": {
"type": [
"string",
"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": {
"type": [
"string",
"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
An SDK login for one of the token user's devices: its SIP identity (kept while the device logs in) and a JWT login token, good until expiresAt.
- 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 a fresh login token.
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
},
"loginToken": {
"type": "string",
"minLength": 1
},
"expiresAt": {
"type": "string",
"minLength": 1
}
},
"required": [
"deviceId",
"sipUsername",
"loginToken",
"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": {
"type": [
"string",
"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": {
"type": [
"string",
"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": {
"type": [
"string",
"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": {
"type": [
"string",
"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": {
"type": [
"string",
"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": {
"type": [
"string",
"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": {
"type": [
"string",
"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": {
"type": [
"string",
"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"
]
}Usage limits
The workspace's monthly calling and texting caps its application set, and this month's usage.
- 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": {
"applicationId": {
"type": [
"string",
"null"
]
},
"monthlyCallMinutes": {
"anyOf": [
{
"type": "integer",
"minimum": 0,
"maximum": 9007199254740991
},
{
"type": "null"
}
]
},
"monthlyMessages": {
"anyOf": [
{
"type": "integer",
"minimum": 0,
"maximum": 9007199254740991
},
{
"type": "null"
}
]
},
"callMinutesUsed": {
"type": "number",
"minimum": 0
},
"messagesUsed": {
"type": "number",
"minimum": 0
},
"callCapReached": {
"type": "boolean"
},
"messageCapReached": {
"type": "boolean"
},
"periodStart": {
"type": "string",
"minLength": 1
},
"periodEnd": {
"type": "string",
"minLength": 1
}
},
"required": [
"applicationId",
"monthlyCallMinutes",
"monthlyMessages",
"callMinutesUsed",
"messagesUsed",
"callCapReached",
"messageCapReached",
"periodStart",
"periodEnd"
]
}Set the monthly calling minutes and texts of a workspace your application manages (null: no cap).
- 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
SiteCall refuses a person's new outbound call or a new text with 402 usage_cap_reached once the calendar month (UTC) has reached the cap. Inbound, 911/933 and AI calls are never capped here (AI calls run on /v1/ai-limit).
Request body
{
"type": "object",
"properties": {
"monthlyCallMinutes": {
"anyOf": [
{
"type": "integer",
"minimum": 0,
"maximum": 44640
},
{
"type": "null"
}
]
},
"monthlyMessages": {
"anyOf": [
{
"type": "integer",
"minimum": 0,
"maximum": 1000000
},
{
"type": "null"
}
]
}
},
"required": [
"monthlyCallMinutes",
"monthlyMessages"
],
"additionalProperties": false
}Response 200
{
"type": "object",
"properties": {
"applicationId": {
"type": [
"string",
"null"
]
},
"monthlyCallMinutes": {
"anyOf": [
{
"type": "integer",
"minimum": 0,
"maximum": 9007199254740991
},
{
"type": "null"
}
]
},
"monthlyMessages": {
"anyOf": [
{
"type": "integer",
"minimum": 0,
"maximum": 9007199254740991
},
{
"type": "null"
}
]
},
"callMinutesUsed": {
"type": "number",
"minimum": 0
},
"messagesUsed": {
"type": "number",
"minimum": 0
},
"callCapReached": {
"type": "boolean"
},
"messageCapReached": {
"type": "boolean"
},
"periodStart": {
"type": "string",
"minLength": 1
},
"periodEnd": {
"type": "string",
"minLength": 1
}
},
"required": [
"applicationId",
"monthlyCallMinutes",
"monthlyMessages",
"callMinutesUsed",
"messagesUsed",
"callCapReached",
"messageCapReached",
"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": [
"gemini"
]
},
{
"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": {
"type": [
"string",
"null"
]
}
},
"required": [
"data",
"nextCursor"
]
}Provision a voice-agent (provider gemini): it answers a plan's ai_answer step and places AI calls.
- 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"
]
},
"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": [
"gemini"
]
},
{
"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": [
"gemini"
]
},
{
"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": {
"type": [
"string",
"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": {
"type": [
"string",
"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": {
"type": [
"string",
"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": {
"type": [
"string",
"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": {
"type": [
"string",
"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": {
"type": [
"string",
"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": {
"type": [
"string",
"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 to a number.
- 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
A warm transfer (warm: true) consults a phone number (e164) only; to a queue or member it is a 422 warm_unsupported, and the call stays as it is.
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}$"
},
"reason": {
"type": "string",
"enum": [
"declined",
"failed"
]
}
},
"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"
]
}Take a ringing inbound call of the workspace on the token user's device, though it was not offered to them (call pickup).
- 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 in_use: answered on another device first. 404 not_found: not ringing on a ring step.
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"
]
}Log that the token user's device held or resumed its own leg of a call it answered or placed (staff metrics; the call is untouched).
- 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
403 forbidden: another device holds the call. recorded: false: the call is not connected.
Request body
{
"type": "object",
"properties": {
"deviceId": {
"type": "string",
"pattern": "^[A-Za-z0-9_.:-]{1,128}$"
},
"held": {
"type": "boolean"
},
"at": {
"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": [
"deviceId",
"held",
"at"
],
"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)$"
},
"recorded": {
"type": "boolean"
},
"duplicate": {
"type": "boolean"
}
},
"required": [
"accepted",
"callId",
"recorded",
"duplicate"
]
}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": {
"type": [
"string",
"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": {
"type": [
"string",
"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": {
"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"
}
]
},
"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": {
"type": [
"string",
"null"
]
},
"durationSecs": {
"anyOf": [
{
"type": "number",
"minimum": 0
},
{
"type": "null"
}
]
},
"model": {
"type": [
"string",
"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": {
"type": [
"string",
"null"
]
}
},
"required": [
"data",
"nextCursor"
]
}Transcribe a recording on request, imported ones included; a failed one is queued again.
- 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
SiteCall transcribes every engine recording by itself and sends transcript.ready. This covers the rest: a recording that has no transcript (an imported one), or one that failed. An imported recording has no call, so no transcript.ready follows: read it back with this call or GET /v1/transcripts/{id}.
Request body
{
"type": "object",
"properties": {
"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)$"
}
},
"required": [
"recordingId"
]
}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": {
"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"
}
]
},
"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": {
"type": [
"string",
"null"
]
},
"durationSecs": {
"anyOf": [
{
"type": "number",
"minimum": 0
},
{
"type": "null"
}
]
},
"model": {
"type": [
"string",
"null"
]
},
"createdAt": {
"type": "string",
"minLength": 1
},
"completedAt": {
"anyOf": [
{
"type": "string",
"minLength": 1
},
{
"type": "null"
}
]
},
"text": {
"type": [
"string",
"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": {
"type": [
"string",
"null"
]
}
},
"required": [
"channel",
"party",
"address"
]
}
}
},
"required": [
"id",
"callId",
"recordingId",
"kind",
"status",
"language",
"durationSecs",
"model",
"createdAt",
"completedAt",
"text",
"segments",
"channels"
]
}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": {
"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"
}
]
},
"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": {
"type": [
"string",
"null"
]
},
"durationSecs": {
"anyOf": [
{
"type": "number",
"minimum": 0
},
{
"type": "null"
}
]
},
"model": {
"type": [
"string",
"null"
]
},
"createdAt": {
"type": "string",
"minLength": 1
},
"completedAt": {
"anyOf": [
{
"type": "string",
"minLength": 1
},
{
"type": "null"
}
]
},
"text": {
"type": [
"string",
"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": {
"type": [
"string",
"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,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
An application key lists the whole workspace; an application user's token lists only the threads of the numbers assigned to that user.
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": {
"type": [
"string",
"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",
"unconfirmed"
]
},
{
"type": "string",
"minLength": 1,
"maxLength": 100
}
]
},
"errorCode": {
"type": [
"string",
"null"
]
},
"createdAt": {
"type": "string",
"minLength": 1
}
},
"required": [
"id",
"conversationId",
"phoneNumberId",
"direction",
"from",
"to",
"text",
"media",
"status",
"errorCode",
"createdAt"
]
}
},
"nextCursor": {
"type": [
"string",
"null"
]
}
},
"required": [
"data",
"nextCursor"
]
}Read a message.
- Scope
messages:*- Credentials
application_key,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)$"
},
"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": {
"type": [
"string",
"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",
"unconfirmed"
]
},
{
"type": "string",
"minLength": 1,
"maxLength": 100
}
]
},
"errorCode": {
"type": [
"string",
"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,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
},
"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": {
"type": [
"string",
"null"
]
},
"metrics": {
"type": "object",
"propertyNames": {
"type": "string"
},
"additionalProperties": {
"type": [
"number",
"null"
]
}
},
"subject": {
"anyOf": [
{
"type": "object",
"properties": {
"kind": {
"anyOf": [
{
"type": "string",
"enum": [
"workspace",
"member",
"application_user",
"queue",
"number"
]
},
{
"type": "string",
"minLength": 1,
"maxLength": 100
}
]
},
"name": {
"type": [
"string",
"null"
]
},
"e164": {
"type": [
"string",
"null"
]
},
"externalUserId": {
"type": [
"string",
"null"
]
}
},
"required": [
"kind",
"name",
"e164",
"externalUserId"
]
},
{
"type": "null"
}
]
}
},
"required": [
"dimension",
"dimensionId",
"days",
"refreshedAt",
"metrics",
"subject"
]
}
},
"nextCursor": {
"type": [
"string",
"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": {
"type": [
"string",
"null"
]
},
"offeredAt": {
"type": "string"
},
"resolvedAt": {
"type": [
"string",
"null"
]
},
"whileAvailable": {
"type": [
"boolean",
"null"
]
}
},
"required": [
"offerId",
"source",
"callId",
"memberId",
"queueId",
"phoneNumberId",
"fromE164",
"offeredAt",
"resolvedAt",
"whileAvailable"
]
}
},
"nextCursor": {
"type": [
"string",
"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": {
"type": [
"string",
"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": {
"type": [
"string",
"null"
]
},
"waitingSince": {
"type": "string"
},
"waitingSecs": {
"type": "number"
}
},
"required": [
"conversationId",
"phoneNumberId",
"externalE164",
"waitingSince",
"waitingSecs"
]
}
},
"nextCursor": {
"type": [
"string",
"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": {
"type": [
"string",
"null"
]
}
},
"required": [
"kind",
"userId"
]
},
{
"type": "object",
"properties": {
"kind": {
"type": "string",
"const": "device"
},
"deviceId": {
"type": [
"string",
"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": {
"type": [
"string",
"null"
]
}
},
"required": [
"kind",
"userId"
]
},
{
"type": "object",
"properties": {
"kind": {
"type": "string",
"const": "device"
},
"deviceId": {
"type": [
"string",
"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": {
"type": [
"string",
"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": {
"type": [
"string",
"null"
]
}
},
"required": [
"kind",
"userId"
]
},
{
"type": "object",
"properties": {
"kind": {
"type": "string",
"const": "device"
},
"deviceId": {
"type": [
"string",
"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": {
"type": [
"string",
"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",
"ai_call.completed"
]
}
},
{
"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": {
"type": [
"string",
"null"
]
}
},
"required": [
"pending",
"parked",
"lastDeliveredAt",
"lastError"
]
}
},
"required": [
"id",
"applicationId",
"url",
"description",
"eventTypes",
"enabled",
"secretRotatedAt",
"previousSecretExpiresAt",
"createdAt",
"updatedAt"
]
}
},
"nextCursor": {
"type": [
"string",
"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": 16,
"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",
"ai_call.completed"
]
}
},
"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": {
"type": [
"string",
"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",
"ai_call.completed"
]
}
},
{
"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": {
"type": [
"string",
"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": {
"type": [
"string",
"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",
"ai_call.completed"
]
}
},
{
"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": {
"type": [
"string",
"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": 16,
"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",
"ai_call.completed"
]
}
},
{
"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": {
"type": [
"string",
"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",
"ai_call.completed"
]
}
},
{
"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": {
"type": [
"string",
"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": {
"type": [
"string",
"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",
"ai_call.completed"
]
}
},
{
"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": {
"type": [
"string",
"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",
"ai_call.completed"
]
}
}
}
}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": {
"type": [
"string",
"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": {
"type": [
"string",
"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": {
"type": [
"string",
"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": {
"type": [
"string",
"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": {
"type": [
"string",
"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": {
"type": [
"string",
"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": {
"type": [
"string",
"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"
},
"reachedVoicemailRecording": {
"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": {
"type": [
"string",
"null"
]
},
"actor": {
"type": [
"string",
"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": {
"type": [
"string",
"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": {
"type": [
"string",
"null"
]
},
"media": {
"type": "array",
"items": {
"type": "object",
"properties": {
"index": {
"type": "integer",
"minimum": 0,
"maximum": 9007199254740991
},
"contentType": {
"type": "string",
"minLength": 1
},
"path": {
"type": "string",
"format": "starts_with",
"pattern": "^\\/api\\/v1\\/messages\\/.*"
},
"sourceUrl": {
"type": "string"
}
},
"required": [
"index",
"contentType"
]
}
},
"status": {
"type": "string",
"minLength": 1
},
"errorCode": {
"type": [
"string",
"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)))$"
},
"consent": {
"type": "string",
"enum": [
"opt_out",
"opt_in"
]
},
"participants": {
"type": "array",
"items": {
"type": "string",
"minLength": 1,
"maxLength": 64
}
}
},
"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": {
"type": [
"string",
"null"
]
},
"media": {
"type": "array",
"items": {
"type": "object",
"properties": {
"index": {
"type": "integer",
"minimum": 0,
"maximum": 9007199254740991
},
"contentType": {
"type": "string",
"minLength": 1
},
"path": {
"type": "string",
"format": "starts_with",
"pattern": "^\\/api\\/v1\\/messages\\/.*"
},
"sourceUrl": {
"type": "string"
}
},
"required": [
"index",
"contentType"
]
}
},
"status": {
"type": "string",
"minLength": 1
},
"errorCode": {
"type": [
"string",
"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)))$"
},
"consent": {
"type": "string",
"enum": [
"opt_out",
"opt_in"
]
},
"participants": {
"type": "array",
"items": {
"type": "string",
"minLength": 1,
"maxLength": 64
}
}
},
"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": "ai_call.completed"
},
"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": {
"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)$"
},
"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": {
"type": [
"string",
"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"
]
},
{
"type": "null"
}
]
},
"aiCall": {
"type": "object",
"properties": {
"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)$"
},
"externalRef": {
"type": [
"string",
"null"
]
},
"outcome": {
"anyOf": [
{
"type": "string",
"enum": [
"completed",
"do_not_call",
"callee_hangup",
"voicemail",
"no_answer",
"busy",
"declined",
"failed",
"ai_failed",
"time_limit",
"cancelled",
"expired",
"ai_cap_reached",
"unavailable",
"opted_out"
]
},
{
"type": "string",
"minLength": 1,
"maxLength": 100
}
]
},
"from": {
"type": "string",
"minLength": 1,
"maxLength": 64
},
"to": {
"type": "string",
"minLength": 1,
"maxLength": 64
},
"answeredBy": {
"anyOf": [
{
"anyOf": [
{
"type": "string",
"enum": [
"human",
"machine",
"unknown"
]
},
{
"type": "string",
"minLength": 1,
"maxLength": 100
}
]
},
{
"type": "null"
}
]
},
"voicemailMessageLeft": {
"type": "boolean"
},
"connectedAt": {
"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"
}
]
},
"aiSeconds": {
"type": "integer",
"minimum": 0,
"maximum": 9007199254740991
},
"answers": {
"type": "object",
"propertyNames": {
"type": "string"
},
"additionalProperties": {
"anyOf": [
{
"type": "string",
"maxLength": 2000
},
{
"type": "number"
},
{
"type": "boolean"
},
{
"type": "null"
}
]
}
},
"chosenSlotId": {
"type": [
"string",
"null"
]
},
"doNotCall": {
"type": "boolean"
},
"summary": {
"type": [
"string",
"null"
]
},
"transcript": {
"type": "array",
"items": {
"type": "object",
"properties": {
"speaker": {
"anyOf": [
{
"type": "string",
"enum": [
"agent",
"callee"
]
},
{
"type": "string",
"minLength": 1,
"maxLength": 100
}
]
},
"text": {
"type": "string"
},
"offsetSeconds": {
"type": "number",
"minimum": 0
}
},
"required": [
"speaker",
"text",
"offsetSeconds"
]
}
},
"transcriptTruncated": {
"type": "boolean"
},
"recording": {
"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)$"
},
"durationSeconds": {
"anyOf": [
{
"type": "integer",
"minimum": 0,
"maximum": 9007199254740991
},
{
"type": "null"
}
]
}
},
"required": [
"id",
"durationSeconds"
]
},
{
"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": [
"agentId",
"externalRef",
"outcome",
"from",
"to",
"answeredBy",
"voicemailMessageLeft",
"connectedAt",
"endedAt",
"aiSeconds",
"answers",
"chosenSlotId",
"doNotCall",
"summary",
"transcript",
"transcriptTruncated",
"recording",
"createdAt"
]
}
},
"required": [
"id",
"occurredAt",
"applicationId",
"workspaceId",
"externalWorkspaceId",
"sequence",
"type",
"callId",
"call",
"aiCall"
]
},
{
"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",
"aging",
"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"
}
]
},
"carrierNumberId": {
"anyOf": [
{
"type": "string",
"minLength": 1
},
{
"type": "null"
}
]
},
"messagingProfileId": {
"anyOf": [
{
"type": "string",
"minLength": 1
},
{
"type": "null"
}
]
},
"billingGroupId": {
"type": [
"string",
"null"
]
},
"texting": {
"type": "object",
"properties": {
"campaignId": {
"type": [
"string",
"null"
]
},
"assignmentStatus": {
"type": [
"string",
"null"
]
},
"targetCampaignId": {
"type": [
"string",
"null"
]
},
"targetStatus": {
"type": [
"string",
"null"
]
},
"ownCampaign": {
"type": "boolean"
}
},
"required": [
"campaignId",
"assignmentStatus",
"targetCampaignId",
"targetStatus"
]
},
"isDefault": {
"type": "boolean"
},
"emergency": {
"type": "object",
"properties": {
"status": {
"anyOf": [
{
"type": "string",
"enum": [
"unset",
"pending",
"enabled",
"failed",
"unsupported"
]
},
{
"type": "string",
"minLength": 1,
"maxLength": 100
}
]
},
"reason": {
"anyOf": [
{
"type": "string",
"maxLength": 200
},
{
"type": "null"
}
]
},
"updatedAt": {
"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": [
"status",
"updatedAt"
]
},
"line": {
"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)$"
},
"phoneNumber": {
"type": "string",
"pattern": "^\\+[1-9]\\d{6,14}$"
},
"label": {
"type": [
"string",
"null"
]
},
"muted": {
"type": "boolean"
},
"recording": {
"type": "object",
"properties": {
"enabled": {
"type": "boolean"
},
"disclosure": {
"type": "boolean"
}
},
"required": [
"enabled",
"disclosure"
]
},
"voicemail": {
"type": "boolean"
},
"receptionist": {
"type": "object",
"properties": {
"enabled": {
"type": "boolean"
},
"afterSecs": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
}
},
"required": [
"enabled",
"afterSecs"
]
},
"ringTimeoutSecs": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
"receptionistAgentId": {
"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"
}
]
},
"members": {
"type": "array",
"items": {
"type": "object",
"properties": {
"appUserId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-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",
"minLength": 1,
"maxLength": 200
},
{
"type": "null"
}
]
},
"role": {
"type": "string",
"minLength": 1
},
"ringMode": {
"type": "string",
"minLength": 1
},
"addedAt": {
"type": "string",
"minLength": 1
}
},
"required": [
"appUserId",
"externalUserId",
"role",
"ringMode",
"addedAt"
]
}
},
"planId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"planVersionId": {
"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"
}
]
},
"revision": {
"type": "integer",
"exclusiveMinimum": 0,
"maximum": 9007199254740991
},
"createdAt": {
"type": "string",
"minLength": 1
},
"updatedAt": {
"type": "string",
"minLength": 1
}
},
"required": [
"phoneNumberId",
"phoneNumber",
"label",
"muted",
"recording",
"voicemail",
"receptionist",
"ringTimeoutSecs",
"receptionistAgentId",
"members",
"planId",
"planVersionId",
"revision",
"createdAt",
"updatedAt"
]
},
{
"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": [
"sitecallNumberId",
"phoneNumber",
"applicationId",
"externalWorkspaceId",
"externalNumberId",
"status",
"inventoryState",
"graceUntil",
"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-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",
"ein",
"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": "close_workspace"
},
"externalWorkspaceId": {
"type": "string",
"minLength": 1,
"maxLength": 200
},
"dispositions": {
"maxItems": 500,
"type": "array",
"items": {
"oneOf": [
{
"type": "object",
"properties": {
"phoneNumber": {
"type": "string",
"pattern": "^\\+[1-9]\\d{6,14}$"
},
"action": {
"type": "string",
"const": "release"
}
},
"required": [
"phoneNumber",
"action"
]
},
{
"type": "object",
"properties": {
"phoneNumber": {
"type": "string",
"pattern": "^\\+[1-9]\\d{6,14}$"
},
"action": {
"type": "string",
"const": "transfer"
},
"toExternalWorkspaceId": {
"type": "string",
"minLength": 1,
"maxLength": 200
},
"idempotencyKey": {
"type": "string",
"minLength": 8,
"maxLength": 200
}
},
"required": [
"phoneNumber",
"action",
"toExternalWorkspaceId",
"idempotencyKey"
]
}
]
}
}
},
"required": [
"type",
"externalWorkspaceId",
"dispositions"
]
},
{
"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_default_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": "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": "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": {
"type": [
"string",
"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": {
"type": [
"string",
"null"
]
},
"linesMoved": {
"type": "integer",
"minimum": 0,
"maximum": 9007199254740991
},
"linesMoving": {
"type": "integer",
"minimum": 0,
"maximum": 9007199254740991
},
"linesWaiting": {
"type": "integer",
"minimum": 0,
"maximum": 9007199254740991
},
"movesHeld": {
"type": "boolean"
},
"holdReason": {
"type": [
"string",
"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)))$"
},
"rejection": {
"type": "object",
"properties": {
"message": {
"type": "string"
},
"fields": {
"type": "array",
"items": {
"type": "string",
"enum": [
"businessName",
"ein",
"street",
"city",
"state",
"postalCode",
"website"
]
}
},
"canResubmit": {
"type": "boolean"
},
"values": {
"type": "object",
"propertyNames": {
"type": "string"
},
"additionalProperties": {
"type": "string"
}
}
},
"required": [
"message",
"fields",
"canResubmit",
"values"
]
}
},
"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": {
"type": [
"string",
"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": {
"type": [
"string",
"null"
]
},
"region": {
"type": [
"string",
"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",
"aging",
"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"
}
]
},
"carrierNumberId": {
"anyOf": [
{
"type": "string",
"minLength": 1
},
{
"type": "null"
}
]
},
"messagingProfileId": {
"anyOf": [
{
"type": "string",
"minLength": 1
},
{
"type": "null"
}
]
},
"billingGroupId": {
"type": [
"string",
"null"
]
},
"texting": {
"type": "object",
"properties": {
"campaignId": {
"type": [
"string",
"null"
]
},
"assignmentStatus": {
"type": [
"string",
"null"
]
},
"targetCampaignId": {
"type": [
"string",
"null"
]
},
"targetStatus": {
"type": [
"string",
"null"
]
},
"ownCampaign": {
"type": "boolean"
}
},
"required": [
"campaignId",
"assignmentStatus",
"targetCampaignId",
"targetStatus"
]
},
"isDefault": {
"type": "boolean"
},
"emergency": {
"type": "object",
"properties": {
"status": {
"anyOf": [
{
"type": "string",
"enum": [
"unset",
"pending",
"enabled",
"failed",
"unsupported"
]
},
{
"type": "string",
"minLength": 1,
"maxLength": 100
}
]
},
"reason": {
"anyOf": [
{
"type": "string",
"maxLength": 200
},
{
"type": "null"
}
]
},
"updatedAt": {
"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": [
"status",
"updatedAt"
]
},
"line": {
"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)$"
},
"phoneNumber": {
"type": "string",
"pattern": "^\\+[1-9]\\d{6,14}$"
},
"label": {
"type": [
"string",
"null"
]
},
"muted": {
"type": "boolean"
},
"recording": {
"type": "object",
"properties": {
"enabled": {
"type": "boolean"
},
"disclosure": {
"type": "boolean"
}
},
"required": [
"enabled",
"disclosure"
]
},
"voicemail": {
"type": "boolean"
},
"receptionist": {
"type": "object",
"properties": {
"enabled": {
"type": "boolean"
},
"afterSecs": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
}
},
"required": [
"enabled",
"afterSecs"
]
},
"ringTimeoutSecs": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
"receptionistAgentId": {
"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"
}
]
},
"members": {
"type": "array",
"items": {
"type": "object",
"properties": {
"appUserId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-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",
"minLength": 1,
"maxLength": 200
},
{
"type": "null"
}
]
},
"role": {
"type": "string",
"minLength": 1
},
"ringMode": {
"type": "string",
"minLength": 1
},
"addedAt": {
"type": "string",
"minLength": 1
}
},
"required": [
"appUserId",
"externalUserId",
"role",
"ringMode",
"addedAt"
]
}
},
"planId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"planVersionId": {
"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"
}
]
},
"revision": {
"type": "integer",
"exclusiveMinimum": 0,
"maximum": 9007199254740991
},
"createdAt": {
"type": "string",
"minLength": 1
},
"updatedAt": {
"type": "string",
"minLength": 1
}
},
"required": [
"phoneNumberId",
"phoneNumber",
"label",
"muted",
"recording",
"voicemail",
"receptionist",
"ringTimeoutSecs",
"receptionistAgentId",
"members",
"planId",
"planVersionId",
"revision",
"createdAt",
"updatedAt"
]
},
{
"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": [
"sitecallNumberId",
"phoneNumber",
"applicationId",
"externalWorkspaceId",
"externalNumberId",
"status",
"inventoryState",
"graceUntil",
"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",
"aging",
"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"
}
]
},
"carrierNumberId": {
"anyOf": [
{
"type": "string",
"minLength": 1
},
{
"type": "null"
}
]
},
"messagingProfileId": {
"anyOf": [
{
"type": "string",
"minLength": 1
},
{
"type": "null"
}
]
},
"billingGroupId": {
"type": [
"string",
"null"
]
},
"texting": {
"type": "object",
"properties": {
"campaignId": {
"type": [
"string",
"null"
]
},
"assignmentStatus": {
"type": [
"string",
"null"
]
},
"targetCampaignId": {
"type": [
"string",
"null"
]
},
"targetStatus": {
"type": [
"string",
"null"
]
},
"ownCampaign": {
"type": "boolean"
}
},
"required": [
"campaignId",
"assignmentStatus",
"targetCampaignId",
"targetStatus"
]
},
"isDefault": {
"type": "boolean"
},
"emergency": {
"type": "object",
"properties": {
"status": {
"anyOf": [
{
"type": "string",
"enum": [
"unset",
"pending",
"enabled",
"failed",
"unsupported"
]
},
{
"type": "string",
"minLength": 1,
"maxLength": 100
}
]
},
"reason": {
"anyOf": [
{
"type": "string",
"maxLength": 200
},
{
"type": "null"
}
]
},
"updatedAt": {
"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": [
"status",
"updatedAt"
]
},
"line": {
"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)$"
},
"phoneNumber": {
"type": "string",
"pattern": "^\\+[1-9]\\d{6,14}$"
},
"label": {
"type": [
"string",
"null"
]
},
"muted": {
"type": "boolean"
},
"recording": {
"type": "object",
"properties": {
"enabled": {
"type": "boolean"
},
"disclosure": {
"type": "boolean"
}
},
"required": [
"enabled",
"disclosure"
]
},
"voicemail": {
"type": "boolean"
},
"receptionist": {
"type": "object",
"properties": {
"enabled": {
"type": "boolean"
},
"afterSecs": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
}
},
"required": [
"enabled",
"afterSecs"
]
},
"ringTimeoutSecs": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
"receptionistAgentId": {
"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"
}
]
},
"members": {
"type": "array",
"items": {
"type": "object",
"properties": {
"appUserId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-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",
"minLength": 1,
"maxLength": 200
},
{
"type": "null"
}
]
},
"role": {
"type": "string",
"minLength": 1
},
"ringMode": {
"type": "string",
"minLength": 1
},
"addedAt": {
"type": "string",
"minLength": 1
}
},
"required": [
"appUserId",
"externalUserId",
"role",
"ringMode",
"addedAt"
]
}
},
"planId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"planVersionId": {
"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"
}
]
},
"revision": {
"type": "integer",
"exclusiveMinimum": 0,
"maximum": 9007199254740991
},
"createdAt": {
"type": "string",
"minLength": 1
},
"updatedAt": {
"type": "string",
"minLength": 1
}
},
"required": [
"phoneNumberId",
"phoneNumber",
"label",
"muted",
"recording",
"voicemail",
"receptionist",
"ringTimeoutSecs",
"receptionistAgentId",
"members",
"planId",
"planVersionId",
"revision",
"createdAt",
"updatedAt"
]
},
{
"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": [
"sitecallNumberId",
"phoneNumber",
"applicationId",
"externalWorkspaceId",
"externalNumberId",
"status",
"inventoryState",
"graceUntil",
"billingGroupId",
"texting",
"updatedAt"
]
}
}
},
"required": [
"type",
"numbers"
]
},
{
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "workspace_closed"
},
"externalWorkspaceId": {
"type": "string",
"minLength": 1,
"maxLength": 200
},
"closedAt": {
"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)))$"
},
"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",
"aging",
"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"
}
]
},
"carrierNumberId": {
"anyOf": [
{
"type": "string",
"minLength": 1
},
{
"type": "null"
}
]
},
"messagingProfileId": {
"anyOf": [
{
"type": "string",
"minLength": 1
},
{
"type": "null"
}
]
},
"billingGroupId": {
"type": [
"string",
"null"
]
},
"texting": {
"type": "object",
"properties": {
"campaignId": {
"type": [
"string",
"null"
]
},
"assignmentStatus": {
"type": [
"string",
"null"
]
},
"targetCampaignId": {
"type": [
"string",
"null"
]
},
"targetStatus": {
"type": [
"string",
"null"
]
},
"ownCampaign": {
"type": "boolean"
}
},
"required": [
"campaignId",
"assignmentStatus",
"targetCampaignId",
"targetStatus"
]
},
"isDefault": {
"type": "boolean"
},
"emergency": {
"type": "object",
"properties": {
"status": {
"anyOf": [
{
"type": "string",
"enum": [
"unset",
"pending",
"enabled",
"failed",
"unsupported"
]
},
{
"type": "string",
"minLength": 1,
"maxLength": 100
}
]
},
"reason": {
"anyOf": [
{
"type": "string",
"maxLength": 200
},
{
"type": "null"
}
]
},
"updatedAt": {
"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": [
"status",
"updatedAt"
]
},
"line": {
"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)$"
},
"phoneNumber": {
"type": "string",
"pattern": "^\\+[1-9]\\d{6,14}$"
},
"label": {
"type": [
"string",
"null"
]
},
"muted": {
"type": "boolean"
},
"recording": {
"type": "object",
"properties": {
"enabled": {
"type": "boolean"
},
"disclosure": {
"type": "boolean"
}
},
"required": [
"enabled",
"disclosure"
]
},
"voicemail": {
"type": "boolean"
},
"receptionist": {
"type": "object",
"properties": {
"enabled": {
"type": "boolean"
},
"afterSecs": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
}
},
"required": [
"enabled",
"afterSecs"
]
},
"ringTimeoutSecs": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
"receptionistAgentId": {
"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"
}
]
},
"members": {
"type": "array",
"items": {
"type": "object",
"properties": {
"appUserId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-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",
"minLength": 1,
"maxLength": 200
},
{
"type": "null"
}
]
},
"role": {
"type": "string",
"minLength": 1
},
"ringMode": {
"type": "string",
"minLength": 1
},
"addedAt": {
"type": "string",
"minLength": 1
}
},
"required": [
"appUserId",
"externalUserId",
"role",
"ringMode",
"addedAt"
]
}
},
"planId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"planVersionId": {
"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"
}
]
},
"revision": {
"type": "integer",
"exclusiveMinimum": 0,
"maximum": 9007199254740991
},
"createdAt": {
"type": "string",
"minLength": 1
},
"updatedAt": {
"type": "string",
"minLength": 1
}
},
"required": [
"phoneNumberId",
"phoneNumber",
"label",
"muted",
"recording",
"voicemail",
"receptionist",
"ringTimeoutSecs",
"receptionistAgentId",
"members",
"planId",
"planVersionId",
"revision",
"createdAt",
"updatedAt"
]
},
{
"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": [
"sitecallNumberId",
"phoneNumber",
"applicationId",
"externalWorkspaceId",
"externalNumberId",
"status",
"inventoryState",
"graceUntil",
"billingGroupId",
"texting",
"updatedAt"
]
}
}
},
"required": [
"type",
"externalWorkspaceId",
"closedAt",
"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",
"maxLength": 4096
},
"mediaKeys": {
"maxItems": 10,
"type": "array",
"items": {
"type": "string",
"pattern": "^voice-media\\/[0-9a-f-]{36}\\/message-uploads\\/[0-9a-f-]{36}\\.(jpg|png|gif|mp4|mp3)$"
}
}
},
"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": "email_call_export"
},
"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)$"
},
"filters": {
"type": "object",
"properties": {
"q": {
"type": "string",
"minLength": 1,
"maxLength": 100
},
"numberId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"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)$"
},
"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)$"
},
"disposition": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"tag": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-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": {
"type": "string",
"enum": [
"inbound",
"outbound"
]
},
"result": {
"type": "string",
"enum": [
"answered",
"missed",
"voicemail",
"ai",
"not_answered"
]
},
"from": {
"type": "string",
"pattern": "^\\d{4}-\\d{2}-\\d{2}$"
},
"to": {
"type": "string",
"pattern": "^\\d{4}-\\d{2}-\\d{2}$"
}
},
"additionalProperties": false
}
},
"required": [
"type",
"commandId",
"filters"
]
},
{
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "create_campaign"
},
"name": {
"type": "string",
"minLength": 1,
"maxLength": 120
},
"consentBasis": {
"type": "string",
"enum": [
"existing_customer",
"express_consent",
"express_written_consent"
]
},
"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)$"
},
"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",
"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"
]
},
"consentBasis": {
"type": "string",
"enum": [
"existing_customer",
"express_consent",
"express_written_consent"
]
}
},
"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"
}
]
},
"maxCallSeconds": {
"type": "integer",
"minimum": 30,
"maximum": 3600
},
"language": {
"type": "string",
"minLength": 2,
"maxLength": 10
},
"tools": {
"maxItems": 2,
"type": "array",
"items": {
"type": "string",
"enum": [
"end_call",
"transfer"
]
}
},
"booking": {
"anyOf": [
{
"type": "object",
"properties": {
"services": {
"type": "string",
"maxLength": 500
}
},
"required": [
"services"
],
"additionalProperties": false
},
{
"type": "null"
}
]
}
},
"required": [
"firstMessage",
"maxCallSeconds",
"language"
]
}
},
"required": [
"name",
"description",
"instructions",
"voiceId",
"configuration"
]
}
},
"required": [
"type",
"input"
]
},
{
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "preview_voice"
},
"voiceId": {
"type": "string",
"maxLength": 64,
"pattern": "^[A-Za-z0-9_-]*$"
}
},
"required": [
"type",
"voiceId"
]
},
{
"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": "set_availability"
},
"availability": {
"type": "string",
"enum": [
"available",
"away",
"offline"
]
}
},
"required": [
"type",
"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-z0-9\\-]*\\.)+[A-Za-z]{2,}$"
},
"role": {
"type": "string",
"enum": [
"admin",
"supervisor",
"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_number_inbox"
},
"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)$"
}
},
"required": [
"type",
"phoneNumberId",
"inboxId"
]
},
{
"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"
]
},
"near": {
"type": "object",
"properties": {
"lat": {
"type": "number",
"minimum": -90,
"maximum": 90
},
"lng": {
"type": "number",
"minimum": -180,
"maximum": 180
}
},
"required": [
"lat",
"lng"
]
},
"timeZone": {
"type": "string",
"minLength": 1,
"maxLength": 64
}
},
"required": [
"type"
]
},
{
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "watch_area_code"
},
"areaCode": {
"type": "string",
"pattern": "^[2-9]\\d{2}$"
}
},
"required": [
"type",
"areaCode"
]
},
{
"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-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": "claim_number"
},
"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)$"
},
"toWorkspaceId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-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",
"phoneNumberId",
"toWorkspaceId",
"confirmPhoneE164"
]
},
{
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "start_checkout"
},
"plan": {
"type": "string",
"minLength": 1,
"maxLength": 80
},
"interval": {
"type": "string",
"enum": [
"month",
"year"
]
}
},
"required": [
"type",
"plan"
]
},
{
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "change_plan"
},
"plan": {
"type": "string",
"minLength": 1,
"maxLength": 80
},
"interval": {
"type": "string",
"enum": [
"month",
"year"
]
}
},
"required": [
"type",
"plan",
"interval"
]
},
{
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "open_billing_portal"
}
},
"required": [
"type"
]
},
{
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "save_call_note"
},
"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)$"
},
"note": {
"type": "string",
"minLength": 1,
"maxLength": 2000
}
},
"required": [
"type",
"callId",
"note"
]
},
{
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "mark_voicemail_heard"
},
"voicemailId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-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",
"voicemailId"
]
},
{
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "start_conversation"
},
"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)$"
},
"toE164": {
"type": "string",
"pattern": "^\\+[1-9]\\d{7,14}$"
},
"text": {
"type": "string",
"maxLength": 4096
},
"mediaKeys": {
"maxItems": 10,
"type": "array",
"items": {
"type": "string",
"pattern": "^voice-media\\/[0-9a-f-]{36}\\/message-uploads\\/[0-9a-f-]{36}\\.(jpg|png|gif|mp4|mp3)$"
}
}
},
"required": [
"type",
"commandId",
"phoneNumberId",
"toE164",
"text"
]
},
{
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "assign_conversation"
},
"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)$"
},
"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"
}
]
}
},
"required": [
"type",
"conversationId",
"memberId"
]
},
{
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "mark_conversation_read"
},
"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)$"
},
"messageIds": {
"minItems": 1,
"maxItems": 200,
"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": [
"type",
"conversationId",
"messageIds"
]
},
{
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "save_contact"
},
"contact": {
"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)$"
},
"displayName": {
"type": "string",
"minLength": 1,
"maxLength": 120
},
"phoneE164": {
"anyOf": [
{
"type": "string",
"pattern": "^\\+[1-9]\\d{7,14}$"
},
{
"type": "null"
}
]
},
"email": {
"anyOf": [
{
"type": "string",
"format": "email",
"pattern": "^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"
},
{
"type": "null"
}
]
},
"notes": {
"anyOf": [
{
"type": "string",
"maxLength": 2000
},
{
"type": "null"
}
]
}
},
"required": [
"displayName",
"phoneE164",
"email",
"notes"
]
}
},
"required": [
"type",
"contact"
]
},
{
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "delete_contact"
},
"contactId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-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",
"contactId"
]
},
{
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "save_call_flow"
},
"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)$"
},
"planId": {
"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"
}
]
},
"form": {
"type": "object",
"properties": {
"template": {
"type": "string",
"enum": [
"ring_team",
"hours_menu",
"queue",
"ai_first",
"ai_share"
]
},
"name": {
"type": "string",
"maxLength": 120
},
"memberIds": {
"maxItems": 200,
"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)$"
}
},
"ringWho": {
"default": "members",
"type": "string",
"enum": [
"members",
"team",
"everyone"
]
},
"teamId": {
"default": null,
"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"
}
]
},
"ringTimeoutSecs": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
"aiEnabled": {
"type": "boolean"
},
"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"
}
]
},
"aiSharePercent": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
"aiHandoff": {
"type": "string",
"enum": [
"none",
"ring_team",
"queue"
]
},
"aiHandoffQueueId": {
"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"
}
]
},
"voicemailGreeting": {
"type": "string",
"maxLength": 500
},
"scheduleId": {
"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"
}
]
},
"timeZone": {
"type": "string",
"maxLength": 100
},
"weekly": {
"maxItems": 21,
"type": "array",
"items": {
"type": "object",
"properties": {
"day": {
"type": "integer",
"minimum": 0,
"maximum": 6
},
"open": {
"type": "string",
"maxLength": 5
},
"close": {
"type": "string",
"maxLength": 5
}
},
"required": [
"day",
"open",
"close"
]
}
},
"menuPrompt": {
"type": "string",
"maxLength": 1000
},
"menuOptions": {
"type": "object",
"propertyNames": {
"type": "string",
"enum": [
"0",
"1",
"2",
"3",
"4",
"5",
"6",
"7",
"8",
"9",
"*",
"#"
]
},
"additionalProperties": {
"type": "string",
"enum": [
"ring",
"queue",
"voicemail"
]
}
},
"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"
}
]
},
"maxWaitSecs": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
"phoneNumberIds": {
"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)$"
}
},
"recordCalls": {
"default": false,
"type": "boolean"
},
"monitorCalls": {
"type": "boolean"
}
},
"required": [
"template",
"name",
"memberIds",
"ringTimeoutSecs",
"aiEnabled",
"aiAgentId",
"aiSharePercent",
"voicemailGreeting",
"scheduleId",
"timeZone",
"weekly",
"menuPrompt",
"menuOptions",
"queueId",
"maxWaitSecs",
"phoneNumberIds"
]
},
"replace": {
"type": "boolean"
}
},
"required": [
"type",
"commandId",
"planId",
"form"
]
},
{
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "save_queue"
},
"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)$"
},
"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"
}
]
},
"form": {
"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": 20,
"type": "array",
"items": {
"type": "string",
"maxLength": 40
}
},
"awayOnMiss": {
"type": "boolean"
},
"supervisionEnabled": {
"type": "boolean"
},
"holdAudioUrl": {
"anyOf": [
{
"type": "string",
"format": "uri"
},
{
"type": "null"
}
]
},
"recordCalls": {
"type": "string",
"enum": [
"inherit",
"on",
"off"
]
},
"members": {
"maxItems": 200,
"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": {
"maxItems": 20,
"type": "array",
"items": {
"type": "string",
"maxLength": 40
}
}
},
"required": [
"memberId",
"skills"
]
}
}
},
"required": [
"name",
"maxWaitSecs",
"wrapUpSecs",
"requiredSkills",
"awayOnMiss",
"supervisionEnabled",
"holdAudioUrl",
"members"
]
}
},
"required": [
"type",
"commandId",
"queueId",
"form"
]
},
{
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "force_agent_state"
},
"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)$"
},
"state": {
"type": "string",
"enum": [
"available",
"away",
"offline"
]
}
},
"required": [
"type",
"memberId",
"state"
]
},
{
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "update_forwarding"
},
"callDelivery": {
"type": "string",
"enum": [
"app",
"phone"
]
},
"emailForwarding": {
"type": "boolean"
}
},
"required": [
"type",
"callDelivery",
"emailForwarding"
]
},
{
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "save_emergency_location"
},
"scope": {
"type": "string",
"enum": [
"workspace",
"member"
]
},
"address": {
"type": "object",
"properties": {
"streetAddress": {
"type": "string",
"maxLength": 200,
"pattern": "^\\d"
},
"extendedAddress": {
"type": "string",
"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"
]
},
"callbackNumber": {
"type": "string",
"pattern": "^\\+[1-9]\\d{7,14}$"
},
"callerName": {
"type": "string",
"maxLength": 50
}
},
"required": [
"streetAddress",
"locality",
"administrativeArea",
"postalCode",
"countryCode"
]
}
},
"required": [
"type",
"scope",
"address"
]
},
{
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "delete_emergency_location"
},
"locationId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-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",
"locationId"
]
},
{
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "refresh_emergency_locations"
}
},
"required": [
"type"
]
},
{
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "create_api_key"
},
"name": {
"type": "string",
"minLength": 1,
"maxLength": 60
}
},
"required": [
"type",
"name"
]
},
{
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "revoke_api_key"
},
"keyId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-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",
"keyId"
]
},
{
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "set_content_access"
},
"enabled": {
"type": "boolean"
}
},
"required": [
"type",
"enabled"
]
},
{
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "save_supervisor_scopes"
},
"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)$"
},
"queueIds": {
"maxItems": 500,
"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)$"
}
},
"teamIds": {
"maxItems": 500,
"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)$"
}
},
"numberIds": {
"maxItems": 500,
"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": [
"type",
"memberId",
"queueIds",
"teamIds",
"numberIds"
]
},
{
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "set_member_role"
},
"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)$"
},
"role": {
"type": "string",
"enum": [
"owner",
"admin",
"supervisor",
"agent"
]
}
},
"required": [
"type",
"memberId",
"role"
]
},
{
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "remove_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)$"
},
"confirm": {
"type": "boolean",
"const": true
}
},
"required": [
"type",
"memberId",
"confirm"
]
},
{
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "set_recording_retention"
},
"days": {
"anyOf": [
{
"type": "integer",
"minimum": 1,
"maximum": 3650
},
{
"type": "null"
}
]
}
},
"required": [
"type",
"days"
]
},
{
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "schedule_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": {
"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"
}
]
},
"toE164": {
"anyOf": [
{
"type": "string",
"pattern": "^\\+[1-9]\\d{7,14}$"
},
{
"type": "null"
}
]
},
"text": {
"type": "string",
"maxLength": 4096
},
"mediaKeys": {
"maxItems": 10,
"type": "array",
"items": {
"type": "string",
"pattern": "^voice-media\\/[0-9a-f-]{36}\\/message-uploads\\/[0-9a-f-]{36}\\.(jpg|png|gif|mp4|mp3)$"
}
},
"sendAt": {
"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": [
"type",
"commandId",
"conversationId",
"phoneNumberId",
"toE164",
"text",
"sendAt"
]
},
{
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "cancel_scheduled_message"
},
"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)$"
}
},
"required": [
"type",
"id"
]
},
{
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "create_bulk_send"
},
"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)$"
},
"name": {
"type": "string",
"minLength": 1,
"maxLength": 120
},
"text": {
"type": "string",
"maxLength": 4096
},
"mediaKeys": {
"maxItems": 10,
"type": "array",
"items": {
"type": "string",
"pattern": "^voice-media\\/[0-9a-f-]{36}\\/message-uploads\\/[0-9a-f-]{36}\\.(jpg|png|gif|mp4|mp3)$"
}
},
"sendAt": {
"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"
}
]
},
"recipients": {
"maxItems": 1000,
"type": "array",
"items": {
"type": "object",
"properties": {
"e164": {
"type": "string",
"pattern": "^\\+[1-9]\\d{7,14}$"
},
"name": {
"anyOf": [
{
"type": "string",
"maxLength": 80
},
{
"type": "null"
}
]
}
},
"required": [
"e164",
"name"
]
}
},
"contactIds": {
"maxItems": 1000,
"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)$"
}
},
"attested": {
"type": "boolean",
"const": true
}
},
"required": [
"type",
"commandId",
"phoneNumberId",
"name",
"text",
"sendAt",
"recipients",
"contactIds",
"attested"
]
},
{
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "cancel_bulk_send"
},
"bulkSendId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-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",
"bulkSendId"
]
},
{
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "save_auto_reply"
},
"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)$"
},
"kind": {
"type": "string",
"enum": [
"missed_call",
"after_hours"
]
},
"enabled": {
"type": "boolean"
},
"text": {
"type": "string",
"minLength": 1,
"maxLength": 480
},
"scheduleId": {
"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"
}
]
},
"cooldownHours": {
"type": "integer",
"minimum": 1,
"maximum": 168
}
},
"required": [
"type",
"phoneNumberId",
"kind",
"enabled",
"text",
"scheduleId",
"cooldownHours"
]
},
{
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "save_business_hours"
},
"days": {
"maxItems": 7,
"type": "array",
"items": {
"type": "integer",
"minimum": 0,
"maximum": 6
}
},
"open": {
"type": "string"
},
"close": {
"type": "string"
}
},
"required": [
"type",
"days",
"open",
"close"
]
},
{
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "save_template"
},
"templateId": {
"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"
}
]
},
"name": {
"type": "string",
"minLength": 1,
"maxLength": 80
},
"body": {
"type": "string",
"minLength": 1,
"maxLength": 1600
},
"shared": {
"type": "boolean"
}
},
"required": [
"type",
"templateId",
"name",
"body",
"shared"
]
},
{
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "delete_template"
},
"templateId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-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",
"templateId"
]
},
{
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "add_note"
},
"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": 2000
},
"mentionIds": {
"maxItems": 20,
"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": [
"type",
"conversationId",
"text",
"mentionIds"
]
},
{
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "delete_note"
},
"noteId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-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",
"noteId"
]
},
{
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "mark_mentions_seen"
},
"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)$"
}
},
"required": [
"type",
"conversationId"
]
},
{
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "connect_hubspot"
},
"token": {
"type": "string",
"minLength": 20,
"maxLength": 200
}
},
"required": [
"type",
"token"
]
},
{
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "disconnect_hubspot"
}
},
"required": [
"type"
]
},
{
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "set_hubspot_logging"
},
"logCalls": {
"type": "boolean"
},
"logTexts": {
"type": "boolean"
}
},
"required": [
"type",
"logCalls",
"logTexts"
]
},
{
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "save_call_disposition"
},
"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)$"
},
"dispositionId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"tagIds": {
"default": [],
"maxItems": 10,
"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": [
"type",
"callId",
"dispositionId"
]
},
{
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "save_wrap_up_settings"
},
"wrapUpSecs": {
"type": "integer",
"minimum": 0,
"maximum": 600
},
"dispositionRequired": {
"type": "boolean"
}
},
"required": [
"type",
"wrapUpSecs",
"dispositionRequired"
]
},
{
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "save_disposition_option"
},
"id": {
"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"
}
]
},
"label": {
"type": "string",
"minLength": 1,
"maxLength": 60
},
"addsToDnc": {
"type": "boolean"
},
"createsCallback": {
"type": "boolean"
},
"archived": {
"type": "boolean"
}
},
"required": [
"type",
"id",
"label",
"addsToDnc",
"createsCallback",
"archived"
]
},
{
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "save_call_tag"
},
"id": {
"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"
}
]
},
"label": {
"type": "string",
"minLength": 1,
"maxLength": 40
},
"archived": {
"type": "boolean"
}
},
"required": [
"type",
"id",
"label",
"archived"
]
},
{
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "end_wrap_up"
},
"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": "set_callback_task"
},
"taskId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-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": [
"open",
"done",
"canceled"
]
},
"assignedMemberId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-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",
"taskId",
"status"
]
},
{
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "save_qa_rubric"
},
"criteria": {
"minItems": 1,
"maxItems": 12,
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string",
"pattern": "^[a-z0-9_-]{1,40}$"
},
"label": {
"type": "string",
"minLength": 1,
"maxLength": 80
},
"guidance": {
"default": "",
"type": "string",
"maxLength": 300
},
"weight": {
"type": "integer",
"minimum": 1,
"maximum": 5
},
"critical": {
"type": "boolean"
}
},
"required": [
"id",
"label",
"weight",
"critical"
]
}
}
},
"required": [
"type",
"criteria"
]
},
{
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "create_dialer_list"
},
"list": {
"type": "object",
"properties": {
"name": {
"type": "string",
"minLength": 1,
"maxLength": 80
},
"mode": {
"type": "string",
"enum": [
"power",
"progressive"
]
},
"fromPhoneNumberId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"pacingSecs": {
"default": 5,
"type": "integer",
"minimum": 0,
"maximum": 60
},
"maxAttempts": {
"default": 3,
"type": "integer",
"minimum": 1,
"maximum": 10
},
"retryAfterMinutes": {
"default": 240,
"type": "integer",
"minimum": 15,
"maximum": 10080
},
"windowStartHour": {
"default": 8,
"type": "integer",
"minimum": 8,
"maximum": 11
},
"windowEndHour": {
"default": 21,
"type": "integer",
"minimum": 18,
"maximum": 21
},
"voicemailDropText": {
"anyOf": [
{
"type": "string",
"maxLength": 500
},
{
"type": "null"
}
]
},
"consentBasis": {
"type": "string",
"enum": [
"existing_customer",
"express_consent",
"express_written_consent"
]
},
"prerecordedConsent": {
"type": "boolean"
},
"agentIds": {
"maxItems": 500,
"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)$"
}
},
"attested": {
"type": "boolean",
"const": true
}
},
"required": [
"name",
"mode",
"fromPhoneNumberId",
"voicemailDropText",
"consentBasis",
"prerecordedConsent",
"agentIds",
"attested"
]
}
},
"required": [
"type",
"list"
]
},
{
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "add_dialer_contacts"
},
"listId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"rows": {
"minItems": 1,
"maxItems": 5000,
"type": "array",
"items": {
"type": "object",
"properties": {
"e164": {
"type": "string",
"maxLength": 32
},
"name": {
"anyOf": [
{
"type": "string",
"maxLength": 120
},
{
"type": "null"
}
]
},
"contactId": {
"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": [
"e164",
"name",
"contactId"
]
}
}
},
"required": [
"type",
"listId",
"rows"
]
},
{
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "set_dialer_list"
},
"listId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"patch": {
"type": "object",
"properties": {
"status": {
"type": "string",
"enum": [
"active",
"paused",
"archived"
]
},
"name": {
"type": "string",
"minLength": 1,
"maxLength": 80
},
"agentIds": {
"maxItems": 500,
"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)$"
}
},
"pacingSecs": {
"type": "integer",
"minimum": 0,
"maximum": 60
},
"maxAttempts": {
"type": "integer",
"minimum": 1,
"maximum": 10
},
"retryAfterMinutes": {
"type": "integer",
"minimum": 15,
"maximum": 10080
},
"windowStartHour": {
"type": "integer",
"minimum": 8,
"maximum": 11
},
"windowEndHour": {
"type": "integer",
"minimum": 18,
"maximum": 21
}
}
}
},
"required": [
"type",
"listId",
"patch"
]
},
{
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "start_dialer_session"
},
"listId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-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",
"listId"
]
},
{
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "end_dialer_session"
},
"sessionId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-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",
"sessionId"
]
},
{
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "claim_next_contact"
},
"sessionId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-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",
"sessionId"
]
},
{
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "prepare_dialer_call"
},
"sessionId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"contactId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-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",
"sessionId",
"contactId"
]
},
{
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "skip_contact"
},
"sessionId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"contactId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"reason": {
"type": "string",
"enum": [
"dnc",
"invalid"
]
}
},
"required": [
"type",
"sessionId",
"contactId",
"reason"
]
},
{
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "add_dnc"
},
"e164s": {
"minItems": 1,
"maxItems": 500,
"type": "array",
"items": {
"type": "string",
"maxLength": 32
}
},
"note": {
"anyOf": [
{
"type": "string",
"maxLength": 200
},
{
"type": "null"
}
]
}
},
"required": [
"type",
"e164s",
"note"
]
},
{
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "remove_dnc"
},
"e164": {
"type": "string",
"maxLength": 32
}
},
"required": [
"type",
"e164"
]
},
{
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "save_knowledge_article"
},
"id": {
"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"
}
]
},
"title": {
"type": "string",
"minLength": 1,
"maxLength": 120
},
"body": {
"type": "string",
"minLength": 1,
"maxLength": 10000
},
"archived": {
"type": "boolean"
}
},
"required": [
"type",
"id",
"title",
"body",
"archived"
]
},
{
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "configure_sso"
},
"metadataUrl": {
"anyOf": [
{
"type": "string",
"format": "uri"
},
{
"type": "null"
}
]
},
"metadataXml": {
"anyOf": [
{
"type": "string",
"maxLength": 100000
},
{
"type": "null"
}
]
},
"domains": {
"minItems": 1,
"maxItems": 10,
"type": "array",
"items": {
"type": "string",
"pattern": "^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?(\\.[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?)+$"
}
}
},
"required": [
"type",
"metadataUrl",
"metadataXml",
"domains"
]
},
{
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "verify_sso_domain"
},
"domain": {
"type": "string",
"pattern": "^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?(\\.[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?)+$"
}
},
"required": [
"type",
"domain"
]
},
{
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "set_sso_enforcement"
},
"enforce": {
"type": "boolean"
}
},
"required": [
"type",
"enforce"
]
},
{
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "set_sso_jit_role"
},
"role": {
"anyOf": [
{
"type": "string",
"enum": [
"agent",
"supervisor"
]
},
{
"type": "null"
}
]
}
},
"required": [
"type",
"role"
]
},
{
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "remove_sso"
}
},
"required": [
"type"
]
},
{
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "create_scim_token"
}
},
"required": [
"type"
]
},
{
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "revoke_scim_token"
},
"tokenId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-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",
"tokenId"
]
}
]
}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"
},
"rows": {
"type": "integer",
"minimum": 0,
"maximum": 9007199254740991
},
"truncated": {
"type": "boolean"
},
"message": {
"type": "string",
"maxLength": 1000
},
"code": {
"type": "string",
"maxLength": 64
},
"dialerClaim": {
"type": "object",
"properties": {
"contact": {
"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)$"
},
"e164": {
"type": "string",
"pattern": "^\\+1[2-9]\\d{2}[2-9]\\d{6}$"
},
"name": {
"type": [
"string",
"null"
]
},
"contactId": {
"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"
}
]
},
"attempts": {
"type": "integer",
"minimum": 0,
"maximum": 9007199254740991
},
"lastResult": {
"type": [
"string",
"null"
]
},
"localTimes": {
"maxItems": 4,
"type": "array",
"items": {
"type": "string"
}
}
},
"required": [
"id",
"e164",
"name",
"contactId",
"attempts",
"lastResult",
"localTimes"
]
},
{
"type": "null"
}
]
},
"reason": {
"type": "string",
"enum": [
"ready",
"empty",
"outside_hours",
"paused",
"pacing",
"on_call",
"disposition_required"
]
},
"nextAt": {
"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"
}
]
},
"lastCallId": {
"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": [
"contact",
"reason",
"nextAt"
]
},
"dialerCall": {
"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)$"
},
"toE164": {
"type": "string",
"pattern": "^\\+1[2-9]\\d{2}[2-9]\\d{6}$"
},
"fromPhoneNumberId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"contactName": {
"type": [
"string",
"null"
]
}
},
"required": [
"callId",
"toE164",
"fromPhoneNumberId",
"contactName"
]
},
"dialerContacts": {
"type": "object",
"properties": {
"added": {
"type": "integer",
"minimum": 0,
"maximum": 9007199254740991
},
"skipped": {
"type": "object",
"properties": {
"dnc": {
"type": "integer",
"minimum": 0,
"maximum": 9007199254740991
},
"opted_out": {
"type": "integer",
"minimum": 0,
"maximum": 9007199254740991
},
"invalid": {
"type": "integer",
"minimum": 0,
"maximum": 9007199254740991
},
"duplicate": {
"type": "integer",
"minimum": 0,
"maximum": 9007199254740991
},
"own_number": {
"type": "integer",
"minimum": 0,
"maximum": 9007199254740991
}
},
"required": [
"dnc",
"opted_out",
"invalid",
"duplicate",
"own_number"
]
}
},
"required": [
"added",
"skipped"
]
},
"secret": {
"type": "string",
"maxLength": 200
},
"issues": {
"maxItems": 50,
"type": "array",
"items": {
"type": "string",
"maxLength": 500
}
},
"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
},
"state": {
"type": "string",
"maxLength": 40
},
"monthlyCost": {
"type": "string",
"maxLength": 40
},
"upfrontCost": {
"type": "string",
"maxLength": 40
},
"currency": {
"type": "string",
"maxLength": 12
},
"memorable": {
"type": "object",
"properties": {
"label": {
"type": "string",
"minLength": 1,
"maxLength": 40
},
"digits": {
"type": "integer",
"minimum": 1,
"maximum": 7
}
},
"required": [
"label",
"digits"
]
}
},
"required": [
"phoneNumber"
]
}
},
"numberSearch": {
"type": "object",
"properties": {
"areaCode": {
"anyOf": [
{
"type": "string",
"pattern": "^\\d{3}$"
},
{
"type": "null"
}
]
},
"nearbyAreaCodes": {
"maxItems": 8,
"type": "array",
"items": {
"type": "string",
"pattern": "^\\d{3}$"
}
},
"notice": {
"anyOf": [
{
"type": "string",
"minLength": 1,
"maxLength": 200
},
{
"type": "null"
}
]
},
"soldOutAreaCode": {
"anyOf": [
{
"type": "string",
"pattern": "^\\d{3}$"
},
{
"type": "null"
}
]
}
},
"required": [
"areaCode",
"nearbyAreaCodes",
"notice"
]
},
"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
},
"state": {
"type": "string",
"maxLength": 40
},
"monthlyCost": {
"type": "string",
"maxLength": 40
},
"upfrontCost": {
"type": "string",
"maxLength": 40
},
"currency": {
"type": "string",
"maxLength": 12
},
"memorable": {
"type": "object",
"properties": {
"label": {
"type": "string",
"minLength": 1,
"maxLength": 40
},
"digits": {
"type": "integer",
"minimum": 1,
"maximum": 7
}
},
"required": [
"label",
"digits"
]
}
},
"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
},
"state": {
"type": "string",
"maxLength": 40
},
"monthlyCost": {
"type": "string",
"maxLength": 40
},
"upfrontCost": {
"type": "string",
"maxLength": 40
},
"currency": {
"type": "string",
"maxLength": 12
},
"memorable": {
"type": "object",
"properties": {
"label": {
"type": "string",
"minLength": 1,
"maxLength": 40
},
"digits": {
"type": "integer",
"minimum": 1,
"maximum": 7
}
},
"required": [
"label",
"digits"
]
},
"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": {
"type": [
"boolean",
"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": {}
}More
Register (or refresh) one of your user's app installs for pushes: once per phone or browser profile, for every workspace of that user; a phone also rings in each.
- Scope
devices:*- Credentials
application_key- Workspace
- None (named in the body, or not needed)
- Idempotency
- No Idempotency-Key: safe to repeat
- Success
- 201, 200
- Errors
{ error: { code, message } }- Retry
- Safe with the same Idempotency-Key
installId is the client's install id (1–128 of A-Z a-z 0-9 _ . : -). Registering again is the heartbeat; a token another installation holds moves here. A user holds at most 10 live installations (limit_exceeded). workspaces names where a phone rings (a user at 10 live devices there is skipped). Tokens are never answered.
Request body
{
"type": "object",
"properties": {
"externalUserId": {
"type": "string",
"minLength": 1,
"maxLength": 200
},
"platform": {
"type": "string",
"enum": [
"ios",
"android",
"web"
]
},
"bundleId": {
"type": "string",
"pattern": "^[A-Za-z0-9][A-Za-z0-9.-]{0,154}$"
},
"alertToken": {
"type": "string",
"minLength": 16,
"maxLength": 4096
},
"voipToken": {
"type": "string",
"minLength": 16,
"maxLength": 4096
},
"appVersion": {
"type": "string",
"minLength": 1,
"maxLength": 80
}
},
"required": [
"externalUserId",
"platform"
],
"additionalProperties": false
}Response 201
{
"type": "object",
"properties": {
"installation": {
"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",
"null"
]
},
"externalUserId": {
"type": [
"string",
"null"
]
},
"installId": {
"type": "string",
"pattern": "^[A-Za-z0-9_.:-]{1,128}$"
},
"platform": {
"type": "string",
"enum": [
"ios",
"android",
"web"
]
},
"bundleId": {
"type": [
"string",
"null"
]
},
"appVersion": {
"type": [
"string",
"null"
]
},
"hasAlertToken": {
"type": "boolean"
},
"hasVoipToken": {
"type": "boolean"
},
"lastSeenAt": {
"type": "string"
},
"revokedAt": {
"type": [
"string",
"null"
]
},
"revokedReason": {
"anyOf": [
{
"anyOf": [
{
"type": "string",
"enum": [
"unregistered",
"token_rejected",
"replaced",
"stale"
]
},
{
"type": "string",
"minLength": 1,
"maxLength": 100
}
]
},
{
"type": "null"
}
]
},
"createdAt": {
"type": "string"
},
"updatedAt": {
"type": "string"
}
},
"required": [
"id",
"applicationId",
"externalUserId",
"installId",
"platform",
"bundleId",
"appVersion",
"hasAlertToken",
"hasVoipToken",
"lastSeenAt",
"revokedAt",
"revokedReason",
"createdAt",
"updatedAt"
]
},
"created": {
"type": "boolean"
},
"workspaces": {
"type": "array",
"items": {
"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",
"null"
]
},
"deviceId": {
"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"
}
]
},
"bound": {
"type": "boolean"
},
"reason": {
"type": [
"string",
"null"
]
}
},
"required": [
"workspaceId",
"externalWorkspaceId",
"deviceId",
"bound",
"reason"
]
}
}
},
"required": [
"installation",
"created",
"workspaces"
]
}Sign an installation out: it gets no more pushes, and its ring endpoints and their credentials are revoked. Name the user, or prove the phone by one of its live tokens.
- Scope
devices:*- Credentials
application_key- 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
{ proof } is for a session that is already gone: the installation's live alert or PushKit token. A proof is spent once used (the tokens go with the installation).
Request body
{
"anyOf": [
{
"type": "object",
"properties": {
"externalUserId": {
"type": "string",
"minLength": 1,
"maxLength": 200
}
},
"required": [
"externalUserId"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"proof": {
"type": "string",
"minLength": 16,
"maxLength": 4096
}
},
"required": [
"proof"
],
"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",
"null"
]
},
"externalUserId": {
"type": [
"string",
"null"
]
},
"installId": {
"type": "string",
"pattern": "^[A-Za-z0-9_.:-]{1,128}$"
},
"platform": {
"type": "string",
"enum": [
"ios",
"android",
"web"
]
},
"bundleId": {
"type": [
"string",
"null"
]
},
"appVersion": {
"type": [
"string",
"null"
]
},
"hasAlertToken": {
"type": "boolean"
},
"hasVoipToken": {
"type": "boolean"
},
"lastSeenAt": {
"type": "string"
},
"revokedAt": {
"type": [
"string",
"null"
]
},
"revokedReason": {
"anyOf": [
{
"anyOf": [
{
"type": "string",
"enum": [
"unregistered",
"token_rejected",
"replaced",
"stale"
]
},
{
"type": "string",
"minLength": 1,
"maxLength": 100
}
]
},
{
"type": "null"
}
]
},
"createdAt": {
"type": "string"
},
"updatedAt": {
"type": "string"
}
},
"required": [
"id",
"applicationId",
"externalUserId",
"installId",
"platform",
"bundleId",
"appVersion",
"hasAlertToken",
"hasVoipToken",
"lastSeenAt",
"revokedAt",
"revokedReason",
"createdAt",
"updatedAt"
]
}Every installation SiteCall holds for one of your users, revoked ones too, without tokens (privacy export).
- Scope
devices:*- Credentials
application_key- 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
Query
{
"type": "object",
"properties": {
"externalUserId": {
"type": "string",
"minLength": 1,
"maxLength": 200
}
},
"required": [
"externalUserId"
]
}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",
"null"
]
},
"externalUserId": {
"type": [
"string",
"null"
]
},
"installId": {
"type": "string",
"pattern": "^[A-Za-z0-9_.:-]{1,128}$"
},
"platform": {
"type": "string",
"enum": [
"ios",
"android",
"web"
]
},
"bundleId": {
"type": [
"string",
"null"
]
},
"appVersion": {
"type": [
"string",
"null"
]
},
"hasAlertToken": {
"type": "boolean"
},
"hasVoipToken": {
"type": "boolean"
},
"lastSeenAt": {
"type": "string"
},
"revokedAt": {
"type": [
"string",
"null"
]
},
"revokedReason": {
"anyOf": [
{
"anyOf": [
{
"type": "string",
"enum": [
"unregistered",
"token_rejected",
"replaced",
"stale"
]
},
{
"type": "string",
"minLength": 1,
"maxLength": 100
}
]
},
{
"type": "null"
}
]
},
"createdAt": {
"type": "string"
},
"updatedAt": {
"type": "string"
}
},
"required": [
"id",
"applicationId",
"externalUserId",
"installId",
"platform",
"bundleId",
"appVersion",
"hasAlertToken",
"hasVoipToken",
"lastSeenAt",
"revokedAt",
"revokedReason",
"createdAt",
"updatedAt"
]
}
}
},
"required": [
"data"
]
}Delete every installation of one of your users and their pending pushes; their ring endpoints are revoked (privacy erasure).
- Scope
devices:*- Credentials
application_key- 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
Query
{
"type": "object",
"properties": {
"externalUserId": {
"type": "string",
"minLength": 1,
"maxLength": 200
}
},
"required": [
"externalUserId"
]
}Response 200
{
"type": "object",
"properties": {
"erased": {
"type": "integer",
"minimum": 0,
"maximum": 9007199254740991
}
},
"required": [
"erased"
]
}Push your own notification to your users' phones and browsers: title, body, an app-relative link and string data.
- Scope
notifications:send- Credentials
application_key- Workspace
- None (named in the body, or not needed)
- Idempotency
- Idempotency-Key required
- Success
- 202
- Errors
{ error: { code, message } }- Retry
- Safe with the same Idempotency-Key
Every live installation of each listed user gets one push; failed pushes retry until ttlSeconds (at most 24 h). Up to 500 recipients; 60 notifications a minute per recipient (the rest come back in throttled); the application's daily recipient cap answers 429 rate_limited. A notification a push provider would refuse (a data key FCM or APNs reserves: from, message_type, notification, collapse_key, aps, google*, gcm*; a rendered push over 3900 bytes) is 422 notification_rejected. Title, body, link and data are never logged.
Request body
{
"type": "object",
"properties": {
"to": {
"type": "object",
"properties": {
"externalUserIds": {
"minItems": 1,
"maxItems": 500,
"type": "array",
"items": {
"type": "string",
"minLength": 1,
"maxLength": 200
}
}
},
"required": [
"externalUserIds"
],
"additionalProperties": false
},
"externalWorkspaceId": {
"type": "string",
"minLength": 1,
"maxLength": 200
},
"category": {
"type": "string",
"pattern": "^[a-z][a-z0-9_.-]{0,63}$"
},
"title": {
"type": "string",
"minLength": 1,
"maxLength": 120
},
"body": {
"type": "string",
"maxLength": 240
},
"link": {
"type": "string",
"maxLength": 512,
"pattern": "^\\/([^/\\\\\\s][^\\\\\\s]*)?$"
},
"collapseKey": {
"type": "string",
"pattern": "^[A-Za-z0-9_.:-]{1,64}$"
},
"priority": {
"default": "normal",
"type": "string",
"enum": [
"normal",
"high"
]
},
"ttlSeconds": {
"default": 86400,
"type": "integer",
"minimum": 60,
"maximum": 86400
},
"data": {
"type": "object",
"propertyNames": {
"type": "string",
"pattern": "^[a-z][a-z0-9_]{0,63}$"
},
"additionalProperties": {
"type": "string"
}
}
},
"required": [
"to",
"category",
"title"
],
"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)$"
},
"recipients": {
"type": "integer",
"minimum": 0,
"maximum": 9007199254740991
},
"installations": {
"type": "integer",
"minimum": 0,
"maximum": 9007199254740991
},
"throttled": {
"type": "array",
"items": {
"type": "string"
}
}
},
"required": [
"id",
"recipients",
"installations",
"throttled"
]
}What happened to each push of one of your notifications: owed, sent, delivered (the phone's receipt), failed or expired.
- Scope
notifications:send- Credentials
application_key- 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
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)$"
},
"recipients": {
"type": "integer",
"minimum": 0,
"maximum": 9007199254740991
},
"installations": {
"type": "integer",
"minimum": 0,
"maximum": 9007199254740991
},
"throttled": {
"type": "array",
"items": {
"type": "string"
}
},
"category": {
"type": "string"
},
"externalWorkspaceId": {
"type": [
"string",
"null"
]
},
"createdAt": {
"type": "string"
},
"expiresAt": {
"type": "string"
},
"deliveries": {
"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)$"
},
"installationId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-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",
"null"
]
},
"platform": {
"type": "string"
},
"state": {
"anyOf": [
{
"type": "string",
"enum": [
"owed",
"leased",
"sent",
"delivered",
"failed",
"expired"
]
},
{
"type": "string",
"minLength": 1,
"maxLength": 100
}
]
},
"attempts": {
"type": "integer",
"minimum": 0,
"maximum": 9007199254740991
},
"sentAt": {
"type": [
"string",
"null"
]
},
"deliveredAt": {
"type": [
"string",
"null"
]
},
"failedAt": {
"type": [
"string",
"null"
]
},
"errorCode": {
"type": [
"string",
"null"
]
}
},
"required": [
"id",
"installationId",
"externalUserId",
"platform",
"state",
"attempts",
"sentAt",
"deliveredAt",
"failedAt",
"errorCode"
]
}
}
},
"required": [
"id",
"recipients",
"installations",
"throttled",
"category",
"externalWorkspaceId",
"createdAt",
"expiresAt",
"deliveries"
]
}List the workspace's lines, newest first: each number's calling settings and the users on it.
- Scope
routing:*- 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
}
}
}Response 200
{
"type": "object",
"properties": {
"data": {
"type": "array",
"items": {
"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)$"
},
"phoneNumber": {
"type": "string",
"pattern": "^\\+[1-9]\\d{6,14}$"
},
"label": {
"type": [
"string",
"null"
]
},
"muted": {
"type": "boolean"
},
"recording": {
"type": "object",
"properties": {
"enabled": {
"type": "boolean"
},
"disclosure": {
"type": "boolean"
}
},
"required": [
"enabled",
"disclosure"
]
},
"voicemail": {
"type": "boolean"
},
"receptionist": {
"type": "object",
"properties": {
"enabled": {
"type": "boolean"
},
"afterSecs": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
}
},
"required": [
"enabled",
"afterSecs"
]
},
"ringTimeoutSecs": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
"receptionistAgentId": {
"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"
}
]
},
"members": {
"type": "array",
"items": {
"type": "object",
"properties": {
"appUserId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-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",
"minLength": 1,
"maxLength": 200
},
{
"type": "null"
}
]
},
"role": {
"type": "string",
"minLength": 1
},
"ringMode": {
"type": "string",
"minLength": 1
},
"addedAt": {
"type": "string",
"minLength": 1
}
},
"required": [
"appUserId",
"externalUserId",
"role",
"ringMode",
"addedAt"
]
}
},
"planId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"planVersionId": {
"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"
}
]
},
"revision": {
"type": "integer",
"exclusiveMinimum": 0,
"maximum": 9007199254740991
},
"createdAt": {
"type": "string",
"minLength": 1
},
"updatedAt": {
"type": "string",
"minLength": 1
}
},
"required": [
"phoneNumberId",
"phoneNumber",
"label",
"muted",
"recording",
"voicemail",
"receptionist",
"ringTimeoutSecs",
"receptionistAgentId",
"members",
"planId",
"planVersionId",
"revision",
"createdAt",
"updatedAt"
]
}
},
"nextCursor": {
"type": [
"string",
"null"
]
}
},
"required": [
"data",
"nextCursor"
]
}Read one line.
- Scope
routing:*- 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
- Errors
{ error: { code, message } }- Retry
- Safe with the same Idempotency-Key
Response 200
{
"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)$"
},
"phoneNumber": {
"type": "string",
"pattern": "^\\+[1-9]\\d{6,14}$"
},
"label": {
"type": [
"string",
"null"
]
},
"muted": {
"type": "boolean"
},
"recording": {
"type": "object",
"properties": {
"enabled": {
"type": "boolean"
},
"disclosure": {
"type": "boolean"
}
},
"required": [
"enabled",
"disclosure"
]
},
"voicemail": {
"type": "boolean"
},
"receptionist": {
"type": "object",
"properties": {
"enabled": {
"type": "boolean"
},
"afterSecs": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
}
},
"required": [
"enabled",
"afterSecs"
]
},
"ringTimeoutSecs": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
"receptionistAgentId": {
"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"
}
]
},
"members": {
"type": "array",
"items": {
"type": "object",
"properties": {
"appUserId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-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",
"minLength": 1,
"maxLength": 200
},
{
"type": "null"
}
]
},
"role": {
"type": "string",
"minLength": 1
},
"ringMode": {
"type": "string",
"minLength": 1
},
"addedAt": {
"type": "string",
"minLength": 1
}
},
"required": [
"appUserId",
"externalUserId",
"role",
"ringMode",
"addedAt"
]
}
},
"planId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"planVersionId": {
"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"
}
]
},
"revision": {
"type": "integer",
"exclusiveMinimum": 0,
"maximum": 9007199254740991
},
"createdAt": {
"type": "string",
"minLength": 1
},
"updatedAt": {
"type": "string",
"minLength": 1
}
},
"required": [
"phoneNumberId",
"phoneNumber",
"label",
"muted",
"recording",
"voicemail",
"receptionist",
"ringTimeoutSecs",
"receptionistAgentId",
"members",
"planId",
"planVersionId",
"revision",
"createdAt",
"updatedAt"
]
}Make a number a line with these settings (201), or give its line every setting; SiteCall compiles and publishes its plan.
- Scope
routing:*- 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, 201
- Errors
{ error: { code, message } }- Retry
- Safe with the same Idempotency-Key
A number becoming a line leaves the plan it was assigned; from then on its plan is the line's own, and /v1/routing-plans refuses to edit it (409 plan_managed_by_line) or to put another plan on the number (409 number_is_line). The answer carries the number's record, which number.updated also delivers.
Request body
{
"type": "object",
"properties": {
"label": {
"default": null,
"anyOf": [
{
"type": "string",
"minLength": 1,
"maxLength": 64
},
{
"type": "null"
}
]
},
"muted": {
"type": "boolean"
},
"recording": {
"type": "object",
"properties": {
"enabled": {
"type": "boolean"
},
"disclosure": {
"type": "boolean"
}
},
"required": [
"enabled",
"disclosure"
],
"additionalProperties": false
},
"voicemail": {
"type": "boolean"
},
"receptionist": {
"type": "object",
"properties": {
"enabled": {
"type": "boolean"
},
"afterSecs": {
"type": "integer",
"minimum": 0,
"maximum": 120
}
},
"required": [
"enabled",
"afterSecs"
],
"additionalProperties": false
},
"ringTimeoutSecs": {
"type": "integer",
"minimum": 10,
"maximum": 120
}
},
"required": [
"muted",
"recording",
"voicemail",
"receptionist",
"ringTimeoutSecs"
],
"additionalProperties": false
}Response 200
{
"type": "object",
"properties": {
"line": {
"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)$"
},
"phoneNumber": {
"type": "string",
"pattern": "^\\+[1-9]\\d{6,14}$"
},
"label": {
"type": [
"string",
"null"
]
},
"muted": {
"type": "boolean"
},
"recording": {
"type": "object",
"properties": {
"enabled": {
"type": "boolean"
},
"disclosure": {
"type": "boolean"
}
},
"required": [
"enabled",
"disclosure"
]
},
"voicemail": {
"type": "boolean"
},
"receptionist": {
"type": "object",
"properties": {
"enabled": {
"type": "boolean"
},
"afterSecs": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
}
},
"required": [
"enabled",
"afterSecs"
]
},
"ringTimeoutSecs": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
"receptionistAgentId": {
"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"
}
]
},
"members": {
"type": "array",
"items": {
"type": "object",
"properties": {
"appUserId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-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",
"minLength": 1,
"maxLength": 200
},
{
"type": "null"
}
]
},
"role": {
"type": "string",
"minLength": 1
},
"ringMode": {
"type": "string",
"minLength": 1
},
"addedAt": {
"type": "string",
"minLength": 1
}
},
"required": [
"appUserId",
"externalUserId",
"role",
"ringMode",
"addedAt"
]
}
},
"planId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"planVersionId": {
"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"
}
]
},
"revision": {
"type": "integer",
"exclusiveMinimum": 0,
"maximum": 9007199254740991
},
"createdAt": {
"type": "string",
"minLength": 1
},
"updatedAt": {
"type": "string",
"minLength": 1
}
},
"required": [
"phoneNumberId",
"phoneNumber",
"label",
"muted",
"recording",
"voicemail",
"receptionist",
"ringTimeoutSecs",
"receptionistAgentId",
"members",
"planId",
"planVersionId",
"revision",
"createdAt",
"updatedAt"
]
},
"number": {
"anyOf": [
{
"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",
"aging",
"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"
}
]
},
"carrierNumberId": {
"anyOf": [
{
"type": "string",
"minLength": 1
},
{
"type": "null"
}
]
},
"messagingProfileId": {
"anyOf": [
{
"type": "string",
"minLength": 1
},
{
"type": "null"
}
]
},
"billingGroupId": {
"type": [
"string",
"null"
]
},
"texting": {
"type": "object",
"properties": {
"campaignId": {
"type": [
"string",
"null"
]
},
"assignmentStatus": {
"type": [
"string",
"null"
]
},
"targetCampaignId": {
"type": [
"string",
"null"
]
},
"targetStatus": {
"type": [
"string",
"null"
]
},
"ownCampaign": {
"type": "boolean"
}
},
"required": [
"campaignId",
"assignmentStatus",
"targetCampaignId",
"targetStatus"
]
},
"isDefault": {
"type": "boolean"
},
"emergency": {
"type": "object",
"properties": {
"status": {
"anyOf": [
{
"type": "string",
"enum": [
"unset",
"pending",
"enabled",
"failed",
"unsupported"
]
},
{
"type": "string",
"minLength": 1,
"maxLength": 100
}
]
},
"reason": {
"anyOf": [
{
"type": "string",
"maxLength": 200
},
{
"type": "null"
}
]
},
"updatedAt": {
"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": [
"status",
"updatedAt"
]
},
"line": {
"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)$"
},
"phoneNumber": {
"type": "string",
"pattern": "^\\+[1-9]\\d{6,14}$"
},
"label": {
"type": [
"string",
"null"
]
},
"muted": {
"type": "boolean"
},
"recording": {
"type": "object",
"properties": {
"enabled": {
"type": "boolean"
},
"disclosure": {
"type": "boolean"
}
},
"required": [
"enabled",
"disclosure"
]
},
"voicemail": {
"type": "boolean"
},
"receptionist": {
"type": "object",
"properties": {
"enabled": {
"type": "boolean"
},
"afterSecs": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
}
},
"required": [
"enabled",
"afterSecs"
]
},
"ringTimeoutSecs": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
"receptionistAgentId": {
"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"
}
]
},
"members": {
"type": "array",
"items": {
"type": "object",
"properties": {
"appUserId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-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",
"minLength": 1,
"maxLength": 200
},
{
"type": "null"
}
]
},
"role": {
"type": "string",
"minLength": 1
},
"ringMode": {
"type": "string",
"minLength": 1
},
"addedAt": {
"type": "string",
"minLength": 1
}
},
"required": [
"appUserId",
"externalUserId",
"role",
"ringMode",
"addedAt"
]
}
},
"planId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"planVersionId": {
"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"
}
]
},
"revision": {
"type": "integer",
"exclusiveMinimum": 0,
"maximum": 9007199254740991
},
"createdAt": {
"type": "string",
"minLength": 1
},
"updatedAt": {
"type": "string",
"minLength": 1
}
},
"required": [
"phoneNumberId",
"phoneNumber",
"label",
"muted",
"recording",
"voicemail",
"receptionist",
"ringTimeoutSecs",
"receptionistAgentId",
"members",
"planId",
"planVersionId",
"revision",
"createdAt",
"updatedAt"
]
},
{
"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": [
"sitecallNumberId",
"phoneNumber",
"applicationId",
"externalWorkspaceId",
"externalNumberId",
"status",
"inventoryState",
"graceUntil",
"billingGroupId",
"texting",
"updatedAt"
]
},
{
"type": "null"
}
]
}
},
"required": [
"line",
"number"
]
}Change some of a line's settings (name, mute, recording, voicemail, receptionist, ring time).
- Scope
routing:*- 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
Muting a line offers nobody its calls (members keep their ring modes; the call takes a message) and leaves it usable for calls and texts out.
Request body
{
"type": "object",
"properties": {
"label": {
"anyOf": [
{
"type": "string",
"minLength": 1,
"maxLength": 64
},
{
"type": "null"
}
]
},
"muted": {
"type": "boolean"
},
"recording": {
"type": "object",
"properties": {
"enabled": {
"type": "boolean"
},
"disclosure": {
"type": "boolean"
}
},
"additionalProperties": false
},
"voicemail": {
"type": "boolean"
},
"receptionist": {
"type": "object",
"properties": {
"enabled": {
"type": "boolean"
},
"afterSecs": {
"type": "integer",
"minimum": 0,
"maximum": 120
}
},
"additionalProperties": false
},
"ringTimeoutSecs": {
"type": "integer",
"minimum": 10,
"maximum": 120
}
},
"additionalProperties": false
}Response 200
{
"type": "object",
"properties": {
"line": {
"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)$"
},
"phoneNumber": {
"type": "string",
"pattern": "^\\+[1-9]\\d{6,14}$"
},
"label": {
"type": [
"string",
"null"
]
},
"muted": {
"type": "boolean"
},
"recording": {
"type": "object",
"properties": {
"enabled": {
"type": "boolean"
},
"disclosure": {
"type": "boolean"
}
},
"required": [
"enabled",
"disclosure"
]
},
"voicemail": {
"type": "boolean"
},
"receptionist": {
"type": "object",
"properties": {
"enabled": {
"type": "boolean"
},
"afterSecs": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
}
},
"required": [
"enabled",
"afterSecs"
]
},
"ringTimeoutSecs": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
"receptionistAgentId": {
"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"
}
]
},
"members": {
"type": "array",
"items": {
"type": "object",
"properties": {
"appUserId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-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",
"minLength": 1,
"maxLength": 200
},
{
"type": "null"
}
]
},
"role": {
"type": "string",
"minLength": 1
},
"ringMode": {
"type": "string",
"minLength": 1
},
"addedAt": {
"type": "string",
"minLength": 1
}
},
"required": [
"appUserId",
"externalUserId",
"role",
"ringMode",
"addedAt"
]
}
},
"planId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"planVersionId": {
"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"
}
]
},
"revision": {
"type": "integer",
"exclusiveMinimum": 0,
"maximum": 9007199254740991
},
"createdAt": {
"type": "string",
"minLength": 1
},
"updatedAt": {
"type": "string",
"minLength": 1
}
},
"required": [
"phoneNumberId",
"phoneNumber",
"label",
"muted",
"recording",
"voicemail",
"receptionist",
"ringTimeoutSecs",
"receptionistAgentId",
"members",
"planId",
"planVersionId",
"revision",
"createdAt",
"updatedAt"
]
},
"number": {
"anyOf": [
{
"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",
"aging",
"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"
}
]
},
"carrierNumberId": {
"anyOf": [
{
"type": "string",
"minLength": 1
},
{
"type": "null"
}
]
},
"messagingProfileId": {
"anyOf": [
{
"type": "string",
"minLength": 1
},
{
"type": "null"
}
]
},
"billingGroupId": {
"type": [
"string",
"null"
]
},
"texting": {
"type": "object",
"properties": {
"campaignId": {
"type": [
"string",
"null"
]
},
"assignmentStatus": {
"type": [
"string",
"null"
]
},
"targetCampaignId": {
"type": [
"string",
"null"
]
},
"targetStatus": {
"type": [
"string",
"null"
]
},
"ownCampaign": {
"type": "boolean"
}
},
"required": [
"campaignId",
"assignmentStatus",
"targetCampaignId",
"targetStatus"
]
},
"isDefault": {
"type": "boolean"
},
"emergency": {
"type": "object",
"properties": {
"status": {
"anyOf": [
{
"type": "string",
"enum": [
"unset",
"pending",
"enabled",
"failed",
"unsupported"
]
},
{
"type": "string",
"minLength": 1,
"maxLength": 100
}
]
},
"reason": {
"anyOf": [
{
"type": "string",
"maxLength": 200
},
{
"type": "null"
}
]
},
"updatedAt": {
"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": [
"status",
"updatedAt"
]
},
"line": {
"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)$"
},
"phoneNumber": {
"type": "string",
"pattern": "^\\+[1-9]\\d{6,14}$"
},
"label": {
"type": [
"string",
"null"
]
},
"muted": {
"type": "boolean"
},
"recording": {
"type": "object",
"properties": {
"enabled": {
"type": "boolean"
},
"disclosure": {
"type": "boolean"
}
},
"required": [
"enabled",
"disclosure"
]
},
"voicemail": {
"type": "boolean"
},
"receptionist": {
"type": "object",
"properties": {
"enabled": {
"type": "boolean"
},
"afterSecs": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
}
},
"required": [
"enabled",
"afterSecs"
]
},
"ringTimeoutSecs": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
"receptionistAgentId": {
"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"
}
]
},
"members": {
"type": "array",
"items": {
"type": "object",
"properties": {
"appUserId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-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",
"minLength": 1,
"maxLength": 200
},
{
"type": "null"
}
]
},
"role": {
"type": "string",
"minLength": 1
},
"ringMode": {
"type": "string",
"minLength": 1
},
"addedAt": {
"type": "string",
"minLength": 1
}
},
"required": [
"appUserId",
"externalUserId",
"role",
"ringMode",
"addedAt"
]
}
},
"planId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"planVersionId": {
"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"
}
]
},
"revision": {
"type": "integer",
"exclusiveMinimum": 0,
"maximum": 9007199254740991
},
"createdAt": {
"type": "string",
"minLength": 1
},
"updatedAt": {
"type": "string",
"minLength": 1
}
},
"required": [
"phoneNumberId",
"phoneNumber",
"label",
"muted",
"recording",
"voicemail",
"receptionist",
"ringTimeoutSecs",
"receptionistAgentId",
"members",
"planId",
"planVersionId",
"revision",
"createdAt",
"updatedAt"
]
},
{
"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": [
"sitecallNumberId",
"phoneNumber",
"applicationId",
"externalWorkspaceId",
"externalNumberId",
"status",
"inventoryState",
"graceUntil",
"billingGroupId",
"texting",
"updatedAt"
]
},
{
"type": "null"
}
]
}
},
"required": [
"line",
"number"
]
}Put an application user on a line at a ring mode (ring, silent or muted), or change its mode.
- Scope
routing:*- 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
userRef is the user's SiteCall id or external:<externalUserId> (your own id; an application key only). 404 user_not_found when no active user answers to it.
Request body
{
"type": "object",
"properties": {
"ringMode": {
"default": "ring",
"type": "string",
"enum": [
"ring",
"silent",
"muted"
]
}
},
"additionalProperties": false
}Response 200
{
"type": "object",
"properties": {
"line": {
"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)$"
},
"phoneNumber": {
"type": "string",
"pattern": "^\\+[1-9]\\d{6,14}$"
},
"label": {
"type": [
"string",
"null"
]
},
"muted": {
"type": "boolean"
},
"recording": {
"type": "object",
"properties": {
"enabled": {
"type": "boolean"
},
"disclosure": {
"type": "boolean"
}
},
"required": [
"enabled",
"disclosure"
]
},
"voicemail": {
"type": "boolean"
},
"receptionist": {
"type": "object",
"properties": {
"enabled": {
"type": "boolean"
},
"afterSecs": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
}
},
"required": [
"enabled",
"afterSecs"
]
},
"ringTimeoutSecs": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
"receptionistAgentId": {
"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"
}
]
},
"members": {
"type": "array",
"items": {
"type": "object",
"properties": {
"appUserId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-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",
"minLength": 1,
"maxLength": 200
},
{
"type": "null"
}
]
},
"role": {
"type": "string",
"minLength": 1
},
"ringMode": {
"type": "string",
"minLength": 1
},
"addedAt": {
"type": "string",
"minLength": 1
}
},
"required": [
"appUserId",
"externalUserId",
"role",
"ringMode",
"addedAt"
]
}
},
"planId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"planVersionId": {
"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"
}
]
},
"revision": {
"type": "integer",
"exclusiveMinimum": 0,
"maximum": 9007199254740991
},
"createdAt": {
"type": "string",
"minLength": 1
},
"updatedAt": {
"type": "string",
"minLength": 1
}
},
"required": [
"phoneNumberId",
"phoneNumber",
"label",
"muted",
"recording",
"voicemail",
"receptionist",
"ringTimeoutSecs",
"receptionistAgentId",
"members",
"planId",
"planVersionId",
"revision",
"createdAt",
"updatedAt"
]
},
"number": {
"anyOf": [
{
"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",
"aging",
"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"
}
]
},
"carrierNumberId": {
"anyOf": [
{
"type": "string",
"minLength": 1
},
{
"type": "null"
}
]
},
"messagingProfileId": {
"anyOf": [
{
"type": "string",
"minLength": 1
},
{
"type": "null"
}
]
},
"billingGroupId": {
"type": [
"string",
"null"
]
},
"texting": {
"type": "object",
"properties": {
"campaignId": {
"type": [
"string",
"null"
]
},
"assignmentStatus": {
"type": [
"string",
"null"
]
},
"targetCampaignId": {
"type": [
"string",
"null"
]
},
"targetStatus": {
"type": [
"string",
"null"
]
},
"ownCampaign": {
"type": "boolean"
}
},
"required": [
"campaignId",
"assignmentStatus",
"targetCampaignId",
"targetStatus"
]
},
"isDefault": {
"type": "boolean"
},
"emergency": {
"type": "object",
"properties": {
"status": {
"anyOf": [
{
"type": "string",
"enum": [
"unset",
"pending",
"enabled",
"failed",
"unsupported"
]
},
{
"type": "string",
"minLength": 1,
"maxLength": 100
}
]
},
"reason": {
"anyOf": [
{
"type": "string",
"maxLength": 200
},
{
"type": "null"
}
]
},
"updatedAt": {
"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": [
"status",
"updatedAt"
]
},
"line": {
"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)$"
},
"phoneNumber": {
"type": "string",
"pattern": "^\\+[1-9]\\d{6,14}$"
},
"label": {
"type": [
"string",
"null"
]
},
"muted": {
"type": "boolean"
},
"recording": {
"type": "object",
"properties": {
"enabled": {
"type": "boolean"
},
"disclosure": {
"type": "boolean"
}
},
"required": [
"enabled",
"disclosure"
]
},
"voicemail": {
"type": "boolean"
},
"receptionist": {
"type": "object",
"properties": {
"enabled": {
"type": "boolean"
},
"afterSecs": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
}
},
"required": [
"enabled",
"afterSecs"
]
},
"ringTimeoutSecs": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
"receptionistAgentId": {
"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"
}
]
},
"members": {
"type": "array",
"items": {
"type": "object",
"properties": {
"appUserId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-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",
"minLength": 1,
"maxLength": 200
},
{
"type": "null"
}
]
},
"role": {
"type": "string",
"minLength": 1
},
"ringMode": {
"type": "string",
"minLength": 1
},
"addedAt": {
"type": "string",
"minLength": 1
}
},
"required": [
"appUserId",
"externalUserId",
"role",
"ringMode",
"addedAt"
]
}
},
"planId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"planVersionId": {
"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"
}
]
},
"revision": {
"type": "integer",
"exclusiveMinimum": 0,
"maximum": 9007199254740991
},
"createdAt": {
"type": "string",
"minLength": 1
},
"updatedAt": {
"type": "string",
"minLength": 1
}
},
"required": [
"phoneNumberId",
"phoneNumber",
"label",
"muted",
"recording",
"voicemail",
"receptionist",
"ringTimeoutSecs",
"receptionistAgentId",
"members",
"planId",
"planVersionId",
"revision",
"createdAt",
"updatedAt"
]
},
{
"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": [
"sitecallNumberId",
"phoneNumber",
"applicationId",
"externalWorkspaceId",
"externalNumberId",
"status",
"inventoryState",
"graceUntil",
"billingGroupId",
"texting",
"updatedAt"
]
},
{
"type": "null"
}
]
}
},
"required": [
"line",
"number"
]
}Take an application user off a line.
- Scope
routing:*- 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
Response 200
{
"type": "object",
"properties": {
"line": {
"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)$"
},
"phoneNumber": {
"type": "string",
"pattern": "^\\+[1-9]\\d{6,14}$"
},
"label": {
"type": [
"string",
"null"
]
},
"muted": {
"type": "boolean"
},
"recording": {
"type": "object",
"properties": {
"enabled": {
"type": "boolean"
},
"disclosure": {
"type": "boolean"
}
},
"required": [
"enabled",
"disclosure"
]
},
"voicemail": {
"type": "boolean"
},
"receptionist": {
"type": "object",
"properties": {
"enabled": {
"type": "boolean"
},
"afterSecs": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
}
},
"required": [
"enabled",
"afterSecs"
]
},
"ringTimeoutSecs": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
"receptionistAgentId": {
"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"
}
]
},
"members": {
"type": "array",
"items": {
"type": "object",
"properties": {
"appUserId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-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",
"minLength": 1,
"maxLength": 200
},
{
"type": "null"
}
]
},
"role": {
"type": "string",
"minLength": 1
},
"ringMode": {
"type": "string",
"minLength": 1
},
"addedAt": {
"type": "string",
"minLength": 1
}
},
"required": [
"appUserId",
"externalUserId",
"role",
"ringMode",
"addedAt"
]
}
},
"planId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"planVersionId": {
"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"
}
]
},
"revision": {
"type": "integer",
"exclusiveMinimum": 0,
"maximum": 9007199254740991
},
"createdAt": {
"type": "string",
"minLength": 1
},
"updatedAt": {
"type": "string",
"minLength": 1
}
},
"required": [
"phoneNumberId",
"phoneNumber",
"label",
"muted",
"recording",
"voicemail",
"receptionist",
"ringTimeoutSecs",
"receptionistAgentId",
"members",
"planId",
"planVersionId",
"revision",
"createdAt",
"updatedAt"
]
},
"number": {
"anyOf": [
{
"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",
"aging",
"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"
}
]
},
"carrierNumberId": {
"anyOf": [
{
"type": "string",
"minLength": 1
},
{
"type": "null"
}
]
},
"messagingProfileId": {
"anyOf": [
{
"type": "string",
"minLength": 1
},
{
"type": "null"
}
]
},
"billingGroupId": {
"type": [
"string",
"null"
]
},
"texting": {
"type": "object",
"properties": {
"campaignId": {
"type": [
"string",
"null"
]
},
"assignmentStatus": {
"type": [
"string",
"null"
]
},
"targetCampaignId": {
"type": [
"string",
"null"
]
},
"targetStatus": {
"type": [
"string",
"null"
]
},
"ownCampaign": {
"type": "boolean"
}
},
"required": [
"campaignId",
"assignmentStatus",
"targetCampaignId",
"targetStatus"
]
},
"isDefault": {
"type": "boolean"
},
"emergency": {
"type": "object",
"properties": {
"status": {
"anyOf": [
{
"type": "string",
"enum": [
"unset",
"pending",
"enabled",
"failed",
"unsupported"
]
},
{
"type": "string",
"minLength": 1,
"maxLength": 100
}
]
},
"reason": {
"anyOf": [
{
"type": "string",
"maxLength": 200
},
{
"type": "null"
}
]
},
"updatedAt": {
"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": [
"status",
"updatedAt"
]
},
"line": {
"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)$"
},
"phoneNumber": {
"type": "string",
"pattern": "^\\+[1-9]\\d{6,14}$"
},
"label": {
"type": [
"string",
"null"
]
},
"muted": {
"type": "boolean"
},
"recording": {
"type": "object",
"properties": {
"enabled": {
"type": "boolean"
},
"disclosure": {
"type": "boolean"
}
},
"required": [
"enabled",
"disclosure"
]
},
"voicemail": {
"type": "boolean"
},
"receptionist": {
"type": "object",
"properties": {
"enabled": {
"type": "boolean"
},
"afterSecs": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
}
},
"required": [
"enabled",
"afterSecs"
]
},
"ringTimeoutSecs": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
"receptionistAgentId": {
"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"
}
]
},
"members": {
"type": "array",
"items": {
"type": "object",
"properties": {
"appUserId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-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",
"minLength": 1,
"maxLength": 200
},
{
"type": "null"
}
]
},
"role": {
"type": "string",
"minLength": 1
},
"ringMode": {
"type": "string",
"minLength": 1
},
"addedAt": {
"type": "string",
"minLength": 1
}
},
"required": [
"appUserId",
"externalUserId",
"role",
"ringMode",
"addedAt"
]
}
},
"planId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"planVersionId": {
"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"
}
]
},
"revision": {
"type": "integer",
"exclusiveMinimum": 0,
"maximum": 9007199254740991
},
"createdAt": {
"type": "string",
"minLength": 1
},
"updatedAt": {
"type": "string",
"minLength": 1
}
},
"required": [
"phoneNumberId",
"phoneNumber",
"label",
"muted",
"recording",
"voicemail",
"receptionist",
"ringTimeoutSecs",
"receptionistAgentId",
"members",
"planId",
"planVersionId",
"revision",
"createdAt",
"updatedAt"
]
},
{
"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": [
"sitecallNumberId",
"phoneNumber",
"applicationId",
"externalWorkspaceId",
"externalNumberId",
"status",
"inventoryState",
"graceUntil",
"billingGroupId",
"texting",
"updatedAt"
]
},
{
"type": "null"
}
]
}
},
"required": [
"line",
"number"
]
}Have an AI agent call someone: the engine dials them, then the voice-agent runs your script once a person answers.
- Scope
calls:*- 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
The call is queued and dialed as soon as the workspace has an AI line free (two at a time), never after deadlineAt and only under the workspace's AI-minute cap. It is always recorded and the callee hears the recording disclosure first. The result arrives once as ai_call.completed on the call's event stream. The call id is callId, else derived from the Idempotency-Key.
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)$"
},
"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)$"
},
"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
}
]
},
"script": {
"type": "object",
"properties": {
"instructions": {
"type": "string",
"minLength": 1,
"maxLength": 12000
},
"firstMessage": {
"type": "string",
"minLength": 1,
"maxLength": 1000
},
"calleeName": {
"type": "string",
"minLength": 1,
"maxLength": 120
},
"language": {
"type": "string",
"enum": [
"en",
"es"
]
},
"voice": {
"type": "string",
"enum": [
"Puck",
"Charon",
"Kore",
"Fenrir",
"Aoede",
"Leda",
"Orus",
"Zephyr"
]
},
"questions": {
"default": [],
"maxItems": 30,
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string",
"pattern": "^[a-z][a-z0-9_]{0,63}$"
},
"text": {
"type": "string",
"minLength": 1,
"maxLength": 500
},
"type": {
"default": "string",
"type": "string",
"enum": [
"string",
"boolean",
"integer",
"number"
]
}
},
"required": [
"id",
"text"
],
"additionalProperties": false
}
},
"slots": {
"default": [],
"maxItems": 5,
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string",
"pattern": "^[A-Za-z0-9_-]{1,64}$"
},
"startsAt": {
"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)))$"
},
"label": {
"type": "string",
"minLength": 1,
"maxLength": 120
}
},
"required": [
"id",
"startsAt",
"label"
],
"additionalProperties": false
}
},
"maxDurationSecs": {
"default": 600,
"type": "integer",
"minimum": 30,
"maximum": 1800
},
"voicemail": {
"default": {
"action": "hangup"
},
"oneOf": [
{
"type": "object",
"properties": {
"action": {
"type": "string",
"const": "hangup"
}
},
"required": [
"action"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"action": {
"type": "string",
"const": "message"
},
"text": {
"type": "string",
"minLength": 1,
"maxLength": 600
}
},
"required": [
"action",
"text"
],
"additionalProperties": false
}
]
}
},
"required": [
"instructions",
"firstMessage"
],
"additionalProperties": false
},
"externalRef": {
"type": "string",
"minLength": 1,
"maxLength": 255
},
"machineDetection": {
"default": "premium",
"type": "string",
"enum": [
"premium",
"off"
]
},
"deadlineAt": {
"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)))$"
},
"consentBasis": {
"type": "string",
"minLength": 1,
"maxLength": 500
}
},
"required": [
"agentId",
"to",
"from",
"script"
],
"additionalProperties": false
}Response 201
{
"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)$"
},
"status": {
"anyOf": [
{
"type": "string",
"enum": [
"queued",
"started",
"completed"
]
},
{
"type": "string",
"minLength": 1,
"maxLength": 100
}
]
},
"from": {
"type": "string",
"pattern": "^\\+[1-9]\\d{7,14}$"
},
"to": {
"type": "string",
"pattern": "^\\+[1-9]\\d{7,14}$"
}
},
"required": [
"callId",
"status",
"from",
"to"
]
}Withdraw a queued AI call, or hang up a live one (no body); it completes as cancelled.
- Scope
calls:*- Credentials
application_key- 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
200 when the call had already completed (nothing changes); the outcome of a cancelled call arrives as ai_call.completed.
Response 202
{
"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)$"
},
"status": {
"anyOf": [
{
"type": "string",
"enum": [
"queued",
"started",
"completed"
]
},
{
"type": "string",
"minLength": 1,
"maxLength": 100
}
]
}
},
"required": [
"callId",
"status"
]
}Record an address's opt-out you learned yourself; SiteCall then refuses every text to it.
- Scope
messages:*- 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
Opt-outs only: an address texts START to opt back in. The answer is the address's current decision, which an older occurredAt may not change.
Request body
{
"type": "object",
"properties": {
"address": {
"type": "string",
"pattern": "^\\+[1-9]\\d{7,14}$"
},
"reason": {
"type": "string",
"minLength": 1,
"maxLength": 500
},
"sourceRef": {
"type": "string",
"minLength": 1,
"maxLength": 200
},
"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)))$"
}
},
"required": [
"address"
],
"additionalProperties": false
}Response 200
{
"type": "object",
"properties": {
"address": {
"type": "string",
"pattern": "^\\+[1-9]\\d{7,14}$"
},
"status": {
"anyOf": [
{
"type": "string",
"enum": [
"opted_out",
"opted_in",
"none"
]
},
{
"type": "string",
"minLength": 1,
"maxLength": 100
}
]
},
"source": {
"anyOf": [
{
"anyOf": [
{
"type": "string",
"enum": [
"keyword",
"carrier",
"application",
"operator",
"import",
"ai_call"
]
},
{
"type": "string",
"minLength": 1,
"maxLength": 100
}
]
},
{
"type": "null"
}
]
},
"occurredAt": {
"type": [
"string",
"null"
]
}
},
"required": [
"address",
"status",
"source",
"occurredAt"
]
}The current consent decision of up to 1000 addresses: their texts, or with channel voice the do-not-call for AI calls.
- 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
A read: changes nothing. none where SiteCall holds no decision; a STOP and a START at the same instant reads as a STOP.
Request body
{
"type": "object",
"properties": {
"addresses": {
"minItems": 1,
"maxItems": 1000,
"type": "array",
"items": {
"type": "string",
"pattern": "^\\+[1-9]\\d{7,14}$"
}
},
"channel": {
"type": "string",
"enum": [
"sms",
"voice"
]
}
},
"required": [
"addresses"
],
"additionalProperties": false
}Response 200
{
"type": "object",
"properties": {
"data": {
"type": "array",
"items": {
"type": "object",
"properties": {
"address": {
"type": "string",
"pattern": "^\\+[1-9]\\d{7,14}$"
},
"status": {
"anyOf": [
{
"type": "string",
"enum": [
"opted_out",
"opted_in",
"none"
]
},
{
"type": "string",
"minLength": 1,
"maxLength": 100
}
]
},
"source": {
"anyOf": [
{
"anyOf": [
{
"type": "string",
"enum": [
"keyword",
"carrier",
"application",
"operator",
"import",
"ai_call"
]
},
{
"type": "string",
"minLength": 1,
"maxLength": 100
}
]
},
{
"type": "null"
}
]
},
"occurredAt": {
"type": [
"string",
"null"
]
}
},
"required": [
"address",
"status",
"source",
"occurredAt"
]
}
}
},
"required": [
"data"
]
}The line type the verification gate sees for a US or Canadian number, without a send.
- Scope
messages:*- Credentials
application_key- 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
{phoneNumber} is E.164 with the + URL-encoded. An exempt number is answered without a carrier lookup (source: "exemption"). A carrier that cannot answer is source: "error" with voip: null: treat it as allowed, as the gate does.
Response 200
{
"type": "object",
"properties": {
"phoneNumber": {
"type": "string",
"pattern": "^\\+1[2-9]\\d{2}[2-9]\\d{6}$"
},
"exempt": {
"type": "boolean"
},
"voip": {
"type": [
"boolean",
"null"
]
},
"lineType": {
"type": [
"string",
"null"
]
},
"source": {
"anyOf": [
{
"type": "string",
"enum": [
"exemption",
"cache",
"carrier",
"error"
]
},
{
"type": "string",
"minLength": 1,
"maxLength": 100
}
]
}
},
"required": [
"phoneNumber",
"exempt",
"voip",
"lineType",
"source"
]
}Vouch for a number so your verification codes pass the VoIP gate.
- Scope
messages:*- Credentials
application_key- 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
Exemptions are your application's own. Repeating the PUT keeps the exemption and updates its reason.
Request body
{
"type": "object",
"properties": {
"reason": {
"type": "string",
"minLength": 1,
"maxLength": 200
}
},
"required": [
"reason"
],
"additionalProperties": false
}Response 200
{
"type": "object",
"properties": {
"phoneNumber": {
"type": "string",
"pattern": "^\\+1[2-9]\\d{2}[2-9]\\d{6}$"
},
"reason": {
"type": "string"
},
"addedAt": {
"type": "string"
}
},
"required": [
"phoneNumber",
"reason",
"addedAt"
]
}Every number in SiteCall's text-messaging program, with the business it serves.
- 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
The public program directory carriers review (https://sitecall.ai/sms): each local number on the shared 10DLC campaign, and each toll-free number filed from its business's confirmed company details. Cached for five minutes.
Response 200
{
"type": "object",
"properties": {
"numbers": {
"type": "array",
"items": {
"type": "object",
"properties": {
"phoneNumber": {
"type": "string",
"pattern": "^\\+1\\d{10}$"
},
"businessName": {
"type": "string",
"minLength": 1
}
},
"required": [
"phoneNumber",
"businessName"
]
}
}
},
"required": [
"numbers"
]
}