SiteCallDevelopers

SiteCall for developers

Calls and texts inside your application.

SiteCall is the phone system: numbers, routing, queues, recordings, transcripts and texting. Your application drives it through a REST API at https://sitecall.ai/api/v1, hears about every change through signed webhooks, and puts calls in your users' browsers and phones with the web and React Native SDKs.

How an application connects

Credentials

CredentialWhat it is
application_keyAn application key (`sc_live_…`) of the application that manages the workspace.
workspace_keyA workspace's own key (`sc_live_…`), which holds only `verify:send`.
member_tokenA SiteCall member's end-user token (`POST /api/v1/sessions` with the member's session).
user_tokenAn application user's end-user token (`POST /api/v1/sessions` with the application key).
user_sessionA signed-in SiteCall user's access token (their SiteCall login, not an end-user token).
application_secretThe application's legacy bearer secret with the `x-sitecall-application` header.
publicNo credential.

Send it as Authorization: Bearer <credential>. Each operation needs one scope:

numbers:* · routing:* · calls:* · calls:supervise · devices:* · messages:* · media:read · webhooks:* · metrics:read

calls:* is call control and never implies calls:supervise. An end-user token carries at most the scopes the key that minted it holds.

Conventions

A refusal

HTTP/1.1 409 Conflict
content-type: application/json

{ "error": { "code": "call_ended", "message": "The call has ended" } }
CodeStatus
unauthorized401
insufficient_scope403
workspace_forbidden403
forbidden403
invalid_request400
invalid_cursor400
idempotency_key_required400
idempotency_key_reused422
idempotency_in_progress409
not_found404
in_use409
not_published409
invalid_plan422
call_ended409
target_not_found404
supervisor_unreachable409
not_implemented501
unavailable503
invalid_destination400
emergency_unavailable422
destination_blocked403
number_unavailable404
caller_id_forbidden403
self_dial422
agent_unreachable409
plan_inactive402
call_conflict409
disabled503
application_key_required403
limit_exceeded409
device_busy409
emergency_location_required403
emergency_address_invalid422
recipient_opted_out409
sender_unavailable422
message_conflict409
sender_not_eligible403
invalid_media422
message_rejected422

The API reference lists all 81 operations, generated from SiteCall's endpoint table. SiteCall's tests run the typed client against every route it lists except the two session-bound provisioning operations: each operation's method and path, the scopes and credentials it accepts and refuses, when it needs an Idempotency-Key and a workspace header, and that its answer matches the published schema.