API reference
This page is generated from the code (backend/tools/generate_api_docs.py), do not edit it by hand. Descriptions come from the backend docstrings. Concepts (authentication, multi-domain, roles, errors) are described in the API documentation; the interactive OpenAPI spec is served on /docs by the API.
800 operations, 73 groups.
Contents
- Authentication (23 operations)
- Second factor and passkeys (13 operations)
- Account (preferences, deletion, sign-up) (9 operations)
- Presence: my state and my status (4 operations)
- Organizations (20 operations)
- Teams (12 operations)
- SMS & conversations (19 operations)
- SMS questionnaires (6 operations)
- Activity (4 operations)
- Conversation notes (4 operations)
- Call notes (4 operations)
- Dashboard (4 operations)
- Live activity (3 operations)
- Video meetings (29 operations)
- Video meetings: guests (6 operations)
- Video meetings (internal) (3 operations)
- Video meetings: limits (4 operations)
- Messages between colleagues (15 operations)
- Address book (26 operations)
- Phone numbers (11 operations)
- Number purchase (4 operations)
- Number porting (7 operations)
- Number porting (domain) (10 operations)
- Number pool and provider (13 operations)
- Number provider webhook (1 operations)
- SMS providers (7 operations)
- Invitations (6 operations)
- Users (8 operations)
- API keys (5 operations)
- Website widget (6 operations)
- Connected applications (11 operations)
- Recording listening links (1 operations)
- Emergency links (2 operations)
- Security policy reports (1 operations)
- Integrations (9 operations)
- Fax (17 operations)
- File retention (6 operations)
- File storage (5 operations)
- Voice: phones and ATAs (13 operations)
- Voice: 9-1-1 addresses (3 operations)
- Phone provisioning (public) (5 operations)
- Website widget (public) (2 operations)
- Portability check (public) (1 operations)
- Push notifications (6 operations)
- Voice (VoXoS) (110 operations)
- Number voice features (17 operations)
- Telma AI (transcription and summary) (12 operations)
- Search in the summaries (1 operations)
- Telma AI (domain and platform) (4 operations)
- Domain voice settings (20 operations)
- Voice (internal) (19 operations)
- Mail (internal) (1 operations)
- Metrics (7 operations)
- Billing (19 operations)
- Free trial, account state and settings (6 operations)
- Billing: cards and receipts (13 operations)
- Domain billing (23 operations)
- Payment notifications (2 operations)
- Domains (60 operations)
- System (27 operations)
- Platform SMS provider accounts (11 operations)
- SMS provider accounts of a domain (16 operations)
- Platform number providers (5 operations)
- Platform providers (8 operations)
- Platform number porting (5 operations)
- Platform 9-1-1 (4 operations)
- Platform voice trunks (12 operations)
- Profiles and permissions (11 operations)
- MCP connector (assistants) (8 operations)
- Connected assistants (consent) (4 operations)
- Uploads (3 operations)
- Chat files (2 operations)
- Inbound webhooks (2 operations)
- API keys: closed routes
Authentication
Login, invitation-based registration, profile, OAuth (Google, Microsoft, Apple).
POST /auth/forgot-password
Request a password reset.
Rate limited to 5 per hour per email address (per client address without an email), whatever the X-API-Key or Authorization headers.
The body must be a JSON object (else 400 validation_error); an email that is missing or not a string gets 400 validation_error too.
The link goes through the SMTP server of the account's own domain and leads to that domain's first production hostname, whatever X-Frontend-Host: the single domain that holds every organization of the account (for a domain_admin, also every domain it administers, and only when the request comes from that domain). A super_admin, or an account spread over several domains or with none, gets the platform's server and FRONTEND_URL (SMTP_* environment variables); without a configured server nothing is sent. The answer is the same in every case.
Access: public (no authentication)
Rate limit: 5 per hour
Request body
| Name | Description |
|---|---|
email |
User email address. |
Response: Success message (always returns success to prevent email enumeration).
POST /auth/login
Login with email and password.
Rate limited by the FAILED sign-ins only (a good sign-in is never counted, so nobody can lock an account out with the owner's own successes, and the owner's sign-ins do not eat the budget): 30 failures per 15 minutes per email address (RATELIMIT_LOGIN_ACCOUNT), then 429 rate_limited with Retry-After, even for the right password (the budget bounds the guesses). Where the client's address is known (not behind the TLS demultiplexer, see "Limits" in the API concepts) two more budgets apply: 10 failures per 15 minutes per email address and client address, and 100 per 15 minutes per client address, so one address cannot lock an account out for the others nor spray many accounts. The answers to the 4th and later failures of an account are slowed (0.5 s, doubling, up to 4 s). A request refused with 400 validation_error is not counted. The bucket is the email address, whatever the X-API-Key and Authorization headers.
The body must be a JSON object (else 400 validation_error); an email or a password that is missing or not a string gets 400 validation_error too.
Session length: the access token lasts 1 hour. The refresh token lasts 30 days (JWT_REFRESH_TOKEN_EXPIRES), renewed at each POST /auth/refresh. With remember false it lasts only 12 hours (JWT_REFRESH_TOKEN_EXPIRES_SHORT, JWT_REFRESH_SHORT_HOURS), still renewed at each refresh: the session ends after 12 hours without a refresh. The choice is kept by the rotation of the refresh token and by the new tokens of PUT /auth/me/password and PUT /auth/me/email.
Access: public (no authentication)
Rate limit: 30 per 15 minutes; 10 per 15 minutes; 100 per 15 minutes
Request body
| Name | Description |
|---|---|
email |
User email address. |
password |
User password. |
remember |
Optional boolean, default true (30-day refresh token, the behavior before this option existed). false opens a short session (12 hours). Another type gets 400 validation_error with field remember. |
any_domain |
Optional, default false. Sign-in from a client that does not know the domain of the account (the mobile app when nobody typed another domain): the answer then carries domain, the domain the account works in, whose host the client adopts as X-Frontend-Host. The domain of X-Frontend-Host when the account works there, otherwise the only domain the account works in (with several, the one of its current organization). A failed sign-in is answered exactly as without it (same 401, same budgets, same delay): it tells nothing about the existence of an account. Ignored when the request carries an X-API-Key header. Another type gets 400 validation_error with field any_domain. Second factor: when the account has one (authenticator app, passkey), the right password does not open the session; the answer is mfa_required with an mfa_token (5 minutes, single use) to send with a code or a passkey assertion to POST /auth/mfa/verify. When the account must have one (platform and domain admins, and organization admins where the domain asks) and its grace period is over, the answer is mfa_enrollment_required with an mfa_token (15 minutes) for the enrollment routes (header X-MFA-Token). Today the platform does not enforce it (MFA_ENFORCE off): such an account without a second factor gets its session with mfa_setup (deadline null), never mfa_enrollment_required; once enforced, mfa_setup carries the deadline of the grace period (14 days). |
Response: user: The user (as GET /auth/me). access_token: Access JWT (1 hour). Sent as Authorization: Bearer. refresh_token: Refresh JWT (30 days, 12 hours when remember is false), renewed at each POST /auth/refresh. domain: Only with any_domain: {id, name, host} of the domain to use (host: first public hostname, as domain_host of GET /api/v1/organizations/my), null when the account works in no domain and the host is unknown. mfa_setup: Only for an account that should have a second factor and has none (recommended while not enforced, or during the grace period): {required, reason (platform_admin, domain_admin or organization_admin), deadline (null while not enforced)}. mfa_required (boolean): Instead of the session: the account has a second factor; with mfa_token, methods (totp, webauthn, backup_code) and expires_in (seconds). mfa_enrollment_required (boolean): Instead of the session: the account must add a second factor first; with mfa_token, reason, deadline and expires_in. mfa_token: The token of the second step (never a session token).
POST /auth/logout
Log out: revoke the refresh token given in the Authorization header and the whole session it belongs to: the access tokens still alive are refused at once (401), those of the earlier rotations included. Other sessions of the user are not touched. (A session opened before this change keeps its access token until it expires, within the hour.)
Rate limited like POST /auth/refresh: per user of the refresh token.
Access: refresh JWT
Response: success: True.
GET /auth/me
Get current authenticated user.
The user object (also returned by login, registration, OAuth and the user routes) has these fields.
With the header X-Admin-Organization (super admin or domain admin, see "Administration context" in the API concepts) the user is shown working in that organization: organization_id is the administered one, team_id is null, the role is the platform role, and the response also carries admin_context and admin_organization_id. Nothing is written on the account.
In a session an administrator opened as this user (POST /api/v1/organizations/<org_id>/members/<user_id>/impersonate), the user also carries impersonated_by {id, name, email}: the administrator.
Access: access JWT
Response: user: mfa (second factor of the account: enabled, methods, totp, passkeys, backup_codes_left, required, reason, deadline, enforced), id, email, name, first_name, last_name, phone (null, or an object with country, number in E.164 and verified_at), timezone (IANA name, null until chosen), language (fr or en), role (agent, manager, admin, domain_admin or super_admin: a copy derived from the profiles and platform permissions, never what decides), permissions (former permission names given by the platform permissions or the profiles in the current organization, plus those granted to the account such as support), organization_id, team_id (the principal team in the current organization), team_ids (every team of the user there, the principal first), oauth_provider, email_verified (false only for a free sign-up whose address was not proved yet), is_active, is_service, created_at, last_login, default_organization_id, default_organization_ids, domain_ids, platform_permissions (platform_admin, domain_admin, support: the permissions of the account), organization_permissions (the permissions of the user in their current organization, given by their profiles; every one for an administrator of the platform or of its domain), profile_ids (the profiles of their membership there), dnd (the do not disturb of the account: {active, until, set_at}, as GET /auth/me/dnd), status (the manual status: {kind, text, until, set_at} or null, as GET /auth/me/status). terms (the terms of use of the domain: {required, version, url, privacy_url, accepted_version, accepted_at}, as GET /auth/me/terms; required true = the web and mobile apps ask the person to accept the current version, with POST /auth/me/terms; never true for a service account, and no request is refused because of it). Accounts created before first_name and last_name existed get them deduced from name. admin_context: true, only while the header X-Admin-Organization is honored. admin_organization_id: The administered organization, with admin_context.
PATCH /auth/me
Update current user profile.
The body must be a JSON object (else 400 validation_error). A field set to null is left unchanged, except timezone, phone and default_organization_id, which null clears.
Changing name alone rewrites first_name and last_name (first word, then the rest); changing first_name or last_name alone rewrites name; sending name with either keeps first_name and last_name as sent.
The profile cannot change the email address (PUT /auth/me/email), grant permissions (an account never grants itself any) or verify a phone number (PUT /auth/me/phone). Deprecated: changing the password here (use PUT /auth/me/password); it now requires current_password and, like the new route, ends the other sessions and follows the same strength rule (400 validation_error with field password). The requests that carry a password are limited to 10 per hour per user (429 rate_limited), like PUT /auth/me/password: they are guesses at the current password for whoever holds a stolen token. The other updates keep the default limits.
Access: access JWT
Rate limit: 10 per hour
Request body
| Name | Description |
|---|---|
name |
New display name (optional, a non-empty string). |
first_name |
First name (optional, at most 100 characters). |
last_name |
Last name (optional, at most 100 characters; may be empty). |
language |
Language preference (optional, fr or en). |
timezone |
IANA time zone such as America/Toronto (optional; null clears it). |
phone |
Phone number as an object with number and optional country (ISO code; for a North American number it is deduced from the area code, CA or US, when absent; other countries must be allowed by the domain and need the international format), or null to remove it. Normalized to E.164; verified_at is null until PUT /auth/me/phone proves it, and an unchanged number keeps its verified_at. Invalid number gets 400 invalid_phone. |
permissions |
Refused with 403 forbidden unless identical to the current list. |
password |
Deprecated, see PUT /auth/me/password (optional; the strength rule of that route). |
current_password |
Current password, required with password (401 invalid_password if wrong). |
default_organization_id |
Default organization for the current domain (optional, a string; null clears it). The organization must belong to the domain of the request (X-Frontend-Host) and the user must be a member of it, unless the account has the platform permission platform_admin. A field of another type, or a shorter password, gets 400 validation_error with field. |
Response: Updated user data. default_organization_id is the default for the current domain, default_organization_ids maps every domain to its default. Only when the password changed, also access_token and refresh_token of a new session (the current one stays signed in, the others end).
PUT /auth/me/email
Change the email address (the sign-in identifier) of the current user.
Needs the proof that the user controls the new address: POST /auth/verifications with channel email, then POST /auth/verifications/<id>/confirm, whose verified_token is sent here (single use, valid 10 minutes). The current password is required too. Rate limited to 10 per hour per user. The body must be a JSON object.
The address is the key of the sign-in: every session ends (token_version is incremented) except the current one, which continues on the new tokens returned here. Pending password reset links are cancelled and the former address gets a notice (best effort).
Access: access JWT
Rate limit: 10 per hour
Request body
| Name | Description |
|---|---|
email |
The new address. |
password |
The current password (not needed by an account without password). |
verified_token |
Token of a confirmed verification of this address (purpose email_change). |
Response: user: The user with the new address. access_token: New access token. refresh_token: New refresh token, to store in place of the old one.
Errors 400 validation_error (field email or password), 400 verification_required (no verified_token), 400 invalid_code (token unknown, already used or for another address), 400 code_expired (token older than 10 minutes), 401 invalid_password, 409 email_in_use, 429 rate_limited.
PUT /auth/me/password
Change the password of the current user.
Replaces PATCH /auth/me with a password, which is now deprecated. Rate limited to 10 per hour per user. The body must be a JSON object (else 400 validation_error).
The new password must have 8 to 128 characters (72 bytes in UTF-8 at most), mix at least 2 of lower case, upper case, digits and other characters, not be a very common password, not be the email address or its local part and differ from the current password.
Every other session ends (token_version is incremented, so their access and refresh tokens are refused with 401). The current session continues on the new tokens returned here, which keep its remember choice: the client must store them in place of the old ones. An account without a password (OAuth sign-in only) gets its first password this way: instead of current_password it sends verified_token, the token of a confirmed email code (POST /auth/verifications, purpose account_proof), so that a stolen session alone cannot set a password on the account (400 verification_required, invalid_code or code_expired otherwise).
Access: access JWT
Rate limit: 10 per hour
Request body
| Name | Description |
|---|---|
current_password |
The password in use (old_password is accepted as a synonym). |
verified_token |
Account without password: token of a confirmed email verification of purpose account_proof. |
new_password |
The new password, see the rule above. |
Response: success: True. user: The user. access_token: New access token. refresh_token: New refresh token, to store in place of the old one.
Errors 400 validation_error with field new_password when the rule is not met, and with field current_password when it is missing. 401 invalid_password when current_password is wrong. 429 rate_limited.
PUT /auth/me/phone
Set the verified phone number of the current user.
Needs the proof that the user receives texts on this number: POST /auth/verifications with channel sms, then POST /auth/verifications/<id>/confirm, whose verified_token is sent here (single use, valid 10 minutes). The current password is required too. Rate limited to 10 per hour per user. The body must be a JSON object. The sessions are not affected.
Access: access JWT
Rate limit: 10 per hour
Request body
| Name | Description |
|---|---|
country |
ISO code of the country (deduced from the area code, CA or US, for a North American number; other countries must be allowed by the domain and need the international format). |
number |
The number, E.164 or national digits; stored in E.164. |
verified_token |
Token of a confirmed verification of this number (purpose phone_change). |
password |
The current password (not needed by an account without password). |
Response: user: The user, with phone set to the number and verified_at to now.
Errors 400 invalid_phone (bad number, country not allowed), 400 validation_error (field password), 400 verification_required (no verified_token), 400 invalid_code (token unknown, already used or for another number), 400 code_expired (token older than 10 minutes), 401 invalid_password, 429 rate_limited.
GET /auth/me/terms
The terms of use of the domain and what this account accepted.
The domain is the one of the request (X-Frontend-Host), else the one of the current organization. The web app and the mobile app show their acceptance screen while required is true; nothing on the server refuses a request because the terms wait (an API key, the MCP connector, the webhooks and the integrations are never stopped).
Access: access JWT
Response: terms: {required, version, url, privacy_url, accepted_version, accepted_at}, as in GET /auth/me (version null: the domain asks nothing; url and privacy_url in the language of the account). history: The acceptances of the account, the latest first: [{domain_id, version, source (signup, invitation, web, app or api), accepted_at}].
POST /auth/me/terms
Accept the current version of the terms of use of the domain.
Kept as the proof: the account, the domain, the version, the date, the client address and the browser (User-Agent) of the request, and where it was given. Never in a session opened as another member (403 impersonation_forbidden) nor in the administration context (X-Admin-Organization, 403 forbidden): the person accepts for themself.
Access: access JWT
Rate limit: 30 per hour
Request body
| Name | Description |
|---|---|
version |
The version the person read (the version of GET /auth/me/terms); required. |
source |
Optional, web or app (default web). |
Response: terms: The terms after the acceptance (required false).
Errors 400 validation_error (field version), 404 no_terms (the domain names no version), 409 terms_version_mismatch (the version is not the current one: read them again; the answer carries terms).
GET /auth/oauth/apple
Get the Sign in with Apple authorization URL.
Public, never rate limited. Apple must be enabled for the domain of the request with every credential (client ID, team ID, key ID, private key: the domain's, else the platform's), else 400 oauth_error. Apple sends the browser back with a POST (form_post, required to receive the name and the address) to the API's POST /auth/oauth/apple/return, which sends it on to redirect_uri with code and state (and user, the first time). The state is signed by the server (10 minutes, single use, bound to Apple, this domain and redirect_uri) and its nonce must come back in Apple's id_token. The client keeps state and refuses a return whose state differs.
Access: public (no authentication)
Rate limit: exempt from the general per-address limit
Query parameters
| Name | Description |
|---|---|
redirect_uri |
The web page the browser ends on (an address of a known domain), which sends the code to POST /auth/oauth/apple/callback. |
Response: auth_url: The Apple consent URL to send the browser to. state: The state in that URL (to be checked at the callback; the callback requires it).
POST /auth/oauth/apple/callback
Handle the Sign in with Apple callback.
Rate limited by the default limits, counted per authorization code (per client address without a code), whatever the X-API-Key or Authorization headers. The body must be a JSON object (else 400 validation_error).
Apple must be enabled with every credential for the domain of the request, else 400 oauth_error and nothing is sent to Apple. The token exchanges with Apple are also limited to 30 per minute for the whole platform: beyond, 429 rate_limited. Each request to Apple waits at most 10 seconds.
The state of GET /auth/oauth/apple must come back with the code (else 400 oauth_error, before anything is sent to Apple); it works once. Apple's id_token is checked (signature with Apple's public keys, issuer, client ID, expiry, nonce of the state). The account is the one linked to the Apple sub; an existing account with the same address is linked (Apple vouches for the address, a private relay address included) unless it is linked to another Apple identity; an account linked to Google or Microsoft gets the Apple identity next to it. A new account is created only where sign-up is open on the domain. Then the second step, as POST /auth/login (mfa_required, mfa_enrollment_required). Every failure after the state is the same 400 oauth_error with a generic message.
Access: public (no authentication)
Request body
| Name | Description |
|---|---|
code |
Authorization code from Apple (query of the web page). |
state |
The state returned by GET /auth/oauth/apple. |
user |
The user value Apple sent the first time (its name), optional. |
any_domain |
As POST /auth/login. |
Response: user: The user (as GET /auth/me). access_token: Access JWT (1 hour). refresh_token: Refresh JWT (30 days). domain: Only with any_domain, as POST /auth/login. mfa_setup, mfa_required, mfa_enrollment_required, mfa_token: As POST /auth/login (second factor).
POST /auth/oauth/apple/return
Where Apple posts the browser back (form_post): sends it on to the web page of the state.
Public, never rate limited. The default limits counted it per client address, that is one counter for every Apple sign-in of the platform behind the TLS demultiplexer (a form body has no target the anonymous routes are keyed by). A per-state key would protect nothing: anyone can post made-up states, each one a new counter, and each costs a signature check only. The route sends nothing to Apple and spends nothing: the signed state (10 minutes, bound to Apple and to the redirect_uri given to GET /auth/oauth/apple, a page of a known domain) only lets it send the browser on to that page; the code is exchanged, once, by POST /auth/oauth/apple/callback, which has its limits. The form (code, state, user the first time, error) comes from Apple through the browser. Nothing is exchanged here: the state is checked (signature, Apple, not expired) without being spent, then 303 to the redirect_uri given to GET /auth/oauth/apple with code, state and user in the query (or error). A state that does not check gets 400 oauth_error.
Access: public (no authentication)
Rate limit: exempt from the general per-address limit
Request body
| Name | Description |
|---|---|
code |
Authorization code (form field). |
state |
The state of GET /auth/oauth/apple (form field). |
user |
JSON with the name, the first time only (form field). |
error |
Apple's error, for example user_cancelled_authorize (form field). |
GET /auth/oauth/google
Get Google OAuth authorization URL.
Public, never rate limited. The URL carries a state made and signed by the server (valid 10 minutes, single use, bound to this provider, this domain and redirect_uri) and a PKCE challenge (S256) whose verifier only the server knows. The client keeps state (for example in sessionStorage) before redirecting the browser, refuses a return whose state differs, and sends it to POST /auth/oauth/google/callback.
Access: public (no authentication)
Rate limit: exempt from the general per-address limit
Query parameters
| Name | Description |
|---|---|
redirect_uri |
Callback URL after authorization. |
Response: auth_url: The Google consent URL to send the browser to. state: The state in that URL (to be checked at the callback; the callback requires it).
POST /auth/oauth/google/callback
Handle Google OAuth callback.
Rate limited by the default limits, counted per authorization code (per client address without a code), whatever the X-API-Key or Authorization headers. The body must be a JSON object and its fields strings (else 400 validation_error).
Google must be enabled, with a client ID, in the OAuth settings of the domain of the request, and the platform's Google credentials configured: else 400 oauth_error, and nothing is sent to Google. The token exchanges with Google are also limited to 30 per minute for the whole platform (only the exchanges actually sent count): beyond, 429 rate_limited. Each request to Google waits at most 10 seconds for an answer.
The state of GET /auth/oauth/google must come back with the code (else 400 oauth_error, before anything is sent to Google); it works once. The account is the one linked to the Google sub; an existing account with the same address is linked only when Google says the address is verified (email_verified) and the account is not linked to another Google identity. A new account is created only where sign-up is open on the domain (settings.signup.enabled), in that domain, as the admin of its own organization. Every failure after the state is the same 400 oauth_error with a generic message.
Access: public (no authentication)
Request body
| Name | Description |
|---|---|
code |
Authorization code from Google. |
state |
The state returned by GET /auth/oauth/google. |
redirect_uri |
Callback URL used in authorization (must be the one of the state). |
any_domain |
As POST /auth/login (the answer then carries domain). |
Response: user: The user (as GET /auth/me). access_token: Access JWT (1 hour). refresh_token: Refresh JWT (30 days). domain: Only with any_domain, as POST /auth/login. mfa_setup, mfa_required, mfa_enrollment_required, mfa_token: As POST /auth/login (second factor).
GET /auth/oauth/microsoft
Get Microsoft OAuth authorization URL.
Public, never rate limited. The URL carries a state made and signed by the server (valid 10 minutes, single use, bound to this provider, this domain and redirect_uri) and a PKCE challenge (S256) whose verifier only the server knows. The client keeps state (for example in sessionStorage) before redirecting the browser, refuses a return whose state differs, and sends it to POST /auth/oauth/microsoft/callback.
Access: public (no authentication)
Rate limit: exempt from the general per-address limit
Query parameters
| Name | Description |
|---|---|
redirect_uri |
Callback URL after authorization. |
Response: auth_url: The Microsoft consent URL to send the browser to. state: The state in that URL (to be checked at the callback; the callback requires it).
POST /auth/oauth/microsoft/callback
Handle Microsoft OAuth callback.
Rate limited by the default limits, counted per authorization code (per client address without a code), whatever the X-API-Key or Authorization headers. The body must be a JSON object and its fields strings (else 400 validation_error).
Microsoft must be enabled, with a client ID, in the OAuth settings of the domain of the request, and the platform's Microsoft credentials configured: else 400 oauth_error, and nothing is sent to Microsoft. The token exchanges with Microsoft are also limited to 30 per minute for the whole platform (only the exchanges actually sent count): beyond, 429 rate_limited. Each request to Microsoft waits at most 10 seconds for an answer.
The state of GET /auth/oauth/microsoft must come back with the code (else 400 oauth_error, before anything is sent to Microsoft); it works once. The account is the one linked to the Microsoft object id. Microsoft vouches for no mail address, so an existing account is never linked by address (it signs in with its password; an account created by Microsoft sign-in is marked oauth_email_verified false), and a pending domain admin invitation is not applied. A new account is created only where sign-up is open on the domain (settings.signup.enabled), in that domain. Every failure after the state is the same 400 oauth_error with a generic message.
Access: public (no authentication)
Request body
| Name | Description |
|---|---|
code |
Authorization code from Microsoft. |
state |
The state returned by GET /auth/oauth/microsoft. |
redirect_uri |
Callback URL used in authorization (must be the one of the state). |
any_domain |
As POST /auth/login (the answer then carries domain). |
Response: user: The user (as GET /auth/me). access_token: Access JWT (1 hour). refresh_token: Refresh JWT (30 days). domain: Only with any_domain, as POST /auth/login. mfa_setup, mfa_required, mfa_enrollment_required, mfa_token: As POST /auth/login (second factor).
GET /auth/oauth/providers
Get list of enabled OAuth providers for current domain.
Public, never rate limited (a cheap read of the domain settings, loaded by every login page).
A provider is offered only when its callback would accept a sign-in (the same rule, AuthService.oauth_provider_enabled): Google and Microsoft when the domain turns them on and the platform's client ID and secret for them are configured (sign-in always uses them); Apple when the domain enables it and its four credentials (client ID, team ID, key ID, private key: the domain's, each missing one taken from the platform's) are known. A button is never shown that would end in 400 oauth_error.
Access: public (no authentication)
Rate limit: exempt from the general per-address limit
Response: providers: {google, microsoft, apple}, true for each provider offered on the domain of the request.
POST /auth/refresh
Refresh the session.
Requires the refresh token in the Authorization header. The refresh token is rotated: the returned one replaces it (the old one stays valid 60 seconds, for tabs that refresh at once). The tokens of one sign-in form a family (claim fam, kept by the rotation): a refresh token already rotated and presented again after those 60 seconds is a copy, and the whole family is revoked (401 for it, the newest tokens and the access tokens included: the owner signs in again). A disabled account gets 401. Once the second factor is enforced on the platform (MFA_ENFORCE), a session that never proved one, of an account that must have one and whose grace period is over, is no longer renewed (401: sign in again, with the second factor); never today. The new tokens keep the claims of the session (remember, family, second factor proved, impersonation). Rate limited by the default limits, counted per user (the identity of the refresh token; per client address when the token is invalid).
Access: refresh JWT
Response: access_token: New access token. refresh_token: New refresh token, to store in place of the old one.
POST /auth/register
Register a new user with an invitation token.
Rate limited to 10 per hour per invitation token (per client address without a token), whatever the X-API-Key or Authorization headers.
The body must be a JSON object and its fields strings: anything else gets 400 validation_error.
Access: public (no authentication)
Rate limit: 10 per hour
Request body
| Name | Description |
|---|---|
token |
Invitation token (required). |
password |
User password. It follows the rule of PUT /auth/me/password (8 to 128 characters, at least 2 of lower case, upper case, digits and symbols, not a very common password, not the email address): else 400 validation_error with field password. |
name |
User display name. |
language |
Preferred language (optional). |
accept_terms |
Optional, true when the page showed the terms of use of the domain and the person accepted them: the acceptance of their current version is kept (as POST /auth/me/terms). Without it, the session asks for it (terms.required of GET /auth/me). |
Response: user: The new user (as GET /auth/me). access_token: Access JWT (1 hour). Sent as Authorization: Bearer. refresh_token: Refresh JWT, to renew the session with POST /auth/refresh.
Errors
POST /auth/reset-password
Reset password using a reset token.
Rate limited to 10 per hour per reset token (per client address without a token), whatever the X-API-Key or Authorization headers.
The body must be a JSON object (else 400 validation_error); a token or a password that is missing or not a string gets 400 validation_error too. The new password follows the same rule as PUT /auth/me/password (8 to 128 characters, 2 character classes out of 4, not a very common password, not the email address: 400 validation_error with field password).
A link works once and is taken atomically before the password changes: two simultaneous requests with the same link cannot both succeed (the second gets 400 validation_error "Invalid or expired reset token"). A successful reset ends every session of the account (token_version) and cancels the account's other pending links. An account created by a sign-in whose address the provider did not vouch for (oauth_email_verified false) loses its OAuth link: the reset proves the mailbox is the person's.
Access: public (no authentication)
Rate limit: 10 per hour
Request body
| Name | Description |
|---|---|
token |
Password reset token. |
password |
New password. It follows the rule of PUT /auth/me/password (8 to 128 characters, at least 2 of lower case, upper case, digits and symbols, not a very common password, not the email address): else 400 validation_error with field password, and the token stays usable. |
Response: Success message.
POST /auth/verifications
Send a verification code to an email address or a phone number.
The first step of PUT /auth/me/email and PUT /auth/me/phone. A code has 6 digits, is valid 10 minutes and is stored hashed. An email goes through the SMTP server of the user's domain, a text message through the SMS provider of that domain, from a number of its pool that no customer holds (or the one named by the domain setting verification.sms_from); it is not charged to the organization.
Asking again for the same target resends a fresh code on the same verification (same id, attempts reset, previous code void). Limits per hour: 3 codes per user and target, 10 per user, 6 per mailbox whoever asked (the spellings of one mailbox count as one: the +tag of an address and the dots of a Gmail address); at least 60 seconds between two codes (resend_after); 30 requests per hour per user. Beyond, 429 rate_limited with retry_after seconds (and a Retry-After header). The body must be a JSON object.
Access: access JWT
Rate limit: 30 per hour
Request body
| Name | Description |
|---|---|
channel |
email or sms (required). |
target |
The email address, or the phone number (E.164 or national digits). |
purpose |
email_change (the default for email), phone_change (the default for sms) or email_verify (proof of the address the account has, for a free sign-up whose address is not proved yet: no target, or the account's own address; 409 already_verified once proved; confirming it grants the starting credit that waited); the purpose must match the channel. |
country |
ISO code of the country of an sms target (deduced from the area code, CA or US, for a North American number). |
Response: verification: Object with id, channel, purpose, target_masked (the target with its middle hidden), expires_in (seconds the code is valid) and resend_after (seconds before another code can be asked). Status 202.
Errors 400 validation_error (field channel, target or purpose), 400 invalid_phone, 429 rate_limited, 502 send_failed (the provider or the mail server refused), 503 email_unavailable (no SMTP server for the domain), 503 sms_unavailable (the domain has no SMS number or provider to send the code with).
POST /auth/verifications/<verification_id>/confirm
Confirm a verification code and get the verified token.
A code allows 5 attempts and 10 minutes; after that, ask for a new code with POST /auth/verifications. Rate limited to 60 per hour per user. The body must be a JSON object. A verification of another user is a 404.
Access: access JWT
Rate limit: 60 per hour
Path parameters
| Name | Description |
|---|---|
verification_id |
Verification ID (the id returned by POST /auth/verifications). |
Request body
| Name | Description |
|---|---|
code |
The 6 digits received. |
Response: verification: Object with id and verified (true). verified_token: Single-use token proving the target, valid 10 minutes, to send to PUT /auth/me/email or PUT /auth/me/phone (already spent for the purpose email_verify). expires_in: Seconds the verified_token is valid. email_verified: true, only for the purpose email_verify (the account is marked verified). credit_granted: The starting credit granted by this confirmation, only when there was one.
Errors 400 invalid_code with attempts_left (wrong code), 400 code_expired (code older than 10 minutes), 404 not_found, 409 already_verified (confirmed already, ask for a new code), 429 too_many_attempts (5 attempts used) or rate_limited.
Second factor and passkeys
Second step of the sign-in, authenticator app (TOTP), backup codes, passkeys (WebAuthn: fingerprint, face, security key) and passwordless sign-in. Closed to API keys.
GET /auth/mfa
The second factor of the account: what is set up, and whether it must have one.
Session, or X-MFA-Token (enrollment).
Access: public (no authentication)
API keys: refused, 403 forbidden (API key not allowed on this route)
Response: mfa: enabled, methods, totp, passkeys (count), backup_codes_left, required, reason (platform_admin, domain_admin, organization_admin), deadline, enforced. passkeys: The passkeys of the account: id, name, created_at, last_used_at, rp_id (the site it works on), backed_up, transports. has_password: Whether the account has a password (the proof asked to add the first factor: current_password, else an email code).
POST /auth/mfa/backup-codes
Replace the backup codes (the old ones stop working).
Session only, for an account with a second factor (else 409 mfa_not_enabled). Proof: a TOTP code or a backup code; the password for an account with passkeys only and no code left.
Access: public (no authentication)
API keys: refused, 403 forbidden (API key not allowed on this route)
Rate limit: 20 per 15 minutes
Request body
| Name | Description |
|---|---|
code |
A TOTP code or a backup code. |
password |
The password (only for an account with passkeys alone). |
Response: backup_codes: The 10 new codes, shown once.
POST /auth/mfa/totp/confirm
Confirm the authenticator app with a code it shows: it becomes a second factor.
Session, or X-MFA-Token (enrollment: the answer then opens the session). 400 invalid_code, 409 not_started. Rate limited: 20 failures per 15 minutes per account. The FIRST factor of an account added from a session proves the account again: current_password (400 validation_error when missing, 401 invalid_password), or, for an account without password, verified_token of an email code (POST /auth/verifications, purpose account_proof; 400 verification_required, invalid_code or code_expired).
Access: public (no authentication)
API keys: refused, 403 forbidden (API key not allowed on this route)
Rate limit: 20 per 15 minutes
Request body
| Name | Description |
|---|---|
code |
The 6-digit code (required). |
current_password |
The password of the account (first factor added from a session). |
verified_token |
Token of a confirmed email verification of purpose account_proof (first factor, account without password). |
Response: mfa: The status (as GET /auth/mfa). backup_codes: The 10 backup codes, shown once, when the account had none. access_token, refresh_token: The session, marked as having proved a second factor (new tokens of the current session; with X-MFA-Token, also user and domain as POST /auth/login).
POST /auth/mfa/totp/disable
Remove the authenticator app.
Session only. Proof: a code of the app or a backup code. 409 mfa_required when it is the last factor of an account that must have one.
Access: public (no authentication)
API keys: refused, 403 forbidden (API key not allowed on this route)
Rate limit: 20 per 15 minutes
Request body
| Name | Description |
|---|---|
code |
A TOTP code or a backup code (required). |
Response: mfa: The status after the change.
POST /auth/mfa/totp/setup
Start setting up an authenticator app (TOTP, 6 digits, 30 seconds).
Session, or X-MFA-Token (enrollment). A new secret each time, kept pending until confirmed; 409 already_enabled when the account has one. An account that already has a second factor adds another one only from a session that proved one (else 403 second_factor_required).
Access: public (no authentication)
API keys: refused, 403 forbidden (API key not allowed on this route)
Response: secret: The secret in base32 (to type by hand). otpauth_uri: The otpauth:// URI. qr_svg: The QR code of that URI (data:image/svg+xml URI).
POST /auth/mfa/verify
Second step of a sign-in: prove the second factor and open the session.
Public. The mfa_token of POST /auth/login (or of an OAuth callback) answered mfa_required: 5 minutes, single use, refused (401 invalid_mfa_token) once the password of the account changed. Rate limited: 10 failures per 15 minutes per account (whatever the mfa_token), then 429.
Access: public (no authentication)
API keys: refused, 403 forbidden (API key not allowed on this route)
Rate limit: 10 per 15 minutes
Request body
| Name | Description |
|---|---|
mfa_token |
The token of mfa_required (required). |
method |
totp, backup_code or webauthn (required). |
code |
totp and backup_code: the 6-digit code of the authenticator app, or a backup code (single use). |
challenge_id |
webauthn: the challenge_id of POST /auth/mfa/webauthn/options. |
credential |
webauthn: the PublicKeyCredential of navigator.credentials.get (JSON). |
Response: user, access_token, refresh_token, domain: As POST /auth/login. The session carries the second factor. backup_codes_left: After a backup code, how many are left.
POST /auth/mfa/webauthn/options
Options of navigator.credentials.get for the second step of a sign-in (the passkeys of the account).
Public. Rate limited: 60 per 15 minutes per account of the mfa_token (the requests with a token that does not read share one counter of their own), never per address. The Origin of the request must be a known domain (the mobile app sends no Origin but X-Client-App: ios or android with X-Frontend-Host); else 400 origin_not_allowed.
Access: public (no authentication)
API keys: refused, 403 forbidden (API key not allowed on this route)
Rate limit: 60 per 15 minutes
Request body
| Name | Description |
|---|---|
mfa_token |
The token of mfa_required (required). |
Response: challenge_id: To send back with the credential (single use, 5 minutes). options: The PublicKeyCredentialRequestOptions (JSON, binary fields in base64url).
PATCH /auth/webauthn/credentials/<credential_id>
Rename a passkey of the account.
Session only.
Access: public (no authentication)
API keys: refused, 403 forbidden (API key not allowed on this route)
Path parameters
| Name | Description |
|---|---|
credential_id |
Id of the passkey (GET /auth/mfa). |
Request body
| Name | Description |
|---|---|
name |
The new name (60 characters). |
Response: passkey: The passkey.
POST /auth/webauthn/credentials/<credential_id>/remove
Remove a passkey of the account.
Session only. Proof: a TOTP code or a backup code; the password for an account with passkeys only and no code left. 409 mfa_required when it is the last factor of an account that must have one.
Access: public (no authentication)
API keys: refused, 403 forbidden (API key not allowed on this route)
Rate limit: 20 per 15 minutes
Path parameters
| Name | Description |
|---|---|
credential_id |
Id of the passkey. |
Request body
| Name | Description |
|---|---|
code |
A TOTP code or a backup code. |
password |
The password (only for an account with passkeys alone). |
Response: mfa: The status after the change.
POST /auth/webauthn/login
Sign in with a passkey (fingerprint, face, PIN of the device, security key).
Public. The authenticator must have verified the person (user verification): the sign-in counts as a multi-factor one, the session opens at once (claim mfa). Unknown passkey, passkey of another site or refused signature: 401. Rate limited, failures (401) only: 30 per 15 minutes per passkey presented (credential id), and, when the client's address is known, 30 per 15 minutes per address; never one counter for the whole platform. Then 429 rate_limited.
Access: public (no authentication)
API keys: refused, 403 forbidden (API key not allowed on this route)
Rate limit: 30 per 15 minutes; 30 per 15 minutes
Request body
| Name | Description |
|---|---|
challenge_id |
The challenge_id of POST /auth/webauthn/login/options (required). |
credential |
The PublicKeyCredential of navigator.credentials.get (JSON, required). |
remember |
As POST /auth/login. |
any_domain |
As POST /auth/login. |
Response: user, access_token, refresh_token, domain: As POST /auth/login.
POST /auth/webauthn/login/options
Options of navigator.credentials.get for a sign-in with a passkey (no address, no password).
Public. Rate limited: 60 per 15 minutes per client address when that address is known; not limited when it is not (a per-address counter would then be one for the whole platform: one person would stop everybody's passkey sign-in). The challenge lives 5 minutes. The Origin of the request must be a known domain (the mobile app sends no Origin but X-Client-App: ios or android with X-Frontend-Host: the passkeys of that site); else 400 origin_not_allowed. The browser offers the passkeys it has for this site.
Access: public (no authentication)
API keys: refused, 403 forbidden (API key not allowed on this route)
Rate limit: 60 per 15 minutes
Response: challenge_id: To send back with the credential (single use, 5 minutes). options: The PublicKeyCredentialRequestOptions (JSON, user verification required).
POST /auth/webauthn/register
Add a passkey (the answer of navigator.credentials.create).
Session, or X-MFA-Token (enrollment: the answer then opens the session). 400 invalid_challenge or invalid_credential, 409 already_registered. The FIRST factor added from a session proves the account again, as POST /auth/mfa/totp/confirm (current_password or verified_token).
Access: public (no authentication)
API keys: refused, 403 forbidden (API key not allowed on this route)
Rate limit: 20 per 15 minutes
Request body
| Name | Description |
|---|---|
challenge_id |
The challenge_id of POST /auth/webauthn/register/options (required). |
credential |
The PublicKeyCredential (JSON, required). |
name |
A name to recognize it (60 characters, default "Clé d'accès"). |
current_password |
The password of the account (first factor added from a session). |
verified_token |
Token of a confirmed email verification of purpose account_proof (first factor, account without password). |
Response: passkey: The passkey (as in GET /auth/mfa). backup_codes: The 10 backup codes, shown once, when the account had none. access_token, refresh_token: As POST /auth/mfa/totp/confirm. mfa: The status after the change.
POST /auth/webauthn/register/options
Options of navigator.credentials.create to add a passkey to the account.
Session, or X-MFA-Token (enrollment). The Origin of the request must be a known domain: the passkey works on that site (the mobile app sends X-Client-App: ios or android with X-Frontend-Host instead; else 400 origin_not_allowed). 409 too_many_passkeys beyond 20. An account that already has a second factor adds another one only from a session that proved one (else 403 second_factor_required).
Access: public (no authentication)
API keys: refused, 403 forbidden (API key not allowed on this route)
Response: challenge_id: To send back with the credential (single use, 5 minutes). options: The PublicKeyCredentialCreationOptions (JSON, binary fields in base64url).
Account (preferences, deletion, sign-up)
Notification preferences, free preferences, deleting one's own account and free sign-up.
DELETE /auth/me
Delete one's own account.
What happens, organization by organization: when the account is the only member, the organization closes with it (refused with 409 balance_negative while its balance is below zero); its API keys, integrations, widgets, invitations, SIP endpoints and call routing are removed and its phone numbers go back to the pool of the domain. When the account shares an organization, it leaves it (refused with 403 last_admin when it is the last member holding members.admin, such as the Admin profile, in an organization that still has other members: give members.admin to someone else first). Every session of the account ends. A confirmation is emailed.
The account stays recoverable for a grace period (settings.account_deletion.grace_days of the domain, 10 days by default, 0 for none): signing in again with the password during it cancels the deletion (the numbers still free in the pool come back); afterwards the account is deleted for good.
Refused in the administration context (X-Admin-Organization, 403 forbidden: it is a personal action), and for super admins and domain admins (403 forbidden).
Access: access JWT
Rate limit: 5 per hour
Request body
| Name | Description |
|---|---|
password |
The password of the account (not needed for an account that signs in with Google or Microsoft only). 401 invalid_password when wrong. |
confirm |
Must be true (400 validation_error, field confirm). |
Response: success: true. deletion: {state: scheduled (recoverable until purge_at) or deleted, purge_at: UTC date or null, numbers: the phone numbers released}.
GET /auth/me/dnd
The do not disturb of the account (the mobile app's switch).
While it is on: no push for new text messages nor for missed calls, the voicemail push arrives silent, and every endpoint of the account (in all its organizations) is in do not disturb (its calls go to its busy handling). The emails are not affected. It ends by itself at until.
Access: access JWT
Response: dnd: {active (boolean), until (ISO 8601 in UTC with Z, or null: no end), set_at (ISO 8601 in UTC with Z: when it was turned on, null when off)}. An expired one is {active: false, until: null, set_at: null}.
PUT /auth/me/dnd
Turn the do not disturb of the account on or off.
Every endpoint of the account, in all its organizations, follows: in do not disturb until until (or without end), or out of it when turned off. The other sessions of the account get the Socket.IO event dnd_update {dnd}.
Access: access JWT
Request body
| Name | Description |
|---|---|
active |
true to turn it on, false to turn it off (required). Anything else: 400 validation_error with field active. |
until |
With active true: the end, an ISO 8601 date and time with its time zone (Z or +hh:mm), in the future and at most 7 days from now (otherwise 400 validation_error with field until); null or absent: no end. Ignored with active false. |
Response: dnd: The state after the change, as GET /auth/me/dnd.
GET /auth/me/notifications
The notification preferences of the account: which emails and pushes it receives.
The platform defaults apply to what the person never changed (a domain can set its own defaults, settings.notifications.defaults). Messages that carry a security notice, a requested code, an invitation or a service notice (password reset, verification codes, the negative balance notices, the end of a trial...) are always sent and have no switch.
Access: access JWT
Response: notifications: email ({updates, survey, purchase, login, low_balance}: booleans; low_balance_threshold: the balance under which the low-balance email is sent, null to use the one of the organization) and push ({sms, missed_call, voicemail}: booleans).
PATCH /auth/me/notifications
Change the notification preferences (partial: only the keys sent change).
Access: access JWT
Request body
| Name | Description |
|---|---|
email |
Optional object with any of updates, survey, purchase, login, low_balance (booleans) and low_balance_threshold (a number from 0 to 100000, or null to use the organization's threshold). |
push |
Optional object with any of sms, missed_call, voicemail (booleans). An unknown channel or key, a value of the wrong type, or a body that is not an object gets 400 validation_error with field (for example email.login). |
Response: notifications: All the preferences after the change, as GET /auth/me/notifications.
GET /auth/me/preferences
The free preferences of the account: a small key/value store for the apps (display choices, last used filters...). Nothing in it changes what the server does.
Access: access JWT
Response: preferences: The object, empty until something is stored.
PATCH /auth/me/preferences
Change the free preferences: every key of the body replaces the stored one, a null value removes it, the other keys are left alone.
Access: access JWT
Request body
| Name | Description |
|---|---|
<key> |
Any JSON value (keys of 1 to 64 letters, digits, _ or -; values nested four levels at most, with keys of the same kind). At most 50 keys and 8 KB in all. A key or a value that is not acceptable, or too much data, gets 400 validation_error with field. |
Response: preferences: The whole object after the change.
POST /auth/signup
Create an account, its organization and its default team (free sign-up).
Closed by default: a domain admin opens it (settings.signup.enabled of the domain, 403 signup_disabled otherwise). Protections: a captcha when the domain set a provider, at most 5 accounts per client address and per day (setting max_per_ip_per_day), disposable email providers refused when the domain lists them, 10 attempts per hour and email address (and 20 per hour and client address). The "client address" is the real one only when the infrastructure passes it on (see "Limits" in the API concepts): behind the TLS demultiplexer of the production host it is unknown, the per-address cap and bucket do not apply, and the sign-ups share a ceiling per domain and day of 100 or 10 times max_per_ip_per_day. The phone, if given, is not verified (confirm it with /auth/verifications); a person with no phone number can sign in.
The email address is not proved at sign-up (the user gets a session at once; user.email_verified is false). The starting credit (setting initial_credit) is therefore NOT granted now: it is granted, once, when the address is verified with POST /auth/verifications (purpose email_verify, no target) then POST /auth/verifications/<id>/confirm, or by a verified change of address. A 409 email_in_use tells that an address has an account: the sign-up form needs it, the captcha and the limits above bound the probing.
Access: public (no authentication)
Rate limit: 10 per hour; 20 per hour
Request body
| Name | Description |
|---|---|
email |
Email address (required, it is the sign-in). |
password |
Password (required; 8 to 128 characters, 2 classes of characters, not a common password nor the email). |
first_name |
First name (required). |
last_name |
Last name (required). |
phone |
Optional object {number, country?}, normalized to E.164 and unverified (invalid: 400 invalid_phone). |
language |
fr or en (default fr). |
accept_terms |
Must be true (400 validation_error, field accept_terms). The acceptance is kept with the version of the terms, the date, the client address and the browser (see POST /auth/me/terms). |
terms_version |
Optional, the terms_version of GET /auth/signup/config the person read: when the domain changed its terms since, 409 terms_changed (with terms_version, the current one) and no account is made. |
captcha_token |
The answer of the captcha widget (required when the domain set a provider; 400 captcha_failed when wrong). |
Response: 201 with user, access_token and refresh_token, like a login. Welcome email (setting notifications.welcome_email) as the domain decided; the starting credit (setting initial_credit of the domain) waits for the verified email address (see above).
Errors 404 domain_not_found (no domain matches X-Frontend-Host), 403 signup_disabled, 403 email_domain_blocked, 400 validation_error / invalid_phone / captcha_failed, 409 email_in_use, 409 terms_changed, 429 rate_limited, 503 captcha_unavailable (the provider could not be asked).
GET /auth/signup/config
What the sign-up page needs to know about the domain: whether sign-up is open and the captcha to show. Public.
Access: public (no authentication)
Rate limit: exempt from the general per-address limit
Query parameters
| Name | Description |
|---|---|
language |
fr or en (default fr): the language of terms_url when the domain gives its terms in both. |
Response: signup: {enabled, captcha: {provider (none, recaptcha or turnstile), site_key}, terms_url, terms_version}. Sign-up is closed (enabled false) unless a domain admin opened it. terms_url is the sign-up link the domain set, else its terms of use in the language asked (null when it has none); terms_version is the version of the terms the sign-up accepts (null: the domain names none).
Errors 404 domain_not_found: no domain matches X-Frontend-Host.
Presence: my state and my status
The one presence of the user (« My state »: what can ring, and why not) and their manual status (away, in a meeting, travelling, free text, with an end). Closed to API keys.
GET /auth/me/presence
My state (« Mon état »): my presence as my colleagues see it, the do not disturb, the manual status, the call queues I serve and my agent status, and everything that can ring for me, with what keeps my calls from ringing.
Access: authenticated (JWT or API key)
API keys: refused, 403 forbidden (API key not allowed on this route)
Query parameters
| Name | Description |
|---|---|
organization_id |
One of my organizations (default: the current one). The pause of the queues and the extensions are those of this organization. |
installation_id |
The installation of the mobile app that asks (the installation_id of POST /voice/devices): this_device then says whether a call rings on this device. |
Response: organization_id: The organization. presence: {state, since, until, label, reason, status}, the one presence (as in GET /voice/colleagues and GET /team-chat/presence). state, by precedence: in_call (since the answer), ringing, in_meeting (a video meeting), dnd (do not disturb, until), absent (manual status: until, reason = its kind, label = its text), paused (a pause of the call queues of this organization, reason = break, lunch, meeting, training or other), unreachable (a phone account, nothing would ring now, connected), free, offline. status: the manual status, in every state, or null. dnd: {active, until, set_at}, as GET /auth/me/dnd. status: {kind (away, meeting, travel, custom), text, until, set_at} or null, as GET /auth/me/status. queues: null without call queues served here; else {queues [{team_id, name, penalty, enabled, strategy}], agent {status (logged_out, available, paused, ringing, in_call, wrapup), pause_reason, since, endpoint_id, dnd, ...}, pause_reasons}. extensions: [{id, extension, label, enabled, registered (a desk phone or an older app registered on its own account now), dnd, forwarded (every call forwarded)}], my extensions here. devices: [{id (null for an app older than the device accounts), installation_id, platform, app_version, registered (its SIP account registered now), push (woken by its call push: PushKit on an iPhone, a live FCM token on Android), can_ring, problems (no_push: notifications off, or no call push; the app rings only while open)}]. web_phones: [{id, open (a tab woken for the calls now), opened_at}]. reach: online (something registered or open now), push (an app woken by its push), offline. can_ring: false when a call to me cannot ring anywhere (see problems). problems: what keeps my calls from ringing: no_extension (no enabled extension here), dnd (do not disturb), forwarded (every extension forwards every call), nothing_rings (no phone registered, no app woken by a push, no web phone open). this_device: with installation_id: {installation_id, registered, push, can_ring, problems (those of the account, but nothing_rings, plus not_provisioned: no SIP account for this installation, disabled: its account was disabled, no_push)}; else null. The app shows « vos appels ne peuvent pas sonner sur cet appareil » when can_ring is false.
Errors 403 forbidden: an API key. 403 not_a_member: not a member of this organization (or in an administration context). 400 validation_error: organization_id is not an id (field: organization_id).
DELETE /auth/me/status
Clear my manual status now.
Access: authenticated (JWT or API key)
API keys: refused, 403 forbidden (API key not allowed on this route)
Response: status: null.
GET /auth/me/status
My manual status (« Absent », « En réunion », « En déplacement » or a short text, with an end). It informs my colleagues (chat, phone panel, transfer) and blocks nothing: my calls still ring and my push notifications still come; the do not disturb (PUT /auth/me/dnd) is what silences them.
Access: authenticated (JWT or API key)
API keys: refused, 403 forbidden (API key not allowed on this route)
Response: status: {kind (away, meeting, travel, custom), text (null, or the text), until (ISO 8601 UTC), set_at} or null (none, or past its end).
PUT /auth/me/status
Set my manual status, with an end; it clears itself at the end. My other sessions get the Socket.IO event status_update {status}; my colleagues get presence_update (chat) and voice_presence (phone panel).
Access: authenticated (JWT or API key)
API keys: refused, 403 forbidden (API key not allowed on this route)
Rate limit: 60 per hour
Request body
| Name | Description |
|---|---|
kind |
away (« Absent »), meeting (« En réunion »), travel (« En déplacement ») or custom (required). |
text |
with custom: the text, 1 to 80 characters (required); with the others: an optional precision. |
minutes |
the end, in 1 to 20160 minutes. Or: |
until |
the end, an ISO 8601 date and time with its time zone, or tomorrow_morning (8:00 tomorrow in my time zone, timezone of my profile, else America/Montreal). In the future, at most 14 days later. One of minutes or until is required. |
Response: status: The status, as GET /auth/me/status.
Errors 400 validation_error: field kind, text, minutes or until. 403 impersonation_forbidden: a session opened as the member.
Organizations
The user's organizations and administration of the domain's organizations.
GET /api/v1/organizations
Search and list the organizations of the current domain (platform_admin or domain_admin).
The current domain is the one serving the frontend host (e.g. other.telma.ca), so each whitelabel site only shows its own organizations. Sorted by name (case and accents ignored). A platform_admin can search every domain with all_domains.
Access: platform permission platform_admin or domain_admin
API keys: refused to restricted keys (limited to a team, or an integration's), 403 forbidden
Query parameters
| Name | Description |
|---|---|
q |
Free text, searched anywhere in the organization name or in the email address of its owner, ignoring case and accents (optional, 100 characters at most, else 400 validation_error with field q). |
skip |
Pagination offset (default 0). Not an integer: 400 validation_error with field skip. |
limit |
Page size (default 50, max 100; a larger value is brought back to 100). Not an integer: 400 validation_error with field limit. |
all_domains |
true to search every domain instead of the current one (platform_admin only, 403 forbidden for a domain_admin; true or false, else 400 validation_error). |
Response: organizations: The organizations of the page, each with member_count, team_count, owner_email (null without owner) and, with all_domains, domain_name (display name of its domain) and domain_host (hostname to use for that domain); domain_id is always there. total: Number of organizations matching the filters, before skip and limit. skip: The offset applied. limit: The page size applied.
POST /api/v1/organizations
Create a new organization in the current domain (platform_admin, or domain_admin of that domain).
Access: platform permission platform_admin or domain_admin
API keys: refused to restricted keys (limited to a team, or an integration's), 403 forbidden
Request body
| Name | Description |
|---|---|
name |
Organization name (required, a string of 1 to 120 characters once trimmed: 400 validation_error otherwise). |
owner_email |
Email of the owner (optional). For a domain admin, only an account that already belongs to this domain (a membership in one of its organizations) is taken; any other address is ignored, without telling whether it exists. |
Response: organization: The created organization. message: Confirmation.
DELETE /api/v1/organizations/<org_id>
Delete organization (platform_admin, or domain_admin of its domain).
Refused (400) while the organization has members. Every other access goes with it: its integrations and their API keys, connected applications (revoked at the provider), website widgets, pending invitations and voice endpoints; its phone numbers go back to the domain. Its teams and conversations stay stored, out of reach.
Access: platform permission platform_admin or domain_admin
API keys: refused to restricted keys (limited to a team, or an integration's), 403 forbidden
Path parameters
| Name | Description |
|---|---|
org_id |
Organization ID. |
Response: Success message.
GET /api/v1/organizations/<org_id>
Get organization details.
platform_admin: any organization; domain_admin: those of their domains; a member holding members.admin or organization.settings: their current organization only.
Not available to restricted API keys (a key limited to a team, or an integration's key): 403 with error forbidden.
Access: authenticated (JWT or API key); platform_admin, domain_admin of the domain of the organization, or members.admin or organization.settings in that organization when it is the current one (checked in the function: 403 forbidden otherwise).
API keys: refused to restricted keys (limited to a team, or an integration's), 403 forbidden
Path parameters
| Name | Description |
|---|---|
org_id |
Organization ID. |
Response: organization: The organization with its teams; capability_states {<capability>: {state (included, base: the phone system of the plan, option: billed as it is used, not_offered, unavailable: not offered by the domain), price, unit (fax, extension, user, application, module, month_used) for a priced option}}; plan {key, name {fr, en}} (the plan it holds); contact_center {offered, on, by_queues, price, agents, agent_price} (the advanced contact centre module, supervision included: PUT /domains/<id>/organizations/<id>/subscription {contact_center}); members (with their email addresses) only for a platform_admin, a domain_admin of its domain or a member holding members.admin there (the same rule as GET /organizations/current/members): without it, the answer has no members.
PUT /api/v1/organizations/<org_id>
Update organization (platform_admin, or domain_admin of its domain).
Access: platform permission platform_admin or domain_admin
API keys: refused to restricted keys (limited to a team, or an integration's), 403 forbidden
Path parameters
| Name | Description |
|---|---|
org_id |
Organization ID. |
Request body
| Name | Description |
|---|---|
name |
New organization name (a string of 1 to 120 characters once trimmed: 400 validation_error otherwise; absent or null leaves it unchanged). |
Response: organization: The updated organization. message: Confirmation.
PUT /api/v1/organizations/<org_id>/billing-anniversary
Set the billing anniversary date of an organization: the day of the month of its statement, and the start of the days during which a number ported in is free.
For a platform_admin, or a domain_admin of the organization's domain. Errors are {error, message}: 400 validation_error (not a date), 403 forbidden (an organization of another domain), 404 not_found.
Access: platform permission platform_admin or domain_admin
API keys: refused to restricted keys (limited to a team, or an integration's), 403 forbidden
Path parameters
| Name | Description |
|---|---|
org_id |
Organization ID. |
Request body
| Name | Description |
|---|---|
billing_anniversary |
ISO date string or null. |
Response: Updated organization.
PUT /api/v1/organizations/<org_id>/capabilities
Update capabilities for an organization.
Only a platform_admin, or a domain_admin of the organization's domain, can update capabilities. Organization capabilities must be a subset of the domain's capabilities.
The known capabilities are textos (messaging; name stored in production), voxos (voice service), sip (SIP endpoints and softphone provisioning, /voice/endpoints* and /voice/provision), call_codes (call codes, legacy without interface: no app uses them any more), voicemail_boxes (voicemail boxes of the endpoints and standalone boxes, /voice/mailboxes), transcription (Telma AI: transcription and summary of the recorded calls, /voice/ai*), mcp (assistants connected to the accounts of the members by the MCP connector, /mcp), zoho and quickbooks (connected applications, /apps: the right to plug the organization's Zoho CRM or QuickBooks Online account; they need nothing else). sip, call_codes, voicemail_boxes and transcription need voxos in the same list. The list replaces the previous one. The plan of the organization decides first (capability_states of GET /organizations/<id>): what it includes is always kept, what it does not offer is refused (400 not_offered with the list in capabilities), the phone system and the options are kept as sent; an option is billed as it is used. Removing sip (or voxos) disables the SIP endpoints of the organization; they are enabled again when sip returns. Removing mcp disconnects every assistant of the organization. Every route that returns an organization shows its list.
Not available to restricted API keys (a key limited to a team, or an integration's key): 403 with error forbidden.
Access: authenticated (JWT or API key)
API keys: refused to restricted keys (limited to a team, or an integration's), 403 forbidden
Path parameters
| Name | Description |
|---|---|
org_id |
Organization ID. |
Request body
| Name | Description |
|---|---|
capabilities |
List of capabilities, each one of textos, voxos, sip, call_codes, voicemail_boxes, transcription, mcp, zoho, quickbooks (e.g., ["textos", "voxos", "sip"]; zoho and quickbooks = the connected applications of /api/v1/apps, which need nothing else). An unknown name, a missing list, or sip, call_codes or voicemail_boxes without voxos is refused with 400 validation_error (field capabilities); a capability the domain does not have, too. |
Response: organization: The updated organization. message: Confirmation.
GET /api/v1/organizations/<org_id>/invitations
Get invitations for an organization.
platform_admin: any organization; domain_admin: those of their domains; a member holding members.admin or organization.settings: their current organization only.
Not available to restricted API keys (a key limited to a team, or an integration's key): 403 with error forbidden.
Access: authenticated (JWT or API key); platform_admin, domain_admin of the domain of the organization, or members.admin or organization.settings in that organization when it is the current one (checked in the function: 403 forbidden otherwise).
API keys: refused to restricted keys (limited to a team, or an integration's), 403 forbidden
Path parameters
| Name | Description |
|---|---|
org_id |
Organization ID. |
Response: invitations: The invitations of the organization. total: Number of invitations.
GET /api/v1/organizations/<org_id>/mcp/connections
The assistants the members connected to this organization (active connections of the MCP connector).
Closed to API keys.
Access: authenticated (JWT or API key); members.admin in that organization when it is the current one, domain_admin of its domain or platform_admin (checked in the function: 403 forbidden otherwise; 404 not_found for an unknown organization).
API keys: refused, 403 forbidden (API key not allowed on this route)
Path parameters
| Name | Description |
|---|---|
org_id |
Organization ID. |
Response: connections: [{id, client_name, redirect_host, organization_id, organization_name, created_at, last_used_at, user: {id, name, email}}], newest first. Never a token. The connections of accounts hidden from the caller (super admins, for whoever is not one) are left out.
DELETE /api/v1/organizations/<org_id>/mcp/connections/<connection_id>
Disconnect an assistant a member connected to this organization: its tokens stop working at once.
Closed to API keys.
Access: authenticated (JWT or API key); As GET /api/v1/organizations/<org_id>/mcp/connections.
API keys: refused, 403 forbidden (API key not allowed on this route)
Path parameters
| Name | Description |
|---|---|
org_id |
Organization ID. |
connection_id |
Id of the connection (GET /api/v1/organizations/<org_id>/mcp/connections). 404 not_found for a connection of another organization or an unknown one. |
Response: message: Confirmation.
DELETE /api/v1/organizations/<org_id>/members/<user_id>
Delete a member from an organization (platform_admin, or domain_admin of its domain).
The user must be a member of that organization (a membership there, whatever their current organization; else 403). The member must be deactivated first: 409 with error user_active otherwise. 403 member_of_other_organizations when the account also belongs to organizations the caller does not administer.
Access: platform permission platform_admin or domain_admin
API keys: refused to restricted keys (limited to a team, or an integration's), 403 forbidden
Path parameters
| Name | Description |
|---|---|
org_id |
Organization ID. |
user_id |
User ID. |
Response: Success message.
PUT /api/v1/organizations/<org_id>/members/<user_id>
Update a member in an organization (platform_admin, or domain_admin of its domain).
The user must be a member of that organization (a membership there, whatever their current organization; else 403): the role changes on the membership of THIS organization (users.role follows only when it is their current one). Never one's own role or status, never a platform account (super admin, domain admin) unless the caller is a super admin (403 forbidden).
Access: platform permission platform_admin or domain_admin
API keys: refused to restricted keys (limited to a team, or an integration's), 403 forbidden; refused when the body gives the role admin, domain_admin, super_admin
Path parameters
| Name | Description |
|---|---|
org_id |
Organization ID. |
user_id |
User ID. |
Request body
| Name | Description |
|---|---|
role |
New role for the user (optional; admin, manager or agent, another value is ignored): the member's profiles are replaced by those of the role (admin: Admin; manager: User and the organization's Gestionnaire profile; agent: User). Never on a platform_admin or domain_admin account (403). An API key never gives the admin role (403). |
is_active |
Whether the user is active (optional). |
Response: user: The updated member. message: Confirmation.
Errors 403 member_of_other_organizations: activating or deactivating the account reaches organizations the caller does not administer.
POST /api/v1/organizations/<org_id>/members/<user_id>/impersonate
Sign in as a member of the organization, without their password ("Se connecter en tant que").
For a member holding members.admin in the organization (the Admin profile, or a profile of its own that gives it), a domain admin of its domain or a super admin, with a session (never an API key, never from a session itself opened as a member). The member must be active, and every organization they belong to must be one the caller administers (a domain admin only by a super admin, a super admin never). The answer has the shape of POST /auth/login: a new session of the member, short (no "remember me"), whose user carries impersonated_by (the caller). It does not count as the member's sign-in, it ends when the caller's account is deactivated, and it may not change the password, email or phone of the account (nor ask for a verification code), delete it, create an API key or sign in as someone else in turn (403 impersonation_forbidden). Journaled in audit_logs (type impersonation_started).
Access: authenticated (JWT or API key)
API keys: refused, 403 forbidden (API key not allowed on this route)
Rate limit: 20 per hour
Path parameters
| Name | Description |
|---|---|
org_id |
Organization ID. |
user_id |
The member's user ID. |
Response: user: The member (as GET /auth/me), with impersonated_by {id, name, email}. access_token: Access token of the new session. refresh_token: Refresh token of the new session (12 hours without a refresh).
Errors 403 forbidden: not an administrator of the organization (members.admin), oneself, an API key or a session opened as a member. 403 member_of_other_organizations: the member also belongs to organizations the caller does not administer. 404 not_found: unknown organization, or not a member. 409 user_inactive: the account is deactivated.
GET /api/v1/organizations/current
Get current user's organization for the current domain.
If user's current organization doesn't belong to the current domain, automatically switch to the user's default organization (if it belongs to this domain), or fall back to any organization in the current domain (if available).
Header X-Organization-Fallback: none turns off the last resort above and, for a super admin or a domain admin, every implicit organization: they are no longer put in the first organization of the domain, nor kept in the one an earlier session left on their account (which is forgotten: the account has no current organization afterwards). The answer is 404 not_found and the client shows its organization picker; the administrator works in an organization by administering it (X-Admin-Organization, below). Other users are not affected.
While the header X-Admin-Organization is honored (super admin or domain admin administering an organization), the organization is the administered one: no domain check and no automatic switch, nothing is written on the account, and the response carries admin_context: true and admin_organization_id.
Not available to restricted API keys (a key limited to a team, or an integration's key): 403 with error forbidden.
Access: authenticated (JWT or API key)
API keys: refused to restricted keys (limited to a team, or an integration's), 403 forbidden
Response: organization: Organization data with member_count, team_count, fax_number_count (its numbers dedicated to fax; 0 without the capability fax) and plan_features {video, team_chat, supervision, assistant} (what its plan unlocks; a closed one answers 403 plan_feature). admin_context: true, only while the header X-Admin-Organization is honored. admin_organization_id: The administered organization, with admin_context.
PUT /api/v1/organizations/current
Rename the current organization (permission organization.settings).
Not available to restricted API keys (a key limited to a team, or an integration's key): 403 with error forbidden.
Access: authenticated (JWT or API key); Permission organization.settings in the current organization (profiles; checked in the function: 403 forbidden otherwise).
API keys: refused to restricted keys (limited to a team, or an integration's), 403 forbidden
Request body
| Name | Description |
|---|---|
name |
New organization name (required, a string of 1 to 120 characters once trimmed: 400 validation_error otherwise). |
Response: organization: The updated organization. message: Confirmation.
GET /api/v1/organizations/current/credit-status
Get credit status for current organization.
Not available to restricted API keys (a key limited to a team, or an integration's key): 403 with error forbidden.
Access: authenticated (JWT or API key)
API keys: refused to restricted keys (limited to a team, or an integration's), 403 forbidden
Response: credit_balance: Credit balance of the organization. has_credits: Whether credits are available. credit_hold_count: Number of messages on credit hold.
GET /api/v1/organizations/current/members
Get members of current user's organization.
Not available to restricted API keys (a key limited to a team, or an integration's key): 403 with error forbidden.
Access: authenticated (JWT or API key); Permission members.admin in the current organization (profiles; checked in the function: 403 forbidden otherwise).
API keys: refused to restricted keys (limited to a team, or an integration's), 403 forbidden
Response: members: The members of the organization. total: Number of members.
GET /api/v1/organizations/my
List all organizations the current user belongs to in the current domain.
Not available to restricted API keys (a key limited to a team, or an integration's key): 403 with error forbidden.
An account with the platform permission platform_admin or domain_admin also gets, without being a member, every organization it administers (platform_admin: those of the current domain, or of every domain with all_domains; domain_admin: those of their domains), with its platform role (super_admin, domain_admin) as role. Not with member_only. Use GET /organizations (q, skip, limit) to search among them without the 1000-organization cap of this list. While the header X-Admin-Organization is honored, is_current marks the administered organization and the response carries admin_context and admin_organization_id.
Access: authenticated (JWT or API key)
API keys: refused to restricted keys (limited to a team, or an integration's), 403 forbidden
Query parameters
| Name | Description |
|---|---|
all_domains |
If "true", return organizations across all domains (not just current). |
member_only |
If "true", only the organizations where the user sees at least one team in the member view of the mobile app (the team they are placed in there, admins included, nothing without one; neither teams.all nor a platform permission adds anything); the mobile app lists those. |
Response: organizations: List of organizations with user's role in each (organization role, or the platform role for an organization that is only administered), permissions (the permissions of the user there, given by their profiles; every one for an organization they administer from the platform or its domain), their domain (domain_id, domain_name, domain_host: hostname to use for that domain), created_at and is_current. total: Number of organizations listed.
POST /api/v1/organizations/switch
Switch to a different organization.
Not available to restricted API keys (a key limited to a team, or an integration's key): 403 with error forbidden.
Access: authenticated (JWT or API key)
API keys: refused to restricted keys (limited to a team, or an integration's), 403 forbidden
Request body
| Name | Description |
|---|---|
organization_id |
ID of the organization to switch to. |
Response: user: The user, now working in the organization. organization: The organization. message: Confirmation.
Errors 400 validation_error: organization_id missing. 404 not_found: unknown organization. 403 forbidden: not a member (and not an administrator of it). 500 server_error: unexpected failure.
GET /api/v1/organizations/unread-counts
Get unread message counts per organization in the current domain.
Only the conversations of the team the user is a member of in each organization, and of their personal inbox there, count (the same rule as the push notifications): being able to read the other teams (teams.all, platform permissions) does not make their messages a notification.
Not available to restricted API keys (a key limited to a team, or an integration's key): 403 with error forbidden.
Access: authenticated (JWT or API key)
API keys: refused to restricted keys (limited to a team, or an integration's), 403 forbidden
Response: unread_counts: Number of unread messages per organization id: the messages the user has not read (each member has their own unread state since 2026-10-30).
Teams
Teams, members, business hours and team webhook.
GET /api/v1/teams
List teams accessible to current user in the current domain.
A member holding teams.all in the organization (profiles Admin and Gestionnaire) gets its teams; otherwise only the team they are placed in (the mobile app needs its name and organization). A restricted API key (limited to a team, or an integration's key) gets the teams it can reach only, whatever the profiles of its owner and whatever organization its owner currently works in.
Access: authenticated (JWT or API key)
Query parameters
| Name | Description |
|---|---|
organization_id |
Organization whose teams to list (optional; default: the caller's current organization). Except for a platform_admin, it must be an organization the caller belongs to or, for a domain admin, an organization of their domains: any other one gets 403, whatever X-Frontend-Host. With a restricted API key, it only filters the teams of the key (never 403). |
skip |
Number of teams to skip (optional, default 0; a negative value counts as 0, a value over 2147483647 is refused: 400 validation_error). |
limit |
Number of teams (optional, default: every team; max 100, a larger value is brought back to 100, 0 or less to 1). A skip or limit that is not an integer is refused (400 validation_error with field). |
include_personal |
If "true", the personal inboxes the caller may read come too (kind "personal", owner_user_id: the inbox of the user of an endpoint, which receives the SMS of the numbers routed to that endpoint); without it they are never listed: they are not teams to manage. |
Response: teams: The teams of the page, each with business_hours, closures, outside_hours_behavior (queue or reject) and open_state {open, always_open, next_change_at (ISO UTC, null when it never changes within about a year), timezone, outside_hours_behavior}: open or closed now and when it changes, computed by the server (several ranges a day, past midnight, holidays and closures; no range = always open). total: Number of teams before skip and limit. skip, limit: The values applied (limit null when absent).
POST /api/v1/teams
Create a new team in the caller's current organization.
400 validation_error for a caller without organization. A team beyond those the plan of the organization includes is billed at the price of an additional team, at its next statement.
Access: permission manage_teams (now teams.manage)
Request body
| Name | Description |
|---|---|
name |
Team name (required, a string of 1 to 120 characters once trimmed: 400 validation_error otherwise). |
phone_number |
Team phone number. |
Response: team: The created team. message: Confirmation.
DELETE /api/v1/teams/<team_id>
Delete a team.
Access: team access (team_id); permission manage_teams (now teams.manage)
Path parameters
| Name | Description |
|---|---|
team_id |
Team ID. |
Response: Success message.
GET /api/v1/teams/<team_id>
Get team details.
Access: permission members.manage or teams.manage or teams.hours or teams.provider in the organization (profiles); team access (team_id)
Path parameters
| Name | Description |
|---|---|
team_id |
Team ID. |
Response: team: The team (with closures and open_state, as in GET /teams); its provider configuration only for a caller holding teams.provider in the team's organization (or administering it from the platform or its domain).
PUT /api/v1/teams/<team_id>
Update team settings.
Access: team access (team_id); permission teams.hours or teams.manage in the organization (profiles)
Path parameters
| Name | Description |
|---|---|
team_id |
Team ID. |
Request body
| Name | Description |
|---|---|
name |
Team name (optional; a string of 1 to 120 characters once trimmed: 400 validation_error otherwise). |
phone_number |
Team phone number (optional). |
business_hours |
Business hours, as in PUT /teams/<id>/hours (optional). |
closures |
Holidays and closures, as in PUT /teams/<id>/hours (optional). |
outside_hours_behavior |
queue or reject, as in PUT /teams/<id>/hours (optional). |
auto_reply_message |
Text sent back outside business hours (optional). |
welcome_message |
Message sent when a conversation starts (optional). |
timezone |
IANA time zone of the business hours and of the archives (optional, e.g. America/Montreal: 400 validation_error when unknown). |
message_templates |
Canned messages agents can insert, list of {title, body} (optional, replaces the list). |
auto_assign_on_reply |
true = a message sent in a conversation without person in charge makes its author the person in charge (optional, off by default). |
hours_source |
Follow the hours of a voice flow of the organization, {flow_id} (optional; null = the team's own hours), as in PUT /teams/<id>/hours. |
color |
The color of the team's tag in the conversations and of its dot in the lists of teams (web and mobile app): null (none, grey) or one of blue, green, amber, red, purple, teal, pink, slate (optional; 400 validation_error otherwise). |
Response: Updated team data.
GET /api/v1/teams/<team_id>/assignable
The members a conversation of the team may be handed to (« Confier à… », PUT /conversations/<id>/assignee): the members who read the team (placed in it, or holding teams.all in its organization; active accounts, never an integration), the caller included. Exactly the ones the assignment accepts. Readable by whoever reads the conversations of the team (messages.read in its organization and access to the team; no permission to manage it).
Access: authenticated (JWT or API key)
Path parameters
| Name | Description |
|---|---|
team_id |
Team ID (a personal inbox: its owner only). |
Response: team_id: The team. members: By name: id, name, teams [{id, name}], presence {state, since} (as GET /team-chat/members). Never the email address.
Errors 403 forbidden: you do not read this team. 404 not_found: no such team in your organizations.
PUT /api/v1/teams/<team_id>/hours
Update team business hours.
Access: team access (team_id); permission configure_hours (now teams.hours)
Path parameters
| Name | Description |
|---|---|
team_id |
Team ID. |
Request body
| Name | Description |
|---|---|
business_hours |
List of ranges {day (0 = Monday), start "HH:MM", end "HH:MM" or "24:00", enabled?}, several per day (28 at most); an end before the start runs past midnight into the next day (Friday 22:00 to 02:00). An empty list means always open. |
closures |
Holidays and closures (optional; absent keeps them): list of {start, end (YYYY-MM-DD), repeat none|yearly|weekly, until, ranges [["HH:MM","HH:MM"]], label}, the closures of the voice flows. On a date of a closure the team is closed all day, or open only in its ranges. |
outside_hours_behavior |
queue (notify the team: a message received outside business hours is kept, marked "received outside business hours", with the usual notifications) or reject (kept and marked the same way, without push notification); auto_reply, an older value, is stored as queue. |
auto_reply_message |
Text sent back automatically to a message received outside business hours, whatever the behavior (once a day per conversation; optional). |
timezone |
IANA time zone for business hours (e.g., America/Montreal; 400 validation_error when unknown). |
hours_source |
Follow the hours of a voice flow of the organization instead of typing them twice: {flow_id} (or {kind: "flow", id}); null = the team's own hours again (optional; absent keeps the link). While it follows, the team is open when the flow is (its schedule, exceptions and closures), its own business_hours and closures are kept but unused, and open_state reads the flow; the behavior outside the hours and the automatic reply stay the team's. No chain: 400 hours_source_chained when the flow follows a team itself, or when flows follow this team's hours; 400 validation_error (field hours_source) for a flow of another organization. |
Response: Updated team data, with hours_source {kind, id, name, missing} (null without link), effective_hours {business_hours, closures, timezone} (the hours it runs on while it follows a flow, else null) and hours_followers [{kind, id, name}] (the flows that follow its hours).
GET /api/v1/teams/<team_id>/members
List members of a team: the accounts holding a membership placed in it (a super admin with a membership included).
Access: permission members.manage or teams.manage or teams.hours or teams.provider in the organization (profiles); team access (team_id)
Path parameters
| Name | Description |
|---|---|
team_id |
Team ID. |
Response: members: The members of the team. total: Number of members.
POST /api/v1/teams/<team_id>/members
Add a member to a team. A member may be in several teams of the organization (2026-10-28): their other teams stay; this one becomes their principal team when they had none.
Access: team access (team_id); permission manage_teams (now teams.manage)
Path parameters
| Name | Description |
|---|---|
team_id |
Team ID. |
Request body
| Name | Description |
|---|---|
user_id |
User ID to add to the team. |
principal |
true makes this team their principal team (the number offered for a new message, « my team » statistics); default false. |
Response: members: The members of the team after the change. message: Confirmation.
DELETE /api/v1/teams/<team_id>/members/<user_id>
Remove a member from a team: their other teams stay (the next one becomes their principal team when it was this one); without any team left, they stay a member of the organization.
Access: team access (team_id); permission manage_teams (now teams.manage)
Path parameters
| Name | Description |
|---|---|
team_id |
Team ID. |
user_id |
User ID to remove from the team. |
Response: members: The members of the team after the change. message: Confirmation.
GET /api/v1/teams/<team_id>/message-templates
List the canned messages of a team (any member of the team, agents included).
Access: team access (team_id)
Path parameters
| Name | Description |
|---|---|
team_id |
Team ID. |
Response: message_templates: List of {id, title, body}.
GET /api/v1/teams/all-organizations
List all teams from all organizations the user belongs to.
This is used for WebSocket room joining to receive real-time updates from all organizations. While the header X-Admin-Organization is honored, only the teams of the administered organization are listed.
Access: authenticated (JWT or API key)
Query parameters
| Name | Description |
|---|---|
member_only |
If "true", only the teams of the member view of the mobile app (in each organization only the team they are placed in, admins included, nothing without one; neither teams.all nor a platform permission adds anything); the mobile app asks for those. |
Response: team_ids: Ids of all the teams of the organization. total: Number of teams.
SMS & conversations
Sending SMS/MMS, conversations, archives.
GET /api/v1/conversations
List conversations for user's teams.
Conversations come from the most recent message to the oldest (last_message_at), open and closed ones (since 2026-10-14 archiving a conversation is closing it: archived is a former value, there is no separate archived state, and the former archived conversations became closed ones). The closed conversations of a team by day of closing are also GET /api/v1/teams/<team_id>/archives, which requires the archives permission messages.archive (Admin and Gestionnaire profiles; refused to a restricted API key).
Access: permission view_team_conversations (now messages.read)
Query parameters
| Name | Description |
|---|---|
team_id |
Team ID (optional, if not provided loads all user's teams). 403 forbidden for a team the user (or the API key) cannot access. |
status |
open or closed (optional, default: both). Any other value, archived included, is refused (400 validation_error, field status). |
replied |
1 = only conversations the contact wrote to at least once, 0 = only those without any inbound message yet (optional). |
q |
Free-text search (optional, 100 characters at most). Digits and phone punctuation (514 555, (514) 555-0123) are looked for in the contact's number and in the team number of the conversation; any other text, without regard to case and accents, in the contact's name and in the messages of the conversation. |
number |
Only the conversations that use this team number (optional): an E.164 number in any usual notation, or the ID of a phone number. 400 validation_error (field number) for anything else. |
unread |
1 = only the conversations with messages the user has not read (optional, 1/0 or true/false). Since 2026-10-30 each member has their own unread state: a colleague who reads a conversation does not mark it read for the others (an integration's account reads the counter of the team: messages nobody read yet). |
assignee |
Person in charge (optional): me (the user), none (nobody), all (default, any), or the ID of a member. 400 validation_error (field assignee) for anything else. |
member_only |
1 = only the teams the user works in: in each organization the team they are placed in, admins included, nothing without one; neither teams.all nor a platform permission adds anything (the web app administers). The mobile app asks for it (optional, 1/0 or true/false). With team_id, a team outside this view is refused (403 forbidden). |
skip |
Pagination offset (default 0; a negative value counts as 0, a value over 2147483647 is refused: 400 validation_error). |
limit |
Page size (default 50, max 100; a larger value is brought back to 100, 0 or less to 1). A skip or limit that is not an integer is refused (400 validation_error). |
Response: conversations: The page of conversations, each with its team_name, last_message ({id, body, direction, status, created_at, has_media}, null for a conversation without message), unread_count (the unread messages of the user) and the person in charge: assignee_id, assignee_name, assigned_at (null when nobody). total: Number of conversations matching ALL the filters, whatever the page. skip, limit: The values applied.
DELETE /api/v1/conversations/<conversation_id>
Delete a conversation for good, with its messages, notes and timeline.
Open to the admins of the organization (permission delete_conversations: admin, domain admin, super admin); managers and agents get 403 forbidden. The role is the one held in the organization that owns the conversation, not the role in the organization the caller is currently working in. The unread counters of the team's users are announced (unread_update).
Access: permission delete_conversations (now messages.delete)
Path parameters
| Name | Description |
|---|---|
conversation_id |
Conversation ID. |
Response: Success message.
GET /api/v1/conversations/<conversation_id>
Get conversation details with messages.
Reading it marks it as read (conversation.updated with change "read" when it had unread messages). A closed conversation is returned like any other to whoever reaches its team: the archives permission only guards the list of GET /api/v1/teams/<team_id>/archives.
Access: permission view_team_conversations (now messages.read)
Path parameters
| Name | Description |
|---|---|
conversation_id |
Conversation ID. |
Query parameters
| Name | Description |
|---|---|
skip |
Message pagination offset (default 0; a negative value counts as 0, a value over 2147483647 is refused: 400 validation_error). |
limit |
Number of messages (default 50, max 100; a larger value is brought back to 100, 0 or less to 1). A skip or limit that is not an integer is refused (400 validation_error). |
mark_read |
0 reads the conversation without marking it read (support, administration; default 1). The conversation then keeps its unread count and nothing is announced. Another value than 1/0/true/false is refused (400 validation_error). |
before |
Only the messages created before this ISO 8601 datetime (optional; no time zone means UTC; skip then counts from there): the older pages of a timeline. 400 validation_error (field before) when it is not a datetime. |
Response: conversation: The conversation. messages: The messages of the page, newest first (skip/limit). Each carries queued (received outside business hours, the team notified) or rejected (received outside business hours, not notified), and automatic: what automatic text an outbound message is (welcome, outside_hours, opt_out, widget; other for an older one sent by nobody; null when someone wrote it). total: Number of messages in the conversation. capabilities: What the number of the conversation can carry, a list such as ["SMS", "MMS"]. events: Every status change of the conversation in timeline order (type closed / reopened, cause inbound / agent / outbound, actor_name, via, message_id of the inbound message that reopened it, anchor_at). opt_out: Whether the contact unsubscribed from the number of the conversation, {opted_out, keyword, at} (keyword: the last STOP or START word they answered, at: when), null when they never answered one. While opted_out is true, POST /sms/send to them from this number answers 403 recipient_opted_out. ai: Telma AI on the messages (capability message_ai), {pending, summaries, nothing_to_summarize, failed}: pending is true while an analysis waits for the conversation to be quiet (10 minutes without a message) or for the worker; summaries are the last analyses that found something, newest first, each {id, state, status, summary, reason, actions (sentences), actions_done (null, or {at, by, by_name} once marked done), actions_due (beside actions: the deadline the messages stated, YYYY-MM-DD or an ISO instant in UTC, else null), actions_overdue (beside actions: the deadline passed), caller_name (the name the contact gave for themselves, to suggest when the conversation has none; never applied), criteria, criteria_labels, summary_language, since, until (the stretch of the conversation it read), done_at, trigger (quiet or closed)}; nothing_to_summarize: analyzed, nothing to summarize; failed: {id, at} when the last analysis failed after its attempts and nothing waits (POST /conversations/<id>/ai/<id>/retry), else null. Null when the conversation was never analyzed. The team room gets conversation_ai_update {conversation_id, ai (one analysis)} when an analysis ends or an action is marked.
PATCH /api/v1/conversations/<conversation_id>
Name the contact of a conversation, or clear the name.
Whoever may write in the conversation may rename it: the same rule as sending a message to it with POST /api/v1/sms/send (permission send_sms and access to the team, the member view of the mobile app included); an integration key whose exposed teams include the team of the conversation too. The name belongs to this conversation only (there is no shared address book: another conversation with the same number, through another team number or another team, keeps its own name). It is the name shown in the lists and searched by the q filter of GET /api/v1/conversations. An open or a closed conversation can be renamed; nothing reopens.
A real change is announced to the team (socket conversation_update with change and type "renamed" and contact_name) and delivered to the integrations as conversation.updated with change "renamed" and contact_name. The same name again changes and announces nothing.
Access: permission send_sms (now messages.send)
Path parameters
| Name | Description |
|---|---|
conversation_id |
Conversation ID. |
Request body
| Name | Description |
|---|---|
contact_name |
The contact's name (required, may be null): trimmed, then 1 to 120 characters on one line, without control characters; null or an empty string (also once trimmed) clears the name. |
Response: conversation: The conversation, in the form of GET /api/v1/conversations/<id> (contact_name updated).
Errors 400 validation_error (field contact_name): body not a JSON object, contact_name missing, not a string nor null, longer than 120 characters, or carrying a line break or a control character. 403 forbidden: the team of the conversation is not accessible. 404 not_found: unknown conversation.
PUT /api/v1/conversations/<conversation_id>/ai/<analysis_id>/actions/<index>
Mark an action Telma AI noted in a text conversation done (or open again): « send the quote » once sent. Whoever reads the conversation may mark its actions. The mark follows the text of the action, as for a call. The team room gets conversation_ai_update.
Access: permission view_team_conversations (now messages.read)
Path parameters
| Name | Description |
|---|---|
conversation_id |
Conversation ID. |
analysis_id |
ID of the analysis (ai.summaries[].id of GET /conversations/<id>). |
index |
Position of the action in its actions (from 0); 404 not_found when there is no such action. |
Request body
| Name | Description |
|---|---|
done |
true marks the action done (who and when are kept), false opens it again (required). |
Response: ai: The analysis, with actions_done updated.
Errors 400 validation_error (field done): done missing or not a boolean. 404 not_found: unknown conversation, analysis or action, or a conversation the user does not read.
POST /api/v1/conversations/<conversation_id>/ai/<analysis_id>/retry
Try again a Telma AI analysis of a text conversation that failed after its attempts (« Analyse impossible » then « Réessayer »): the same messages are read again as soon as the worker is free. Whoever reads the conversation may ask for it. The team room gets conversation_ai_update.
Access: permission view_team_conversations (now messages.read)
Path parameters
| Name | Description |
|---|---|
conversation_id |
Conversation ID. |
analysis_id |
ID of the failed analysis (ai.failed.id of GET /conversations/<id>). |
Response: ai: The analysis (state retry).
Errors 404 not_found: unknown conversation or analysis, or a conversation the user does not read. 409 conflict: the analysis did not fail (or is already tried again). 403 capability_required (capability message_ai): Telma AI on the messages is off for the organization.
POST /api/v1/conversations/<conversation_id>/ai/draft
Propose a reply to a text conversation, written by Telma AI from its last messages and its last summary: « Proposer une réponse ». Nothing is sent nor stored: the text fills the reply box and the agent reads, changes and sends it. Whoever may write in the conversation may ask (the rule of POST /sms/send); the organization needs Telma AI on the messages. 30 drafts an hour per user, 300 per organization.
Access: permission send_sms (now messages.send)
Path parameters
| Name | Description |
|---|---|
conversation_id |
Conversation ID. |
Response: draft: {text}: the proposed reply (under 320 characters asked, 480 at most).
Errors 404 not_found: unknown conversation or one the user does not write in. 403 capability_required (capability message_ai). 409 nothing_to_answer: the contact wrote nothing yet. 429 rate_limited. 502 provider_error, 503 unavailable: the service did not answer, try again.
POST /api/v1/conversations/<conversation_id>/archive
Close a conversation (former route « archive »): since 2026-10-14 the same as POST .../close, kept for the clients that still call it. The conversation is closed: it leaves the list of the open ones, shows in the team's closed conversations (GET /teams/<team_id>/archives) and reopens when the contact writes. Delivers conversation.updated with change "closed" and cause "agent".
Access: permission archives (now messages.archive)
Path parameters
| Name | Description |
|---|---|
conversation_id |
Conversation ID. |
Response: conversation: The closed conversation. message: Confirmation.
PUT /api/v1/conversations/<conversation_id>/assignee
Give a conversation a person in charge (« je m'en occupe »), hand it to a colleague, or release it.
Anyone who may write in the conversation may take it, hand it over or release it, even when somebody else has it: the person in charge tells the colleagues who handles it, it never blocks an answer (the change is in the timeline). Closing a conversation keeps its person in charge (the history says who handled it); a new message that reopens it leaves it assigned.
Access: permission send_sms (now messages.send)
Path parameters
| Name | Description |
|---|---|
conversation_id |
Conversation ID. |
Request body
| Name | Description |
|---|---|
assignee_id |
"me" (the user), the ID of a member who reads the team of the conversation, or null (nobody). |
Response: conversation: The conversation, with assignee_id, assignee_name and assigned_at (null when nobody). changed: false when it already had that person in charge (nothing announced). Socket and webhook: conversation_update / conversation.updated with change "assigned", assignee {id, name} (null when released), and an event of type assigned in the timeline of GET /conversations/<id> (assignee_id, assignee_name, previous_assignee_id, previous_assignee_name, actor_name).
Errors 400 validation_error (field assignee_id): absent, not me/null/an ID, or not a member who reads the team (an integration's account cannot take it for itself: me is refused). 403 forbidden: the team is not accessible. 404 not_found: unknown conversation.
POST /api/v1/conversations/<conversation_id>/close
Close a conversation.
Delivers conversation.updated with change "closed" and cause "agent".
Access: permission view_team_conversations (now messages.read)
Path parameters
| Name | Description |
|---|---|
conversation_id |
Conversation ID. |
Request body
| Name | Description |
|---|---|
actor_name |
Integration keys only: name of the person acting through the integration (shown in the timeline), 120 characters max. |
Response: conversation: The updated conversation. message: Confirmation text.
POST /api/v1/conversations/<conversation_id>/read
Mark a conversation as read, explicitly (the other devices of the user follow).
Reading it with GET /api/v1/conversations/<id> marks it too (unless mark_read=0). When the conversation had unread messages, conversation.updated with change "read" and the unread_update counters are announced; marking an already read conversation changes and announces nothing.
Access: permission view_team_conversations (now messages.read)
Path parameters
| Name | Description |
|---|---|
conversation_id |
Conversation ID. |
Response: conversation: The conversation (unread_count 0).
Errors 403 forbidden: the team is not accessible. 404 not_found: unknown conversation.
POST /api/v1/conversations/<conversation_id>/reopen
Reopen a closed conversation.
Delivers conversation.updated with change "reopened" and cause "agent". A conversation also reopens by itself, with the same event: cause "inbound" when the contact writes to a closed conversation (message_id then gives that message). Sending a message in a closed conversation leaves it closed (before 2026-10-14, a message sent in an archived one reopened it, cause "outbound").
Access: permission view_team_conversations (now messages.read)
Path parameters
| Name | Description |
|---|---|
conversation_id |
Conversation ID. |
Request body
| Name | Description |
|---|---|
actor_name |
Integration keys only: name of the person acting through the integration (shown in the timeline), 120 characters max. |
Response: conversation: The updated conversation.
GET /api/v1/conversations/unread-count
Unread counters of the menu: the same numbers as the unread_update event.
Counts the conversations with messages the user has not read and those messages, in every team the user can read in the organization they work in (the administered organization in the administration context), closed conversations included. Each member has their own unread state since 2026-10-30 (an integration's account: the counter of the team).
Access: permission view_team_conversations (now messages.read)
Query parameters
| Name | Description |
|---|---|
number |
Only the conversations that use this team number (optional): an E.164 number in any usual notation, or the ID of a phone number. 400 validation_error (field number) for anything else. |
member_only |
1 = only the teams of the member view of the mobile app (optional, same rule as GET /conversations). |
Response: unread: {conversations: number of conversations with unread messages, messages: number of unread messages}.
GET /api/v1/messages
List messages with filters.
Messages of one team, the most recent first, those of closed conversations included.
Access: permission view_team_conversations (now messages.read)
Query parameters
| Name | Description |
|---|---|
team_id |
Team ID (optional when the user has a team; an integration key must give it). 403 forbidden otherwise, or for a team that is not accessible. |
direction |
Filter by direction (inbound, outbound). |
status |
Filter by status. |
skip |
Pagination offset (default 0; a negative value counts as 0, a value over 2147483647 is refused: 400 validation_error). |
limit |
Page size (default 50, max 100; a larger value is brought back to 100, 0 or less to 1). A skip or limit that is not an integer is refused (400 validation_error). |
Response: messages: The page of messages. skip, limit: The values applied.
DELETE /api/v1/messages/<message_id>
Delete one message for good (admins of the organization that owns the message, like deleting a conversation).
The conversation stays, even when it is left without message; its unread count is brought down to the number of inbound messages left, and the unread counters of the team's users are announced (unread_update). Files attached to the message are not removed.
Access: permission delete_conversations (now messages.delete)
Path parameters
| Name | Description |
|---|---|
message_id |
Message ID. |
Response: Success message.
Errors 403 forbidden: the team of the message is not accessible, or the role is not admin. 404 not_found: unknown message.
POST /api/v1/sms/send
Send an SMS or MMS message.
The message is recorded in the conversation of the team number and the contact (created if needed; a closed one stays closed: since 2026-10-14 only a message from the contact reopens it), then handed to the provider. Subscribed integrations receive it as message.sent.
Access: permission send_sms (now messages.send)
Rate limit: 100 per hour (600 per hour for an integration key)
Request body
| Name | Description |
|---|---|
to |
Recipient phone number (required). |
body |
Message text (required unless media_urls is given). |
team_id |
Team ID (optional when the user has a team, or when from_number identifies the team). An integration key has no team of its own: pass team_id or from_number (403 forbidden otherwise). |
from_number |
Sender phone number (optional, uses the number of the contact's conversation or the first team number). Without team_id, the team the number is assigned to is used. 400 number_not_in_team when it is not a number of the team. |
media_urls |
MMS attachments (optional): a list of files uploaded with POST /api/v1/upload, each given as the returned url (a string) or as an object {url, content_type}. Any other URL, or a file that no longer exists, is refused (400 validation_error). The content type recorded with the message is the uploaded file's. |
sender_name |
Integration keys only: name of the person sending through the integration, shown as the sender (default: the integration name), 120 characters max. |
external_sender |
Integration keys only: the integration's own identifier of that person, 120 characters max. |
Response: message: The created message. conversation: Its conversation (201).
Errors 403 recipient_opted_out: the recipient answered an opt-out keyword (STOP, ARRÊT, FIN, UNSUBSCRIBE...) to the number that would send, and has not answered START (DÉBUT) since; number and opt_out {opted_out, keyword, at} in the answer, nothing is recorded nor debited. 403 number_disabled: the number that would send is switched off (reason: paused, with paused_reason balance for a pause of the platform; inactive; sms_disabled), whether it was asked for with from_number or it is the only one of the team; a switched-off number is skipped when the sender is chosen by the platform. 400 validation_error: body not a JSON object, to missing or not a phone number (field to: a number in E.164 or a valid North American number, or a short code of 3 to 9 digits), neither body nor media_urls, body not a string, body longer than the limit of the domain (field body: 800 characters by default, setting settings.sms.max_body_length of the domain, 0 for no limit), media_urls not a list of uploads. 400 number_not_in_team: from_number is not (or no longer) a number of the team. 400 configuration_error: no number assigned to the team, provider not configured or not enabled, domain not found. 402 insufficient_balance: the organization's credit does not cover the message (estimated_cost and current_balance in the answer); the message is debited BEFORE the provider is asked, so requests sent at the same time cannot share one message's worth of credit (the loser gets this answer and its message is recorded as failed, error_code insufficient_balance), and a message the provider does not send is credited back. 402 account_suspended: the balance stayed negative past the grace period (E46); balance_state, release_at and balance in the answer; sending resumes when the balance is back to zero or more. 403 forbidden: team not accessible, or no team given or found. 404 not_found: team. 429: rate limit. 429 sms_limit_reached: an anti-A2P limit of the sending number is reached (limit {kind recipients_per_hour, recipients_per_day or identical_text_per_day, max, window hour or day, number, resets_at, new_account} and retry_after in the answer, Retry-After header): more distinct recipients in the hour (100 by default) or in the day (300), or the same text (case, accents, punctuation and spacing ignored, digits kept) to more distinct recipients in the day (50), half of that for an account created in the last 14 days; a recipient already texted in the window is never refused by it; nothing is recorded nor debited. 500 send_failed: the provider refused or failed (or, error_code billing_error, the debit itself failed and nothing was sent); error_code and message_id give the message, recorded as failed in the conversation; no message.sent is delivered, the debit is credited back, and a retry creates a new message.
GET /api/v1/teams/<team_id>/archives
The closed conversations of a team (path archives, a former name: since 2026-10-14 archiving is closing, there is no separate archived state), most recently closed first, by the date of the closing (closed_at). The list of the conversations gives them too with status=closed.
Access: permission archives (now messages.archive)
Path parameters
| Name | Description |
|---|---|
team_id |
Team ID. |
Query parameters
| Name | Description |
|---|---|
date |
Optional date filter: closed that day (YYYY-MM-DD format, in the team's time zone). |
skip |
Pagination offset (default 0; a negative value counts as 0, a value over 2147483647 is refused: 400 validation_error). |
limit |
Page size (default 50, max 100; a larger value is brought back to 100, 0 or less to 1). A skip or limit that is not an integer is refused (400 validation_error). |
Response: conversations: The closed conversations (each with closed_at). skip, limit: The values applied.
GET /api/v1/teams/<team_id>/archives/dates
The days on which conversations of the team were closed (its « archives »).
Access: permission archives (now messages.archive)
Path parameters
| Name | Description |
|---|---|
team_id |
Team ID. |
Response: List of dates (YYYY-MM-DD format).
GET /api/v1/teams/<team_id>/phone-numbers
Get phone numbers assigned to a team.
Access: permission send_sms (now messages.send)
Path parameters
| Name | Description |
|---|---|
team_id |
Team ID. |
Response: phone_numbers: List of {number, label, capabilities} (active numbers of the team; capabilities = ["SMS"] or ["SMS", "MMS"], empty for a number that no SMS provider carries).
SMS questionnaires
Quizzes and surveys played by text message on a number (SMS application « Questionnaire »): questions, settings, results of the sessions.
GET /api/v1/sms/questionnaires
The SMS questionnaires of the current organization (without their questions), by name.
Access: permission numbers.manage in the organization (profiles)
API keys: refused to restricted keys (limited to a team, or an integration's), 403 forbidden
Response: questionnaires: [{id, name, language, active, question_count, draw, scoring, numbers [{id, number, label}], sessions, completed, ...}] (every field of GET /sms/questionnaires/<id> but questions). total: How many.
POST /api/v1/sms/questionnaires
Create an SMS questionnaire (a quiz, or a survey without scoring). 50 at most per organization.
Errors: 400 validation_error with field (questions.<index>.<field> for a question).
Access: permission numbers.manage in the organization (profiles)
API keys: refused to restricted keys (limited to a team, or an integration's), 403 forbidden
Request body
| Name | Description |
|---|---|
name |
Name, 1 to 80 characters (required). |
language |
fr (default) or en: the default texts and the language of the AI judge. |
questions |
1 to 200 questions [{id?, text (1-600), answers [accepted answers, 1-120 characters, 10 at most; at least one with scoring], explanation? (300)}] (required); id kept when given (letters, digits, - and _, 24 at most), generated otherwise. |
draw |
Questions drawn at random for each session, 1 to the number of questions (50 at most; default 5 or fewer). |
scoring |
Grade the answers and count a score (default true); false = a survey, every answer recorded. |
start_keywords |
Words that start a session (10 at most; case, accents and punctuation ignored); empty (default) = any message starts one. |
intro |
First text of a session, before the first question ({total} = number of questions, {name}). |
correct_text |
Answers to a right or a wrong answer ({answer} = the first accepted answer). |
wrong_text |
Answers to a right or a wrong answer ({answer} = the first accepted answer). |
outro |
Last text ({score}, {total}). |
help_text |
Answer to a message outside a session that is not a start keyword, once an hour at most ({keyword}). |
timeout_minutes |
A session without an answer for this long expires (1 to 1440, default 30). |
handoff |
At the end of a session, hand the conversation to the supervising team of the number (default false). |
handoff_keywords |
Words that hand the conversation to the team at any moment (e.g. AGENT). |
handoff_text |
Text sent when a keyword hands the conversation over. |
ai_judge |
Ask the AI of the platform about a doubtful answer (default true); applied only when the organization has Telma AI (ai_available), else the approximate correction decides alone. |
active |
Inactive = the numbers routed to it go to their team (default true). |
Response: questionnaire: The questionnaire (same object as GET /sms/questionnaires/<id>).
DELETE /api/v1/sms/questionnaires/<questionnaire_id>
Delete an SMS questionnaire that no number uses (its sessions in progress stop; the results stay readable until they expire).
Errors: 409 questionnaire_in_use with numbers [{id, number}] when a number is routed to it.
Access: permission numbers.manage in the organization (profiles)
API keys: refused to restricted keys (limited to a team, or an integration's), 403 forbidden
Path parameters
| Name | Description |
|---|---|
questionnaire_id |
Questionnaire ID. |
Response: deleted: true.
GET /api/v1/sms/questionnaires/<questionnaire_id>
One SMS questionnaire of the current organization, with its questions.
Access: permission numbers.manage in the organization (profiles)
API keys: refused to restricted keys (limited to a team, or an integration's), 403 forbidden
Path parameters
| Name | Description |
|---|---|
questionnaire_id |
Questionnaire ID. |
Response: questionnaire: {id, name, language, start_keywords, intro, questions [{id, text, answers, explanation}], draw, scoring, correct_text, wrong_text, outro, help_text, timeout_minutes, handoff, handoff_keywords, handoff_text, ai_judge, ai_available (the organization has Telma AI: without it the AI judge is not asked), active, question_count, numbers [{id, number, label}] (numbers routed to it), sessions (sessions played), completed, created_at, updated_at}.
PUT /api/v1/sms/questionnaires/<questionnaire_id>
Change an SMS questionnaire: the fields given change (questions = the whole list; keep the id of a question so that the results of the sessions keep its text). A session in progress goes on with its questions.
Access: permission numbers.manage in the organization (profiles)
API keys: refused to restricted keys (limited to a team, or an integration's), 403 forbidden
Path parameters
| Name | Description |
|---|---|
questionnaire_id |
Questionnaire ID. |
Request body
| Name | Description |
|---|---|
<field> |
Any field of POST /sms/questionnaires. |
Response: questionnaire: The questionnaire after the change.
GET /api/v1/sms/questionnaires/<questionnaire_id>/sessions
The sessions (results) of an SMS questionnaire, the most recent first. Finished sessions are kept 180 days.
Access: permission numbers.manage in the organization (profiles)
API keys: refused to restricted keys (limited to a team, or an integration's), 403 forbidden
Path parameters
| Name | Description |
|---|---|
questionnaire_id |
Questionnaire ID. |
Query parameters
| Name | Description |
|---|---|
state |
active, done, expired or stopped (STOP, hand-off keyword, questionnaire changed); all by default. |
skip |
Pagination (limit 1 to 100, default 50). |
limit |
Pagination (limit 1 to 100, default 50). |
Response: sessions: [{id, questionnaire_id, number (ours), remote (the contact), state, score, total, answered, handed_off, conversation_id, answers [{question_id, question, given, correct (null without scoring), judged_by (fuzzy, ai or null), at}], started_at, updated_at, ended_at}]. total, skip, limit: Pagination.
Activity
What happened since a moment (text messages, calls, voicemail): the History page of the app.
GET /api/v1/activity
What happened since a moment, newest first, as the user sees it in the mobile app: the text messages sent and received in the teams the user is placed in (the member view, member_only of GET /conversations), the calls placed, received and missed on the user's own SIP endpoints (as GET /voice/calls?endpoint_id= gives them; a call between two endpoints of the user is listed once, as placed), and the voicemail messages the user hears in the app (the rule of GET /voice/voicemails?member_only=true), in every organization of the user.
Access: member of the organization; Any member. A request made with an API key gets the text messages only (the teams the key allows).
Query parameters
| Name | Description |
|---|---|
since |
ISO 8601 datetime, the oldest moment wanted, at most 366 days back, a moment slightly older (up to an hour, for latency and clock drift) is brought to the bound (required; no time zone means UTC). The app sends the start of its day, or one hour ago; the web dashboard, the start of the period chosen (today, 7, 30 or 90 days, or dates). With until, any moment at most 366 days before until. |
until |
ISO 8601 datetime, the end of the period (excluded; default now), after since. The app sends the start of the next day for an older day (« Plus ancien »); the web dashboard, the end of a past period, or the moment of the oldest event shown to read the events before it (« Plus ancien »). |
limit |
At most this many events, 1 to 500 (default 300). |
scope |
"mine" (default: what the app shows, described above) or "all" (the web dashboard with « all my teams »: the text messages of every team the user sees, as GET /conversations without member_only; every call of each organization where the user holds voice.calls.all (their own endpoints elsewhere), each with status (answered, missed, no_answer, busy, failed, voicemail, blocked) and without endpoint_id; the voicemail messages the web shows). Any other value is 400 validation_error. |
Response: events: [{id, type (sms, call, voicemail, meeting or fax), direction (inbound or outbound; null for a meeting), at (ISO 8601 UTC), number, name, ...}]. sms: text (an excerpt, null for a picture alone), media, status, conversation_id, team_id, team_name, organization_id. call (the calls of the user's endpoints, plus the missed calls of their organizations no endpoint was rung for that the user sees, such as a call received while the call flow was closed): missed (an incoming call no device of the endpoint answered), answered, duration (seconds talked), voicemail (it ended in a voicemail box), closed (received while its call flow was closed, « Received after hours »), call_id, endpoint_id, endpoint_label, organization_id, ai (Telma AI: {state, status, summary, reason, actions, actions_done, criteria} of the summary of the call, null when it is not transcribed). voicemail: duration, listened, voicemail_id, mailbox_id (null: the box of a number), organization_id, transcript (Telma AI: the text of the message, null until it is transcribed), ai_state (pending, processing, done, failed, waiting_credit, waiting_plan, or null: not transcribed). meeting (a video meeting the user hosted, was invited to or took part in, by its start; capability video): name and title (its title), state, duration (seconds, once ended), host (the user hosted it), participants (how many came), contacts [{id, name}] (the contacts of the address book it is about), meeting_id, recording ({id, status, summary} of its last recording, or null), organization_id. fax (a fax received or sent by a fax number of the user's teams, where they hold fax.read; capability fax): pages, status (received, failed, queued, sending, sent), error, read (the user opened it), fax_id, organization_id, ai (Telma AI on the received faxes, capability fax_ai: the ai of GET /fax/<id>, {state, summary, reason, sender, fields, actions, actions_due, actions_done, actions_overdue, language, text_chars, error, done_at}, null when it never took the fax). since: The moment applied (ISO 8601 UTC). until: The end applied (ISO 8601 UTC), null without until. total: Number of events returned. truncated (boolean): More events than limit happened since then.
GET /api/v1/activity/after-hours
The calls received after hours that nobody opened yet, as the History of the mobile app shows them: a dot on their row, a number on the History tab and on the icon of the app, a dot on their day in the calendar and on « Plus ancien ». A call received while its call flow was closed rings nobody; it stays new until someone who sees it opens it (PUT /activity/calls/<id>/seen), like a voicemail message not listened to.
Access: member of the organization; Any member; the calls of the user's endpoints and the missed calls no endpoint was rung for that the user sees (the rule of GET /activity). Closed to API keys.
Response: total: How many (at most 200). calls: [{call_id, at (ISO 8601 UTC, the start of the call), organization_id}], newest first, a year back at most.
PUT /api/v1/activity/calls/<call_id>/seen
Mark a call received after hours as seen (the app does it when the call is opened), or new again. Shared, like the listening of a voicemail message: seen by one, seen by all who see the call.
Access: member of the organization
Response: call_id, seen (boolean), total (the calls still new for the user, as GET /activity/after-hours counts them).
Body seen: true (default) or false.
Errors 404 not_found: no such call, or not in the user's History. 409 not_after_hours: the call was not received while its call flow was closed. 403 forbidden: an API key.
GET /api/v1/activity/days
How many events each day holds, for the calendar of the page « Historique » of the mobile app (« Plus ancien »): the text messages, calls, voicemail messages and faxes of the member view, by the rules of GET /activity (scope mine). The days are those of the device: it sends their starts, so that its time zone and summer time are its own.
Access: member of the organization; Any member. A request made with an API key counts the text messages only (the teams the key allows).
Query parameters
| Name | Description |
|---|---|
starts |
The starts of the days, then the end of the last one: ISO 8601 datetimes separated by commas, increasing, 2 to 63 values (62 days at most; no time zone means UTC). The app sends the local midnights of a month and of the first day of the next one. |
Response: days: [{start (ISO 8601 UTC), sms, calls, voicemails, faxes (received and sent by the fax numbers of the user's teams, where they hold fax.read; 2026-11-03), total}], one per day, in the order of starts.
Conversation notes
Internal notes of a conversation (never sent to the contact).
GET /api/v1/conversations/<conversation_id>/notes
List the internal notes of a conversation.
Notes are silent comments of the team: they are never sent to the contact. They come in timeline order (anchor_at): the moment they were written, or the time of the message they comment (message_id).
Access: permission view_team_conversations (now messages.read)
Path parameters
| Name | Description |
|---|---|
conversation_id |
Conversation ID. |
Query parameters
| Name | Description |
|---|---|
skip |
Number of notes to skip (optional, default 0; a negative value counts as 0, a value over 2147483647 is refused: 400 validation_error). |
limit |
Number of notes (optional, default: every note; max 100, a larger value is brought back to 100, 0 or less to 1). A skip or limit that is not an integer is refused (400 validation_error). |
Response: notes: Notes of the conversation, in timeline order (id, conversation_id, team_id, message_id, anchor_at, body, author_id, author_name, via, external_author, created_at, updated_at). total: Number of notes of the conversation.
POST /api/v1/conversations/<conversation_id>/notes
Add an internal note to a conversation (never sent to the contact).
Delivers conversation.note with change "created" to the integrations.
Access: permission view_team_conversations (now messages.read)
Path parameters
| Name | Description |
|---|---|
conversation_id |
Conversation ID. |
Request body
| Name | Description |
|---|---|
body |
Note text (required, 4000 characters max after trimming spaces): 400 validation_error when missing, empty or longer. |
message_id |
Message of the conversation the note comments (optional): the note is placed right after it. 404 not_found when it is not a message of this conversation. |
author_name |
Integration keys only: name of the person writing through the integration (default: the integration name), 120 characters max. |
external_author |
Integration keys only: the integration's own identifier of that person, 120 characters max. |
Response: note: The created note (201), with the fields of GET .../notes.
DELETE /api/v1/conversations/<conversation_id>/notes/<note_id>
Delete an internal note (its author, or a member whose profiles in the organization of the conversation give members.manage or messages.delete: the Admin and Gestionnaire profiles; or a platform or domain administrator). A restricted API key deletes only its owner's notes.
Access: permission view_team_conversations (now messages.read)
Path parameters
| Name | Description |
|---|---|
conversation_id |
Conversation ID. |
note_id |
Note ID. |
Response: success: True.
PUT /api/v1/conversations/<conversation_id>/notes/<note_id>
Edit the text of an internal note (its author only).
An integration key edits the notes written through it; the integration checks external_author on its side. Delivers conversation.note with change "updated" to the integrations.
Access: permission view_team_conversations (now messages.read)
Path parameters
| Name | Description |
|---|---|
conversation_id |
Conversation ID. |
note_id |
Note ID. |
Request body
| Name | Description |
|---|---|
body |
New note text (required, 4000 characters max after trimming spaces): 400 validation_error when missing, empty or longer. |
Response: note: The updated note, with the fields of GET .../notes. 403 forbidden for a note of another author, 404 not_found for an unknown or deleted note.
Call notes
Internal notes of a call (agent dashboard).
GET /api/v1/voice/calls/<call_id>/notes
The internal notes of a call: silent comments of the team on a call record (« il rappelle jeudi »), never heard by anyone outside. The call is looked up in the organizations of the user; 404 not_found for a call the user does not see in GET /voice/calls.
Access: member of the organization; voice.use in the organization of the call, and the call among those the user sees (voice.calls.all, or a call of one of their endpoints).
API keys: refused to restricted keys (limited to a team, or an integration's), 403 forbidden
Path parameters
| Name | Description |
|---|---|
call_id |
Call ID. |
Response: notes: Oldest first (id, call_id, body, author_id, author_name, created_at, updated_at). total: Number of notes of the call.
POST /api/v1/voice/calls/<call_id>/notes
Add an internal note to a call. The users who see the call get the event call_note (change "created").
Access: member of the organization; As GET /voice/calls/<id>/notes.
API keys: refused to restricted keys (limited to a team, or an integration's), 403 forbidden
Path parameters
| Name | Description |
|---|---|
call_id |
Call ID. |
Request body
| Name | Description |
|---|---|
body |
Note text (required, 4000 characters max after trimming spaces): 400 validation_error (field body) when missing, empty or longer. |
Response: note: The created note (201), with the fields of GET .../notes.
DELETE /api/v1/voice/calls/<call_id>/notes/<note_id>
Delete a call note: its author, or a member whose profiles in the organization of the call give voice.calls.all or members.manage (the Admin and Gestionnaire profiles), or a platform or domain administrator. Event call_note with change "deleted".
Access: member of the organization; As GET /voice/calls/<id>/notes.
API keys: refused to restricted keys (limited to a team, or an integration's), 403 forbidden
Path parameters
| Name | Description |
|---|---|
call_id |
Call ID. |
note_id |
Note ID. |
Response: success: True.
PUT /api/v1/voice/calls/<call_id>/notes/<note_id>
Edit the text of a call note (its author only). Event call_note with change "updated".
Access: member of the organization; As GET /voice/calls/<id>/notes.
API keys: refused to restricted keys (limited to a team, or an integration's), 403 forbidden
Path parameters
| Name | Description |
|---|---|
call_id |
Call ID. |
note_id |
Note ID. |
Request body
| Name | Description |
|---|---|
body |
New note text (required, 4000 characters max after trimming spaces). |
Response: note: The updated note. 403 forbidden for a note of another author, 404 not_found for an unknown or deleted note.
Dashboard
What the agent has to do: actions noted in the calls, calls to return.
POST /api/v1/dashboard/callbacks/handled
Mark a number of the callbacks list handled (called back from elsewhere, or no need to): its attempts up to now leave the list; a new missed call brings it back. One mark per number and organization, the last one counts.
Access: member of the organization; voice.use in that organization, which must have the voice service (404 not_found otherwise).
API keys: refused to restricted keys (limited to a team, or an integration's), 403 forbidden
Request body
| Name | Description |
|---|---|
number |
The number (required; E.164 or a North American number in any usual notation). |
organization_id |
The organization of the attempts (required: the one the entry carries). |
Response: handled: {number, at, by, by_name, organization_id, voicemails_listened, actions_done} (201). The voicemail messages of that number not listened yet that the user hears are marked listened, and the open actions « call back » of its calls and voicemail messages the user reads are marked done (over the last 30 days; the counts say how many); DELETE takes them back with the mark.
DELETE /api/v1/dashboard/callbacks/handled/<number>
Remove the « handled » mark of a number: its attempts come back in the callbacks list, the voicemail messages and the actions the mark settled are unheard and open again (unless done again since).
Access: member of the organization; As POST /dashboard/callbacks/handled.
API keys: refused to restricted keys (limited to a team, or an integration's), 403 forbidden
Path parameters
| Name | Description |
|---|---|
number |
The number (E.164 or any usual notation). |
Query parameters
| Name | Description |
|---|---|
organization_id |
The organization of the mark (required). |
Response: success: True (also when there was no mark).
GET /api/v1/dashboard/todo
What the agent has to do, in every organization of the user that has the voice service: the actions Telma AI noted in the summarized calls, voicemail messages and text conversations and not marked done yet (as the assistant's open_actions), and the numbers to call back (missed incoming calls and voicemail messages that got since neither a call from us, nor a call answered for at least 30 seconds, nor a text message sent to that number, nor a « handled » mark: as the assistant's callbacks_due, plus the mark).
Access: member of the organization; Any member; an organization without the voice service, or without voice.use for the user, contributes nothing.
API keys: refused to restricted keys (limited to a team, or an integration's), 403 forbidden
Query parameters
| Name | Description |
|---|---|
days |
How many days back, 1 to 30 (default 7). |
limit |
At most this many entries in each list, 1 to 200 (default 50). |
Response: since: The moment applied (ISO 8601 UTC). actions: [{action, index (position in the summary's actions, for PUT /voice/calls/<id>/ai/actions/<index>, PUT /voice/voicemails/<id>/ai/actions/<index>, PUT /conversations/<conversation_id>/ai/<message_ai_id>/actions/<index>, PUT /video/recordings/<recording_id>/ai/actions/<index> or PUT /fax/<fax_id>/ai/actions/<index>), call_id (a call), voicemail_id (a voicemail message), message_ai_id and conversation_id (a text conversation), meeting_id and recording_id (a recorded video meeting the user hosted; name = its title), fax_id (a received fax Telma AI read; number = the fax number that sent it, name = the name it sent or the sender read on the document), the others null, at, direction, number (the other party, E.164), name (caller id name of an incoming call, contact name of a conversation), call_summary (an excerpt), organization_id, due (the deadline the exchange stated: YYYY-MM-DD for a day, an ISO instant in UTC for a time, null without one), overdue (the deadline passed), urgency (a voicemail message: low, normal, high, or null)}], the ones with a deadline first (closest, so overdue, first), then newest first. Only the calls whose summary the user reads (voice.recordings, or a call of one of their endpoints) and the voicemail messages they hear (the rule of GET /voice/voicemails), in the organizations that have the transcription capability, the text conversations of the teams the user reads (GET /conversations) in the organizations that have the message_ai capability, and the received faxes of the fax numbers of the user's teams where they hold fax.read, in the organizations that have the fax_ai capability; an organization without the voice service gives its conversations only. callbacks: [{number (E.164), name, attempts, kinds (missed_call, voicemail, queue: a call of a call queue no agent took), last_attempt_at, voicemail_text (text of the last message, Telma AI, or null), voicemail_summary (what Telma AI understood of that message: its reason, else its summary, or null; shown before the text), urgency (the highest urgency Telma AI gave to its voicemail messages: low, normal, high, or null), callback_tried_without_answer_at, refs ([{call_id} or {voicemail_id}], the last 5 attempts), organization_id, actions (the open actions « call back » of the calls and voicemail messages of that number, as in actions: shown once, here, not in actions)}], the urgent ones first (high, then normal or none, then low), then newest attempt first. Only the calls the user sees in GET /voice/calls and the voicemail messages the web shows them. faxes: [{id, kind (received: a fax received and not read by the user; failed: a fax of their teams that failed to go), fax_id, at, number, name, pages, error, organization_id, team_id}], newest first: the fax numbers of the user's teams, where they hold fax.read (capability fax). counts: {actions, callbacks, faxes, total}: what is left to do (the badge of the menu, also GET /dashboard/todo/count).
GET /api/v1/dashboard/todo/count
How much is left to do: the open actions and the numbers to call back of GET /dashboard/todo (an action « call back » attached to its callback counts once), for the badge of the menu « Dashboard ».
Access: member of the organization; As GET /dashboard/todo.
API keys: refused to restricted keys (limited to a team, or an integration's), 403 forbidden
Query parameters
| Name | Description |
|---|---|
days |
How many days back, 1 to 30 (default 7). |
Response: actions: Open actions (not attached to a callback). callbacks: Numbers to call back. faxes: Faxes to read or to send again. total: actions + callbacks + faxes (counted up to 200 each).
Live activity
Calls and conversations in progress of the organization, counters of the day, listening to a call; activity per organization for the domain administrators.
GET /api/v1/live
What happens now in the current organization: the calls in progress, the conversations active in the last 15 minutes and the counters of the day. Never the content of a message.
Access: permission activity.live in the organization (profiles)
API keys: refused, 403 forbidden (API key not allowed on this route)
Response: at: The moment of the answer (ISO 8601 UTC). all_teams: True when the member sees every team (teams.all); else only their teams. all_calls: True when the member sees every call (teams.all or voice.calls.all); else the calls of the numbers of their teams, of the members of their teams, or waiting in the queue of one of them. calls: [{id, direction (inbound, outbound, internal), state (talking, hold, ringing, menu, message, queue, voicemail, forward, closed, dial, dialing, system (an outbound or internal call answered by the voice server itself: echo test, music, message), music (a number routed to the music on hold), routing), from {kind (number, user, account), number, name, user_id, endpoint_label, extension}, to {kind (number, telma_number), number, name}, number {id, number, label, team_id} (the number of the organization called), step {kind, label, since, team_id, team_name, position (in the queue), number (forward)}, with [parties], ringing [parties], listeners [{name, mode (listen, whisper, barge), state (ringing, listening), mine}] (who listens to the call now), started_at, answered_at, state_since, duration_seconds, state_seconds, server (super admin only: the voice server that carries it)}], the longest first. id is opaque (never the id of the voice server). conversations: [{id, team_id, team_name, contact {number, name}, team_number, status, last_message_at, last_direction, recent_messages (in the last 15 minutes), waiting_seconds (the contact wrote last: since when), unread_count, agent {user_id, name} (who sent the last message), channel (where the last message sent was written: web, mobile, api, mcp, app:<name>, auto, or null), app {kind, name} (the SMS application handling it)}], the latest first, 100 at most. counters: {since (midnight in the user's time zone), calls {inbound, answered, missed, outbound, average_wait_seconds}, sms {inbound, outbound}}. recent_minutes: 15.
Errors 404 no_organization: the user has no current organization.
POST /api/v1/live/calls/<call_id>/listen
Listen to a call in progress: the voice server rings the user's own phones like a call (their extensions in the organization, the app woken by a push, the web phone; the device already in the call left out) and, answered, the user hears the call (listen), speaks to our side only (whisper) or to both (barge). Journalled (audit log call_listened); the parties are not told.
Access: permission activity.listen in the organization (profiles)
API keys: refused, 403 forbidden (API key not allowed on this route)
Path parameters
| Name | Description |
|---|---|
call_id |
The id of the call in progress (id of GET /live). |
Request body
| Name | Description |
|---|---|
mode |
listen (default), whisper or barge. |
web_phone |
The web phone of the tab that asks (its account name): the listening goes to that tab alone, which answers by itself; the user's phones ring when the tab cannot be woken. |
Response: status: ringing (the user's phones ring). mode: The mode.
Errors 400 validation_error: mode unknown (field: mode), or web_phone not a web phone of the user (field: web_phone). 403 plan_feature (feature supervision): the plan of the organization does not include the supervision. 404 not_found: no such call in progress in the organization, or a call the user does not see. 409 no_phone: the user has no enabled extension in the organization. 409 not_bridged: nobody of the organization talks in the call yet. 502 voice_server_error: the voice server could not be reached or refused.
GET /api/v1/live/organizations
The live activity of every organization of the domains the user administers (all of them for a platform admin), without numbers nor content: calls in progress against the channel limit, SMS of the last 15 minutes, spending of the day, balance and the anomaly signals.
Access: platform permission platform_admin or domain_admin
API keys: refused, 403 forbidden (API key not allowed on this route)
Query parameters
| Name | Description |
|---|---|
domain_id |
Only this domain (one the user administers). |
Response: at: The moment of the answer (ISO 8601 UTC). recent_minutes: 15. currency: CAD. totals: {calls, sms_recent, spend_today, organizations, active, with_signals}. organizations: [{organization_id, name, domain_id, domain_name, calls, talking, international_calls, max_channels (null: no limit), sms_recent, sms_last_hour, spend_today, balance, balance_state (ok, low, empty, or null), signals (channels_full, international, sms_spike, balance_low, balance_empty, account_suspended, account_grace)}], those with signals first, then the busiest.
Errors 403 forbidden: domain_id is not a domain the user administers. 400 validation_error: domain_id is not an id (field: domain_id).
Video meetings
Video meetings (capability video): rooms, LiveKit tokens, invitations by text message, e-mail, link or to a member, waiting room, chat, recording and Telma IA summary, a phone in a meeting, settings.
GET /api/v1/video/members
The colleagues a member may invite to a meeting (POST /video/rooms/<id>/invites, channel member): the active members of the current organization, the user left out, sorted by name. Names only, never an address.
Access: member of the organization
API keys: refused, 403 forbidden (API key not allowed on this route)
Query parameters
| Name | Description |
|---|---|
q |
Only the names containing this text (no case, no accents). |
Response: members (array): {id, name}.
GET /api/v1/video/numbers
The numbers the member may use from a meeting: to send a text invitation (those of their teams that may send) and to present when calling a phone into it (the rule of « appeler un contact »).
Access: member of the organization
API keys: refused, 403 forbidden (API key not allowed on this route)
Response: sms (array): {id, number, label, team_id, team_name}. voice (array): {id, number, label, team_id, team_name}.
GET /api/v1/video/recordings
Search the recorded meetings of the current organization the member reads, newest first: by words in what Telma AI wrote (summary, reason, actions) and, with transcript=1, in the transcripts the member reads in full.
Access: member of the organization; The host and the members holding voice.recordings read everything; a member who took part reads the summary, and their search never looks into its transcript.
API keys: refused, 403 forbidden (API key not allowed on this route)
Query parameters
| Name | Description |
|---|---|
q |
Words searched, each one must appear (case and accents ignored; 200 characters and 10 words at most); absent: every recording. |
transcript |
1 also searches the transcripts, of the recordings the member reads in full (the host, voice.recordings); default 0. |
from |
Recordings started at or after this moment (ISO 8601). |
to |
Recordings started before this moment (ISO 8601). |
skip |
Offset (default 0). |
limit |
Page size, 1 to 50 (default 20). |
Response: recordings (array): The recordings (fields of GET /video/recordings/<id>, never the transcript nor the tracks), each with meeting_id (the meeting), access (full or summary), matched_in (where the words were found: summary, reason, actions, transcript) and transcript_matches ([{speaker, start, text}] of the transcript, 5 at most, with transcript=1 on a recording read in full). total: Count with the same filters. skip, limit: The page.
Errors 400 validation_error (field q, from or to).
GET /api/v1/video/recordings/<recording_id>
A recorded meeting and its Telma AI.
Access: member of the organization; The host and the members holding voice.recordings read everything; a member who took part reads the summary (404 otherwise).
API keys: refused, 403 forbidden (API key not allowed on this route)
Path parameters
| Name | Description |
|---|---|
recording_id |
The recording. |
Response: recording: {id, room_id, title, status (recording, uploading, queued, processing, available, failed, deleted), host {id, name}, started_at, ended_at, duration_s, expires_at (the retention of the call recordings of the domain), ai ({state, status (conversation, no_conversation), summary, reason, actions, actions_done, criteria, language, summary_language, error, counted_seconds, done_at, transcript [{speaker (the name of the participant), start, end (seconds from the start of the recording), text}]} or null), tracks [{index, participant_id, name, status, started_at, ended_at, duration_s, available}]}. A member who only took part reads the summary without the transcript nor the tracks.
PUT /api/v1/video/recordings/<recording_id>/ai/actions/<index>
Mark an action of the summary of a meeting done (or not): it leaves « À faire » (GET /dashboard/todo).
Access: member of the organization; Whoever reads the summary (404 otherwise).
API keys: refused, 403 forbidden (API key not allowed on this route)
Path parameters
| Name | Description |
|---|---|
recording_id |
The recording. |
index |
The position of the action in ai.actions. |
Request body
| Name | Description |
|---|---|
done |
Done or not (required). |
Response: recording: The recording.
GET /api/v1/video/recordings/<recording_id>/audio/<track>
The audio of one track of a recorded meeting (audio/ogg, Opus), once Telma AI has kept it.
Access: member of the organization; The host and the members holding voice.recordings (404 otherwise; 404 too while the file is not kept yet).
API keys: refused, 403 forbidden (API key not allowed on this route)
Path parameters
| Name | Description |
|---|---|
recording_id |
The recording. |
track |
The index of the track (tracks[].index). |
Response: The OGG file (audio/ogg).
POST /api/v1/video/recordings/<recording_id>/share
Forward the summary of a recorded meeting by email: the summary and its actions (never the transcript nor the audio), with a few words of the sender.
Access: member of the organization; The host and the members holding voice.recordings (404 otherwise, also for a member who only took part).
API keys: refused, 403 forbidden (API key not allowed on this route)
Path parameters
| Name | Description |
|---|---|
recording_id |
The recording. |
Request body
| Name | Description |
|---|---|
emails |
The addresses the summary goes to, 1 to 10. |
note |
A few words shown above the summary (optional, 1 000 characters at most). |
Response: sent (array): The addresses the summary went to. failed (array): The addresses the mail server refused.
Errors 400 validation_error (field emails, note). 404 not_found. 409 no_summary: no summary yet. 429 rate_limited: 30 addresses per member per hour. 502 send_failed. 503 email_unavailable.
GET /api/v1/video/rooms
The meetings of the member: those they host or were invited to (or took part in), newest first; with scope=organization, every meeting of the organization (members who see every call: voice.calls.all).
Access: member of the organization
API keys: refused, 403 forbidden (API key not allowed on this route)
Query parameters
| Name | Description |
|---|---|
state |
Only these states, comma-separated (scheduled, active, ended, cancelled). |
from |
Meetings planned, started or created (instant) from this moment (ISO 8601). |
to |
... before this moment (ISO 8601). |
scope |
mine (default) or organization (voice.calls.all). |
contact_id |
Only the meetings about this contact of the address book (its history). |
skip |
Offset (default 0). |
limit |
Page size, 1 to 100 (default 50). |
Response: rooms (array): The meetings (see GET /video/rooms/<id>). total: Count with the same filters. skip, limit: The page.
POST /api/v1/video/rooms
Create a meeting: instant (no scheduled_at: it starts when the host joins) or scheduled.
Access: permission video.host in the organization (profiles)
API keys: refused, 403 forbidden (API key not allowed on this route)
Request body
| Name | Description |
|---|---|
title |
Title, 1 to 120 characters (default « Rencontre » / « Meeting »). |
details |
Free text of the invitation (an agenda, what to prepare…), several lines, 4000 characters at most; shown to the guests in the invitation email, its reminder, the calendar event and the page of the link (not in the text message). |
scheduled_at |
When it is planned (ISO 8601 with a time zone, in the coming year); absent or null: instant. |
duration_min |
Planned duration in minutes, 5 to the limit of the organization (default 60); the meeting ends at the limit of the organization (max_duration_min, 180 by default) after its start. |
lobby |
Guests without a personal invitation wait to be admitted (default: the setting of the organization, true). |
record |
Recording planned (the host still starts it; guests consent before entering); default: the setting of the organization when the meeting may be recorded. 409 recording_unavailable when asked and the meeting may not be recorded (see can_record). |
remind |
Reminder before a scheduled meeting (push to the host and the members invited, email to the guests invited by email), default true. |
remind_before_min |
When the reminder goes, in minutes before the meeting: 5, 10, 15, 30, 60, 120 or 1440 (the day before); default 15. |
contact_ids |
Contacts of the address book the meeting is about (20 at most; shared ones, or the member's own private ones). |
recurrence |
A recurring meeting (needs scheduled_at): {freq (daily, weekly, monthly), interval (1 to 12, default 1: every week, 2: every other week…), weekdays (weekly: days 0 = Monday to 6 = Sunday, including the day of the first meeting; default that day), until (last day, YYYY-MM-DD, within 3 years) or count (1 to 200 meetings, counted from the start of the series), none of them: no end}. The meetings are computed in the time zone of the organization; only the next one exists ahead of time (created when the previous one's time comes or when it is cancelled), with the invitations of the previous one; the guests have one link for the whole series. |
Response: host_email_sent (boolean): A scheduled meeting: the confirmation email went to the host, with the calendar invitation (invitation.ics) of the meeting; sent again when its time, duration, title or details change. room: The meeting (201), with code, phone_code (6 digits typed on a phone), link (link of the guests /r/<code>; the series' for a recurring meeting) and series.
Errors 400 validation_error (field, recurrence.<key>). 409 video_limit (limit max_open_rooms: 200 meetings not over in the organization; max_series: 100 recurring meetings not over).
DELETE /api/v1/video/rooms/<room_id>
Cancel a scheduled meeting, or end a meeting in progress for everybody (its recording stops and goes to Telma AI).
Access: member of the organization; The host, or a moderator in the meeting (403 forbidden otherwise).
API keys: refused, 403 forbidden (API key not allowed on this route)
Path parameters
| Name | Description |
|---|---|
room_id |
The meeting. |
Query parameters
| Name | Description |
|---|---|
scheduled_only |
1 cancels a scheduled meeting only: a meeting in progress (or that starts meanwhile) is left as it is, 409 room_started (what an assistant asks, never to cut people off). |
series |
1 cancels the whole recurring series (the host): no meeting after, its scheduled meetings cancelled; this meeting, when in progress, goes on unless scheduled_only is absent (it ends then). Without it, a cancelled meeting of a series is only this one: the next one is scheduled. |
Response: room: The meeting, cancelled or ended.
Errors 409 room_started (scheduled_only, the meeting is in progress), room_ended (scheduled_only, the meeting is over).
GET /api/v1/video/rooms/<room_id>
A meeting.
Access: member of the organization; The host, the members invited or who took part, and the members who see every call (voice.calls.all) (404 otherwise).
API keys: refused, 403 forbidden (API key not allowed on this route)
Path parameters
| Name | Description |
|---|---|
room_id |
The meeting. |
Response: room: {id, title, details, code, phone_code (while not over), link (https://
PATCH /api/v1/video/rooms/<room_id>
Change a meeting: its details (the host), or lock it (the host or a moderator: nobody new enters, guests wait).
Access: member of the organization
API keys: refused, 403 forbidden (API key not allowed on this route)
Path parameters
| Name | Description |
|---|---|
room_id |
The meeting. |
Request body
| Name | Description |
|---|---|
title |
1 to 120 characters. |
details |
As in POST /video/rooms; empty or null removes it. |
scheduled_at |
A scheduled meeting only (409 room_started otherwise); ISO 8601 with a time zone, or null (instant). |
duration_min |
5 to the limit of the organization. |
lobby |
As in POST /video/rooms. |
record |
As in POST /video/rooms. |
remind |
As in POST /video/rooms. |
remind_before_min |
As in POST /video/rooms (the reminder goes again at the new moment). |
contact_ids |
The contacts of the meeting (replaces the list). |
recurrence |
As in POST /video/rooms: makes a scheduled meeting recurring; for a meeting of a series, with series: true only: the new rule from this meeting on (null: the series stops after it). |
series |
A meeting of a series: true changes the whole series from this meeting on (title, details, duration, waiting room, recording, reminder, contacts of its meetings to come; a new time or rule cancels its meetings to come and restarts the series from this one, same link); false or absent: this meeting only. |
locked |
A meeting in progress (409 room_not_started otherwise); everybody in the meeting gets the room message {type: locked, on}. |
Response: room: The meeting.
Errors 400 validation_error (field). 403 forbidden: not the host (or not a moderator for locked). 409 room_ended.
GET /api/v1/video/rooms/<room_id>/chat
The chat of a meeting, oldest first.
Access: member of the organization
API keys: refused, 403 forbidden (API key not allowed on this route)
Path parameters
| Name | Description |
|---|---|
room_id |
The meeting. |
Query parameters
| Name | Description |
|---|---|
before |
Only the messages before this message id (older pages). |
limit |
1 to 200 (default 100). |
Response: messages (array): {id, author {kind (member, guest, phone), name, user_id, participant_id}, text, file ({id, url, name, content_type, size} or null; url = a signed link valid 24 hours), created_at}.
POST /api/v1/video/rooms/<room_id>/chat
Write in the chat of a meeting in progress: a text (JSON), or a file (multipart, field file, field text beside it). LiveKit relays it to everybody in the room (data, topic chat, the message as GET renders it).
Access: member of the organization; A member in the meeting (admitted or joined) or a moderator (403 forbidden otherwise).
API keys: refused, 403 forbidden (API key not allowed on this route)
Path parameters
| Name | Description |
|---|---|
room_id |
The meeting. |
Request body
| Name | Description |
|---|---|
text |
At most 2000 characters (required without a file). |
file |
Multipart only, 25 MB at most: an image (jpg, png, gif, webp, heic), a video (mp4, mov), a sound (mp3, wav, m4a) or a document (pdf, doc, docx, xls, xlsx, ppt, pptx, odt, ods, odp, rtf, txt, csv, zip). The participants read it by a signed link valid 24 hours. |
Response: message: The message (201).
Errors 400 validation_error (field text or file). 409 room_not_started, room_ended.
POST /api/v1/video/rooms/<room_id>/dial
Call a phone into a meeting in progress: LiveKit calls the number through the voice server (billed as an outbound call of the organization); the person joins the meeting as a participant phone, named by the address book (the number masked otherwise). DELETE /video/rooms/<id>/participants/<participant_id> hangs up.
Access: permission video.host in the organization (profiles); The host or a moderator holding video.host (403 forbidden otherwise).
API keys: refused, 403 forbidden (API key not allowed on this route)
Path parameters
| Name | Description |
|---|---|
room_id |
The meeting. |
Request body
| Name | Description |
|---|---|
number |
The number to call (E.164, or a North American number) (required). |
from_number |
The number presented: the id or the number of one of GET /video/numbers (voice); default: the first. |
Response: participant: The participant phone (201), dialing until it answers (then joined).
Errors 400 validation_error (field number or from_number). 403 outbound_suspended. 409 no_number, room_not_started, video_limit (limit max_participants). 422 destination_not_allowed (reason, country): a country the organization may not call, or a premium-rate number. 429 rate_limited (30 calls per meeting). 502 dial_failed. 503 video_unavailable: the phone of the meetings is not configured.
GET /api/v1/video/rooms/<room_id>/invites
The invitations of a meeting.
Access: member of the organization; The host or a moderator (403 forbidden otherwise).
API keys: refused, 403 forbidden (API key not allowed on this route)
Path parameters
| Name | Description |
|---|---|
room_id |
The meeting. |
Response: invites (array): {id, channel (sms, email, link, member), name, contact_id, user_id, phone, phone_masked, email, message_id (the text message sent), sent_at, opened_at (the guest opened the link), joined_at, revoked, created_at}.
POST /api/v1/video/rooms/<room_id>/invites
Invite someone: a guest by text message, by email (with an iCalendar invitation) or by a link to share, or a member of the organization (event video_invite and push of the app).
A guest's link is https://
Access: member of the organization; The host or a moderator (403 forbidden otherwise).
API keys: refused, 403 forbidden (API key not allowed on this route)
Path parameters
| Name | Description |
|---|---|
room_id |
The meeting. |
Request body
| Name | Description |
|---|---|
channel |
sms, email, link or member (required). |
contact_id |
A contact of the address book: its name, first number and email by default. |
name |
The name of the guest (1 to 60 characters). |
phone |
The number of the guest (sms; default: the first number of the contact). |
email |
The address of the guest (email; default: the contact's). |
user_id |
The member to invite (member; not the host). |
from_number |
The number the text message goes from (sms): the id or the number of one of the member's numbers (GET /video/numbers, sms); default: the first. |
Response: invite: The invitation (201). link: The link of the guest (sms, email, link: the only time it is given); null for a member.
Errors 400 validation_error (field). 403 recipient_opted_out, number_disabled, forbidden; 402 insufficient_balance, account_suspended (the text message). 409 already_invited, no_number, room_ended, video_limit (limit max_invites). 429 rate_limited. 502 send_failed. 503 email_unavailable.
DELETE /api/v1/video/rooms/<room_id>/invites/<invite_id>
Revoke an invitation: its link no longer admits (a guest who opens it waits like anybody).
Access: member of the organization; The host or a moderator (403 forbidden otherwise).
API keys: refused, 403 forbidden (API key not allowed on this route)
Path parameters
| Name | Description |
|---|---|
room_id |
The meeting. |
invite_id |
The invitation. |
Response: invite: The invitation, revoked.
GET /api/v1/video/rooms/<room_id>/lobby
The guests waiting to be admitted, oldest first.
Access: member of the organization; The host or a moderator (403 forbidden otherwise).
API keys: refused, 403 forbidden (API key not allowed on this route)
Path parameters
| Name | Description |
|---|---|
room_id |
The meeting. |
Response: participants (array): The participants waiting (see GET /video/rooms/<id>).
POST /api/v1/video/rooms/<room_id>/lobby/<participant_id>
Admit or refuse a guest who waits (the guest's page learns it at its next poll; event video_lobby).
Access: member of the organization; The host or a moderator (403 forbidden otherwise).
API keys: refused, 403 forbidden (API key not allowed on this route)
Path parameters
| Name | Description |
|---|---|
room_id |
The meeting. |
participant_id |
The participant waiting. |
Request body
| Name | Description |
|---|---|
admit |
True to admit, false to refuse (required). |
Response: participant: The participant, admitted or denied.
Errors 409 not_waiting, video_limit (limit max_participants: the meeting is full).
DELETE /api/v1/video/rooms/<room_id>/participants/<participant_id>
Hang up a phone in the meeting (any participant: as POST .../remove).
Access: member of the organization; The host or a moderator (403 forbidden otherwise).
API keys: refused, 403 forbidden (API key not allowed on this route)
Path parameters
| Name | Description |
|---|---|
room_id |
The meeting. |
participant_id |
The participant. |
Response: participant: The participant.
POST /api/v1/video/rooms/<room_id>/participants/<participant_id>/mute
Mute the microphone (or the camera) of a participant, or stop their screen share; they may turn it on again.
kind screen stops the screen share of the participant (its picture and its sound) for everyone: the web app of the participant ends the share and tells them the host stopped it. audio and video never touch a screen share.
Access: member of the organization; The host or a moderator (403 forbidden otherwise).
API keys: refused, 403 forbidden (API key not allowed on this route)
Path parameters
| Name | Description |
|---|---|
room_id |
The meeting. |
participant_id |
The participant. |
Request body
| Name | Description |
|---|---|
kind |
audio (default), video or screen. |
Response: success: True.
Errors 409 not_in_room. 502 video_unavailable.
POST /api/v1/video/rooms/<room_id>/participants/<participant_id>/remove
Remove a participant from the meeting: a member or a guest cannot come back (denied), a phone is hung up.
Access: member of the organization; The host or a moderator (403 forbidden otherwise).
API keys: refused, 403 forbidden (API key not allowed on this route)
Path parameters
| Name | Description |
|---|---|
room_id |
The meeting. |
participant_id |
The participant. |
Response: participant: The participant.
Errors 409 is_host.
DELETE /api/v1/video/rooms/<room_id>/recording
Stop recording: the tracks are written, then Telma AI transcribes and summarizes the meeting (event video_ai_update; email of the summary to the host).
Access: member of the organization; The host or a moderator (403 forbidden otherwise).
API keys: refused, 403 forbidden (API key not allowed on this route)
Path parameters
| Name | Description |
|---|---|
room_id |
The meeting. |
Response: recording: The recording (uploading, then queued), or null when nothing was recording.
POST /api/v1/video/rooms/<room_id>/recording
Start recording a meeting in progress: audio only, one file per track of each participant who consented (the members and the phones, the guests who consented), until DELETE or the end of the meeting; everybody in the room gets the room message {type: recording, on: true} (a guest who did not consent is asked: POST /video/join/<code>/consent).
Access: member of the organization; The host or a moderator holding video.host (403 forbidden otherwise).
API keys: refused, 403 forbidden (API key not allowed on this route)
Path parameters
| Name | Description |
|---|---|
room_id |
The meeting. |
Response: recording: The recording (201), see GET /video/recordings/<id>.
Errors 409 already_recording, room_not_started, recording_unavailable (no Telma AI, or no Telma AI plan on an endpoint of the host). 503 video_unavailable: no store for the recordings.
GET /api/v1/video/rooms/<room_id>/recordings
The recordings of a meeting, newest first (summaries only for a member who only took part).
Access: member of the organization
API keys: refused, 403 forbidden (API key not allowed on this route)
Path parameters
| Name | Description |
|---|---|
room_id |
The meeting. |
Response: recordings (array): See GET /video/recordings/<id>; those the member may read.
POST /api/v1/video/rooms/<room_id>/token
The LiveKit token of a member to join a meeting (15 minutes to connect; LiveKit renews it during the connection).
The host may always join (a scheduled meeting becomes active: 409 video_limit with limit max_active_rooms beyond the limit of the organization) and gets the rights of the room (roomAdmin, screen sharing); a member invited, or who sees every call (voice.calls.all), joins a meeting in progress (screen sharing too). Not available to a session opened as a member, nor in the administration mode.
Access: member of the organization
API keys: refused, 403 forbidden (API key not allowed on this route)
Path parameters
| Name | Description |
|---|---|
room_id |
The meeting. |
Response: url: The WebSocket of LiveKit (LIVEKIT_URL). token: The JWT to connect with. identity: The identity in the room (m_
Errors 403 forbidden: administration mode. 403 removed: the host removed the member. 409 room_not_started (not the host, meeting not started), room_ended, room_locked, video_limit (limit max_participants, or max_active_rooms). 503 video_unavailable: LiveKit does not answer.
GET /api/v1/video/settings
The settings of the meetings of the organization.
Access: member of the organization
API keys: refused, 403 forbidden (API key not allowed on this route)
Response: settings: {record_default, lobby, max_participants, max_duration_min, max_active_rooms}: what applies. caps: {max_participants, max_duration_min, max_active_rooms}: the limits set by the platform (10, 180, 5 by default). available (boolean): Whether the video service is configured. phone (boolean): Whether a phone may be called into a meeting.
PUT /api/v1/video/settings
Change the settings of the meetings of the organization (each key optional).
Access: permission organization.settings in the organization (profiles)
API keys: refused, 403 forbidden (API key not allowed on this route)
Request body
| Name | Description |
|---|---|
record_default |
The switch « Record » of a new meeting. |
lobby |
Guests without a personal invitation wait to be admitted. |
max_participants |
2 to the cap (null: the cap). |
max_duration_min |
5 to the cap, in minutes (null: the cap). |
max_active_rooms |
1 to the cap (null: the cap). |
Response: settings, caps, available, phone: As GET /video/settings.
Errors 400 validation_error (field): a value above its cap, an unknown key.
Video meetings: guests
Public routes of the guests of a meeting (link /r/…, no account): the meeting, entering, the waiting room, the token, the chat.
GET /api/v1/video/join/<code>
What a guest sees before entering a meeting (public, no account).
Access: public (no authentication)
Rate limit: 60 per minute; 120 per minute
Path parameters
| Name | Description |
|---|---|
code |
The code of the meeting (8 characters of the link /r/<code>). |
Query parameters
| Name | Description |
|---|---|
i |
The token of a personal invitation (the link of an invitation); an invalid one is ignored. |
Response: room: {title, details (the free text of the host: an agenda…, or null), host_name, organization_name, branding (the brand of the domain: name, logo, theme), scheduled_at, state (scheduled, active, ended, cancelled), record (recording planned), recording (recording now), lobby, locked}. invite: {name} of a valid personal invitation, else null.
POST /api/v1/video/join/<code>
A guest asks to enter (public): admitted at once with a valid personal invitation (unless the meeting is locked) or when the meeting has no waiting room, else waiting for the host. The page then polls GET /video/join/<code>/status every 2 seconds.
Access: public (no authentication)
Rate limit: 20 per minute; 10 per minute
Path parameters
| Name | Description |
|---|---|
code |
The code of the meeting. |
Request body
| Name | Description |
|---|---|
name |
The name the guest shows, 1 to 60 characters (required). |
invite_token |
The token of a personal invitation (i of the link). |
consent_recording |
The guest accepts to be recorded; required true when the meeting is recorded or planned to be (400 consent_required). |
Response: participant_id: The guest's participant (201). secret: The secret of the guest's session (keep it: it is given once). state: waiting or admitted.
Errors 400 validation_error (field name), consent_required. 409 room_ended. 429 too_many_waiting (30 guests wait already), or the rate limits.
GET /api/v1/video/join/<code>/chat
The chat of the meeting, for a guest admitted (public).
Access: public (no authentication)
Rate limit: 60 per minute
Path parameters
| Name | Description |
|---|---|
code |
The code of the meeting. |
Query parameters
| Name | Description |
|---|---|
p |
The participant id (required). |
s |
The secret (required). |
before |
Only the messages before this message id. |
Response: messages (array): {id, author {kind, name}, text, file, created_at}.
Errors 403 forbidden: the guest is not admitted.
POST /api/v1/video/join/<code>/chat
Write in the chat of a meeting in progress, for a guest admitted (public): a text (JSON), or a file (multipart, field file, field text beside it).
Access: public (no authentication)
Rate limit: 30 per minute
Path parameters
| Name | Description |
|---|---|
code |
The code of the meeting. |
Query parameters
| Name | Description |
|---|---|
p |
The participant id (required). |
s |
The secret (required). |
Request body
| Name | Description |
|---|---|
text |
At most 2000 characters (required without a file). |
file |
Multipart only, 25 MB at most, the types of the members' chat files (images, videos, sounds, documents). |
Response: message: The message (201).
Errors 403 forbidden: the guest is not admitted. 409 room_not_started, room_ended. 400 validation_error, file_too_large, invalid_file_type (field file). 429 rate_limited: more than 20 files in an hour.
POST /api/v1/video/join/<code>/consent
A guest consents (or not) to the recording started after they entered: their tracks are recorded from then on (public).
Access: public (no authentication)
Rate limit: 30 per minute
Path parameters
| Name | Description |
|---|---|
code |
The code of the meeting. |
Query parameters
| Name | Description |
|---|---|
p |
The participant id (required). |
s |
The secret (required). |
Request body
| Name | Description |
|---|---|
consent_recording |
(required). |
Response: consent_recording (boolean): What is kept.
GET /api/v1/video/join/<code>/status
Where a guest stands (public, polled every 2 seconds): the LiveKit token appears once admitted, in a meeting in progress.
Access: public (no authentication)
Rate limit: 60 per minute; 600 per minute
Path parameters
| Name | Description |
|---|---|
code |
The code of the meeting. |
Query parameters
| Name | Description |
|---|---|
p |
The participant id (required). |
s |
The secret (required). |
Response: state: waiting, admitted, joined, left, denied (refused or removed), full (back after leaving, the meeting is full) or ended. url: The WebSocket of LiveKit (admitted, meeting in progress). token: The JWT to connect with (same; 15 minutes to connect). identity: The identity in the room (g_
Errors 404 not_found: unknown participant or wrong secret (always the same answer).
Video meetings (internal)
Signed webhooks of LiveKit, code of a meeting typed on a phone (voice server), events of the Telma IA worker.
POST /api/v1/internal/video/ai-events
The Telma AI worker moved a recorded meeting on (service token): the web server emits video_ai_update and sends the summary email to the host, once.
Access: service token (Authorization: Bearer $VOICE_INTERNAL_TOKEN), neither a user nor an API key
API keys: refused, 403 forbidden (API key not allowed on this route)
Request body
| Name | Description |
|---|---|
recording_id |
The recording (required). |
Response: success (boolean): True.
Errors 401 unauthorized. 503 internal_api_disabled.
POST /api/v1/internal/video/livekit
Webhooks of LiveKit (signed with the API key and secret of LiveKit, never a user nor an API key): room_started, room_finished (the meeting ends), participant_joined and participant_left (the participants of the meeting), track_published (an audio track of a participant who consented gets its own Egress while the meeting is recorded), egress_updated and egress_ended (a track of a recording is written).
Access: public (no authentication)
API keys: refused, 403 forbidden (API key not allowed on this route)
Rate limit: exempt from the general per-address limit
Request body
| Name | Description |
|---|---|
event |
The name of the event; room, participant, track, egressInfo as LiveKit sends them. |
Response: received (boolean): True (also for an event of a room that is not ours, ignored).
Errors 401 unauthorized: missing or wrong signature, signed by another key, body changed. 503 video_unavailable: LiveKit is not configured.
POST /api/v1/internal/video/resolve
The LiveKit room of the code a caller typed (service token of the voice servers): the action meeting of a number or of a call flow asks for the code, then sends the call to LiveKit SIP into livekit_room.
Access: service token (Authorization: Bearer $VOICE_INTERNAL_TOKEN), neither a user nor an API key
API keys: refused, 403 forbidden (API key not allowed on this route)
Rate limit: 120 per minute
Request body
| Name | Description |
|---|---|
code |
The 6 digits of the meeting (phone_code), or its 8 characters (required). |
organization_id |
The organization of the number called: only its meetings answer (required). |
phone_number_id |
The number called (a number of that organization, else 404). |
caller |
The number of the caller (journaled only). |
Response: livekit_room: The room (r_<id>) to send the call into. room_id: The meeting. title: Its title (for a prompt).
Errors 400 validation_error. 401 unauthorized. 404 not_found: no meeting with this code in the organization. 409 room_not_started, room_locked, video_limit (full). 503 internal_api_disabled.
Video meetings: limits
Limits of the meetings of a domain and of an organization (super admin).
GET /api/v1/domains/<domain_id>/organizations/<organization_id>/video-limits
The limits of the video meetings of an organization (super admin): its own, over the domain's.
Access: platform permission platform_admin
API keys: refused, 403 forbidden (API key not allowed on this route)
Path parameters
| Name | Description |
|---|---|
domain_id |
The domain. |
organization_id |
The organization. |
Response: caps: {max_participants, max_duration_min, max_active_rooms}: what caps the organization. stored: What the organization has of its own (the keys set only). domain: The limits of the domain. settings: What applies (the choices of the organization under the caps).
PUT /api/v1/domains/<domain_id>/organizations/<organization_id>/video-limits
Change the limits of the video meetings of one organization (super admin; each key optional, null goes back to the domain's).
Access: platform permission platform_admin
API keys: refused, 403 forbidden (API key not allowed on this route)
Path parameters
| Name | Description |
|---|---|
domain_id |
The domain. |
organization_id |
The organization. |
Request body
| Name | Description |
|---|---|
max_participants |
2 to 100. |
max_duration_min |
15 to 1440. |
max_active_rooms |
1 to 100. |
Response: caps, stored, domain, settings: As GET.
GET /api/v1/domains/<domain_id>/video-limits
The limits of the video meetings of a domain (super admin).
Access: platform permission platform_admin
API keys: refused, 403 forbidden (API key not allowed on this route)
Path parameters
| Name | Description |
|---|---|
domain_id |
The domain. |
Response: limits: {max_participants, max_duration_min, max_active_rooms}: what applies to its organizations (the defaults: 10, 180, 5). stored: What the domain sets itself (the keys set only). bounds: {key: [min, max]}.
PUT /api/v1/domains/<domain_id>/video-limits
Change the limits of the video meetings of a domain (super admin; each key optional, null goes back to the default).
Access: platform permission platform_admin
API keys: refused, 403 forbidden (API key not allowed on this route)
Path parameters
| Name | Description |
|---|---|
domain_id |
The domain. |
Request body
| Name | Description |
|---|---|
max_participants |
2 to 100. |
max_duration_min |
15 to 1440. |
max_active_rooms |
1 to 100. |
Response: limits, stored, bounds: As GET.
Messages between colleagues
Conversations between the members of an organization: one-to-one and one per team, unread counts, files, presence (online, idle, in a call, in a meeting, and the one presence).
GET /api/v1/team-chat/members
The other members of the organization one may write to (« Nouveau message »), with their teams and presence. Never their email address.
Access: member of the organization; A member of the organization.
API keys: refused, 403 forbidden (API key not allowed on this route)
Query parameters
| Name | Description |
|---|---|
organization_id |
One of the member's organizations (default: the current one). |
Response: members: By name: id, name, teams [{id, name}], presence {state, since} (as GET /team-chat/presence). organization_id: The organization.
GET /api/v1/team-chat/phone-messages
The messages taken for you (or by you), newest first.
Access: authenticated (JWT or API key)
API keys: refused, 403 forbidden (API key not allowed on this route)
Query parameters
| Name | Description |
|---|---|
organization_id |
The organization (default: the current one). |
box |
for_me (default: taken for you) or by_me (taken by you). |
handled |
true or false to keep only those (absent: all). |
limit |
1 to 200 (default 50). |
Response: phone_messages: As POST /team-chat/phone-messages.
POST /api/v1/team-chat/phone-messages
Take a message for a colleague: a card of the call (for whom, from whom, the number, the message, to call back or not), sent to them in your direct conversation of the chat between colleagues (unread, push and real time as any chat message, with phone_message so that the chat shows the card). With callback true it is a callback in their « À faire » (kind message) until they call or text the number back, or mark it handled.
Access: authenticated (JWT or API key)
API keys: refused, 403 forbidden (API key not allowed on this route)
Rate limit: 60 per minute
Request body
| Name | Description |
|---|---|
organization_id |
The organization (default: the current one). |
for_user_id |
The colleague the message is for, a member of the organization other than you (required). |
from_name |
Who called (120 characters at most). |
number |
The number to call back (any notation, kept in E.164); required with callback. |
text |
The message (2000 characters at most). |
callback |
To call back (default false). |
call_id |
The call the message was taken in (a call of the organization), for the link of the card. |
contact_id |
The shared contact of the caller, for the link of the card (default: the shared contact of number; a private contact of yours is not linked). |
Response: phone_message: {id, organization_id, for_user_id, by_user_id, by_name, from_name, number, text, callback, call_id, contact_id, thread_id (the chat conversation it was sent in), created_at, handled_at}.
Errors 400 validation_error (field): a field of the wrong type or too long, no for_user_id, yourself, callback without number, nothing said at all. 403 not_a_member. 404 not_found: the colleague is not a member.
PUT /api/v1/team-chat/phone-messages/<message_id>
Mark a message taken for you handled, or not (it leaves « À faire », or comes back).
Access: authenticated (JWT or API key)
API keys: refused, 403 forbidden (API key not allowed on this route)
Request body
| Name | Description |
|---|---|
handled |
required. |
Response: phone_message: As POST /team-chat/phone-messages.
Errors 400 validation_error (field: handled). 404 not_found: no such message taken for you.
GET /api/v1/team-chat/presence
The presence of every member of the organization, the caller included. By precedence: in_meeting (in a video meeting), in_call (in a call on one of their phones), online (the web app or the app open, active in the last 5 minutes), away (open, no activity for 5 minutes), offline. The changes come by the event presence_update {user_id, state, since}.
Access: member of the organization; A member of the organization.
API keys: refused, 403 forbidden (API key not allowed on this route)
Query parameters
| Name | Description |
|---|---|
organization_id |
One of the member's organizations (default: the current one). |
Response: <user_id>: {state, since}: since = when the state started (ISO 8601, null when unknown).
GET /api/v1/team-chat/threads
The conversations of the member in an organization: one per team the member is placed in (created at this first read), then the one-to-one conversations with colleagues, each with its unread count. A one-to-one conversation with a former member stays while it has messages.
Access: member of the organization; A member of the organization (a membership there); 403 not_a_member otherwise (also a platform administrator who only administers it).
API keys: refused, 403 forbidden (API key not allowed on this route)
Query parameters
| Name | Description |
|---|---|
organization_id |
One of the member's organizations (default: the current one). |
Response: threads: The teams first (by name), then the people (latest first): id, organization_id, kind (direct or team), team_id, title (the team or the colleague), other_user_id, other_is_member, member_ids, members [{id, name}], member_count, last_message_at, last_message_preview, last_message_author_id, last_message_author_name, unread (messages of the others not read yet), mentions (of which naming the member), created_at. unread_total: Sum of the unread counts. organization_id: The organization of the list.
POST /api/v1/team-chat/threads
Open the one-to-one conversation with a colleague of the same organization: the existing one, or a new one (idempotent: the same two members always get the same conversation).
Access: member of the organization; A member of the organization; never a session opened as a member (403 impersonation_forbidden).
API keys: refused, 403 forbidden (API key not allowed on this route)
Request body
| Name | Description |
|---|---|
user_id |
The colleague (required): 400 validation_error (field user_id) when missing, invalid or oneself; 404 not_found when not an active member of the organization. |
organization_id |
One of the member's organizations (default: the current one). |
Response: thread: The conversation (fields of GET /team-chat/threads); 201 when it was created, 200 when it existed.
GET /api/v1/team-chat/threads/<thread_id>
One conversation of the member, with its unread count.
Access: member of the organization; A member of the conversation: one of its two members, or a member placed in its team.
API keys: refused, 403 forbidden (API key not allowed on this route)
Path parameters
| Name | Description |
|---|---|
thread_id |
Conversation ID. |
Response: thread: The conversation (fields of GET /team-chat/threads). 404 not_found for a conversation the member is not part of, or of another organization.
POST /api/v1/team-chat/threads/<thread_id>/files
Upload a file for a message of this conversation, then send the message with file {id}. A file never sent is deleted after a day; a deleted message takes its file.
Access: member of the organization; A member of the conversation; never a session opened as a member (403 impersonation_forbidden).
API keys: refused, 403 forbidden (API key not allowed on this route)
Rate limit: 60 per hour
Path parameters
| Name | Description |
|---|---|
thread_id |
Conversation ID. |
Request body
| Name | Description |
|---|---|
file |
The file (multipart/form-data field, required), 25 MB at most: an image (jpg, png, gif, webp, heic), a video (mp4, mov), a sound (mp3, wav, m4a) or a document (pdf, doc, docx, xls, xlsx, ppt, pptx, odt, ods, odp, rtf, txt, csv, zip), by its name's extension. 400 validation_error (field file) for a missing, empty or not accepted file, 400 file_too_large over 25 MB, 400 invalid_file_type when its content is not of the type its extension says. |
Response: file: {id, url, name, content_type, size} (201): url = a signed link valid 24 hours (GET /api/v1/chat-files/<id>/f/<name>), given only to the members of the conversation.
Errors 429 rate_limited: more than 60 files in an hour.
GET /api/v1/team-chat/threads/<thread_id>/messages
The messages of a conversation, the latest page first, returned oldest first; deleted messages stay in place (deleted true, no text nor file). Reading does not mark the conversation read (POST .../read does).
Access: member of the organization; A member of the conversation (404 not_found otherwise).
API keys: refused, 403 forbidden (API key not allowed on this route)
Path parameters
| Name | Description |
|---|---|
thread_id |
Conversation ID. |
Query parameters
| Name | Description |
|---|---|
before |
A message ID of the conversation, or an ISO 8601 date: only the messages before it (the next page up). |
limit |
Messages per page, 1 to 100 (default 50). |
Response: messages: id, thread_id, organization_id, author_id, author_name, text, file ({id, url, name, content_type, size} or null: url is a signed link valid 24 hours; id null for an older file, whose url is public), mentions (member ids), created_at, edited_at, deleted. has_more: Whether older messages remain (ask again with before = the first message's id). total: Number of messages of the conversation. limit: The page size used. reads: Where each member read up to: [{user_id, name, last_read_at}] (the « read by » of the last messages). thread_id: The conversation.
POST /api/v1/team-chat/threads/<thread_id>/messages
Write a message in a conversation. Its members get the event team_message (change "created", with their unread counts) and, but the author, the app push team_message (preference push.team_message, cut by the do not disturb, one notification per conversation). A file is first uploaded with POST .../threads/<id>/files, then its id given here.
Access: member of the organization; A member of the conversation; never a session opened as a member (403 impersonation_forbidden).
API keys: refused, 403 forbidden (API key not allowed on this route)
Rate limit: 60 per minute
Path parameters
| Name | Description |
|---|---|
thread_id |
Conversation ID. |
Request body
| Name | Description |
|---|---|
text |
The message, 4000 characters at most after trimming spaces (required without a file): 400 validation_error (field text). |
file |
{id}: a file uploaded with POST .../threads/<id>/files by the author, for this conversation, not yet sent (400 validation_error field file.id otherwise). Still accepted: {url, name}, an image, video or sound of POST /api/v1/upload. |
mentions |
Ids of members of the conversation named by @ (others are ignored): they get a push saying so. |
Response: message: The message (fields of GET .../messages), 201. 409 recipient_not_member when the colleague of a one-to-one conversation left the organization.
Errors 429 rate_limited: more than 60 messages in a minute.
DELETE /api/v1/team-chat/threads/<thread_id>/messages/<message_id>
Delete one's own message: it stays in place as deleted (no text nor file). The members get team_message (change "deleted").
Access: member of the organization; A member of the conversation, author of the message; never a session opened as a member.
API keys: refused, 403 forbidden (API key not allowed on this route)
Path parameters
| Name | Description |
|---|---|
thread_id |
Conversation ID. |
message_id |
Message ID. |
Response: message: The deleted message. 403 forbidden for the message of someone else, 404 not_found for an unknown one.
PUT /api/v1/team-chat/threads/<thread_id>/messages/<message_id>
Change the text of one's own message (edited_at is set). The members get team_message (change "updated").
Access: member of the organization; A member of the conversation, author of the message; never a session opened as a member.
API keys: refused, 403 forbidden (API key not allowed on this route)
Path parameters
| Name | Description |
|---|---|
thread_id |
Conversation ID. |
message_id |
Message ID. |
Request body
| Name | Description |
|---|---|
text |
The new text (required unless the message carries a file, 4000 characters at most). |
Response: message: The message. 403 forbidden for the message of someone else, 404 not_found for an unknown or deleted one.
POST /api/v1/team-chat/threads/<thread_id>/read
Mark a conversation read up to its last message. The other members get team_read {thread_id, organization_id, user_id, last_read_at} (their « read by »), the member's own devices the same with unread 0 and unread_total.
Access: member of the organization; A member of the conversation; never a session opened as a member.
API keys: refused, 403 forbidden (API key not allowed on this route)
Path parameters
| Name | Description |
|---|---|
thread_id |
Conversation ID. |
Response: thread_id, organization_id, user_id, last_read_at: The new read mark (never moved back). unread: 0. unread_total: The member's unread messages left in the organization.
GET /api/v1/team-chat/unread
The member's unread messages in an organization (the badge of the menu), without creating any conversation.
Access: member of the organization; A member of the organization.
API keys: refused, 403 forbidden (API key not allowed on this route)
Query parameters
| Name | Description |
|---|---|
organization_id |
One of the member's organizations (default: the current one). |
Response: unread_total: Messages of the others not read yet, every conversation of the member. mentions: Of which naming the member. threads: {conversation id: unread} of the conversations with unread messages. organization_id: The organization.
Address book
The contacts of the organization (filled by the calls and the messages), their notes, the records of the connected applications; private contacts of a user.
GET /api/v1/contacts
The address book of the current organization: the shared contacts and the user's private ones.
The book fills itself from the calls and the messages of the organization (a new number = a new shared contact, named by the caller id, the conversation or a connected application); the users complete it.
Access: member of the organization
API keys: refused to restricted keys (limited to a team, or an integration's), 403 forbidden
Query parameters
| Name | Description |
|---|---|
q |
A piece of a name, a company, an email, or at least 3 digits of a number (any notation). |
scope |
all (default: shared contacts and the user's private ones), shared, mine (private only). |
sort |
name (default), last_activity, created_at. order: asc (default for name) or desc. |
skip |
Pagination (limit 1 to 100, default 50). |
limit |
Pagination (limit 1 to 100, default 50). |
Response: contacts: Contacts (id, numbers, number (the main one), name, company, email, private, owner_id, source, links {app: {kind, id, name, url, manual, found_at}}, last_activity {at, kind call|sms, direction}, notes_count, first_seen_at, created_at, updated_at), without their notes. total, skip, limit.
Errors 400 validation_error: unknown scope, sort or order; skip or limit not an integer. 400 no_organization.
POST /api/v1/contacts
Create a contact by hand, in the shared book or as a private contact of the user.
Access: member of the organization
API keys: refused to restricted keys (limited to a team, or an integration's), 403 forbidden
Request body
| Name | Description |
|---|---|
name |
Optional, 120 characters at most on one line. |
company |
Optional, 120 characters at most on one line. |
email |
Optional email address. |
private |
true = a private contact, only the user sees it (default false: shared by the organization). |
Response: contact: The contact (form of GET /api/v1/contacts/<id>).
Errors 400 validation_error (with field). 409 number_taken (+ contact): a number already belongs to a contact of that book.
DELETE /api/v1/contacts/<contact_id>
Delete a contact: a private one by its owner, a shared one with contacts.manage (or by its creator).
The conversations and the calls of its numbers are kept; a new call or message creates the contact again, without its name and notes.
Access: member of the organization
API keys: refused to restricted keys (limited to a team, or an integration's), 403 forbidden
Path parameters
| Name | Description |
|---|---|
contact_id |
The contact. |
Response: 204 No Content.
Errors 403 forbidden. 404 not_found.
GET /api/v1/contacts/<contact_id>
One contact, with its notes.
Access: member of the organization
API keys: refused to restricted keys (limited to a team, or an integration's), 403 forbidden
Path parameters
| Name | Description |
|---|---|
contact_id |
The contact. |
Response: contact: id, organization_id, owner_id, private, numbers, number, name, company, email, source (call, sms, manual, history), links {app: {kind, id, name, url, manual, found_at}} (the records of the connected applications), last_activity {at, kind, direction}, notes [{id, author_id, author_name, body, created_at}], notes_count, first_seen_at, created_at, updated_at, created_by.
Errors 404 not_found: unknown contact, of another organization, or private to someone else.
PUT /api/v1/contacts/<contact_id>
Change a contact: its name, company, email, numbers, or whether it is private.
Renaming a shared contact renames every conversation of its numbers in the organization (and a renamed conversation renames the contact). Making a contact private is for its creator or contacts.manage; a private contact made shared merges nothing: its numbers must be free in the shared book.
Access: member of the organization
API keys: refused to restricted keys (limited to a team, or an integration's), 403 forbidden
Path parameters
| Name | Description |
|---|---|
contact_id |
The contact. |
Request body
| Name | Description |
|---|---|
name |
As in POST; only the keys present change (null clears name, company and email). |
company |
As in POST; only the keys present change (null clears name, company and email). |
email |
As in POST; only the keys present change (null clears name, company and email). |
numbers |
As in POST; only the keys present change (null clears name, company and email). |
private |
Move the contact to the user's private book (true) or to the shared book (false). |
Response: contact: The contact, updated.
Errors 400 validation_error. 403 forbidden: making someone else's shared contact private without contacts.manage. 404 not_found. 409 number_taken.
GET /api/v1/contacts/<contact_id>/apps
What the connected applications (Zoho CRM, QuickBooks, LeadConnector) know about the contact, read now.
One row per connected application that finds records by number; the answers are cached 5 minutes per number.
Access: member of the organization
API keys: refused to restricted keys (limited to a team, or an integration's), 403 forbidden
Path parameters
| Name | Description |
|---|---|
contact_id |
The contact. |
Response: apps: [{app, name (of the application), connected, found, kind (contact, lead, customer), id, record_name, url (the record at the provider), extra (QuickBooks: balance, open_invoices, customer_number, address, company; Zoho and LeadConnector: email, company), records (QuickBooks: every customer that has the number, 5 at most, those with it as primary phone first, each {kind, id, record_name, url, extra}; the first one is the record above; [] for the other applications), error (reconnect_required, provider_error... or null), link (the record attached to the contact, or null; QuickBooks: with balance and balance_at, the balance written every 10 minutes by the upkeep of the connection)}].
Errors 404 not_found.
POST /api/v1/contacts/<contact_id>/apps/quickbooks/customer
Create the QuickBooks customer of a shared contact and link the contact to it (permission contacts.manage: profiles Admin and Manager). Before creating, the customers it would duplicate are looked for (same phone number, same display name): unless force is true they are returned (409) so that the user picks one instead. Not available to API keys limited to teams. Requires a connected QuickBooks (capability quickbooks).
Access: member of the organization
API keys: refused to restricted keys (limited to a team, or an integration's), 403 forbidden
Path parameters
| Name | Description |
|---|---|
contact_id |
The contact (shared). |
Response: 201 record {kind, id, record_name, url, extra} of the new customer, contact (linked to it).
Body display_name: Name of the customer in QuickBooks (required, 100 characters at most; QuickBooks refuses a name already used by a customer, a vendor or an employee, case and accents ignored). given_name, family_name, company, email: Optional. phone: The phone of the customer (default: the main number of the contact), as PrimaryPhone. address: Optional billing address {line1, city, province, postal_code, country}. force: true = create even when customers with the same number or name exist.
Errors 400 validation_error (field). 403 forbidden. 404 not_found (no such contact, a private contact, or no connected QuickBooks). 409 possible_duplicates {records: [same shape]} (unless force). 409 duplicate_name: QuickBooks refuses the name. 409 reconnect_required. 502 provider_error.
POST /api/v1/contacts/<contact_id>/apps/refresh
Ask the connected applications again for the records of the contact (its links), now.
Access: member of the organization
API keys: refused to restricted keys (limited to a team, or an integration's), 403 forbidden
Path parameters
| Name | Description |
|---|---|
contact_id |
The contact. |
Response: contact: The contact, with its links updated (a contact without a name takes the one of the first record found).
Errors 404 not_found.
POST /api/v1/contacts/<contact_id>/apps/zoho/record
Create the Zoho CRM contact or lead of a shared contact and link the contact to it (permission contacts.manage: profiles Admin and Manager). Before creating, the contacts and leads it would duplicate are looked for (same phone number, same email): unless force is true they are returned (409) so that the user picks one instead. Not available to API keys limited to teams. Requires a connected Zoho CRM (capability zoho).
Access: member of the organization
API keys: refused to restricted keys (limited to a team, or an integration's), 403 forbidden
Path parameters
| Name | Description |
|---|---|
contact_id |
The contact (shared). |
Response: 201 record {kind, id, record_name, url, extra} of the new record, contact (linked to it).
Body module: contact (default) or lead. last_name: Required (80 characters at most). first_name: Optional. company: Required for a lead (its Company); not used for a contact. email, title: Optional. phone: The phone of the record (default: the main number of the contact). address: Optional {line1, city, province, postal_code, country} (mailing address of a contact, address of a lead). force: true = create even when records with the same number or email exist.
Errors 400 validation_error (field). 403 forbidden. 404 not_found (no such contact, a private contact, or no connected Zoho CRM). 409 possible_duplicates {records}. 409 duplicate: Zoho refuses a duplicate of a unique field. 409 reconnect_required. 502 provider_error.
GET /api/v1/contacts/<contact_id>/notes
The notes of a contact, oldest first (the same as notes of GET /contacts/<id>; for the mobile app).
Access: member of the organization
API keys: refused to restricted keys (limited to a team, or an integration's), 403 forbidden
Path parameters
| Name | Description |
|---|---|
contact_id |
The contact. |
Response: notes: [{id, author_id, author_name, body, created_at, updated_at (null until changed)}].
Errors 404 not_found.
POST /api/v1/contacts/<contact_id>/notes
Add a note to a contact (never sent to the contact).
Access: member of the organization
API keys: refused to restricted keys (limited to a team, or an integration's), 403 forbidden
Path parameters
| Name | Description |
|---|---|
contact_id |
The contact. |
Response: note: {id, author_id, author_name, body, created_at}. contact: The contact, updated.
Errors 400 validation_error (field body). 404 not_found. 409 too_many_notes: 200 notes already.
DELETE /api/v1/contacts/<contact_id>/notes/<note_id>
Delete a note of a contact: its author, or contacts.manage.
Access: member of the organization
API keys: refused to restricted keys (limited to a team, or an integration's), 403 forbidden
Path parameters
| Name | Description |
|---|---|
contact_id |
The contact. note_id: The note. |
Response: 204 No Content.
Errors 403 forbidden. 404 not_found: unknown contact or note.
PUT /api/v1/contacts/<contact_id>/notes/<note_id>
Change the text of a note of a contact: its author only (as the notes of a conversation; 2026-10-30).
Access: member of the organization
API keys: refused to restricted keys (limited to a team, or an integration's), 403 forbidden
Path parameters
| Name | Description |
|---|---|
contact_id |
The contact. note_id: The note. |
Response: note: {id, author_id, author_name, body, created_at, updated_at}. contact: The contact, updated.
Errors 400 validation_error (field body). 403 forbidden: a note of someone else. 404 not_found: unknown contact or note.
GET /api/v1/contacts/<contact_id>/reach
How to write to or call a contact from the address book: the numbers of the organization the user may send from and present on a call, and the one of the last interaction with the contact, chosen by default.
Access: member of the organization
API keys: refused to restricted keys (limited to a team, or an integration's), 403 forbidden
Path parameters
| Name | Description |
|---|---|
contact_id |
The contact. |
Response: last: The last interaction of the user with the contact, {kind (sms or call), at, our_number (E.164), their_number (E.164), conversation_id or call_id}, or null. Only the conversations of the teams the user reaches and the calls they see count. sms: Null without messages.send or without a number to send from; else {numbers [{id, number, label, team_id, team_name}] (the numbers of the teams the user reaches that may send now), default_number_id (the number of the last interaction, else of the last conversation with the contact, else the first one), default_to (the number of the contact to write to: the one of the last interaction, else the main one)}. Send with POST /sms/send {to, from_number}. voice: Null without voice.use or without an enabled SIP endpoint of the user in the organization (the voice service and sip; the webphone capability is not needed: the mobile app calls as well); else {numbers [{id, number, label}] (the numbers the user may present: those of their teams, the ones routed to their endpoints and the one their endpoint presents; every voice number of the organization with voice.calls.all), default_number_id (the number of the last interaction when it is one of them, else null: the endpoint's own), default_to, organization_default_number_id (the default outbound number of the organization, GET /voice/default-number, when it is one of them, else null)}. The web phone and the mobile app present it with the SIP header X-Telma-Number (its id); the voice server checks it again against the list kept on the account of the tab or the device.
Errors 404 not_found: unknown contact, of another organization, or private to someone else.
GET /api/v1/contacts/books
The named address books of the organization (besides the automatic book and the private contacts).
A named book is a list the organization makes (« Suppliers », « Emergencies »…), filled by hand or by copying or moving contacts of the automatic book; a desk phone may show one as its directory.
Access: member of the organization
API keys: refused to restricted keys (limited to a team, or an integration's), 403 forbidden
Response: books: [{id, name, entries_count, created_at, updated_at}], by name. can_manage: the user may create, rename, delete and fill the books (contacts.manage).
POST /api/v1/contacts/books
Create a named address book (contacts.manage).
Access: member of the organization
API keys: refused to restricted keys (limited to a team, or an integration's), 403 forbidden
Response: book: The book, 201.
Errors 400 validation_error (field name: missing, too long or taken). 409 too_many_books: 50 books at most.
DELETE /api/v1/contacts/books/<book_id>
Delete a named address book and its entries (contacts.manage); the contacts of the automatic book are not touched. The desk phones that showed it go back to the organization's directory.
Access: member of the organization
API keys: refused to restricted keys (limited to a team, or an integration's), 403 forbidden
Response: 204 No Content.
Errors 404 not_found.
PUT /api/v1/contacts/books/<book_id>
Rename a named address book (contacts.manage).
Access: member of the organization
API keys: refused to restricted keys (limited to a team, or an integration's), 403 forbidden
Response: book: The book.
Errors 400 validation_error. 404 not_found.
GET /api/v1/contacts/books/<book_id>/entries
The entries of a named address book, by name.
Access: member of the organization
API keys: refused to restricted keys (limited to a team, or an integration's), 403 forbidden
Query parameters
| Name | Description |
|---|---|
q |
A piece of a name, a company, an email, or at least 3 digits of a number. |
skip |
Pagination (limit 1 to 100, default 50). |
limit |
Pagination (limit 1 to 100, default 50). |
Response: book: The book. entries: [{id, book_id, numbers, number (the main one), name, company, email, source_contact_id (the contact of the automatic book it was copied from, or null), created_at, updated_at}]. total, skip, limit.
Errors 404 not_found.
POST /api/v1/contacts/books/<book_id>/entries
Add an entry to a named address book by hand (contacts.manage).
Access: member of the organization
API keys: refused to restricted keys (limited to a team, or an integration's), 403 forbidden
Request body
| Name | Description |
|---|---|
name |
Optional, 120 characters at most. email: Optional. |
company |
Optional, 120 characters at most. email: Optional. |
Response: entry: The entry, 201.
Errors 400 validation_error. 404 not_found. 409 number_taken (+ entry): a number is already in this book. 409 book_full: 5000 entries at most.
DELETE /api/v1/contacts/books/<book_id>/entries/<entry_id>
Remove an entry from a named address book (contacts.manage).
Access: member of the organization
API keys: refused to restricted keys (limited to a team, or an integration's), 403 forbidden
Response: 204 No Content.
Errors 404 not_found.
PUT /api/v1/contacts/books/<book_id>/entries/<entry_id>
Change an entry of a named address book (contacts.manage): only the keys present change (null clears name, company and email).
Access: member of the organization
API keys: refused to restricted keys (limited to a team, or an integration's), 403 forbidden
Response: entry: The entry.
Errors 400 validation_error. 404 not_found. 409 number_taken.
POST /api/v1/contacts/books/<book_id>/import
Copy or move contacts of the automatic book into a named address book (contacts.manage).
The entry is a copy (name, company, email, numbers): it keeps its name when the contact changes. A number already in the book is left as it is (counted in skipped). Moving also deletes the contact from the automatic book: its calls and conversations stay, but they lose its name, and the next call or text from its number puts it back in the automatic book, unnamed.
Access: member of the organization
API keys: refused to restricted keys (limited to a team, or an integration's), 403 forbidden
Request body
| Name | Description |
|---|---|
move |
true = move (default false: copy). |
Response: added: Entries made. skipped: Contacts whose numbers were all already in the book. moved: Contacts removed from the automatic book. book: The book.
Errors 400 validation_error (field contact_ids). 404 not_found. 409 book_full.
POST /api/v1/contacts/by-number
The contact of a phone number, created in the shared book when there is none yet, and optionally named.
Behind the menu of a number in the lists (calls, voicemail, conversations, dashboard): « Name », « Contact card », « Add a note », « Write », « Call » work on any number shown, known or not. The user's private contact wins over the shared one, as in /contacts/resolve. Naming a shared contact renames every conversation of its numbers in the organization (as PUT /contacts/<id>).
Access: member of the organization
API keys: refused to restricted keys (limited to a team, or an integration's), 403 forbidden
Request body
| Name | Description |
|---|---|
name |
Optional; when the key is present, the name of the contact (one line, 120 characters at most; null or an empty string clears it). |
Response: contact: The contact (form of GET /api/v1/contacts/<id>). created: true when the contact was just created (201), false otherwise (200).
Errors 400 validation_error (field number or name). 400 no_organization.
GET /api/v1/contacts/reach
How to call or write to a number, contact or not (the « Appeler » buttons of the dashboard, 2026-10-29): the same answer as GET /contacts/<id>/reach, for the contact of the number in the current organization when there is one (all its numbers count), else for that number alone. Nothing is created.
Access: member of the organization
API keys: refused to restricted keys (limited to a team, or an integration's), 403 forbidden
Query parameters
| Name | Description |
|---|---|
number |
The number (any notation; 400 validation_error field number when it is not a phone number). |
Response: last, sms, voice: as GET /contacts/<id>/reach. contact_id: the contact of the number, or null.
Errors 400 validation_error (field number), 400 no_organization.
GET /api/v1/contacts/resolve
The contacts behind phone numbers, in one call (a list of calls or of conversations to name).
Access: member of the organization
API keys: refused to restricted keys (limited to a team, or an integration's), 403 forbidden
Response: contacts: {E.164: contact or null}; the user's private contact wins over the shared one. Contacts in their brief form (without notes).
Errors 400 validation_error: no number, or more than 100.
Phone numbers
Phone number registry and team assignment.
GET /api/v1/phone-numbers
List the phone numbers of the current organization (E09).
With an API key, only the numbers assigned to the teams the key reaches are listed (a number without a team is left out). A restricted key (limited to a team, or an integration's key) gets the numbers of its teams, whatever organization its owner currently works in.
Access: authenticated (JWT or API key)
Query parameters
| Name | Description |
|---|---|
status |
active, paused, released (the trash of the organization, E11) or pending (order not yet delivered); absent = active, paused and pending. |
q |
Text searched in the label and in the digits of the number. |
skip |
Pagination offset (default 0). |
limit |
Page size (default 50, at most 100). |
Response: phone_numbers: The page of numbers (registry fields, plus usage, use_label_as_caller_id, state {status, enabled, sleep, released_at, expires_at}, features {voicemail, recording, sms {available, enabled}}, routing, type, area_code, city, region, order, team_name). total: Number of numbers matching the filters. skip: Offset applied. limit: Page size applied. counts: Numbers by status after the text filter: {active, paused, released, pending}.
GET /api/v1/phone-numbers/<phone_id>
Get phone number details.
A number of the caller's organization only; with an API key, only a number assigned to a team the key reaches (404 not_found otherwise, the same answer as an unknown number); for a restricted key, whatever organization its owner currently works in.
Access: authenticated (JWT or API key)
Path parameters
| Name | Description |
|---|---|
phone_id |
Phone number ID. |
Response: phone_number: The number.
PATCH /api/v1/phone-numbers/<phone_id>
Change the attributes of a number of the organization (the fields given change).
Not available to API keys. Errors are {error, message}: 400 validation_error with field (label longer than 24 characters, usage, sms_enabled on a number without SMS or without a team to put it in), 403, 404, 409 conflict (number in the trash).
Access: permission numbers.manage in the organization (profiles)
API keys: refused, 403 forbidden (API key not allowed on this route)
Path parameters
| Name | Description |
|---|---|
phone_id |
Phone number ID. |
Request body
| Name | Description |
|---|---|
label |
Name of the number, at most 24 characters, no control character or line break (empty = the number itself). |
usage |
business or personal. |
sms_enabled |
true puts the number in the default team of the organization (when it has none) and switches SMS on; false takes it out of its team. |
Response: phone_number: The number after the change (same object as GET /phone-numbers/<id>).
PUT /api/v1/phone-numbers/<phone_id>
Switch a phone number on or off (is_active), for the platform only.
An inactive number is not counted in the monthly statement, so only the platform permissions (platform_admin, domain_admin, acting for the organization with the X-Admin-Organization header) may write is_active; any other member, even with numbers.manage, is refused (403 forbidden) and uses PATCH /phone-numbers/<id> (sms_enabled, label, usage) or releases the number instead. The number must belong to the current organization (403 forbidden otherwise). A request without is_active changes nothing.
Access: permission numbers.manage in the organization (profiles)
Path parameters
| Name | Description |
|---|---|
phone_id |
Phone number ID. |
Request body
| Name | Description |
|---|---|
is_active |
Whether number is active, a boolean (400 validation_error, field is_active, otherwise). |
Response: phone_number: The updated number. message: Confirmation.
POST /api/v1/phone-numbers/<phone_id>/assign
Assign phone number to a team.
Access: permission numbers.manage in the organization (profiles)
Path parameters
| Name | Description |
|---|---|
phone_id |
Phone number ID. |
Request body
| Name | Description |
|---|---|
team_id |
Team ID to assign (null to unassign); never a personal inbox (400 validation_error). The SMS routing of the number becomes team (see PUT /phone-numbers/<id>/sms-routing). |
Response: phone_number: The number after the change. message: Confirmation (assigned, or unassigned when team_id is null).
GET /api/v1/phone-numbers/<phone_id>/prices
Prices of a number of the organization: its installation and what it costs each month.
The unit prices of the organization (those of its domain, or its own): the installation (the number's own price winning; a toll-free number is ordered by the team: 20 $ by default) is debited when the number is bought; monthly is what the number costs in the monthly statement beyond the numbers the plan includes, never debited when the number is bought. Not available to API keys.
Access: authenticated (JWT or API key)
API keys: refused, 403 forbidden (API key not allowed on this route)
Path parameters
| Name | Description |
|---|---|
phone_id |
Phone number ID. |
Response: prices: {currency, setup, monthly}.
GET /api/v1/phone-numbers/<phone_id>/provider
Get SMS provider info for a phone number (read-only: the domain administrator manages the provider).
Access: permission numbers.manage in the organization (profiles)
Path parameters
| Name | Description |
|---|---|
phone_id |
Phone number ID. |
Response: provider: The provider name (the configuration is managed by the domain administrator). message: A reminder that the domain administrator manages it.
POST /api/v1/phone-numbers/<phone_id>/release
Release a number: it goes to the trash of the organization (E11).
The number leaves the organization (no team, no billing, no calls) but stays RESERVED for it until state.expires_at (the domain's trash_days, 10 days by default; 0 = given back to the domain pool at once), and can be restored until then. Its routing is switched off, not deleted. Not available to API keys. Errors are {error, message}: 403, 404, 409 conflict (already in the trash, access number, order not delivered), 409 e911_number_of_phone (the 9-1-1 number of a phone, with phone {id, label}: it is given back from the phone, DELETE /voice/phones/<id>/e911-number).
Access: permission numbers.manage in the organization (profiles)
API keys: refused, 403 forbidden (API key not allowed on this route)
Path parameters
| Name | Description |
|---|---|
phone_id |
Phone number ID. |
Response: phone_number: The number, with state.status released, state.released_at and state.expires_at.
POST /api/v1/phone-numbers/<phone_id>/restore
Take a number back out of the trash (E11).
The number returns to the organization with its label, usage, voice settings and routing, and to its team (the default team when that team is gone). Nothing is charged here. Not available to API keys. Errors are {error, message}: 402 insufficient_balance (with balance and required: the balance is zero or below), 403, 404 (not in the trash of this organization), 409 expired (the reservation has ended) or conflict.
Access: permission numbers.manage in the organization (profiles)
API keys: refused, 403 forbidden (API key not allowed on this route)
Path parameters
| Name | Description |
|---|---|
phone_id |
Phone number ID. |
Response: phone_number: The restored number.
PUT /api/v1/phone-numbers/<phone_id>/sms-routing
Choose where the inbound SMS of a number go: a team, the user of an endpoint, or a questionnaire.
team: the conversations of the senders with a team of the organization (the chosen one, else the default team; a number without either stays without team and its SMS are not recorded). endpoint: the personal inbox of the user of an endpoint of the organization (a hidden team named after the user, never listed with the teams, read by that user, in the web app and the mobile app, and on the web by the members who hold teams.all); when the endpoint changes hands, the SMS follow its new user. Sending from the number goes through the same team or inbox (POST /sms/send). An endpoint later deleted, disabled or left without a user: its SMS stay in the last inbox. Conversations already open stay where they are. questionnaire: the SMS questionnaire questionnaire_id of the organization answers by itself (see /sms/questionnaires); the team of the number (or the team_id given, null for none), if any, supervises the conversations. The opt-out keywords (STOP...) are handled before any action. The change is journalled. Same permission as POST /phone-numbers/<id>/assign; a number of the current organization only (404 not_found, 403 forbidden); not available to API keys.
Access: permission numbers.manage in the organization (profiles)
API keys: refused, 403 forbidden (API key not allowed on this route)
Path parameters
| Name | Description |
|---|---|
phone_id |
Phone number ID. |
Request body
| Name | Description |
|---|---|
action |
team, endpoint or questionnaire (400 validation_error, field action, otherwise). |
team_id |
For team: a team of the organization, null or absent for the default team (400 validation_error, field team_id, for an unknown team). For questionnaire: the supervising team (absent: the team of the number stays; null: none). |
endpoint_id |
For endpoint: an enabled endpoint of the organization whose user is a member of it (400 validation_error, field endpoint_id, otherwise). |
questionnaire_id |
For questionnaire: a questionnaire of the organization (400 validation_error, field questionnaire_id, otherwise). |
daily_limit |
For questionnaire: texts the application may send from this number per day, 1 to 10000 (default 500). |
Response: phone_number: The number after the change, with sms_routing ({action} for team, {action, endpoint_id} for endpoint, {action, questionnaire_id, questionnaire_name, daily_limit} for questionnaire), team_id and team_name (the name of the user for a personal inbox). 400 validation_error with field sms_enabled when the number does not carry SMS or they are switched off (PATCH /phone-numbers/<id>).
GET /api/v1/phone-numbers/unassigned
List unassigned phone numbers.
Not available to restricted API keys (a key limited to a team, or an integration's key): 403 with error forbidden.
Access: authenticated (JWT or API key)
API keys: refused to restricted keys (limited to a team, or an integration's), 403 forbidden
Response: phone_numbers: The numbers of the organization that no team uses. total: Number of numbers.
Number purchase
Search of available numbers, prices and purchase (permission numbers.buy).
POST /api/v1/phone-numbers/acquire
Buy a number: its installation fee, if any, is debited from the credits.
Either a number from the search results, or criteria (the first match is bought). The number goes to the default team of the organization with SMS on. The installation appears in the history; the month of the number is never debited here: the number is in the monthly statement of the organization (included in its plan, or at its monthly price beyond the numbers included). A number ordered from a provider that is not delivered at once comes back with 202 and pending true: it is delivered later (or refunded and removed if the provider fails). Not available to API keys. Errors are {error, message}: 400 validation_error / country_unsupported, 402 insufficient_balance (with balance and required, nothing is charged), 409 number_unavailable, 502/503 provider errors.
Access: permission numbers.buy in the organization (profiles)
API keys: refused, 403 forbidden (API key not allowed on this route)
Request body
| Name | Description |
|---|---|
number |
Number from the search results (E.164); or |
country |
Country (required without number). |
type |
local or tollfree. |
area_code |
Area code. |
city |
City. |
state |
Province or state. |
Response: phone_number: The number bought (same object as GET /phone-numbers/<id>). balance: Credit balance after the debit. pending: True while the order awaits the provider's delivery.
GET /api/v1/phone-numbers/available
Search the numbers that can be bought, with their prices for the organization.
Sources: the domain pool first, then (when the domain uses a number provider) its API if the pool has nothing that matches. Not available to API keys. Errors are {error, message}: 400 validation_error with field, 502/503 provider_error / provider_unavailable.
Access: permission numbers.buy in the organization (profiles)
API keys: refused, 403 forbidden (API key not allowed on this route)
Query parameters
| Name | Description |
|---|---|
country |
ISO 3166-1 alpha-2 country, required (CA, US...). |
type |
local or tollfree. |
state |
Province or state. |
city |
City (part of the name). |
area_code |
Area code (3 digits). |
skip |
Offset (default 0). |
limit |
Page size (default 25, at most 25). |
Response: results: List of {number, type, country, state, city, area_code, setup_fee (debited at the purchase), price_per_month (what the number costs in the monthly statement beyond the numbers the plan includes; never debited at the purchase), currency, capabilities}. count: Number of numbers matching (all pages).
GET /api/v1/phone-numbers/available/countries
Countries and number types the domain sells (pool and number provider merged).
Not available to API keys. Errors are {error, message}: 502/503 when the number provider fails and the pool has nothing.
Access: permission numbers.buy in the organization (profiles)
API keys: refused, 403 forbidden (API key not allowed on this route)
Response: countries: List of {code, name, types} where types are local and/or tollfree.
GET /api/v1/phone-numbers/available/regions
Provinces and cities in which numbers can be bought (free numbers of the pool and the number provider), to fill the state and city of GET /available.
A number provider that sells by region (the platform's today) answers only a search that names a province, a city or an area code. Not available to API keys. Errors are {error, message}: 502/503 when the number provider fails and the pool has nothing.
Access: permission numbers.buy in the organization (profiles)
API keys: refused, 403 forbidden (API key not allowed on this route)
Response: regions: [{code (province or state), cities: [name, ...]}], sorted.
Number porting
Bring numbers from another carrier: check, request, follow-up, correction after a refusal, cancellation (permission numbers.buy, when the domain allows it).
POST /api/v1/phone-numbers/port/check
Check whether numbers can be ported in, before a request.
Not available to API keys. Errors are {error, message}: 403 port_not_enabled, 502/503 when the provider fails.
Access: permission numbers.buy in the organization (profiles)
Request body
| Name | Description |
|---|---|
numbers |
1 to 50 Canadian numbers (required). |
Response: results: [{number, portable, reason (already_here: the number is already on the platform, in_progress: another request has it, not_portable), carrier (current carrier), rate_center}].
GET /api/v1/phone-numbers/port/config
Whether the organization may port numbers in, the earliest date it may ask and what a number costs.
Not available to API keys.
Access: permission numbers.buy in the organization (profiles)
Response: enabled: The domain lets its organizations port their numbers in. earliest_due_date: The first date a request may ask (YYYY-MM-DD; the carriers need 5 business days). provinces: Provinces of the service address. max_numbers: Numbers in one request at most. fees: {port_fee, port_price, monthly, free_until, currency}: what one number costs (null when not enabled); port_fee is debited when its port completes: nothing for a port asked before free_until (ISO 8601; the first days of the organization, 30 by default, from its billing anniversary date or else its creation), port_price (the price of a ported number of the organization's grid) afterwards (free_until null); monthly is what the number costs in the monthly statement beyond the numbers the plan includes. balance: Credit balance of the organization.
GET /api/v1/port-requests
The port requests of the organization, newest first.
Not available to API keys.
Access: permission numbers.buy in the organization (profiles)
Query parameters
| Name | Description |
|---|---|
state |
open (every request not completed nor cancelled), closed (completed or cancelled: the history) or a state (submitted, carrier_pending, confirmed, rejected, cancel_requested, cancelled, completed). |
skip |
Offset (default 0). |
limit |
Page size (default 50, at most 100). |
Response: port_requests: List of requests (as GET /port-requests/<id>, without events). total: Requests matching. skip, limit: The page.
POST /api/v1/port-requests
Ask to port numbers in: they move to the organization when the current carrier lets them go.
The request goes to the carriers at once. Nothing is debited now: the fee of the port of each number is debited when it arrives; the balance must cover it when asking. Follow it with GET /port-requests/<id> (the event port_update tells each change in real time; an email is sent when it is confirmed, refused, completed or cancelled). Not available to API keys. Errors are {error, message}: 400 validation_error with field, 402 insufficient_balance (with balance and required), 403 port_not_enabled, 409 number_not_portable (with numbers: the results of the check that failed), 422 port_refused (the provider refused the request), 502/503.
Access: permission numbers.buy in the organization (profiles)
Request body
| Name | Description |
|---|---|
numbers |
1 to 50 Canadian numbers, held by the same holder (required). |
full_name |
Name (person or company) on the account at the current carrier (required). |
street_number |
Civic number of the service address (required). |
street_name |
Street of the service address (required). |
floor |
Floor. |
suite |
Suite. |
city |
City (required). |
province |
Province code: AB, BC, MB, NB, NL, NS, NT, NU, ON, PE, QC, SK or YT (required). |
postal_code |
Canadian postal code (required). |
account_number |
Account number at the current carrier (required). |
current_carrier |
Name of the current carrier. |
due_date |
Wanted date, YYYY-MM-DD, a weekday from earliest_due_date of GET /phone-numbers/port/config (required). |
comments |
Note for the carriers (up to 500 characters). |
Response: port_request: The request (as GET /port-requests/<id>).
GET /api/v1/port-requests/<request_id>
A port request and its history.
Not available to API keys.
Access: permission numbers.buy in the organization (profiles)
Path parameters
| Name | Description |
|---|---|
request_id |
Port request ID. |
Response: port_request: {id, state (submitted, carrier_pending: at the current carrier, confirmed: date set, rejected: to correct and send again, cancel_requested, cancelled, completed), scope (organization or pool), organization_id, organization_name, domain_id, numbers [{number, state (pending, carrier_pending, confirmed, rejected, cancelled, ported), carrier, rate_center, due_date (confirmed date), rejection [{code, message, remarks, hint}], phone_id (once ported), ported_at}], holder {full_name, street_number, street_name, floor, suite, city, province, postal_code, account_number, current_carrier}, due_date, confirmed_date, comments, fees {port_fee, monthly, currency}, rejection_hint (holder_mismatch, not_portable, conflicting_order, due_date or other), attention {at, number, message} (the request changed at the carrier), cancel_request {at, reason, refused_at, refused_reason}, attempts, submit_uncertain, created_at, updated_at, completed_at, closed_at (completed or cancelled), events [{kind (request or provider), event, number, due_date, at, rejection, remarks, reason}]}.
POST /api/v1/port-requests/<request_id>/cancel
Cancel a port request that is not completed.
When the provider cannot cancel by itself, the request becomes cancel_requested: the platform asks the provider and closes it (or tells why it could not: the port goes on). Not available to API keys. Errors are {error, message}: 409 conflict (completed, cancelled or already asked).
Access: permission numbers.buy in the organization (profiles)
Path parameters
| Name | Description |
|---|---|
request_id |
Port request ID. |
Request body
| Name | Description |
|---|---|
reason |
Why (up to 300 characters). |
Response: port_request: The request (as GET /port-requests/<id>).
POST /api/v1/port-requests/<request_id>/resubmit
Send a refused request again, corrected. The fields given change; the others are kept.
Not available to API keys. Errors are {error, message}: 400 validation_error, 409 conflict (the request is not refused), 422 port_refused, 502/503.
Access: permission numbers.buy in the organization (profiles)
Path parameters
| Name | Description |
|---|---|
request_id |
Port request ID. |
Request body
| Name | Description |
|---|---|
full_name |
As POST /port-requests. |
street_number |
As POST /port-requests. |
street_name |
As POST /port-requests. |
floor |
As POST /port-requests. |
suite |
As POST /port-requests. |
city |
As POST /port-requests. |
province |
As POST /port-requests. |
postal_code |
As POST /port-requests. |
account_number |
As POST /port-requests. |
current_carrier |
As POST /port-requests. |
due_date |
As POST /port-requests. |
comments |
As POST /port-requests. |
Response: port_request: The request (as GET /port-requests/<id>).
Number porting (domain)
The port requests of the domain's organizations, and porting numbers into the domain's pool (domain admin).
POST /api/v1/domains/<domain_id>/organizations/<organization_id>/announced-numbers
List, in the numbers of an organization, a number it still holds at another carrier. Journalled.
The number is shown « not transferred yet »: the extensions may present it on their outbound calls and its routing can be prepared; it receives no call and no text here, sends no text, and nothing is billed for it. A port request of the organization that names it takes it over; a number that came another way is put in service by POST .../announced-numbers/<id>/arrived. Presenting a number is a matter of trust: make sure the organization owns it.
Access: platform permission platform_admin or domain_admin (domain_admin: only its domains, domain_id)
Path parameters
| Name | Description |
|---|---|
domain_id |
Domain ID. |
organization_id |
Organization ID (of the domain). |
Request body
| Name | Description |
|---|---|
number |
A North American number, local or toll-free (required). |
note |
Up to 200 characters, kept in the journal (where the number is, when it should come). |
Response: phone_number: The number (as GET /phone-numbers), with porting {pending: true, announced: true}.
Errors 400 validation_error (field: number, note). 404 not_found. 409 number_taken (already on the platform), in_progress (an open port request has it).
DELETE /api/v1/domains/<domain_id>/organizations/<organization_id>/announced-numbers/<phone_id>
An announced number will not come: remove it from the numbers of the organization, with its routing. Journalled.
An extension that presented it goes back to the default outbound number of the organization, then to its own number.
Access: platform permission platform_admin or domain_admin (domain_admin: only its domains, domain_id)
Path parameters
| Name | Description |
|---|---|
domain_id |
Domain ID. |
organization_id |
Organization ID. |
phone_id |
The announced number. |
Response: withdrawn: true.
Errors 404 not_found (not an announced number of this organization, or a port request follows it now).
POST /api/v1/domains/<domain_id>/organizations/<organization_id>/announced-numbers/<phone_id>/arrived
An announced number is now carried by the platform (it came outside a port request): put in service. Journalled.
From then on it is a number like the others: counted by the statement, texts on when it sits in a team.
Access: platform permission platform_admin or domain_admin (domain_admin: only its domains, domain_id)
Path parameters
| Name | Description |
|---|---|
domain_id |
Domain ID. |
organization_id |
Organization ID. |
phone_id |
The announced number. |
Response: phone_number: The number (as GET /phone-numbers).
Errors 404 not_found (not an announced number of this organization, or a port request follows it now).
GET /api/v1/domains/<domain_id>/port-config
Whether the domain can port numbers into its pool, from when, at what cost.
Access: platform permission platform_admin or domain_admin (domain_admin: only its domains, domain_id)
Path parameters
| Name | Description |
|---|---|
domain_id |
Domain ID. |
Response: enabled: A number provider of the domain ports numbers in. organizations_enabled: The organizations may port their own numbers (port_in_enabled of PUT /domains/<id>/did-provider). earliest_due_date, provinces, max_numbers: As GET /phone-numbers/port/config. fees: {port_fee, monthly, currency}: the provider's cost of one number ported into the pool.
GET /api/v1/domains/<domain_id>/port-requests
Every port request of the domain: its organizations' and its own (into the pool), newest first.
Access: platform permission platform_admin or domain_admin (domain_admin: only its domains, domain_id)
Path parameters
| Name | Description |
|---|---|
domain_id |
Domain ID. |
Query parameters
| Name | Description |
|---|---|
state |
open, closed or a state (as GET /port-requests). |
scope |
organization or pool. |
organization_id |
Only this organization. |
skip |
Offset (default 0). |
limit |
Page size (default 50, at most 100). |
Response: port_requests: As GET /port-requests. total, skip, limit: The page.
POST /api/v1/domains/<domain_id>/port-requests
Port numbers into the pool of the domain (they arrive free, to sell or assign). Journalled.
Access: platform permission platform_admin or domain_admin (domain_admin: only its domains, domain_id)
Path parameters
| Name | Description |
|---|---|
domain_id |
Domain ID. |
Request body
| Name | Description |
|---|---|
numbers |
As POST /port-requests. |
full_name |
As POST /port-requests. |
street_number |
As POST /port-requests. |
street_name |
As POST /port-requests. |
floor |
As POST /port-requests. |
suite |
As POST /port-requests. |
city |
As POST /port-requests. |
province |
As POST /port-requests. |
postal_code |
As POST /port-requests. |
account_number |
As POST /port-requests. |
current_carrier |
As POST /port-requests. |
due_date |
As POST /port-requests. |
comments |
As POST /port-requests. |
Response: port_request: The request (as GET /port-requests/<id>).
Errors 400 validation_error. 404 port_unavailable (no number provider of the domain ports numbers in). 409 number_not_portable. 422 port_refused. 502/503.
GET /api/v1/domains/<domain_id>/port-requests/<request_id>
A port request of the domain and its history (as GET /port-requests/<id>).
Access: platform permission platform_admin or domain_admin (domain_admin: only its domains, domain_id)
Path parameters
| Name | Description |
|---|---|
domain_id |
Domain ID. |
request_id |
Port request ID. |
Response: port_request: As GET /port-requests/<id>.
POST /api/v1/domains/<domain_id>/port-requests/<request_id>/cancel
Cancel a port request of the domain (as POST /port-requests/<id>/cancel).
Access: platform permission platform_admin or domain_admin (domain_admin: only its domains, domain_id)
Path parameters
| Name | Description |
|---|---|
domain_id |
Domain ID. |
request_id |
Port request ID. |
Request body
| Name | Description |
|---|---|
reason |
Why (up to 300 characters). |
Response: port_request: As GET /port-requests/<id>.
POST /api/v1/domains/<domain_id>/port-requests/<request_id>/resubmit
Send a refused request of the domain again, corrected (as POST /port-requests/<id>/resubmit).
Access: platform permission platform_admin or domain_admin (domain_admin: only its domains, domain_id)
Path parameters
| Name | Description |
|---|---|
domain_id |
Domain ID. |
request_id |
Port request ID. |
Request body
| Name | Description |
|---|---|
full_name |
As POST /port-requests. |
street_number |
As POST /port-requests. |
street_name |
As POST /port-requests. |
floor |
As POST /port-requests. |
suite |
As POST /port-requests. |
city |
As POST /port-requests. |
province |
As POST /port-requests. |
postal_code |
As POST /port-requests. |
account_number |
As POST /port-requests. |
current_carrier |
As POST /port-requests. |
due_date |
As POST /port-requests. |
comments |
As POST /port-requests. |
Response: port_request: As GET /port-requests/<id>.
POST /api/v1/domains/<domain_id>/port-requests/check
Check whether numbers can be ported in (as POST /phone-numbers/port/check).
Access: platform permission platform_admin or domain_admin (domain_admin: only its domains, domain_id)
Path parameters
| Name | Description |
|---|---|
domain_id |
Domain ID. |
Request body
| Name | Description |
|---|---|
numbers |
1 to 50 Canadian numbers (required). |
Response: results: As POST /phone-numbers/port/check.
Number pool and provider
Numbers the domain sells (one by one, in batch, or bought from the number provider), where the numbers the organizations buy come from, trash (domain admin).
GET /api/v1/domains/<domain_id>/did-provider
Where the numbers the organizations buy come from, the number providers the domain may use, and the trash settings.
The number providers are configured by the platform (GET /api/v1/system/number-providers); a domain admin only sees each one's id and description, never its name.
Access: platform permission platform_admin or domain_admin (domain_admin: only its domains, domain_id)
Path parameters
| Name | Description |
|---|---|
domain_id |
Domain ID. |
Response: did_provider: {type (pool, provider or hybrid), account_id (the number provider chosen; null = the first one available), countries, pricing {mode (plan or cost_plus), setup_markup_percent}, import_unknown_stock, port_in_enabled, webhook_secret (masked), api_configured (a number provider is available)}. providers: The number providers the domain may use: [{id, description, capabilities {prices, release, tollfree_order, regions, sms_toggle, synchronous_orders, port_in, port_cancel}}] (name only for a super admin). numbers: {trash_days, release_to_provider, default_voice_trunk_id}.
PUT /api/v1/domains/<domain_id>/did-provider
Change where the numbers the organizations buy come from (the fields given change).
Switching back to pool changes nothing for the numbers already bought. Journalled.
Access: platform permission platform_admin or domain_admin (domain_admin: only its domains, domain_id)
Path parameters
| Name | Description |
|---|---|
domain_id |
Domain ID. |
Request body
| Name | Description |
|---|---|
type |
pool (default: the organizations buy the numbers of the pool), provider (they buy straight from the number provider), or hybrid (pool first, the provider when the pool has nothing that matches). provider and hybrid need a number provider available for the domain (400 validation_error otherwise). |
account_id |
The number provider to use (an id of providers in GET); null = the first one available. |
countries |
Countries offered. |
pricing |
{mode: plan (the unit prices of the domain) or cost_plus (provider cost plus markup), setup_markup_percent}. |
import_unknown_stock |
Add to the pool the numbers the provider holds for the domain and we do not know (default false). |
port_in_enabled |
The organizations may port their own numbers in, through the domain's number provider (default false; the domain admin can always port numbers into the pool). |
webhook_secret |
Secret in the delivery webhook URL /webhook/numbers/<webhook_secret>, for a provider that delivers its orders later: 16 to 128 characters among letters, digits, - and _. |
trash_days |
Days a released number stays reserved for its organization, 0 to 365 (default 10; 0 = given back at once). |
release_to_provider |
Give a number bought from the provider back to it when it returns to the pool, when the provider can take it back (default true). |
default_voice_trunk_id |
Voice trunk of the domain given to the numbers customers acquire (they then reach the voice service: voice_enabled); null leaves the voice to the domain admin, number by number. |
Response: did_provider: The settings after the change (as GET). providers: As GET. numbers: {trash_days, release_to_provider, default_voice_trunk_id}.
POST /api/v1/domains/<domain_id>/did-provider/sync
Follow the number provider now (the periodic task does the same).
Follows the pending orders (delivery or refund), retries the releases that failed and reconciles the stock the provider holds with the numbers we know (missing and unknown numbers are reported; unknown ones are added to the pool only when import_unknown_stock is on).
Access: platform permission platform_admin or domain_admin (domain_admin: only its domains, domain_id)
Path parameters
| Name | Description |
|---|---|
domain_id |
Domain ID. |
Request body
| Name | Description |
|---|---|
stock |
false skips the stock reconciliation (default true). |
import_unknown |
true or false overrides import_unknown_stock for this run. |
Response: result: {orders {followed, delivered, failed, pending}, stuck, releases {retried, released, failed}, stock ({provider_count, our_count, missing_at_provider, unknown_at_provider, imported} or null), error ({code, message} or null)}.
POST /api/v1/domains/<domain_id>/did-provider/test
Check the connection to the number provider of the domain (one cheap read call).
Access: platform permission platform_admin or domain_admin (domain_admin: only its domains, domain_id)
Path parameters
| Name | Description |
|---|---|
domain_id |
Domain ID. |
Response: ok: Whether the provider answered and accepted the credentials. message: What happened. provider: "provider" when a number provider was tested, "pool" when the domain has none.
GET /api/v1/domains/<domain_id>/number-market/available
Numbers the number provider sells now, at its cost, to buy them for the pool.
The provider is asked live: a number shown may be taken by someone else before it is ordered. Numbers we already hold are left out. At least a province, a city or an area code is needed with a provider that sells by region (an empty list otherwise).
Access: platform permission platform_admin or domain_admin (domain_admin: only its domains, domain_id)
Path parameters
| Name | Description |
|---|---|
domain_id |
Domain ID. |
Query parameters
| Name | Description |
|---|---|
state |
Province (code, e.g. QC). |
city |
City (rate center), its start is enough, without case nor accents. |
area_code |
Area code (3 digits) or area code and exchange (6 digits). |
account_id |
The number provider; default: the domain's. |
limit |
Numbers returned, 1 to 25 (default 25). |
Response: results: [{number, type, country, state, city, area_code, setup_cost, monthly_cost, currency, capabilities}]. count: Numbers found.
Errors 404 provider_not_configured. 502/503: the provider failed.
POST /api/v1/domains/<domain_id>/number-market/order
Buy numbers from the number provider into the pool of the domain.
Each number is ordered on its own; the ones the provider delivers enter the pool (status free), bound to the provider's SMS account (SMS turned on at the provider) and to its voice trunk when the domain may use it, at the provider's cost (setup and monthly cost recorded on the number). Nothing is debited here: the domain then sells them to its organizations or assigns them. Journalled.
Access: platform permission platform_admin or domain_admin (domain_admin: only its domains, domain_id)
Rate limit: 30 per hour
Path parameters
| Name | Description |
|---|---|
domain_id |
Domain ID. |
Request body
| Name | Description |
|---|---|
numbers |
1 to 10 E.164 numbers from GET .../number-market/available (required). |
account_id |
The number provider; default: the domain's. |
Response: results: [{number, status: ordered (in the pool), pending (the provider delivers later), unavailable (taken meanwhile, or already ours) or failed, phone_id, message}]. ordered: How many entered the pool.
Errors 400 validation_error. 404 provider_not_configured.
GET /api/v1/domains/<domain_id>/number-market/regions
Provinces and cities in which the number provider sells numbers (to search them).
Access: platform permission platform_admin or domain_admin (domain_admin: only its domains, domain_id)
Path parameters
| Name | Description |
|---|---|
domain_id |
Domain ID. |
Query parameters
| Name | Description |
|---|---|
account_id |
The number provider (an id of providers in GET /domains/<id>/did-provider); default: the domain's. |
Response: regions: [{code (province), cities: [name, ...]}], sorted.
Errors 404 provider_not_configured: no number provider for the domain. 502/503: the provider failed.
GET /api/v1/domains/<domain_id>/number-pool
The numbers of the domain with their pool status and prices.
Access: platform permission platform_admin or domain_admin (domain_admin: only its domains, domain_id)
Path parameters
| Name | Description |
|---|---|
domain_id |
Domain ID. |
Query parameters
| Name | Description |
|---|---|
status |
free, assigned, trash, held, pending, returned or access; absent = all. |
country |
Only this country. |
type |
local or tollfree. |
q |
Text searched in the number, the label and the city. |
skip |
Pagination offset (default 0). |
limit |
Page size (default 50, at most 100). |
Response: numbers: The page (registry fields plus pool_status, source, type, area_code, city, region, country, capabilities, pricing {setup_fee} (null = the unit prices of the domain decide: number_setup, tollfree_number_setup), organization_name, released_at, expires_at). total: Number matching the filters. skip: Offset applied. limit: Page size applied. counts: Numbers by pool status, whatever the filters.
POST /api/v1/domains/<domain_id>/number-pool
Add one number to the pool of the domain.
Errors are {error, message}: 400 validation_error with field (not an E.164 number, bad attribute), 409 conflict (the number already exists, in this domain or another).
Access: platform permission platform_admin or domain_admin (domain_admin: only its domains, domain_id)
Path parameters
| Name | Description |
|---|---|
domain_id |
Domain ID. |
Request body
| Name | Description |
|---|---|
number |
Phone number (E.164, or North American digits). |
country |
ISO 3166-1 alpha-2 country (deduced for +1 numbers). |
type |
local or tollfree (deduced from the area code). |
area_code |
Area code (deduced for +1 numbers). |
city |
City. |
region |
Province or state. |
capabilities |
List of voice, sms (both by default). |
setup_fee |
Installation price charged to the buyer (null or absent = the price of the grid of the domain). |
label |
Label of the number (the number by default). |
Response: phone_number: The number added (pool view).
DELETE /api/v1/domains/<domain_id>/number-pool/<phone_id>
Remove a number from the pool, as long as nobody holds it.
A number bought by an organization, held in its trash or in reserve (balance limbo) or whose order is pending cannot be removed (409 number_in_use). A number ordered from the provider is given back to it first (502/503 and nothing removed if the provider fails), unless release_at_provider is false.
Access: platform permission platform_admin or domain_admin (domain_admin: only its domains, domain_id)
Path parameters
| Name | Description |
|---|---|
domain_id |
Domain ID. |
phone_id |
Phone number ID. |
Query parameters
| Name | Description |
|---|---|
release_at_provider |
false keeps the number at the provider and only removes it here (default true). |
Response: message: Result message.
PUT /api/v1/domains/<domain_id>/number-pool/<phone_id>
Change the attributes and prices of a number of the pool (the fields given change).
Prices apply to the next purchase; a number already bought keeps what its owner paid.
Access: platform permission platform_admin or domain_admin (domain_admin: only its domains, domain_id)
Path parameters
| Name | Description |
|---|---|
domain_id |
Domain ID. |
phone_id |
Phone number ID. |
Request body
| Name | Description |
|---|---|
country |
ISO 3166-1 alpha-2 country. |
type |
local or tollfree. |
area_code |
Area code. |
city |
City. |
region |
Province or state. |
capabilities |
List of voice, sms. |
setup_fee |
Installation price (null = the price of the grid of the domain). |
label |
Label. |
Response: phone_number: The number after the change (pool view).
POST /api/v1/domains/<domain_id>/number-pool/batch
Add many numbers to the pool in one request (JSON list or CSV).
Every row is validated on its own: the valid rows are added, the others are reported (a number already known is skipped, never an error). At most 5000 rows. Send JSON {numbers: [...]} where an item is an E.164 string or an object with the single-number fields, optionally {defaults: {...}} applied to every item; or {csv: "<text>"}; or the CSV itself (Content-Type text/csv, or a multipart file). CSV columns: number, country, type, area_code, city, region (or state, province), setup_fee, capabilities (voice|sms), label; comma or semicolon separated, with a header.
Access: platform permission platform_admin or domain_admin (domain_admin: only its domains, domain_id)
Path parameters
| Name | Description |
|---|---|
domain_id |
Domain ID. |
Query parameters
| Name | Description |
|---|---|
dry_run |
1 validates and counts without writing (CSV bodies; JSON uses the dry_run field). |
Request body
| Name | Description |
|---|---|
numbers |
List of numbers (strings or objects). |
defaults |
Fields applied to every item (country, type, city, region, capabilities, setup_fee). |
csv |
The CSV text, instead of numbers. |
dry_run |
true validates without writing. |
Response: created: Numbers added. skipped: List of {row, number, reason} (already_exists, duplicate_in_batch). row = the line of the file for a CSV (the title line is line 1), else the position in the list (from 1). errors: List of {row, number, field, message} for the invalid rows (field: the column at fault). total: Rows received. dry_run: Whether nothing was written. phone_numbers: The first 100 numbers added (pool view).
POST /api/v1/domains/<domain_id>/number-trash/purge
Give back to the pool, now, the numbers of the domain whose reservation has ended (the periodic task does the same).
Access: platform permission platform_admin or domain_admin (domain_admin: only its domains, domain_id)
Path parameters
| Name | Description |
|---|---|
domain_id |
Domain ID. |
Response: result: {examined, returned}.
Number provider webhook
Delivery of number orders by the provider (public, token in the URL).
POST /webhook/numbers/<token>
Delivery webhook of the number provider: an order was delivered or failed.
Public; the URL token is the domain's webhook_secret (settings.voice.did_provider). The body is read by the provider adapter ({order_id, status, number, message}). A delivered order puts the number in service; a failed one refunds the buyer. Unknown tokens, orders and replays answer 200 without doing anything.
Access: public (no authentication)
Rate limit: 120 per minute
Path parameters
| Name | Description |
|---|---|
token |
The domain's webhook_secret. |
Response: processed: Number of order updates applied.
SMS providers
Available providers, configuration schemas, per-team configuration.
GET /api/v1/providers
List available SMS providers.
Access: authenticated (JWT or API key)
Query parameters
| Name | Description |
|---|---|
lang |
Language for descriptions (fr, en). |
Response: List of available providers with basic info.
GET /api/v1/providers/<provider_name>/guide
Get configuration guide for a provider.
Access: permission configure_provider (now teams.provider)
Path parameters
| Name | Description |
|---|---|
provider_name |
Provider type (one of GET /api/v1/providers). |
Query parameters
| Name | Description |
|---|---|
lang |
Language (fr, en). |
Response: Step-by-step configuration guide.
GET /api/v1/providers/<provider_name>/schema
Get configuration schema for a provider.
Access: permission configure_provider (now teams.provider)
Path parameters
| Name | Description |
|---|---|
provider_name |
Provider type (one of GET /api/v1/providers). |
Response: Configuration schema with required fields.
DELETE /api/v1/providers/teams/<team_id>/provider
Remove provider configuration from a team.
Access: team access (team_id); permission configure_provider (now teams.provider)
Path parameters
| Name | Description |
|---|---|
team_id |
Team ID. |
Response: Success message.
GET /api/v1/providers/teams/<team_id>/provider
Get current provider configuration for a team.
Access: team access (team_id); permission configure_provider (now teams.provider)
Path parameters
| Name | Description |
|---|---|
team_id |
Team ID. |
Response: provider: The provider name (null when none). config: The provider configuration, secrets masked. configured: Whether a provider is set.
PUT /api/v1/providers/teams/<team_id>/provider
Save provider configuration for a team.
Access: team access (team_id); permission configure_provider (now teams.provider)
Path parameters
| Name | Description |
|---|---|
team_id |
Team ID. |
Request body
| Name | Description |
|---|---|
provider |
Provider type (one of GET /api/v1/providers). |
config |
Provider configuration. |
test_first |
Whether to test connection before saving (default: true). |
Response: team: The team, with its provider configuration. message: Confirmation.
Errors 400 validation_error: provider missing or unknown. 400 connection_error / test_failed: the test of the connection failed, nothing is saved (success false). Skip the test with test_first false.
POST /api/v1/providers/test
Test provider connection with given configuration.
Access: permission configure_provider (now teams.provider)
Request body
| Name | Description |
|---|---|
provider |
Provider type (one of GET /api/v1/providers). |
config |
Provider configuration. |
Response: success: Whether the connection works. message: Confirmation, or the reason of the failure.
Errors 400 validation_error: provider missing. 400 configuration_error: unknown provider or invalid configuration (success false). 400 connection_error: the provider refused the connection, with its code (success false). 500 unknown_error: unexpected failure (success false).
Invitations
User invitations into an organization.
GET /api/v1/invitations
List invitations for current organization.
Access: permission members.admin in the organization (profiles)
Response: invitations: The invitations of the current organization. total: Number of invitations.
POST /api/v1/invitations
Create a new invitation.
Session (JWT) only: a request authenticated by an API key, ordinary or restricted, gets 403 (error forbidden, message "API key not allowed on this route"). An invitation is a way to sign in, and a key never hands one out. The body must be a JSON object (else 400 validation_error).
The answer is the same whether the address already has an account or not (it tells nothing about the address, and returns no profile): an invitation is created and emailed, valid 7 days. An address with no account follows the link to create its account (POST /auth/register). An address that already has an account is never attached to the organization by the invitation alone: the account accepts it itself, signed in, with POST /api/v1/invitations/accept (the link of its email leads to the page that does it). Until then the invitation shows among the pending ones, can be resent and cancelled.
The email goes through the SMTP server of the organization's domain and links to that domain's first production hostname, whatever X-Frontend-Host (the platform's server and FRONTEND_URL for an organization without domain).
An organization sends at most 50 invitations per hour (429 rate_limited, config RATELIMIT_INVITATIONS), counted for the organization, not for each sender.
Every member of an organization is a user of its plan, billed at the price per user of the plan from the statement that follows the day they join.
Access: permission members.admin in the organization (profiles)
API keys: refused, 403 forbidden (API key not allowed on this route)
Request body
| Name | Description |
|---|---|
email |
Invitee email address (a valid address, at most 254 characters; else 400 validation_error with field email). |
role |
Role for the new user (optional, default: agent; admin, manager or agent). Former way: prefer profile_ids. |
profile_ids |
Profiles the member gets (optional; ids of GET /api/v1/organizations/current/profiles, they add up); when given, the role follows them. |
team_id |
Team ID to assign (optional; a team of the organization): with team_ids, the principal one. |
team_ids |
Teams to place the member in (optional; teams of the organization, at most 50; 2026-10-28, a member may be in several teams). The principal is team_id when it is one of them, else the first. |
organization_id |
Organization to invite into (optional; only a platform_admin, or a domain_admin of its domain, may name an organization other than their own; a string, else 400 validation_error). |
Response: invitation: The invitation, with its token (shown here only). message: Confirmation. email_sent: Whether the email went out (201). The answer is the same whether or not the address already belongs to an account (no profile is returned and nobody is added): an existing account accepts the invitation itself with POST /invitations/accept.
Errors 400 validation_error: email missing or invalid, role other than admin, manager or agent, profile_ids empty or naming a profile the organization cannot give (field profile_ids), team not in the organization, caller without organization, or an invitation of this organization to this address already pending. 403 forbidden: organization_id of an organization the caller does not manage; or the role or the profiles give a permission the caller does not hold in the organization (field role or profile_ids; with members.manage alone, members.manage and members.admin are never given). 404 not_found: organization_id unknown. 409 conflict: the account is already a member of the organization.
DELETE /api/v1/invitations/<invitation_id>
Delete/cancel an invitation.
Access: permission members.admin in the organization (profiles)
Path parameters
| Name | Description |
|---|---|
invitation_id |
Invitation ID. |
Response: Success message.
POST /api/v1/invitations/<invitation_id>/resend
Resend an invitation email.
Session (JWT) only: a request authenticated by an API key, ordinary or restricted, gets 403 (error forbidden, message "API key not allowed on this route"), like the creation. The email goes through the SMTP server of the organization's domain and links to that domain's first production hostname, whatever X-Frontend-Host (the platform's server and FRONTEND_URL for an organization without domain).
Access: permission members.admin in the organization (profiles)
API keys: refused, 403 forbidden (API key not allowed on this route)
Path parameters
| Name | Description |
|---|---|
invitation_id |
Invitation ID. |
Response: Success message.
Errors 404 not_found: invitation unknown. 403 forbidden: invitation of an organization the caller does not administer. 400 validation_error: already accepted. 500 configuration_error: no SMTP server for the domain. 500 email_error: the email could not be sent.
POST /api/v1/invitations/accept
Accept, with an existing account, an invitation to an organization.
The account joins the organization with the profiles (else the role's profiles) and the team of the invitation: a membership is created, nothing else of the account changes (its current organization and team stay). Switch to the organization afterwards (POST /api/v1/organizations/switch). Only the owner of the invited address, signed in with that very account, can accept: the token alone, held by the inviter for one, is not enough. An invitation is used once: the link opened again by its owner, already a member of the organization, answers 200 with already_member true (and creates nothing).
Session (JWT) only: a request authenticated by an API key gets 403 (error forbidden, message "API key not allowed on this route").
The body must be a JSON object (else 400 validation_error).
Access: authenticated (JWT or API key)
API keys: refused, 403 forbidden (API key not allowed on this route)
Request body
| Name | Description |
|---|---|
token |
Invitation token (from the link of the email; a non-empty string, else 400 validation_error with field token). |
Response: organization: The organization joined. role: The role the profiles amount to there (admin, manager or agent; a copy). already_member: true when the invitation had already been accepted by this account, which is a member of the organization. message: Confirmation. 404 not_found, whatever the cause (unknown, expired, used or cancelled invitation, or an invitation for another address).
GET /api/v1/invitations/verify/<token>
Verify an invitation token.
Public. Rate limited by the default limits, counted per token, whatever the X-API-Key or Authorization headers.
Access: public (no authentication)
Path parameters
| Name | Description |
|---|---|
token |
Invitation token. |
Response: valid: true. email: The invited address. role: The role of the invitation (domain_admin for an invitation to administer a domain). organization_name: Name of the organization (of the domain for a domain admin invitation).
Errors 404 not_found: unknown or expired token. 410 invitation_accepted: the invitation was already accepted, the account exists: sign in (email in the answer, the address the link was sent to).
Users
Organization user management.
GET /api/v1/users
List the users of the caller's organization.
A member who holds members.manage without members.admin (the former manager) only sees the users of their own team (none without a team); with members.admin, every user of their organizations (platform_admin: every account of the platform when no team is given; with the header X-Admin-Organization, the administered organization only). Super admins are never listed as members.
Access: permission manage_users (now members.manage)
Query parameters
| Name | Description |
|---|---|
team_id |
Filter by team ID (must be a team the caller can access). |
skip |
Pagination offset (default 0). |
limit |
Pagination limit (default 50, max 100). A skip or limit that is not an integer is refused (400 validation_error). |
Response: users: The users of the page. total: Number of users before skip and limit. skip: Offset applied. limit: Page size applied.
POST /api/v1/users
Create a user in the caller's organization.
A member with members.manage without members.admin (the former manager) only creates agents, placed in their own team; with members.admin, any organization role. The member gets the profiles of the role (admin: Admin; manager: User and the organization's Gestionnaire profile; agent: User); PUT /api/v1/organizations/current/members/<id>/profiles changes them. super_admin and domain_admin cannot be created here (platform permissions: PUT /api/v1/users/<id>/platform-permissions). 400 validation_error when the address already has an account (an invitation never reveals it: prefer POST /api/v1/invitations).
Session (JWT) only: a request authenticated by an API key, ordinary or restricted, gets 403 (error forbidden, message "API key not allowed on this route"). An account, even without a password, is a way to sign in (password reset by email, OAuth), and a key never hands one out. The body must be a JSON object (else 400 validation_error).
Access: permission manage_users (now members.manage)
API keys: refused, 403 forbidden (API key not allowed on this route)
Request body
| Name | Description |
|---|---|
email |
User email (a valid address, at most 254 characters; stored in lower case). |
name |
User display name (1 to 100 characters, no control characters). |
password |
User password (optional if sending invite). When given it follows the rule of PUT /auth/me/password (8 to 128 characters, at least 2 of lower case, upper case, digits and symbols, not a very common password, not the email address); else 400 validation_error with field password. |
role |
Organization role, translated into profiles (admin, manager or agent; default agent; one the caller may give, else 403 forbidden). |
team_id |
Team ID (must belong to the organization). |
language |
Preferred language (fr or en, default fr; else 400 validation_error with field language). |
Response: Created user data.
Errors
DELETE /api/v1/users/<user_id>
Delete a user of the caller's organization.
Access: permission manage_users (now members.manage)
Path parameters
| Name | Description |
|---|---|
user_id |
User ID. |
Response: Success message.
Errors 400 validation_error: the caller cannot delete themselves. 409 user_active: deactivate the user first. 403 forbidden: user out of reach. 403 member_of_other_organizations: the account also belongs to organizations the caller does not administer.
GET /api/v1/users/<user_id>
Get user details.
Users can view themselves; a member with members.manage without members.admin (the former manager) the agents of their own team; with members.admin, the users of a shared organization; platform_admin anyone, domain_admin the users of the organizations of their domains.
Access: authenticated (JWT or API key); Yourself; members.admin: the members of a shared organization; members.manage: the members of their own team there who manage nobody (neither members.manage nor members.admin); in both cases only a member whose permissions there the caller holds too (checked in the function: 403 forbidden otherwise).
Path parameters
| Name | Description |
|---|---|
user_id |
User ID. |
Response: User data.
PUT /api/v1/users/<user_id>
Update a user of the caller's organization.
The role and the team belong to ONE organization: the caller's (the user must be a member of it). The other fields belong to the whole account (every organization and every domain of the user): to change them on someone else the caller must administer every organization of the user (platform_admin, a domain_admin of all their domains, a member holding members.admin in all their organizations; with members.manage alone, an agent of their own team who belongs to no other organization), else 403 member_of_other_organizations. A value identical to the stored one is no change. The user changes their own profile freely, except the password (see below).
The body must be a JSON object (else 400 validation_error).
Access: permission manage_users (now members.manage)
API keys: refused when the body gives the role admin, domain_admin, super_admin; refused when the body contains password
Path parameters
| Name | Description |
|---|---|
user_id |
User ID. |
Request body
| Name | Description |
|---|---|
name |
New name (optional; a string of 1 to 100 characters without control characters, else 400 validation_error with field name). Account-wide. |
role |
New role in the caller's organization (optional; admin, manager or agent, never above the caller, never one's own): the member's profiles are replaced by those of the role (as POST /api/v1/users). An API key never gives the admin role: 403 (error forbidden, message "API key not allowed on this route"). |
is_active |
Activate or deactivate the user (optional; a caller who administers every organization of the user, never oneself). A deactivated user can no longer sign in and their sessions stop working. Account-wide. |
team_id |
New team (optional; a team of the caller's organization, null takes the user out of any team there). Written on the membership of that organization only; the user must be a member of it. With team_ids: their principal team (one of them). Alone: a team the member is already in becomes their principal team (their other teams stay: a form echoing the user changes nothing); another team replaces all of them. |
team_ids |
Every team of the member in the caller's organization (optional; teams of that organization, [] takes the user out of every team there; 2026-10-28, a member may be in several teams). The principal is team_id when it is one of them, else the first. |
language |
New language (optional; fr or en, else 400 validation_error with field language). Account-wide. |
permissions |
Permissions granted to the account on top of its profiles (optional; the only grantable one is support). Only a platform_admin, or a domain_admin who administers every organization of the user, may change the grants, never their own; the permissions of the role in the list are ignored, so a form echoing the whole user is fine. Anyone else changing them gets 403 forbidden, a name that cannot be granted 400 validation_error with field permissions. permission_grants is an alias with the same rule (it is not a free field). |
first_name |
New first name (optional, rewrites name). Account-wide. |
last_name |
New last name (optional, rewrites name). Account-wide. |
timezone |
IANA time zone (optional; null clears it). Account-wide. |
password |
New password of ANOTHER account (optional): a password reset by an administrator, who must administer every organization of the user and chooses a password that follows the rule of PUT /auth/me/password (else 400 validation_error with field password). Your own password is not changed here (403 forbidden with field password): use PUT /auth/me/password, which asks for the current password. Session (JWT) only: with an API key, a body with a password gets 403 (error forbidden, message "API key not allowed on this route"), whoever the user, the key owner included. |
Response: Updated user data.
Errors 403 member_of_other_organizations: activating or deactivating the account, or setting the password of another user, reaches organizations the caller does not administer.
DELETE /api/v1/users/<user_id>/membership
Remove a member from the caller's organization, leaving the account alone.
The user leaves the caller's organization (the current one, or the one being administered with X-Admin-Organization) and nothing else: the account stays active in its other organizations, with its profile, password and sessions. Neither the activation of the account nor the administration of its other organizations is needed (unlike PUT /users/<id> with is_active and DELETE /users/<id>, which reach the whole account). The user's SIP endpoints of this organization are detached and disabled, and the default organization they had here is forgotten. When this was their current organization they move to another one of theirs.
A user whose only organization this is cannot be removed (409 only_organization): they are deactivated, then deleted. Never oneself (400 validation_error), never a member the caller may not act on there (403: members.admin, or members.manage for a member of their team who manages nobody, and every permission the member holds there held by the caller too), never a user who is not a member (404).
Access: permission members.admin in the organization (profiles)
Path parameters
| Name | Description |
|---|---|
user_id |
User ID. |
Response: Success message.
PUT /api/v1/users/<user_id>/role
Change the organization role of a user of the caller's organization.
Former way: the member's profiles are replaced by those of the role (admin: Admin; manager: User and the organization's Gestionnaire profile; agent: User); prefer PUT /api/v1/organizations/current/members/<id>/profiles. Never one's own role, never a role above the caller's (403 forbidden), never on a user who is not a member of the caller's organization (403).
The body must be a JSON object (else 400 validation_error).
Access: permission members.admin in the organization (profiles)
API keys: refused when the body gives the role admin, domain_admin, super_admin
Path parameters
| Name | Description |
|---|---|
user_id |
User ID. |
Request body
| Name | Description |
|---|---|
role |
New role (admin, manager, agent; required, else 400 validation_error). An API key never gives the admin role: 403 (error forbidden, message "API key not allowed on this route"). |
Response: Updated user data.
Errors
PUT /api/v1/users/<user_id>/team
Assign a member of the caller's organization to one of its teams.
The team belongs to ONE organization, the caller's (the current one, or the one being administered with X-Admin-Organization): the user must be a member of it (else 403) and the team one of its teams that the caller may use (else 400 validation_error). The team is written on the membership of that organization, whatever the current organization of the user: an administrator never changes the team the user has in another organization.
The body must be a JSON object (else 400 validation_error).
Access: permission members.admin in the organization (profiles)
Path parameters
| Name | Description |
|---|---|
user_id |
User ID. |
Request body
| Name | Description |
|---|---|
team_id |
Team ID (null to remove from any team). It replaces every team of the member there: to place a member in several teams, PUT /api/v1/users/<id> with team_ids or POST /api/v1/teams/<id>/members. |
Response: user: The updated user. message: Confirmation.
API keys
Keys for programmatic access.
GET /api/v1/keys
List API keys of the caller, or of a user they administer.
Access: permission generate_api_keys (now api_keys.manage)
Query parameters
| Name | Description |
|---|---|
user_id |
Owner of the keys (optional, defaults to the caller). |
Response: api_keys: The keys (id, key_prefix, name, user_id, team_id, team_ids, integration_id, created_at, last_used_at, revoked), never the secret. total: Number of keys.
POST /api/v1/keys
Create a new API key for the caller.
JWT only: a request authenticated by an API key gets 403 (error forbidden, message "API key not allowed on this route"), so a key never mints another key. A key limited to a team acts as an agent of that team, whatever the role of its creator: it cannot administer anything nor read organization-wide data (billing, organization, members).
Every key, limited to a team or not, is only minted with the CURRENT PASSWORD of the owner (current_password: 400 validation_error when missing, 401 invalid_password when wrong), so that a stolen access token (valid one hour) does not buy a key that outlives it. An account without a password (OAuth sign-in only) has none to give. Rate limited to 10 per hour per user (429 rate_limited): the password is guessed here otherwise. The key of a super_admin or a domain_admin goes no further than the administration of the owner's current organization.
A personal key is revoked when its owner changes the password or the email address, resets the password, or is deactivated (the keys of an integration are not personal).
The body must be a JSON object: anything else (no body, a body that is not JSON, a list, a string...) gets 400 validation_error.
Access: permission generate_api_keys (now api_keys.manage)
API keys: refused, 403 forbidden (API key not allowed on this route)
Rate limit: 10 per hour
Request body
| Name | Description |
|---|---|
name |
Key name/description (required, a non-empty string, else 400 validation_error). |
team_id |
Restrict the key to this team (optional; the identifier, as a string, of a team the caller can access, else 400 validation_error). |
current_password |
The password of the caller (required for every key of an account that has a password). |
expires_in_days |
Lifetime of the key in days (optional, an integer from 1 to 365, else 400 validation_error with field expires_in_days; 90 when absent). Every key made here expires: it is refused (401) after expires_at, and a new one is made to replace it. |
Response: api_key: The key record (same fields as in the list), without the secret. key: The secret of the key, in plain text. It is in this answer only (201): store it now. message: Confirmation. warning: Reminder that the key will not be shown again.
DELETE /api/v1/keys/<key_id>
Revoke an API key.
Access: permission generate_api_keys (now api_keys.manage)
Path parameters
| Name | Description |
|---|---|
key_id |
API key ID. |
Response: message: Confirmation that the key is revoked.
GET /api/v1/keys/<key_id>
Get API key details.
Access: permission generate_api_keys (now api_keys.manage)
Path parameters
| Name | Description |
|---|---|
key_id |
API key ID. |
Response: api_key: The key record (same fields as in the list), without the secret.
POST /api/v1/keys/<key_id>/revoke
Revoke an API key (alias of DELETE).
Access: permission generate_api_keys (now api_keys.manage)
Path parameters
| Name | Description |
|---|---|
key_id |
API key ID. |
Response: message: Confirmation that the key is revoked.
Website widget
Configuration of the form embedded on a website (permission integrations.manage).
GET /api/v1/widgets
List the website widgets of the current organization.
Access: permission integrations.manage in the organization (profiles)
Response: widgets: List of widgets with their embed code. total: Number of widgets.
POST /api/v1/widgets
Create a website widget for the current organization.
Access: permission integrations.manage in the organization (profiles)
Request body
| Name | Description |
|---|---|
name |
Internal name of the widget. |
team_id |
Team that receives the conversations. |
phone_number |
Team number the welcome message is sent from. |
welcome_message |
Text sent to the visitor's mobile, in the default language. |
welcome_messages |
Welcome text per language, {fr, en} (optional; an empty language falls back to the default one). |
language |
Default language, fr or en (optional, default fr); the widget follows the page language (<html lang> or data-lang) when it is fr or en. |
texts |
Displayed texts per language, {fr: {title, description, button_label, success_message}, en: {...}} (optional; a flat object applies to the default language). |
accent_color |
Hex color of the button (optional). |
text_color |
Hex color of the button text (optional, default #ffffff). |
allowed_origins |
Websites allowed to use the widget, hostnames (optional, empty = any). |
demo_numbers |
Mobile numbers of the people who demonstrate the widget, 5 at most (optional; a list, or one per line). They may ask for the welcome text again right away and up to 30 times per hour and 100 per day, instead of 3 per hour and 10 per day; the limits of the widget itself still apply. Invalid number or more than 5: 400 validation_error. |
enabled |
Whether the widget accepts submissions (optional, default true). |
Response: widget: The created widget with its embed code.
DELETE /api/v1/widgets/<widget_id>
Delete a website widget.
Access: permission integrations.manage in the organization (profiles)
Path parameters
| Name | Description |
|---|---|
widget_id |
Widget ID. |
Response: Success message.
GET /api/v1/widgets/<widget_id>
Get a website widget.
Access: permission integrations.manage in the organization (profiles)
Path parameters
| Name | Description |
|---|---|
widget_id |
Widget ID. |
Response: widget: The widget with its embed code.
PUT /api/v1/widgets/<widget_id>
Update a website widget (same fields as creation, all optional).
Access: permission integrations.manage in the organization (profiles)
Path parameters
| Name | Description |
|---|---|
widget_id |
Widget ID. |
Response: widget: The updated widget. message: Confirmation.
POST /api/v1/widgets/<widget_id>/regenerate-key
Give the widget a new key: sites using the old embed code stop working.
Access: permission integrations.manage in the organization (profiles)
Path parameters
| Name | Description |
|---|---|
widget_id |
Widget ID. |
Response: widget: The widget with its new embed code (the old key stops working). message: Confirmation.
Connected applications
Zoho CRM and QuickBooks Online accounts plugged into an organization: OAuth connection, settings, test, record of a number, delivery log (permission integrations.manage; capabilities zoho, quickbooks).
GET /api/v1/apps
The applications the current organization may connect (capability of its domain and of the organization), with their connection when there is one. A connected QuickBooks is checked at Intuit (CompanyInfo) first: a company disconnected from the QuickBooks App Store comes back with the status reconnect.
Access: permission integrations.manage in the organization (profiles)
API keys: refused, 403 forbidden (API key not allowed on this route)
Response: apps: One entry per application: {app (zoho, quickbooks, ghl), name, configured (the platform has credentials for this organization: a connection is possible; false for an organization that connects to test companies when the platform has no development keys), features (what the connector does: lookup, call_log, recording, summary, transcript, users; LeadConnector: sms_bridge, mms, mirror_sent), events (what it handles), default_settings, connection (null, or {status (connected, reconnect, disconnected), account, settings, connected_by {id, name}, connected_at, disconnected_at, last_error}); never the tokens}.
DELETE /api/v1/apps/<app>
Disconnect an application: the refresh token is revoked at the provider (LeadConnector: the app is uninstalled from the CRM account, which stops offering Telma as its text provider) and the tokens are erased here; the account and the settings stay (found again at the next connection). Listening links already deposited are not revoked (they die with the recordings). What was already exchanged stays on both sides (texts, contacts, call logs).
Access: permission integrations.manage in the organization (profiles)
API keys: refused, 403 forbidden (API key not allowed on this route)
Path parameters
| Name | Description |
|---|---|
app |
The application (zoho, quickbooks, ghl). |
Response: connection: The connection, status disconnected. revoked: Whether the provider accepted the revocation, or the uninstall (false: the tokens are erased here anyway; the app is then to be uninstalled at the provider).
Errors 403 capability_required: the domain or the organization lacks the application. 404 not_connected: no connection.
GET /api/v1/apps/<app>/callback
Return of the provider after the consent (public: the browser comes back without a session).
Checks the state, exchanges the code, reads the account and writes the connection, then redirects (303) to <site of the domain>/settings/apps?app=<app>&connected=1, or ...&error=<code> (oauth_error whatever the provider said, the detail goes to the server log; invalid_state for a missing, forged, expired or spent state; app_not_configured, with reason=sandbox_keys_missing when the organization connects to test companies and the platform has no development keys). Never renders HTML nor puts a token in the URL. The connection keeps the client_id and the environment of the keys that issued its tokens (oauth_keys), never the secret.
Access: public (no authentication)
API keys: refused, 403 forbidden (API key not allowed on this route)
Path parameters
| Name | Description |
|---|---|
app |
The application (zoho, quickbooks, ghl), or its public name in the address registered at the provider (LeadConnector: messaging, the redirect_uri of the Infrastructure page; the CRM refuses an address that names it). An installation started at the provider's marketplace (LeadConnector: « Install » on the app) comes back with a code but no state, so without an organization: the code is exchanged, the tokens are kept aside 15 minutes (app_pending_installs) and the browser is sent to <FRONTEND_URL>/settings/apps?app=<app>&claim=<ticket>, where an administrator with integrations.manage attaches them to their organization (POST /api/v1/apps/<app>/claim). |
Query parameters
| Name | Description |
|---|---|
code |
The authorization code of the provider. |
state |
The signed state given by POST /api/v1/apps/<app>/connect (absent for an installation started at the provider). |
error |
Set by the provider when the user refused (redirected with error=oauth_error). |
Response: A 303 redirection to the settings page of the domain.
POST /api/v1/apps/<app>/claim
Attach to the current organization an installation started at the provider's marketplace (the browser came back to the callback without a state and was sent to the Applications page with a claim ticket). The ticket is single use and lives 15 minutes; the connection is written as if the flow had started here.
Access: permission integrations.manage in the organization (profiles)
API keys: refused, 403 forbidden (API key not allowed on this route)
Path parameters
| Name | Description |
|---|---|
app |
The application (ghl). |
Request body
| Name | Description |
|---|---|
ticket |
The claim parameter of the page URL. |
Response: connection: The connection, status connected.
Errors 400 validation_error: ticket missing. 403 capability_required: the domain or the organization lacks the application. 404 not_found: unknown application, or unknown, spent or expired ticket (error invalid_ticket). 409 app_not_configured (reason environment_mismatch): the organization connects to test companies and the installation was made with production keys (the ticket is spent).
POST /api/v1/apps/<app>/connect
Start the connection of an application: the URL of the provider's consent page, to open in the browser.
The user comes back on GET /api/v1/apps/<app>/callback, which writes the connection and redirects to the settings page of the domain. The state in the URL is signed, valid 10 minutes and used once.
Access: permission integrations.manage in the organization (profiles)
API keys: refused, 403 forbidden (API key not allowed on this route)
Path parameters
| Name | Description |
|---|---|
app |
The application (zoho, quickbooks, ghl). |
Response: url: The authorization URL of the provider.
Errors 403 capability_required: the domain or the organization lacks the application (capability). 404 not_found: unknown application. 409 app_not_configured: the platform has no client credentials for it; reason sandbox_keys_missing: the organization connects to test companies (organizations.app_environments.<app> = sandbox) and the platform has no development keys (refused: a demo is never connected with the production keys).
GET /api/v1/apps/<app>/deliveries
The log of what Telma delivered to the application (kept 30 days), newest first.
Access: permission integrations.manage in the organization (profiles)
API keys: refused, 403 forbidden (API key not allowed on this route)
Path parameters
| Name | Description |
|---|---|
app |
The application (zoho, quickbooks, ghl). |
Query parameters
| Name | Description |
|---|---|
skip |
Rows to skip (optional, default 0). |
limit |
Page size (optional, default 50, at most 100). |
Response: deliveries: Rows {id, event, state (pending, sent, failed, skipped), attempts, next_attempt_at, summary (one line of the result, in French), summary_key and summary_params (the same line as an i18n key of the web, apps.deliveries.summaries.<key>, and its values; null on rows from before 2026-11-10), result, error {code, message}, data (ids of the event), created_at, sent_at}. total: Number of rows. skip, limit: As received.
Errors 404 not_connected: no connection.
GET /api/v1/apps/<app>/lookup
The record of the application for a phone number (the contact or lead of Zoho, the customer of QuickBooks, the contact of LeadConnector), cached 5 minutes per number.
Access: permission integrations.manage or voice.use or messages.read in the organization (profiles)
API keys: refused, 403 forbidden (API key not allowed on this route)
Path parameters
| Name | Description |
|---|---|
app |
The application (zoho, quickbooks, ghl). |
Query parameters
| Name | Description |
|---|---|
number |
The phone number (required; any usual notation). |
Response: found: Whether a record exists. kind: contact, lead or customer (null when not found). id, name, url: The record, its name and its page at the provider. extra: Other facts (Zoho: email, company; QuickBooks: balance, open_invoices).
Errors 400 validation_error: number missing or not a phone number. 404 not_connected: no connection. 409 reconnect_required: the user must connect the application again. 502 provider_error: the provider failed.
PUT /api/v1/apps/<app>/settings
Change the settings of a connection (the whole object is validated by the connector; a field left out takes its default).
Common fields: enabled (boolean), teams (list of team ids of the organization, empty = every team). Zoho: log_calls, log_missed_calls, recording (link, file, none), summary, transcript (attachment, note, none), create_contact (false only, for now), users ({telma_user_id: zoho_user_id}: the owner of the logged calls; default the user who connected). QuickBooks: lookup (boolean), endpoints (list of extension ids of the organization whose ringing shows the customer record, empty = every extension). LeadConnector: number_id (the phone number of the organization the CRM account texts from; required for the bridge to work), inbound (the texts the contacts send to that number go to the CRM), mirror_sent (the texts sent from Telma on that number appear in the CRM too), create_contact (a text from an unknown number creates the contact in the CRM).
Access: permission integrations.manage in the organization (profiles)
API keys: refused, 403 forbidden (API key not allowed on this route)
Path parameters
| Name | Description |
|---|---|
app |
The application (zoho, quickbooks, ghl). |
Request body
| Name | Description |
|---|---|
settings |
The settings object (or the fields themselves at the top level). |
Response: connection: The connection with its new settings.
Errors 400 validation_error: a field is wrong (field). 403 capability_required: the application is not enabled. 404 not_connected: no connection.
POST /api/v1/apps/<app>/test
Test a connection: one read at the provider (Zoho: the organization and the current user; QuickBooks: the company information; LeadConnector: the CRM account); the account of the connection is refreshed with what came back.
Access: permission integrations.manage in the organization (profiles)
API keys: refused, 403 forbidden (API key not allowed on this route)
Path parameters
| Name | Description |
|---|---|
app |
The application (zoho, quickbooks, ghl). |
Response: ok: True. account: The account as the provider describes it now.
Errors 404 not_connected: no connection. 409 reconnect_required: the provider refused the tokens, the user must connect again. 502 provider_error: the provider did not answer or answered an error (code, short message).
GET /api/v1/apps/<app>/users
The users of the connected account (Zoho: the active CRM users), to map the members of the organization to them (settings.users).
Access: permission integrations.manage in the organization (profiles)
API keys: refused, 403 forbidden (API key not allowed on this route)
Path parameters
| Name | Description |
|---|---|
app |
The application (zoho). |
Response: users: [{id, email, name}].
Errors 404 not_connected: no connection; 404 not_supported: the application has no users to list. 409 reconnect_required: the user must connect the application again. 502 provider_error: the provider failed.
POST /api/v1/apps/<app>/webhook
The provider's webhook (public; authenticated by the provider's signature, never by a session or a key).
LeadConnector: the delivery URL of the conversation provider, and the address of the app events of the marketplace app. The CRM POSTs here every SMS a user of a connected CRM account sends from its conversations ({contactId, locationId, messageId, type, phone, message, attachments, userId}), signed Ed25519 by the CRM over the raw body. The message is sent in the background from the Telma number of the connection (a delivery app.message_requested of that connection, with its retries and its line in the log), and its status reported to the CRM (delivered as soon as the carrier accepts it, failed on a refusal). The app event UNINSTALL ({type, appId, locationId}, or companyId for every account of a CRM company) disconnects the connections of that CRM account (or of every account of the company). The address to register is shown on the Infrastructure page (webhook_url: /api/v1/apps/messaging/webhook, the marketplace refusing an address that names it).
Access: public (no authentication)
API keys: refused, 403 forbidden (API key not allowed on this route)
Rate limit: 600 per minute
Path parameters
| Name | Description |
|---|---|
app |
The application (ghl) or its public name (messaging). |
Response: ok: True; delivery_id, or duplicate (same CRM message again), or ignored (an Email, another app event), or disconnected (UNINSTALL: number of connections disconnected).
Errors 401 invalid_signature: missing or wrong signature. 400 validation_error: not a JSON object, or locationId / messageId missing (locationId / companyId for UNINSTALL). 404 not_found: unknown application, or no webhook for it; 404 unknown_location: no connected organization for this CRM account.
Recording listening links
The secret link of a call recording, as a connected application receives it (public, signed token in the address).
GET /r/<token>
Listen to the recording of a call through its secret link (the link a connected application received).
The token is signed and bound to the recording: a recording erased, replaced or expired, a link forged or unknown, all answer the same 404. The audio (audio/mpeg) is served inline with Accept-Ranges: bytes, Cache-Control: private, no-store and X-Robots-Tag: noindex; 60 plays per minute per link.
Access: public (no authentication)
Rate limit: 60 per minute
Path parameters
| Name | Description |
|---|---|
token |
The secret token of the link (<call_id>.<expiry>.<signature>). |
Response: The MP3 of the recording (audio/mpeg, inline).
Errors 404 not_found: unknown, forged or expired link, or recording no longer available.
Emergency links
The page of an emergency of an on-call line, opened from the link of its text (public, random token in the address, expires).
GET /u/<token>
The page of an emergency, opened from the link of its text (no sign-in: the link is the right).
Shows the client, the line, when it came, the number to call back (a tel: link), the outcome, who took it, and the identification and the message when there are some. 60 openings per minute per link.
Access: public (no authentication)
Rate limit: 60 per minute
Path parameters
| Name | Description |
|---|---|
token |
The secret token of the link. |
Response: The page (text/html).
Errors 404 not_found: unknown, forged or expired link.
GET /u/<token>/<role>.mp3
The identification (identify) or the message (message) of an emergency, from the link of its text.
Access: public (no authentication)
Rate limit: 60 per minute
Path parameters
| Name | Description |
|---|---|
token |
The secret token of the link. |
role |
identify or message. |
Response: The MP3 (audio/mpeg, inline).
Errors 404 not_found: unknown, forged or expired link, or no such audio.
Security policy reports
The browsers report there what the content security policy of the web app (report mode) would have blocked (public, logged, never stored).
POST /api/v1/csp-report
A browser reports what the Content-Security-Policy of the web app would have blocked (report-only mode).
Access: public (no authentication)
Rate limit: 60 per minute
Response: Nothing (204).
Integrations
Third-party applications' access to an organization's teams: API key limited to the exposed teams and signed outbound webhook (permission integrations.manage).
GET /api/v1/integrations
List the integrations of the current organization.
Access: permission integrations.manage in the organization (profiles)
API keys: refused, 403 forbidden (API key not allowed on this route)
Response: integrations: List of integrations (the API key itself is never returned again). total: Number of integrations. events_available: Every event a webhook can receive (what a new integration gets by default).
POST /api/v1/integrations
Create an integration for the current organization.
The API key is returned once, in api_key; it cannot be read back later (use regenerate-key to get a new one). The webhook secret is readable at any time.
The webhook URL must be https on port 443, at most 500 characters, without credentials (user:password@), and every address its host resolves to must be public (no loopback, private, link-local, reserved, multicast or carrier-grade NAT address, IPv4 or IPv6, nor an address of the platform itself). It is checked again before each delivery, which then fails with "address not allowed" if the name now points elsewhere. Redirects are not followed.
The body must be a JSON object: anything else is refused with 400 validation_error, message "The request body must be a JSON object".
Access: permission integrations.manage in the organization (profiles)
API keys: refused, 403 forbidden (API key not allowed on this route)
Request body
| Name | Description |
|---|---|
name |
Name of the integration (required, a string of 80 characters max), shown as the sender of the messages it sends. |
team_ids |
Teams of the organization exposed to the integration (optional, empty = every team of the organization; a team of another organization is refused with 400). |
webhook_url |
Public https URL receiving the events (optional, 500 characters max; without it the integration only uses the API). Any other URL is refused with 400 validation_error, message "webhook_url must be a public https URL". |
events |
Events to deliver (optional, default all): message.received, message.sent, conversation.updated, conversation.note, call.summarized (the summary of a call, without the transcript), questionnaire.completed (a session of an SMS questionnaire ended), voicemail.summarized (the summary of a voicemail message, without its text), conversation.summarized (an analysis of a text conversation by Telma AI, without the messages), fax.summarized (a received fax Telma AI read and summarized, without the text read nor the PDF). An unknown event is refused with 400. |
enabled |
Whether the key and the webhook are active (optional, default true). |
Response: integration: The created integration (201). api_key: The API key, shown only once.
DELETE /api/v1/integrations/<integration_id>
Delete an integration: its API key is revoked and its webhook stops.
Access: permission integrations.manage in the organization (profiles)
API keys: refused, 403 forbidden (API key not allowed on this route)
Path parameters
| Name | Description |
|---|---|
integration_id |
Integration ID. |
Response: Success message.
GET /api/v1/integrations/<integration_id>
Get an integration.
Access: permission integrations.manage in the organization (profiles)
API keys: refused, 403 forbidden (API key not allowed on this route)
Path parameters
| Name | Description |
|---|---|
integration_id |
Integration ID. |
Response: integration: The integration.
PUT /api/v1/integrations/<integration_id>
Update an integration: only the fields sent change.
A new webhook URL follows the rules of the creation (public https URL on port 443, 500 characters max); the URL already saved, sent again as is, is not checked again (so the integration can be renamed or disabled while its receiver is down). Every delivery checks the URL before the call.
The body must be a JSON object: anything else is refused with 400 validation_error, message "The request body must be a JSON object".
Access: permission integrations.manage in the organization (profiles)
API keys: refused, 403 forbidden (API key not allowed on this route)
Path parameters
| Name | Description |
|---|---|
integration_id |
Integration ID. |
Request body
| Name | Description |
|---|---|
name |
New name (a string of 80 characters max), also shown as the sender of its messages (optional). |
team_ids |
New list of exposed teams (optional; replaces the list, empty = every team of the organization); the API key follows at once. |
webhook_url |
New public https URL (optional, 500 characters max); "" or null removes the webhook; the saved URL sent again unchanged is kept without a new check. A new URL resumes a paused webhook and resets its failure count and last error. Any other URL is refused with 400 validation_error, message "webhook_url must be a public https URL". |
events |
New list of events (optional; replaces the list). |
enabled |
false disables the API key and the webhook, true enables them again (optional). |
webhook_paused |
false resumes a webhook paused after repeated failures (optional; true is ignored). |
Response: integration: The updated integration.
GET /api/v1/integrations/<integration_id>/deliveries
Most recent webhook deliveries of an integration, newest first.
Deliveries are kept 7 days; the list holds the limit most recent ones, without pagination. The ping of /test is not listed.
Access: permission integrations.manage in the organization (profiles)
API keys: refused, 403 forbidden (API key not allowed on this route)
Path parameters
| Name | Description |
|---|---|
integration_id |
Integration ID. |
Query parameters
| Name | Description |
|---|---|
limit |
Number of rows (optional, integer, default 50, at most 200; values out of 1..200 are clamped). Not an integer: 400 validation_error. |
Response: deliveries: Event, URL, attempts, HTTP status, error ("HTTP <status>", "timeout", "connection error", "redirect not followed", "address not allowed" or "not sent"; never the content of the answer), timestamps and payload. total: Number of rows returned.
POST /api/v1/integrations/<integration_id>/regenerate-key
Replace the API key of an integration: the previous key stops working at once.
Access: permission integrations.manage in the organization (profiles)
API keys: refused, 403 forbidden (API key not allowed on this route)
Path parameters
| Name | Description |
|---|---|
integration_id |
Integration ID. |
Response: integration: The integration. api_key: The new API key in plain text, shown only once (the old key stops working). message: Confirmation.
POST /api/v1/integrations/<integration_id>/regenerate-secret
Replace the webhook signing secret of an integration.
Access: permission integrations.manage in the organization (profiles)
API keys: refused, 403 forbidden (API key not allowed on this route)
Path parameters
| Name | Description |
|---|---|
integration_id |
Integration ID. |
Response: integration: The integration with its new webhook secret. message: Confirmation.
POST /api/v1/integrations/<integration_id>/test
Send a ping event to the webhook URL and report the outcome (no retry).
The ping is signed like any event but has a reduced shape, {"id": "test", "event": "ping", "created_at", "organization_id", "integration": {"id", "name"}}, without team, conversation nor message, and its X-Telma-Delivery header is always test (do not deduplicate on it). It goes out even when the integration is disabled or its webhook paused, is not listed among the deliveries and does not count in the webhook health. The receiver should answer 2xx to ping and ignore the events it does not know.
The call follows the delivery rules: redirects are not followed, 5 s to connect, 10 s between two reads, 15 s in all; the body of the answer is neither kept nor returned. The ping waits 5 s at most for a free call slot (error "not sent" otherwise, nothing being sent). 10 tests per minute per organization (all its integrations together), then 429 rate_limited.
Access: permission integrations.manage in the organization (profiles)
API keys: refused, 403 forbidden (API key not allowed on this route)
Rate limit: 10 per minute
Path parameters
| Name | Description |
|---|---|
integration_id |
Integration ID. |
Response: success: Whether the endpoint answered 2xx in time. status_code: HTTP status returned by the endpoint, if any (null when no answer was received). error: null on success, else one of "HTTP <status>", "timeout", "connection error", "redirect not followed", "address not allowed" (the URL resolves to an address that is not public), "not sent" (no free call slot in time: Telma is busy, try again), "No webhook URL".
Fax
The faxes of the numbers dedicated to fax: received and sent, sending a PDF or photos with a cover page, cover page templates of the organization (capability fax; permissions fax.read, fax.send, settings voice.routing).
GET /api/v1/fax
The faxes of the teams of the user (received and sent), newest first.
Access: permission fax.read in the organization (profiles)
API keys: refused, 403 forbidden (API key not allowed on this route)
Query parameters
| Name | Description |
|---|---|
direction |
in or out (optional). number_id: one fax number (optional). skip, limit (50 by default, 100 at most). |
Response: faxes: [{id, team_id, phone_number_id, direction, remote, remote_name, remote_station, source (portal, app, ata, api, voice), status (in: received, failed; out: queued, sending, sent, failed), pages, error, attempts, next_attempt_at, has_pdf, cover, created_by, read, created_at, completed_at, expires_at, ai}], total, skip, limit. ai: Telma AI on the received faxes (capability fax_ai), null when it never took the fax, else {state (pending: waits for the worker; processing: being read; retry: an attempt failed, tried again after 1, 5 then 30 minutes; done; failed: could not be read; skipped: not read, see error), summary, reason (what the document is, one line), sender (who sent it, as written on the document, or null), fields [{label, value}] (the useful data written on it: numbers, amounts, dates, at most 12), actions (sentences: what the document asks the team to do), actions_due (beside actions: the deadline written, YYYY-MM-DD or an ISO instant in UTC, else null), actions_done (beside actions: true once someone marked it done), actions_overdue (beside actions: the deadline passed), language (of the summary), text_chars (characters read on the pages), error (failed: ocr_unavailable, ocr_failed, ocr_timeout, unreadable_tiff, no_document, provider_error; skipped: daily_limit (the daily cap of the platform), no_text (nothing could be read), unavailable (Telma AI was turned off since)), done_at}; the fields of the summary are empty until done. The team room gets fax_ai_update {fax_id, ai} when the reading ends or an action is marked.
DELETE /api/v1/fax/<fax_id>
Delete a fax and its files (its sender, or voice.routing); a fax being sent cannot be deleted (409).
Access: permission fax.send or voice.routing in the organization (profiles)
API keys: refused, 403 forbidden (API key not allowed on this route)
GET /api/v1/fax/<fax_id>
One fax; reading it marks it read for the user.
Access: permission fax.read in the organization (profiles)
API keys: refused, 403 forbidden (API key not allowed on this route)
Response: fax: As in GET /fax (with its ai).
PUT /api/v1/fax/<fax_id>/ai/actions/<index>
Mark an action Telma AI read on a fax done, or open it again: whoever reads the fax. The mark follows the text of the action (who and when are kept).
Access: permission fax.read in the organization (profiles)
API keys: refused, 403 forbidden (API key not allowed on this route)
Path parameters
| Name | Description |
|---|---|
index |
The position of the action in ai.actions. |
Request body
| Name | Description |
|---|---|
done |
true: done; false: open again (required). |
Response: fax: The fax, its ai.actions_done updated. The team room gets fax_ai_update {fax_id, ai}.
Errors 400 validation_error (field done or index). 404 not_found: unknown fax, a fax the user does not read, or no summary.
GET /api/v1/fax/<fax_id>/pdf
The fax as a PDF (received, or what was sent with its cover page).
Access: permission fax.read in the organization (profiles)
API keys: refused, 403 forbidden (API key not allowed on this route)
POST /api/v1/fax/<fax_id>/retry
Send again a fax that failed (a new series of attempts).
Access: permission fax.send in the organization (profiles)
API keys: refused, 403 forbidden (API key not allowed on this route)
GET /api/v1/fax/<fax_id>/text
The text Telma AI read on the pages of a received fax (OCR), masked like a transcript (card numbers, social insurance numbers, dates of birth; health information when the organization asks): « Voir le texte lu ». Never in the lists.
Access: permission fax.read in the organization (profiles)
API keys: refused, 403 forbidden (API key not allowed on this route)
Response: text: The text, the pages separated by a line « --- page n --- » (several pages). pages: Pages of the fax. pages_read: Pages read (30 at most). chars: Characters of the text. read_at: When it was read (ISO 8601 UTC).
Errors 404 not_found: unknown fax, a fax the user does not read, or no text read (Telma AI did not read it, or not yet).
POST /api/v1/fax/cover-preview
The cover page as it would be sent (PDF), for a template and fields.
Request body (JSON): template_id: A template (default: the default template). fields: {to_name, to_company, subject, message, from_name}. to: The recipient's number (optional). pages: Pages of the documents (optional).
Access: permission fax.send or voice.routing in the organization (profiles)
API keys: refused, 403 forbidden (API key not allowed on this route)
GET /api/v1/fax/covers
The cover page templates of the organization (the default first).
Access: permission fax.send or voice.routing in the organization (profiles)
API keys: refused, 403 forbidden (API key not allowed on this route)
Response: covers: [{id, name, sender_name, company, address, phone, fax, email, footer, has_logo, is_default}].
POST /api/v1/fax/covers
Create a cover page template (name required; 20 per organization).
Access: permission voice.routing in the organization (profiles)
API keys: refused, 403 forbidden (API key not allowed on this route)
Response: cover: The template, 201.
DELETE /api/v1/fax/covers/<cover_id>
Access: permission voice.routing in the organization (profiles)
API keys: refused, 403 forbidden (API key not allowed on this route)
PUT /api/v1/fax/covers/<cover_id>
Change a cover page template (same fields as POST).
Access: permission voice.routing in the organization (profiles)
API keys: refused, 403 forbidden (API key not allowed on this route)
DELETE /api/v1/fax/covers/<cover_id>/logo
Access: permission voice.routing in the organization (profiles)
API keys: refused, 403 forbidden (API key not allowed on this route)
PUT /api/v1/fax/covers/<cover_id>/logo
The logo of a template (multipart file: PNG or JPEG, 2 MB at most); printed in grayscale.
Access: permission voice.routing in the organization (profiles)
API keys: refused, 403 forbidden (API key not allowed on this route)
GET /api/v1/fax/numbers
The fax numbers of the organization the user works with (their teams'), with their settings for voice.routing.
Access: permission fax.read or fax.send or voice.routing in the organization (profiles)
API keys: refused, 403 forbidden (API key not allowed on this route)
Response: numbers: [{id, number, label, team {id, name}, settings {emails, endpoint_id} (voice.routing only)}].
PUT /api/v1/fax/numbers/<phone_id>
Where a fax received on this number goes, besides the Fax page of its team.
Access: permission voice.routing in the organization (profiles)
API keys: refused, 403 forbidden (API key not allowed on this route)
Request body
| Name | Description |
|---|---|
emails |
Addresses that receive each fax as a PDF (5 at most). |
endpoint_id |
The endpoint of an ATA port whose fax machine prints each fax (null: none). |
Response: number: The fax number with its settings.
POST /api/v1/fax/send
Send a fax from a fax number of one of the user's teams.
Request body (multipart): from_number_id: The fax number it is sent from (required). to: The fax number of the recipient (10 digits, or + and the country code). files: PDF, JPEG or PNG (photos of pages: one page each), 10 files and 20 MB each at most, put end to end. cover: JSON {include (default true), template_id (default: the default template of the organization), fields {to_name, to_company, subject, message, from_name}}: the cover page, first, with the date and the pages. source: portal or app (optional, default portal).
Access: permission fax.send in the organization (profiles)
API keys: refused, 403 forbidden (API key not allowed on this route)
Response: fax: The fax (status queued), 201. It is sent in a few seconds; busy or unanswered, it is tried again after 5 then 15 minutes.
File retention
How long the faxes, call recordings and voicemail messages are kept: one year by default, longer (up to 10 years) with a tier at a fixed monthly price the organization chooses; the domain's default and tiers.
GET /api/v1/domains/<domain_id>/organizations/<organization_id>/retention
How long the files of an organization of the domain are kept (as GET /organizations/current/retention, tier preview included).
Access: platform permission platform_admin or domain_admin (domain_admin: only its domains, domain_id)
API keys: refused, 403 forbidden (API key not allowed on this route)
Path parameters
| Name | Description |
|---|---|
domain_id |
Domain ID. |
organization_id |
Organization ID. |
Response: As GET /organizations/current/retention.
PUT /api/v1/domains/<domain_id>/organizations/<organization_id>/retention
Choose the tier of an organization of the domain (as PUT /organizations/current/retention, without the automatic recharge). Journaled.
Errors are {error, message}: 400 validation_error (field tier); 404 not_found; 409 confirm_required {would_expire}.
Access: platform permission platform_admin or domain_admin (domain_admin: only its domains, domain_id)
API keys: refused, 403 forbidden (API key not allowed on this route)
Path parameters
| Name | Description |
|---|---|
domain_id |
Domain ID. |
organization_id |
Organization ID. |
Request body
| Name | Description |
|---|---|
tier |
The key of a tier, or null for the domain's default. |
confirm |
Erase the files the shorter retention leaves behind. |
Response: As PUT /organizations/current/retention.
GET /api/v1/domains/<domain_id>/retention-settings
The retention of the files of the domain: the default and the tiers its organizations may choose.
Access: platform permission platform_admin or domain_admin (domain_admin: only its domains, domain_id)
API keys: refused, 403 forbidden (API key not allowed on this route)
Path parameters
| Name | Description |
|---|---|
domain_id |
Domain ID. |
Response: retention_settings: {default_days (365 by default), tiers [{key, days, monthly, storage_gb}] (by default 30d, 90d, 180d and 365d at 9, 19, 29 and 49 a month, with 5, 15, 30 and 60 GB of file storage)}. holders: {
PUT /api/v1/domains/<domain_id>/retention-settings
Change the retention of the files of the domain (the fields given). New files follow at once; the files already stored keep their end of retention until their organization changes its tier. Journaled.
Errors are {error, message}: 400 validation_error with field; 409 tier_in_use {tier, organizations}: a tier removed while organizations hold it.
Access: platform permission platform_admin or domain_admin (domain_admin: only its domains, domain_id)
API keys: refused, 403 forbidden (API key not allowed on this route)
Path parameters
| Name | Description |
|---|---|
domain_id |
Domain ID. |
Request body
| Name | Description |
|---|---|
default_days |
Days a file is kept without a tier, 1 to 3650. The recordings and voicemail messages follow it unless the voice settings of the domain set their own (PUT /domains/<id>/voice-settings). |
tiers |
The whole list [{key, days, monthly, storage_gb}]: key (lowercase letters, digits, - and _), days 1 to 3650, monthly price 0 to 10000, storage_gb (file storage the tier includes, 0 to 100000; 0 or absent: the space of the domain); keys unique. |
Response: retention_settings: As GET.
GET /api/v1/organizations/current/retention
How long the files of the organization are kept: faxes, call recordings and voicemail messages. The faxes and the voicemail messages are kept one year (the domain's default), the call recordings as long as the plan says (7 days by default); a tier keeps the recordings longer, at a fixed monthly price that includes file storage, billed on the anniversary statement.
Access: permission organization.settings or billing.view or billing.manage in the organization (profiles)
API keys: refused, 403 forbidden (API key not allowed on this route)
Query parameters
| Name | Description |
|---|---|
tier |
A tier key (or none) to preview: adds preview {tier, days_by_kind, would_expire (files the next purge would erase with that tier: their end of retention is already past)}. |
Response: retention: {default_days (the domain's default, 365 unless the domain changed it), tier (the key held, or null), since, days (how long the call recordings are kept), base_days (how long they are kept without a tier: the plan of the organization), days_by_kind {fax, recording, voicemail} (0: kept forever; a tier never shortens a kind), monthly (price of the tier held, 0 without), storage_gb (file storage the tier held includes, 0 without), tiers [{key, days, monthly, storage_gb}]}.
PUT /api/v1/organizations/current/retention
Choose how long the files of the organization are kept. The files already stored follow at once: a longer tier prolongs them, a shorter one (or none) shortens them, and the files whose end of retention is then past are erased by the next purge (within the hour). Journaled.
Errors are {error, message}: 403 forbidden without billing.manage; 400 validation_error (field tier: unknown tier); 402 auto_recharge_required (a tier that costs something needs the automatic recharge with a card); 409 confirm_required {would_expire}: files would be erased, send again with confirm true.
Access: permission organization.settings in the organization (profiles)
API keys: refused, 403 forbidden (API key not allowed on this route)
Request body
| Name | Description |
|---|---|
tier |
The key of a tier of GET (tiers), or null for the domain's default. |
confirm |
Erase the files the shorter retention leaves behind (required when would_expire > 0). |
Response: retention: As GET. would_expire: Files the next purge erases.
File storage
The space the files of each organization take (faxes, call recordings, voicemail messages, sounds, meetings, MMS, conversation files): a part included, then a price by the GB and by the month on the anniversary statement; the domain's setting and ranking.
GET /api/v1/domains/<domain_id>/organizations/<organization_id>/storage
The space the files of an organization of the domain take (as GET /organizations/current/storage).
Access: platform permission platform_admin or domain_admin (domain_admin: only its domains, domain_id)
API keys: refused, 403 forbidden (API key not allowed on this route)
Path parameters
| Name | Description |
|---|---|
domain_id |
Domain ID. |
organization_id |
Organization ID. |
Response: As GET /organizations/current/storage.
GET /api/v1/domains/<domain_id>/storage
The space the files of each organization of the domain take, the largest first (organizations without a file are left out).
Access: platform permission platform_admin or domain_admin (domain_admin: only its domains, domain_id)
API keys: refused, 403 forbidden (API key not allowed on this route)
Path parameters
| Name | Description |
|---|---|
domain_id |
Domain ID. |
Response: settings: {included_gb, per_gb_month, block_gb}. organizations: [{id, name, domain_id, bytes, files, by_kind, used_gb, billable_gb, estimated_amount}] (500 at most). truncated (boolean): More organizations than listed. totals: {bytes, files, used_gb, estimated_amount}.
GET /api/v1/domains/<domain_id>/storage-settings
The storage of the files the domain bills its organizations: the space included and the price of a GB beyond it.
Access: platform permission platform_admin or domain_admin (domain_admin: only its domains, domain_id)
API keys: refused, 403 forbidden (API key not allowed on this route)
Path parameters
| Name | Description |
|---|---|
domain_id |
Domain ID. |
Response: storage_settings: {included_gb (5 by default), per_gb_month (0.50 by default), block_gb (10 by default)}.
PUT /api/v1/domains/<domain_id>/storage-settings
Change the storage of the files the domain bills (the fields given). The next statements follow. Journaled.
Errors are {error, message}: 400 validation_error with field.
Access: platform permission platform_admin or domain_admin (domain_admin: only its domains, domain_id)
API keys: refused, 403 forbidden (API key not allowed on this route)
Path parameters
| Name | Description |
|---|---|
domain_id |
Domain ID. |
Request body
| Name | Description |
|---|---|
included_gb |
GB included for every organization, 0 to 100000 (to the tenth). |
per_gb_month |
Price of a GB beyond the included space, by the month, 0 to 100. |
block_gb |
The space beyond the included one is billed by whole blocks of this many GB, an integer from 1 to 1000. |
Response: storage_settings: As GET.
GET /api/v1/organizations/current/storage
The space the files of the organization take on the file store: faxes, call recordings, voicemail messages, sounds, video meetings, MMS attachments and the files of the conversations. A part is included; beyond it, each GB (rounded up to the tenth) is billed by the month on the anniversary statement, measured when the statement is made.
Access: permission organization.settings or billing.view or billing.manage in the organization (profiles)
API keys: refused, 403 forbidden (API key not allowed on this route)
Response: storage: {bytes, files, by_kind {fax, recording, voicemail, sound, meeting, mms, chat: {bytes, files}}, used_gb, included_gb (5 by default; the space of the retention tier when the organization holds one), per_gb_month (price of a GB beyond the included space, 0.50 by default), block_gb (the space beyond is billed by whole blocks of this many GB, 10 by default), billable_gb (GB billed beyond the included space), estimated_amount (what the next statement would bill if the space stayed as it is)}.
Voice: phones and ATAs
Desk phones and analog adapters (ATAs) Telma configures: model, MAC address and endpoint of each line (permission voice.endpoints, capability sip).
GET /api/v1/voice/phones
Physical phones and ATAs of the current organization.
Access: permission voice.endpoints in the organization (profiles)
API keys: refused, 403 forbidden (API key not allowed on this route)
Response: phones: [{id, model, model_label, model_auto (added by its family, model not yet told by the phone), detected {label, firmware, key} | null (what the phone says it is), vendor, mac, label, timezone, lines [{port, endpoint_id, endpoint {id, label, extension, username, enabled} | null}], use_https, provisioning {profile_rule, profile_url, secure_since, common_rule (the same for every phone, inside activation only; to type in the phone or give by DHCP option 66/160)}, activation {open_until, minutes, taken {at, ip, user_agent} | null}, admin_password (of the phone's web page), ztp {vendor, service, state (registered | failed | not_configured), at, error} | null (null: the maker has no redirection service), last_fetch {at, secure, ip, user_agent, full} | null, created_at, updated_at}].
POST /api/v1/voice/phones
Add a phone or an ATA.
Access: permission voice.endpoints in the organization (profiles)
API keys: refused, 403 forbidden (API key not allowed on this route)
Request body
| Name | Description |
|---|---|
model |
A key of GET /voice/phones/models (400 validation_error, field model). |
mac |
Its MAC address, with or without separators (400 validation_error, field mac, also when another phone has it). |
label |
Its name (required, 80 characters at most). |
lines |
[{port, endpoint_id}] (optional): the endpoint whose account each line registers with; an endpoint goes on one line of one phone only. |
timezone |
IANA time zone of the phone's clock (optional, America/Toronto by default). |
e911_address |
(optional) The address where this phone is, when it is NOT at the address of the number its lines present (a phone at home, an adapter at a cottage): the phone gets its own 9-1-1 number at once, registered with this address, as in POST /voice/phones/<id>/e911-number. Same fields as PUT /voice/numbers/<id>/e911. |
Response: phone: The created phone (as in GET /voice/phones), 201.
Errors 422 e911_address_required (numbers [{id, number, label}]): a line presents a number that has no 9-1-1 address; enter it first (PUT /voice/numbers/<id>/e911), or give the phone its own address (e911_address). 400 validation_error (field e911_address.<field>), 409 number_unavailable: as in POST /voice/phones/<id>/e911-number; the phone is not added.
DELETE /api/v1/voice/phones/<phone_id>
Remove a phone: its URL stops at once, and it leaves its maker's redirection service. The phone keeps the accounts it already has until it is reset; renew the password of its endpoints (POST /voice/endpoints/<id>/reset-password) to cut it off for good.
Access: permission voice.endpoints in the organization (profiles)
API keys: refused, 403 forbidden (API key not allowed on this route)
PUT /api/v1/voice/phones/<phone_id>
Change a phone: label, mac, lines, timezone, use_https (false: the phone stays on HTTP), modules (what its expansion modules show: overflow, colleagues, contacts, both; null = the organization's), ringtone (telma, classic1 to classic8; null = the organization's), directory (the contacts of its directory: auto = the automatic book of the organization, private = the private contacts of the member of its first line, none, or book:<id> = a named book of GET /contacts/books; null = the organization's).
The phone takes the change at its next fetch (on reboot, then every 24 hours).
Access: permission voice.endpoints in the organization (profiles)
API keys: refused, 403 forbidden (API key not allowed on this route)
Response: phone: The phone (as in GET /voice/phones).
DELETE /api/v1/voice/phones/<phone_id>/activation
Close the window of the common address before its end (the phone's own addresses keep working).
Access: permission voice.endpoints in the organization (profiles)
API keys: refused, 403 forbidden (API key not allowed on this route)
Response: phone: The phone, with activation.open_until null.
POST /api/v1/voice/phones/<phone_id>/activation
Let the phone configure itself from the common address (provisioning.common_rule) for the next 30 minutes, once: the first fetch of its profile closes the window and gives it an HTTPS address of its own (the former one stops). For a phone reset to its factory settings, or a new one.
Access: permission voice.endpoints in the organization (profiles)
API keys: refused, 403 forbidden (API key not allowed on this route)
Response: phone: The phone, with activation {open_until, minutes, taken}.
DELETE /api/v1/voice/phones/<phone_id>/e911-number
The phone is back at the address of the number its lines present: its own 9-1-1 number is given back (its address is removed at the provider) and its 9-1-1 calls present the number of their line again.
Access: permission voice.endpoints in the organization (profiles)
API keys: refused, 403 forbidden (API key not allowed on this route)
Response: phone: The phone (as in GET /voice/phones).
Errors 404 not_found, 422 e911_address_required (numbers): a line presents a number without a 9-1-1 address; enter it first (PUT /voice/numbers/<id>/e911). The 9-1-1 number is kept.
POST /api/v1/voice/phones/<phone_id>/e911-number
Give a phone its own 9-1-1 number: for a phone or an adapter that is NOT at the address of the number its lines present (a desk phone at home that presents the company's number, an adapter at a cottage).
A 9-1-1 call reaches the emergency centre with the address registered for the number it presents. This phone gets a local number of its own (near the given address when one is available), registered with the given address and presented ONLY on its 9-1-1 calls; its ordinary calls keep presenting the number of their line. A callback of the emergency centre on that number rings the phone (its first line). Included in the plan: no fee, not counted with the numbers. Until the address is active (a few business days), a 9-1-1 call from the phone hears to hang up and call from a cell phone, never with the address of its lines' number.
Access: permission voice.endpoints in the organization (profiles)
API keys: refused, 403 forbidden (API key not allowed on this route)
Request body
| Name | Description |
|---|---|
address |
Where the phone is: {name (person or company, required), first_name, street_number, unit, street_name (required), city (required), province (two letters, required), postal_code (required, must match the province), other (floor, directions)}. |
Response: phone: The phone (as in GET /voice/phones), with e911_number {id, number, pending (bought, not delivered yet), e911 (as in GET /voice/e911)}, 201.
Errors 400 validation_error (field), 404 not_found, 409 already (the phone has its 9-1-1 number), 409 number_unavailable, 502/503 when no number can be obtained now.
POST /api/v1/voice/phones/<phone_id>/renew-token
New provisioning URL: the former one and the phone's HTTPS token stop at once (a phone still on them must be given the new one, as after a factory reset).
Access: permission voice.endpoints in the organization (profiles)
API keys: refused, 403 forbidden (API key not allowed on this route)
Response: phone: The phone with its new provisioning URL.
POST /api/v1/voice/phones/<phone_id>/ztp
Register the phone again with its maker's redirection service (after a failure, or once the service is set up).
Access: permission voice.endpoints in the organization (profiles)
API keys: refused, 403 forbidden (API key not allowed on this route)
Response: phone: The phone, with ztp {vendor, service, state (registered | failed | not_configured), at, error}.
GET /api/v1/voice/phones/models
Phone and ATA models Telma can provision.
Access: permission voice.endpoints in the organization (profiles)
API keys: refused, 403 forbidden (API key not allowed on this route)
Response: models: [{key, vendor, label, lines (lines or FXS ports), kind (ata | desk | dect), https_first, auto (true: the family without its model, which the phone tells at its first fetch)}].
GET /api/v1/voice/phones/settings
Settings shared by all the phones of the organization (they take a change at their next fetch: every night, or when restarted).
Access: permission voice.endpoints in the organization (profiles)
API keys: refused, 403 forbidden (API key not allowed on this route)
Response: settings: {admin_password (of the phones' web page, the same on all of them), language (member: the language of the member of the first line | fr | en), timezone, time_format (24h | 12h), keys (all | teams | list | none: the colleagues put on the keys), key_endpoint_ids (for list, in the order of the keys), modules (what the expansion modules of the Yealink models that take them show: overflow = the colleagues the phone's keys cannot hold, colleagues = all of them, the phone's keys keeping its lines, contacts = the named contacts of the phone's directory, both = colleagues then contacts; a phone may choose its own), directory (the contacts of the directory, after the colleagues: auto = the automatic book of the organization, private = the private contacts of the member of the phone's first line, none, or book:<id> = a named book; a phone may choose its own), directory_books ([{id, name, entries_count}]: the named books it may show), directory_contacts (directory is not none; kept for the former clients), resync_hour (0 to 23), use_https (for a phone added from now on), voicemail_key, voicemail_number, logo, startup_sound (the brand's startup jingle on the Poly), ringtone (telma = the ringtone composed for Telma, Telma domain only; classic1 to classic8 = the built-in ones of the phone; a phone may choose its own), logo_available (the brand's wallpaper and jingle are offered to this organization)}.
PUT /api/v1/voice/phones/settings
Change the shared settings of the phones.
Access: permission voice.endpoints in the organization (profiles)
API keys: refused, 403 forbidden (API key not allowed on this route)
Response: settings: The settings (as in GET /voice/phones/settings); 400 validation_error with field on a wrong value.
Voice: 9-1-1 addresses
9-1-1 civic address of each number, sent to the provider; required for the numbers the lines of a phone or an adapter present (permission voice.endpoints or voice.routing, capability sip).
GET /api/v1/voice/e911
The 9-1-1 address of each voice number of the current organization.
A 9-1-1 call from a desk phone or an adapter reaches the emergency centre with the address of the number it presents, once that address is active; a phone that has its own 9-1-1 number presents that one. Calls from the mobile app, a softphone and the web phone never use it: the app hands 9-1-1 to the cell phone.
Access: permission voice.endpoints or voice.routing in the organization (profiles)
API keys: refused, 403 forbidden (API key not allowed on this route)
Response: numbers: [{id, number, label, e911 {eligible (false: toll-free), address {name, first_name, street_number, unit, street_name, city, province, postal_code, other} | null, status (null, pending, sent, active, removing), registered (9-1-1 calls of the number reach the emergency centre now), active_since, updated_at}, phone {id, label} | null (the 9-1-1 number of that phone: presented only on its 9-1-1 calls, see POST /voice/phones/<id>/e911-number)}]. phones_without_address: [{id, label, numbers [{id, number, label}]}]: phones and adapters whose lines present a number without an address.
DELETE /api/v1/voice/numbers/<phone_id>/e911
Remove the 9-1-1 address of a number of the current organization. Journalled.
Access: permission voice.endpoints or voice.routing in the organization (profiles)
API keys: refused, 403 forbidden (API key not allowed on this route)
Response: e911: As in GET /voice/e911 (status removing until the provider has removed it).
Errors 404 not_found, 409 e911_number_of_phone: the 9-1-1 number of a phone keeps its address; remove the phone's 9-1-1 number instead (DELETE /voice/phones/<id>/e911-number).
PUT /api/v1/voice/numbers/<phone_id>/e911
Enter or change the 9-1-1 address of a number of the current organization. Journalled.
The address is sent to the provider in the next batch (status pending, then sent, then active). Until it is active, a 9-1-1 call from a phone presenting the number hears to hang up and call from a cell phone; while a change is on its way, the former address stays in force.
Access: permission voice.endpoints or voice.routing in the organization (profiles)
API keys: refused, 403 forbidden (API key not allowed on this route)
Request body
| Name | Description |
|---|---|
address |
{name (person or company, required), first_name, street_number, unit, street_name (required), city (required), province (two letters, required), postal_code (required, must match the province), other (floor, directions)}. |
Response: e911: As in GET /voice/e911.
Errors 400 validation_error (field), 404 not_found.
Phone provisioning (public)
The configuration file a phone or an ATA fetches by itself (public, token of the phone in the address).
GET /prov/<filename>
The common address: the phone named by the MAC of the file, inside its activation window only.
Access: public (no authentication)
Rate limit: 30 per minute
GET /prov/<token>/<path:filename>
Access: public (no authentication)
Rate limit: 30 per minute
GET /prov/brand/<filename>
The wallpaper of the phones of the Telma domain at a screen size (nothing secret: no token).
Access: public (no authentication)
Rate limit: 60 per minute
GET /prov/brand/sound/<filename>
The startup jingle of the Poly and the Telma ringtone (8 kHz for the Yealink, 16 kHz for the Poly) of the phones of the Telma domain (mono WAV; nothing secret: no token).
Access: public (no authentication)
Rate limit: 60 per minute
GET /prov/ca/<path:filename>
The root certificate the phones trust for their HTTPS profile.
Access: public (no authentication)
Rate limit: 120 per minute
Website widget (public)
Endpoints called by visitors' browsers: script and conversation start. Unauthenticated, rate limited.
GET /widget/<key>.js
The embeddable script of a widget, with its display configuration inlined.
Never rate limited: every visitor of every customer site loads it, and in production they all arrive from the same address (a counter per address would be shared by all the sites). It is public, cached by browsers (5 minutes) and has no side effect.
Access: public (no authentication)
Rate limit: exempt from the general per-address limit
Path parameters
| Name | Description |
|---|---|
key |
Widget key (from the embed code). |
Response: JavaScript that renders the form on the host page.
POST /widget/<key>/start
Start a conversation from the widget: the team's welcome text is sent to the visitor.
Rate limited per widget (10 per minute, 60 per hour, 500 per day) and per destination number, whatever the widget (3 per hour, 10 per day), whatever other headers the request carries. A demonstration number of the widget (its demo_numbers) has its own, wider limits (30 per hour, 100 per day) and gets the text again even moments after the last one. A conversation that was closed with this number is reopened. The destination must be in a country the widget's domain allows (its setting verification.phone_countries; Canada and the United States otherwise): a widget key is public, this bounds what it can make the organization pay. Only the welcome texts handed to the SMS provider are counted: a slot is taken on each counter, atomically, right before the text is handed over, so simultaneous starts never send more than the limits; a refused request (unknown widget, other site, honeypot hit, invalid number, misconfigured widget, text already sent moments ago) is not counted, and the slots are given back when the text could not be handed to the provider (provider not enabled, insufficient balance). Beyond, 429 with error rate_limited and retry_after (also in Retry-After); a widget or a number already at its limit gets it before any other check.
Access: public (no authentication)
Rate limit: exempt from the general per-address limit
Path parameters
| Name | Description |
|---|---|
key |
Widget key. |
Request body
| Name | Description |
|---|---|
phone |
The visitor's mobile number: a North American number (its 10 digits, with or without 1 or +1 in front, or "+" and the 10 digits), always counted and texted as +1 and the 10 digits; or an international number typed with "+" and another country code (8, 9 or 11 to 15 digits in all: "+" and 10 digits is read as a North American number), accepted only when the widget's domain allows a country outside North America. Anything else, a North American number whose area code or exchange starts with 0 or 1 included, or a number of a country the domain does not allow: 400 invalid_number. |
lang |
Language of the visitor, fr or en (optional, default: the widget's default language); picks the welcome text. |
Response: ok: true when the text was sent (or was sent moments ago to the same number). message: Text to show the visitor. already_sent: true when this number just received the text (a second start within a minute sends nothing).
Errors 404 not_found: widget unknown or disabled. 403 forbidden: the site is not among the allowed origins. 400 invalid_number (malformed, or a country the domain does not allow). 429 rate_limited. 503 configuration_error: the widget has no team or number. 503 send_failed (or the code of the refusal, for example a provider not enabled or an insufficient balance): the text was not handed to the provider.
Portability check (public)
The telma.ca website asks whether a Canadian number can be brought to Telma. Unauthenticated, from the site's pages only, rate limited per address and for the whole platform; answers kept 24 h per number.
POST /api/v1/public/port-check
Whether a Canadian number can be brought to Telma (public, for the website).
Only from the website's pages (Origin among PUBLIC_PORT_CHECK_ORIGINS). Rate limited per client address (5 per minute, 20 per hour, 50 per day: 429 rate_limited with Retry-After); the answers are kept 24 h per number; the provider is asked at most 20 times per minute, 200 per hour, 1000 per day for the whole platform (beyond: 503 busy).
Access: public (no authentication)
Rate limit: 5 per minute; 20 per hour; 50 per day
Request body
| Name | Description |
|---|---|
number |
A Canadian local number, as typed (« 514 555-0199 », « +1 514 555 0199 »). |
Response: number (E.164), portable (bool), carrier (the current carrier, when known), rate_center.
Errors 403 forbidden (another site), 400 invalid_number, not_canadian or toll_free (toll-free numbers are ported with the team, not here), 429 rate_limited, 503 unavailable (switched off, or the provider failed) or busy (the platform's ceiling).
Push notifications
Firebase Cloud Messaging tokens of the Telma and VoXoS mobile apps (one entry per device).
POST /api/v1/push/register
Register the FCM token of this app installation for the current user.
Called at every login and whenever Firebase rotates the token. A token previously attached to another user is moved to the current one only when the request names the same installation (device_id) as the former registration (another person signs in on the same phone); a token presented with another device id (or without one) is refused, 409 token_in_use, and the former registration is disabled and journaled. A former registration without device id (older apps) is moved as before.
Access: authenticated (JWT or API key)
API keys: refused to restricted keys (limited to a team, or an integration's), 403 forbidden
Request body
| Name | Description |
|---|---|
token |
FCM registration token. |
platform |
"ios" or "android". |
app |
"textos" (Telma app, Messages + Voice; default; "telma" is taken as "textos", the name stored in production) or "ubinext" (Ubinext app): which notifications this installation receives (400 validation_error for any other value). |
device_id |
Stable identifier of the installation (optional). |
app_version |
App version (optional). |
voip_token |
PushKit (VoIP) token of the installation, iOS only (optional): a hexadecimal string of 64 to 200 characters (stored lower-cased), null to erase it, absent to keep the stored one. The incoming-call push of an installation that has one goes through Apple's VoIP push (the app reports the call to CallKit at once) instead of FCM. A PushKit token belongs to one installation: it is taken off any other registration that carried it. 400 validation_error (field voip_token) for another value or on android. |
Response: token: The registered token (masked), with has_voip_token.
GET /api/v1/push/tokens
Devices registered for push notifications by the current user.
Access: authenticated (JWT or API key)
API keys: refused to restricted keys (limited to a team, or an integration's), 403 forbidden
Response: tokens: List of the user's tokens (masked).
POST /api/v1/push/unregister
Stop notifying this app installation (logout on the device).
Access: authenticated (JWT or API key)
API keys: refused to restricted keys (limited to a team, or an integration's), 403 forbidden
Request body
| Name | Description |
|---|---|
token |
FCM registration token. |
Response: success: True. disabled: Whether a token of the current user was disabled.
GET /api/v1/push/web/key
The key a browser subscribes to the notifications of the web app with (Web Push, VAPID).
The web app shows its own notices while one of its windows is open. With a subscription, the browser also shows « Incoming call » and the inbound text messages when no window is open, as long as it runs in the background.
Access: authenticated (JWT or API key)
API keys: refused to restricted keys (limited to a team, or an integration's), 403 forbidden
Response: enabled (boolean): Whether the platform sends Web Push notifications. public_key: The applicationServerKey of PushManager.subscribe (base64url), null when disabled.
POST /api/v1/push/web/subscribe
Store the push subscription of this browser for the current user (PushSubscription.toJSON()).
Sent by the web app at each start of a session once the notifications are allowed. The subscription of a browser belongs to the user signed in there: another user who signs in takes it over. Refused in a « sign in as » session.
Access: authenticated (JWT or API key)
API keys: refused to restricted keys (limited to a team, or an integration's), 403 forbidden
Request body
| Name | Description |
|---|---|
endpoint |
Address of the push service of the browser, https, one of the known push services (required). |
keys |
{p256dh, auth} as the browser gives them, base64url (required). |
standalone |
Whether the page runs as an installed app (its own window). |
Response: subscription: {id, service, standalone, user_agent, created_at, updated_at}.
Errors 400 validation_error: endpoint is not an https address of a known push service, or a key is missing (field). 403 impersonation_forbidden: « sign in as » session. 503 web_push_disabled: the platform has no Web Push key.
POST /api/v1/push/web/unsubscribe
Forget the push subscription of this browser (sign out, notifications switched off).
Access: authenticated (JWT or API key)
API keys: refused to restricted keys (limited to a team, or an integration's), 403 forbidden
Request body
| Name | Description |
|---|---|
endpoint |
The endpoint of the subscription (required). |
Response: success: True. removed (boolean): Whether a subscription of the current user was deleted.
Voice (VoXoS)
VoXoS endpoints (softphone provisioning), call flows, ring groups, sounds, blacklist, calls and recordings, call codes and call requests. Organizations with the voice service enabled only.
GET /api/v1/voice/access-numbers
Access numbers to dial to place a call with a call code (one per country, Canada first).
Legacy, without interface: the apps no longer use the call codes (an incoming call rings the softphone, outbound calls go through it); the route stays until it is removed.
Needs the call_codes capability (403 capability_required) on top of voxos; not open to API keys.
Access: permission voice.use in the organization (profiles)
API keys: refused, 403 forbidden (API key not allowed on this route)
Query parameters
| Name | Description |
|---|---|
country |
ISO 3166-1 alpha-2 country (CA, US...). Default: the country of the user's phone, else every country. |
Response: access_numbers: List of {country, number, label}.
GET /api/v1/voice/blacklist
Numbers, prefixes and regions the organization refuses (calls received and placed).
Access: permission voice.blacklist in the organization (profiles)
API keys: refused to restricted keys (limited to a team, or an integration's), 403 forbidden
Response: entries: List of {id, description, type (number|prefix|region), number (number and prefix), region_id and area_codes (region), direction (both|inbound|outbound), note, created_at}.
POST /api/v1/voice/blacklist
Add an entry to the blacklist. An entry that already exists is updated and answered with 200.
The blacklist applies to every routing of the organization's numbers (flows, direct dial, groups, forward) for entries that apply to incoming calls, to the calls placed from the SIP endpoints and with call codes (the call is hung up and recorded with the disposition BLOCKED, nothing is charged). An entry written before E28 (no direction) keeps its old reading: incoming calls only in the flows that enable the blacklist.
Access: permission voice.blacklist in the organization (profiles)
API keys: refused to restricted keys (limited to a team, or an integration's), 403 forbidden
Request body
| Name | Description |
|---|---|
type |
number (default), prefix or region. |
number |
Phone number (10 or 11 digits, with or without +) for a number; digits of the prefix for a prefix (with + they are international digits, without it a North American prefix: 514555 is 1514555). |
region_id |
Region of GET /voice/blacklist/regions (region). |
description |
Name of the entry (24 characters at most). |
direction |
both (default), inbound or outbound. |
note |
Why (optional, 120 characters at most). |
Response: entry: The entry.
DELETE /api/v1/voice/blacklist/<entry_id>
Remove an entry from the blacklist.
Access: permission voice.blacklist in the organization (profiles)
API keys: refused to restricted keys (limited to a team, or an integration's), 403 forbidden
Path parameters
| Name | Description |
|---|---|
entry_id |
Entry ID. |
Response: success: True.
PATCH /api/v1/voice/blacklist/<entry_id>
Rename an entry (its number, prefix or region never changes). The note and the direction can change too.
Access: permission voice.blacklist in the organization (profiles)
API keys: refused to restricted keys (limited to a team, or an integration's), 403 forbidden
Path parameters
| Name | Description |
|---|---|
entry_id |
Entry ID. |
Request body
| Name | Description |
|---|---|
description |
New name (24 characters at most). |
note |
New note. |
direction |
both, inbound or outbound. |
Response: entry: The entry.
GET /api/v1/voice/blacklist/regions
Regions that can be blocked in one entry (provinces, toll-free and premium numbers), with their area codes.
Access: permission voice.blacklist in the organization (profiles)
API keys: refused to restricted keys (limited to a team, or an integration's), 403 forbidden
Response: version: Version of the table (changes when a region changes). regions: List of {id, label (in the language of the request), labels {fr, en}, area_codes}.
GET /api/v1/voice/call-info
What the next call of one of the user's SIP endpoints will be like (the (i) of the app's dial pad).
Access: member of the organization; An enabled endpoint assigned to the user, in any of their organizations (404 not_found otherwise), judged in the organization of the endpoint: it needs the voice service and the sip capability there (403 voice_not_enabled, 403 capability_required with capability sip) and the user needs voice.use there (403 forbidden), whatever their current organization; not available to API keys (403 forbidden).
API keys: refused, 403 forbidden (API key not allowed on this route)
Query parameters
| Name | Description |
|---|---|
endpoint_id |
An endpoint assigned to the user (required; see GET /voice/provision). |
Response: call_info: {endpoint_id, caller_id {name, number, hidden} (hidden: the endpoint's outbound calls go out with a private caller ID, the app may show it for one call; what an outbound call presents: the label of the endpoint, the voice number its settings choose, else the number routed to it, else the first voice number of the organization), extension, recording (the next outbound call is recorded), recording_detail {endpoint (the endpoint's own setting), imposed_by (organization, number or null: a rule of the organization that wins on outbound calls), skip_allowed (the user may skip it for his next call), skip_next (the next outbound call is skipped)}, diagnostics {level (0 off, 1 summary, 2 detailed, 3 full), name, until}}.
PUT /api/v1/voice/call-info/recording
Record, or not, the calls one's own endpoint makes (its settings.recording, from the (i) of the app's dial pad). A rule of the organization (see recording_detail) still wins on outbound calls. Journalled.
Access: member of the organization; An enabled endpoint assigned to the user, in any of their organizations (404 not_found otherwise), judged in the organization of the endpoint: it needs the voice service and the sip capability there (403 voice_not_enabled, 403 capability_required with capability sip) and the user needs voice.use there (403 forbidden), whatever their current organization; not available to API keys (403 forbidden).
API keys: refused, 403 forbidden (API key not allowed on this route)
Query parameters
| Name | Description |
|---|---|
endpoint_id |
An endpoint assigned to the user (required). |
Request body
| Name | Description |
|---|---|
enabled |
Record the calls of the endpoint (required). |
Response: call_info: As GET /voice/call-info.
PUT /api/v1/voice/call-info/recording/skip-next
Skip, or not, the recording the organization imposes on the next outbound call of one's own endpoint (used once by the voice server, valid 15 minutes). Journalled.
Access: member of the organization; An enabled endpoint assigned to the user, in any of their organizations (404 not_found otherwise), judged in the organization of the endpoint: it needs the voice service and the sip capability there (403 voice_not_enabled, 403 capability_required with capability sip) and the user needs voice.use there (403 forbidden), whatever their current organization; not available to API keys (403 forbidden).
API keys: refused, 403 forbidden (API key not allowed on this route)
Query parameters
| Name | Description |
|---|---|
endpoint_id |
An endpoint assigned to the user (required). |
Request body
| Name | Description |
|---|---|
skip |
True to skip the next outbound call, false to take the skip back (required). |
Response: call_info: As GET /voice/call-info.
Errors 403 recording_skip_not_allowed: the organization does not let its users skip the recording, or a Telma AI plan of the endpoint imposes it. 409 recording_not_imposed: nothing imposes the recording of the next call (the endpoint's own setting decides).
POST /api/v1/voice/call-requests
Ask for a call code: dial the access number, then type the code, and the destination is called.
Legacy, without interface: the apps no longer use the call codes (an incoming call rings the softphone, outbound calls go through it); the route stays until it is removed.
The app shows access.tel_uri (tel:+15145550100,12345: access number, a pause, the code) to the phone dialler. The code lives 180 seconds; a new request cancels the user's pending one. The call is limited to max_duration seconds, computed from the balance and the tariff, and billed afterwards like any outbound call. Checks, in order: capability, body, verified phone (422 phone_not_verified), origin number (403 number_disabled), suspended account (402 account_suspended, E46: negative balance past the grace period), balance (402 insufficient_balance with balance), destination (422 blocked_call with reason invalid_destination, premium, blacklisted or no_rate), duration the balance allows (402), access number of the country (404 no_access_number), 60 requests per hour (429 rate_limited with retry_after).
Access: permission voice.use in the organization (profiles)
API keys: refused, 403 forbidden (API key not allowed on this route)
Request body
| Name | Description |
|---|---|
from_number_id |
ID of the organization's number the call comes from (the caller ID shown to the callee). |
to |
Destination number (E.164, or a North American number). |
mode |
"access_code" (the only mode). |
country |
Country of the access number (default: the country of the user's phone, else CA). |
Response: call_request: {id, status "pending", from {number_id, number}, to, max_duration, expires_at, created_at}. access: {number, code, ttl, tel_uri}.
DELETE /api/v1/voice/call-requests/<request_id>
Cancel a call request (the user who made it only).
Legacy, without interface: the apps no longer use the call codes (an incoming call rings the softphone, outbound calls go through it); the route stays until it is removed.
A pending request becomes cancelled and its code stops working. A request that is already over (cancelled, expired, finished) answers success without any change; a call in progress (used or connected) answers 409 conflict.
Access: permission voice.use in the organization (profiles)
API keys: refused, 403 forbidden (API key not allowed on this route)
Path parameters
| Name | Description |
|---|---|
request_id |
Call request ID. |
Response: success: True.
GET /api/v1/voice/call-requests/<request_id>
Follow a call request (the user who made it only).
Legacy, without interface: the apps no longer use the call codes (an incoming call rings the softphone, outbound calls go through it); the route stays until it is removed.
Access: permission voice.use in the organization (profiles)
API keys: refused, 403 forbidden (API key not allowed on this route)
Path parameters
| Name | Description |
|---|---|
request_id |
Call request ID. |
Response: call_request: {id, status (pending, used, connected, expired, cancelled or failed), from {number_id, number}, to, max_duration, expires_at, created_at, used_at, connected_at, ended_at, answered_seconds, failure, call_id}; the last fields appear when they exist. A pending request past its expiry reads expired.
GET /api/v1/voice/calls
Call records (CDR) of the organization, newest first by default.
Needs the voxos capability (403 voice_not_enabled otherwise). A member without voice.calls.all sees only the calls of their own SIP endpoints (made or rung); with it, every call of the organization.
Access: member of the organization; voice.use in the current organization; with endpoint_id, judged in the organization of the endpoint instead (whatever the current organization), which needs the voice service and the sip capability (403 voice_not_enabled, 403 capability_required with capability sip, 403 forbidden without voice.use there).
API keys: refused to restricted keys (limited to a team, or an integration's), 403 forbidden
Query parameters
| Name | Description |
|---|---|
skip |
Pagination offset (default 0; below 0 counts as 0). |
limit |
Page size (default 50, brought back into 1-100). A skip or limit that is not an integer is refused (400 validation_error with field). |
direction |
"inbound" or "outbound" (aliases "in" and "out"; optional). |
from |
Calls started at or after this ISO 8601 date or datetime (optional; no time zone means UTC). |
to |
Calls started at or before this ISO 8601 datetime; a date alone (2026-10-31) covers that whole day (optional). |
number_id |
ID of the phone number the calls went through (optional). |
status |
"all" (default), "answered", "missed" (not answered, not blocked), "blocked" (hung up by the blacklist) or "closed" (the missed calls received while their voice flow was closed: closed.missed). |
call_type |
direct, flow, forward, voicemail, screened, blocked, callcode, internal, queue, fax_in, fax_out or fax_ata (optional). |
sort |
start (default), duration, cost, caller or callee. |
order |
"desc" (default) or "asc". |
endpoint_id |
Only the calls of this SIP endpoint, which must be assigned to the user (404 not_found otherwise, whatever the user's permissions): those it placed or that rang it, in the organization of the endpoint (any of the user's organizations), plus the missed calls of that organization no endpoint was rung for that the user sees (a call received while the call flow was closed, a caller who hung up waiting for an agent): the ones whose missed call notification reached the user. The history of the app, the same on every device of the endpoint. Each call then carries mine. |
ai_state |
Telma AI: only the calls in this state of transcription (pending, processing, done, failed, waiting_credit, waiting_plan, deleted). |
ai_q |
Telma AI: words searched in the summaries and the transcripts (needs voice.recordings, ignored otherwise). |
criterion |
Telma AI, repeatable: key:value, only the calls whose summary gave this value to this criterion (true/false for yes or no; needs voice.recordings). |
party |
Only the calls with this phone number at either end, caller or callee (E.164 or a North American number in any usual notation; optional): the history of one contact. 400 validation_error (field party) for anything else. |
ai_semantic |
Telma AI: search by meaning, a question in plain words ("customers unhappy about the delay", 300 characters at most; needs voice.recordings, ignored otherwise; the organization needs the transcription capability). Compares the meaning of the summaries (summary, reason, actions) of the 5000 newest summarized calls of the period with the question: only the closest calls (200 at most, above a minimum similarity), best first (sort and order ignored), each with ai_score. Combines with the other filters. 503 semantic_search_unavailable when the service is off or does not answer; 429 rate_limited past its budget (30 searches a minute per user, 600 an hour per organization). |
Response: calls: The page of calls (see GET /voice/calls/<id> for the fields), each with ai {state, status, summary, reason, actions, actions_done (beside actions: null, or {at, by, by_name} once marked done), criteria} of Telma AI (null when the call is not transcribed, or when the user has neither voice.recordings nor an endpoint in the call). With ai_semantic, each one has ai_score (similarity of meaning, 0 to 1, higher is closer). With endpoint_id, each one has mine {direction (outbound: the endpoint placed it, internal calls included; inbound: it rang), number (the other party: E.164 or short number), name (caller id name of an incoming call, label of an endpoint for a short number, else null), answered (by this endpoint, on any of its devices)}. total: Number of calls matching the filters, whatever the page. skip: Offset applied. limit: Page size applied.
GET /api/v1/voice/calls/<call_id>
One call record of the organization (without voice.calls.all: a call of the user's own SIP endpoints, 404 otherwise).
Access: permission voice.use in the organization (profiles)
API keys: refused to restricted keys (limited to a team, or an integration's), 403 forbidden
Path parameters
| Name | Description |
|---|---|
call_id |
Call ID. |
Response: call: id, organization_id, phone_number_id, endpoint_id, caller and callee (the dialplan digits), from ({number, e164}) and to ({number, e164}, plus extension and label for a short number: the endpoint called or a test number; for a call group or a call queue, a transfer of the web phone: target (group or queue), label, and number = its name), direction (an internal call is outbound), call_type (direct, flow, forward, voicemail, screened, blocked, callcode, internal, queue: waited in a call queue, fax_in: a fax received on a fax number, fax_out: a fax sent, fax_ata: a fax received from the fax port of an adapter), fax_id (a fax call: its fax in GET /fax/<id> when the user reads it there, else null; absent for another call), status (answered, voicemail, blocked, busy, failed: it never rang, no_answer: an outbound call nobody took, missed: an incoming call nobody took), dial_status, call_request_id, forwarded, clid, start, answer, end, duration, billsec, disposition, cost and currency (null until rated), billing (rating state, null until looked at), source_number and access_number (call-code calls), voicemail (the call ended in the voicemail), block_reason (paused, sleep, channel_limit, blacklist, no_credit: an outbound call refused for lack of credit or account_suspended for a blocked call), queue (a call of a call queue: {team_id, team_name, state (answered, abandoned: the caller hung up while waiting, overflowed), exit_reason (timeout, empty, full, closed), wait_seconds, missed: no agent took it, then status missed}; null for another call), closed (the call reached a voice flow outside its business hours: {flow_id, flow_name, missed: nobody took it and no voicemail was left, « received after hours », then status missed}; null for another call), recording ({state (processing, available, failed, deleted, expired), available_at, expires_at, size, duration} or null), inserted_at, parts (the other answered parts of the same call the user may see, the oldest first: a blind transfer is summarized in parts, each to the endpoint that took it; [{id, start, answer, billsec, answered_by {id, label, extension} or null, callee, ai_state, recording_state}], empty for a call of one part).
GET /api/v1/voice/colleagues
The colleagues, call groups and call queues one may transfer a call of the web phone or of the mobile app to: every extension of the organization that has a user and a short number (yours left out), with whether they are free now. Never the other party nor any number of their calls.
Open to every member who holds voice.use and has an enabled extension in the organization (with the voice service and sip; the webphone capability is not needed). Read it again on the Socket.IO event voice_presence {organization_id} (sent when the calls in progress of the organization change, at most about once a second), and from time to time for reach (a phone that registers sends no event).
Access: authenticated (JWT or API key)
API keys: refused, 403 forbidden (API key not allowed on this route)
Query parameters
| Name | Description |
|---|---|
organization_id |
The organization (one where you have an extension and voice.use); default: the current one, else the organization of your first such extension. |
Response: organization_id: The organization. colleagues: [{endpoint_id, user_id, name, label (the extension's label when it differs), extension (the short number to dial or transfer to), state (free, ringing, busy: in a call, on hold, or placing one), since (ISO 8601 UTC: the answer of the call, or since it rings; null when free), state_seconds, reach (online: a phone or app registered or a web phone open; push: an app woken by its push; offline: nothing will ring, the call goes to the colleague's forward or voicemail rules), dnd (do not disturb in force), forwarded (every call is forwarded), in_meeting and meeting_since (in a video meeting now), queue_paused and pause_reason (an agent of the call queues on a pause: break, lunch, meeting, training, other)}], the free and reachable first, then those who ring, the busy and those free but in a meeting or a pause, the do not disturb, the unreachable. A colleague in a meeting or on a pause stays transferable (the panel warns). groups: [{id, name, target (what to dial or transfer to: tg<id>, resolved by the voice server in your organization only), extension (the short number of the group, or null: dialing it from a phone of the organization rings the group too), members (extensions of the group with an active user), free (free and reachable), ringing, busy, unavailable (do not disturb or nothing to ring), externals (external numbers of the group)}], the call groups of the organization, by name. queues: [{id, name, target (tq<id>), agents, logged_in, available (agents free for a call now), waiting (calls waiting or offered), longest_wait_seconds (null without a call waiting)}], the enabled call queues of the organization, by name. parked: The calls parked now in the organization, as GET /voice/parked (2026-10-30). Each colleague also has voicemail_target (2026-10-30): what to transfer to so that the caller leaves a message in the colleague's own mailbox (tv<endpoint id>, « Messagerie »), null when their extension has no usable mailbox.
Errors 400 validation_error: organization_id is not an id (field: organization_id). 403 forbidden: you hold voice.use in no organization of your extensions, or have no extension (or not voice.use) in this one. 404 no_endpoint: no enabled SIP extension is assigned to you.
GET /api/v1/voice/default-number
The default outbound number of the current organization: the number the outbound calls of its extensions present when the extension chose none.
An outbound call presents, in this order: the number chosen on the extension (settings.caller_id_number_id of PUT /voice/endpoints/<id>), this default number, the number routed to the extension, the first voice number of the organization.
Access: permission voice.endpoints or voice.routing in the organization (profiles)
API keys: refused to restricted keys (limited to a team, or an integration's), 403 forbidden
Response: default_number: {number_id, number, label}, all null when the organization has no default.
PUT /api/v1/voice/default-number
Choose the default outbound number of the current organization. Journalled.
Access: permission voice.endpoints or voice.routing in the organization (profiles)
API keys: refused to restricted keys (limited to a team, or an integration's), 403 forbidden
Request body
| Name | Description |
|---|---|
number_id |
A voice number of the organization, or null for no default (required). |
Response: default_number: As GET.
Errors 400 validation_error (field: number_id).
POST /api/v1/voice/devices
The SIP account of this installation of the mobile app (one per device), to register all the time.
Every device of a user has its own account: a call to one of the user's endpoints rings every device at once (and the endpoint's own account, for a desk phone), and a call made by a device goes out as the endpoint it names in the header X-Telma-Poste (one of the user's endpoints, else the first of GET /voice/provision), and may name the number it presents in the header X-Telma-Number (the id of one of the numbers GET /contacts/<id>/reach offers under voice: those of the user's teams, the ones routed to their endpoints and the one their endpoint presents; every voice number of the organization with voice.calls.all; the voice server checks it again against the list this call keeps on the account, and presents the endpoint's own number for any other). The account is created at the first call, enabled again by the next ones; an installation signed in by another user gets a new password. Also send device_id = installation_id to POST /api/v1/push/register, so that a call push says which device it woke.
Access: authenticated (JWT or API key)
API keys: refused, 403 forbidden (API key not allowed on this route)
Request body
| Name | Description |
|---|---|
installation_id |
Id the app generated once for this installation, 8 to 64 letters, digits or dashes (required). |
platform |
ios or android (required). |
app_version |
Version of the app (optional). |
Response: device: {id, name, installation_id, platform, app_version, enabled, sip {server, port, transport, srtp, username, password, display_name}}; the server is the one of the user's first endpoint (as GET /voice/provision).
Errors 400 validation_error (field installation_id, platform or app_version). 403 device_revoked: the device was disabled (PUT /voice/devices/<id>); the app keeps the account of the endpoint. 404 no_endpoint: no enabled SIP endpoint is assigned to the user in an organization with the voice service.
PUT /api/v1/voice/devices/<device_id>
Disable a device (lost, replaced) or enable it again. A disabled device no longer rings nor calls, and its app cannot enable it by itself (POST /voice/devices answers 403 device_revoked); it then registers the account of its endpoint, as an app that predates the devices.
Access: authenticated (JWT or API key); The user of the device, or a member who holds voice.endpoints in the current organization when the user of the device has an endpoint there (404 not_found otherwise).
API keys: refused, 403 forbidden (API key not allowed on this route)
Path parameters
| Name | Description |
|---|---|
device_id |
The id of the device (GET /voice/my-devices, GET /voice/endpoints/<id>/devices). |
Request body
| Name | Description |
|---|---|
enabled |
false to disable, true to enable again (required). |
Response: device: As GET /voice/my-devices.
DELETE /api/v1/voice/devices/<installation_id>
The app signs out: the SIP account of this installation stops working.
Access: authenticated (JWT or API key)
API keys: refused, 403 forbidden (API key not allowed on this route)
Path parameters
| Name | Description |
|---|---|
installation_id |
The installation id sent to POST /voice/devices. |
Response: disabled (boolean): Whether an enabled account of the user was disabled.
GET /api/v1/voice/diagnostics
Diagnostics reports of the organization's calls, newest first.
Needs the sip capability on the organization.
Access: permission voice.endpoints in the organization (profiles)
API keys: refused to restricted keys (limited to a team, or an integration's), 403 forbidden
Query parameters
| Name | Description |
|---|---|
endpoint_id |
Only the reports of this endpoint (optional). |
skip |
Pagination offset (default 0). |
limit |
Page size (default 50, at most 100). |
Response: diagnostics: The page: id, endpoint_id, endpoint_name, level, direction, remote, sip_call_id, started_at, ended_at, created_at, size, app, problems (what the app found wrong, e.g. microphone_silent). total: Number of reports matching the filter. skip: Offset applied. limit: Page size applied.
POST /api/v1/voice/diagnostics
Upload the diagnostics report of a call, made by the app at its end when the diagnostics of the endpoint are on.
Only the parts of the current level of the endpoint are kept (a part of a higher level is dropped); SIP credentials (Authorization headers) are removed. Kept 30 days.
Access: member of the organization; An enabled endpoint assigned to the user, in any of their organizations (404 not_found otherwise), judged in the organization of the endpoint: it needs the voice service and the sip capability there (403 voice_not_enabled, 403 capability_required with capability sip) and the user needs voice.use there (403 forbidden), whatever their current organization; not available to API keys (403 forbidden).
API keys: refused, 403 forbidden (API key not allowed on this route)
Rate limit: 120 per hour
Request body
| Name | Description |
|---|---|
endpoint_id |
The endpoint of the call, assigned to the user (required). |
sip_call_id |
Call-ID of the call. |
direction |
inbound or outbound. |
remote |
The other party (number or name). |
started_at |
ISO 8601 dates of the call. |
ended_at |
ISO 8601 dates of the call. |
app |
{version, build, platform, os, device} of the app. |
summary |
Level 1 and above: one object (network, transport, srtp, codec, sip steps, rtp counters, microphone, playback, errors, problems). |
timeline |
Level 2 and above: one sample per second (at most 7200). |
sip_messages |
Level 2 and above: the SIP messages of the call as text (at most 500). |
logs |
Level 2 and above: the app's log lines of the call (at most 5000). |
rtp_trace |
Level 3: the RTP packet headers sent and received (at most 60000), never the audio. |
Response: diagnostic: {id, level} of the stored report.
Errors 400 validation_error: diagnostics off for the endpoint (field endpoint_id), report too large for its level (field size: 64 KB at level 1, 1 MB at level 2, 4 MB at level 3) or a malformed part.
DELETE /api/v1/voice/diagnostics/<diagnostic_id>
Delete a diagnostics report.
Access: permission voice.endpoints in the organization (profiles)
API keys: refused to restricted keys (limited to a team, or an integration's), 403 forbidden
Path parameters
| Name | Description |
|---|---|
diagnostic_id |
Report ID. |
Response: success: True.
GET /api/v1/voice/diagnostics/<diagnostic_id>
One diagnostics report, whole, with what the voice server saw of the call.
Access: permission voice.endpoints in the organization (profiles)
API keys: refused to restricted keys (limited to a team, or an integration's), 403 forbidden
Path parameters
| Name | Description |
|---|---|
diagnostic_id |
Report ID. |
Response: diagnostic: The fields of the list, plus summary, timeline, sip_messages, logs, rtp_trace (those of its level) and server {call (the call record matched by endpoint and time, as GET /voice/calls/<id>, or null), qos (the RTP statistics the voice server computed for each channel of the call at hang up: channel, rx/tx packets, lost, jitter, rtt)}.
GET /api/v1/voice/directory
The other endpoints of the organization of one's own endpoint, to call them by their short number (the contacts of the app). Never an SIP identifier nor a password.
Access: member of the organization; An enabled endpoint assigned to the user, in any of their organizations (404 not_found otherwise), judged in the organization of the endpoint: it needs the voice service and the sip capability there (403 voice_not_enabled, 403 capability_required with capability sip) and the user needs voice.use there (403 forbidden), whatever their current organization; not available to API keys (403 forbidden).
API keys: refused, 403 forbidden (API key not allowed on this route)
Query parameters
| Name | Description |
|---|---|
endpoint_id |
An endpoint assigned to the user (required); the organization is its own. |
Response: entries: [{id, label (the label of the endpoint, else its user's name, else its short number), extension, user_name}] of the enabled endpoints of the organization that have a short number, sorted by label, without the endpoint asking.
GET /api/v1/voice/endpoints
SIP endpoints (softphones, desk phones) of the current organization.
Needs the sip capability on the organization: 403 capability_required (with capability: sip) without it, 403 voice_not_enabled without voxos.
Access: permission voice.endpoints in the organization (profiles)
API keys: refused to restricted keys (limited to a team, or an integration's), 403 forbidden
Response: endpoints: [{id, name, label, organization_id, user_id, user {id, name, email}, server_id, server {id, name}, sip_server, sip_port, username, password, description, extension, enabled, max_contacts (null: the platform's), locked ({until, at, failures} while the voice server keeps it locked after wrong passwords, else null), settings (see PUT /voice/endpoints/<id>), diagnostics, ai ({plan, pending_plan, suspended}: its Telma AI plan, see GET /voice/ai), created_at, updated_at}].
POST /api/v1/voice/endpoints
Create a SIP endpoint; its username and password are generated.
Needs the sip capability on the organization: 403 capability_required (with capability: sip) without it, 403 voice_not_enabled without voxos.
The SIP username (also its name) is derived from the account code of the organization (3 letters and 4 digits, given with its first endpoint, e.g. cli0001), a 0, then the short number: cli0001042 for 42; a letter is added when that name is taken (cli0001042a). 409 conflict when no account code is left for the name of the organization.
Access: permission voice.endpoints in the organization (profiles)
API keys: refused to restricted keys (limited to a team, or an integration's), 403 forbidden
Request body
| Name | Description |
|---|---|
label |
Display name of the endpoint (e.g. "Poste de Marie"), the caller name of its calls (required): 200 characters at most, no line break or control character (400 validation_error, field label). |
user_id |
User of the organization (a member: 400 validation_error otherwise) who uses it from the mobile app (optional). |
server_id |
Voice server to place it on (optional, default: the least loaded enabled server). |
extension |
Short number (required, 400 validation_error with field extension without it): 2 to 5 digits, not starting with 0, unique in the organization among the endpoints and the call groups (409 conflict otherwise, with taken_by endpoint or group); another endpoint dials it to call this one. Reserved: 600, 601 (tests), 112, 999 and the N11 numbers such as 911 (400 validation_error, field extension). It never changes afterwards. |
settings |
Settings of the endpoint (optional), as in PUT /voice/endpoints/<id>. |
max_contacts |
Devices registered at once on the endpoint, 1 to 10 (optional; null or absent: the platform's, 3 by default). The app on a phone or a tablet and a SIP desk phone may share the endpoint: they all ring together and the first to answer takes the call; beyond the limit, the oldest registration is replaced (400 validation_error, field max_contacts). |
Response: endpoint: The created endpoint with its credentials.
DELETE /api/v1/voice/endpoints/<endpoint_id>
Delete an endpoint; numbers routed to it lose their routing. Its voicemail box is deleted too (its messages stay, for the admins), after a voicemail step that names it in a call flow or a group's fallback became hangup and a voicemail routing that names it went back to the box of the number.
Needs the sip capability on the organization: 403 capability_required (with capability: sip) without it, 403 voice_not_enabled without voxos.
Access: permission voice.endpoints in the organization (profiles)
API keys: refused to restricted keys (limited to a team, or an integration's), 403 forbidden
Path parameters
| Name | Description |
|---|---|
endpoint_id |
Endpoint ID. |
Response: success: True.
PUT /api/v1/voice/endpoints/<endpoint_id>
Rename an endpoint, assign it to a user, enable or disable it, change its settings.
Needs the sip capability on the organization: 403 capability_required (with capability: sip) without it, 403 voice_not_enabled without voxos.
Access: permission voice.endpoints in the organization (profiles)
API keys: refused to restricted keys (limited to a team, or an integration's), 403 forbidden
Path parameters
| Name | Description |
|---|---|
endpoint_id |
Endpoint ID. |
Request body
| Name | Description |
|---|---|
label |
Display name (optional), same rules as at the creation. |
user_id |
User of the organization, or null to unassign (optional). |
enabled |
Whether the endpoint can register (optional). |
server_id |
Move the endpoint to another voice server (optional); the app picks the new address at its next start. |
extension |
Short number (as at the creation), only for an endpoint that has none yet (created before short numbers were required); the short number of an endpoint never changes and is never removed (400 validation_error, field extension). |
max_contacts |
Devices registered at once on the endpoint, 1 to 10, or null for the platform's (optional), as at the creation. |
diagnostics |
Diagnostics of the calls of the endpoint, {level (0 off, 1 summary, 2 detailed, 3 full), hours (1 to 168, default 24: they stop by themselves)}; the app uploads a report at the end of each call (GET /voice/diagnostics). |
settings |
Settings of the endpoint (the fields given change): language (fr, en, es or null: the language of the messages it hears on its own calls), ring_seconds (5 to 120, or null: how long it rings before its no-answer handling; null = what the routing or its box says, 30 s for an internal call), dnd (do not disturb: it never rings, the call goes to its busy handling; turning it on or off here makes it without end), forward {always, busy, no_answer} (a 10-digit North American number or the short number of another endpoint of the organization; null = none; always never rings it), follow_me {enabled, numbers (1 to 3 external numbers rung together once it did not answer), ring_seconds (10 to 120)}, recording (the calls it makes are recorded), caller_id_number_id (a voice number of the organization its outbound calls present; null = the number routed to it, else the first voice number), hide_caller_id (its calls to outside go out with a private caller ID, never for 9-1-1; one call may show it: X-Telma-Privacy 0 from the app or the web phone), allowed_networks (up to 20 IPv4 or IPv6 addresses or CIDR networks: its outbound calls go out only from a device in one of them; empty: anywhere; registration and incoming calls are not restricted). The answers also carry dnd_until (ISO 8601 in UTC, or null: no end), the end of a do not disturb set by the user for their whole account (PUT /auth/me/dnd), never accepted here (400); the dnd answered is the one in force (false once dnd_until passed). 400 validation_error with field; 422 destination_not_allowed (with field, reason, country) for a forward the organization may not make. |
Response: endpoint: The updated endpoint (with settings).
GET /api/v1/voice/endpoints/<endpoint_id>/devices
The devices (installations of the mobile app) that ring for an endpoint: those of its user, each with its own SIP account (POST /voice/devices). They ring for every endpoint of that user.
Needs the sip capability on the organization.
Access: permission voice.endpoints in the organization (profiles)
API keys: refused to restricted keys (limited to a team, or an integration's), 403 forbidden
Path parameters
| Name | Description |
|---|---|
endpoint_id |
An endpoint of the current organization (404 not_found otherwise). |
Response: devices: [{id, name, installation_id, platform, app_version, enabled, revoked, created_at, provisioned_at, state}], state: registered (connected now), push (asleep, woken by a call push), offline, disabled; empty for an endpoint without user.
POST /api/v1/voice/endpoints/<endpoint_id>/reset-password
Generate a new SIP password for an endpoint (phones must be reconfigured).
Needs the sip capability on the organization: 403 capability_required (with capability: sip) without it, 403 voice_not_enabled without voxos.
Access: permission voice.endpoints in the organization (profiles)
API keys: refused to restricted keys (limited to a team, or an integration's), 403 forbidden
Path parameters
| Name | Description |
|---|---|
endpoint_id |
Endpoint ID. |
Response: endpoint: The endpoint with its new password.
POST /api/v1/voice/endpoints/<endpoint_id>/unlock
Unlock an endpoint the voice server locked after repeated wrong passwords (its outbound calls were refused). Journalled. Change its password first if it may have leaked.
Needs the sip capability on the organization.
Access: permission voice.endpoints in the organization (profiles)
API keys: refused to restricted keys (limited to a team, or an integration's), 403 forbidden
Path parameters
| Name | Description |
|---|---|
endpoint_id |
Endpoint ID. |
Response: endpoint: The endpoint (as GET /voice/endpoints), locked null.
GET /api/v1/voice/endpoints/status
Registration state of the organization's endpoints, as seen by the voice server.
Needs the sip capability on the organization: 403 capability_required (with capability: sip) without it, 403 voice_not_enabled without voxos.
The app of the mobile app is not registered between two calls: the voice server wakes it by a push when a call comes in. reachable names the endpoints it would wake (their user has a device that receives the incoming-call push), whatever their registration state. dnd names the endpoints in do not disturb now (set by their user in the mobile app or in the endpoint's settings): they never ring, whatever their registration state.
Access: permission voice.endpoints in the organization (profiles)
API keys: refused to restricted keys (limited to a team, or an integration's), 403 forbidden
Response: statuses: {endpoint name: state} ("Not in use", "In use", "Unavailable"...), empty when the voice server is unreachable. reachable: {endpoint name: {devices, platforms, last_seen, app_versions}}: the endpoints whose user has a device woken by a push for an incoming call (devices: how many; platforms: ios, android; last_seen: ISO 8601, the last time the app registered that device; app_versions: versions of the app); the others are absent. dnd: {endpoint name: end}: the endpoints in do not disturb now, with its end (ISO 8601 UTC, null without end); the others are absent.
GET /api/v1/voice/flows
Voice flows of the organization (what happens to a call: prompts, menus, ringing, voicemail).
Reading with voice.use; creating, changing and deleting need voice.routing.
Access: permission voice.use in the organization (profiles)
API keys: refused to restricted keys (limited to a team, or an integration's), 403 forbidden
Response: flows: List of flows, by name, each with active_on ([{phone_number_id, number}]: the numbers that run it).
POST /api/v1/voice/flows
Create a voice flow. The name is unique in the organization: a name already taken gets " (1)", " (2)"...
Access: permission voice.routing in the organization (profiles)
API keys: refused to restricted keys (limited to a team, or an integration's), 403 forbidden
Request body
| Name | Description |
|---|---|
name |
Flow name (80 characters at most). |
language |
"fr" or "en" (prompts and voicemail language). |
languages |
{fallback, switch_key, extras [{lang, fallback, switch_key, sounds {sound id: translated sound id}}]}: extra languages of the menu, the key that switches to each one and the sounds played in it (a sound without translation is played as is). |
cid_prefix |
Text prepended to the caller name on the phones (optional); 20 characters at most (a longer text is cut), a string without control characters or line breaks and without double quotes, backslashes, commas, ampersands, pipes, dollar signs, braces and backticks (400 validation_error, field cid_prefix). |
business_hours |
{enabled, timezone, schedule {mon..sun: [["09:00","17:00"]]}, closures [{start, end, repeat none|yearly|weekly, until, ranges, label}], exceptions [{date, ranges}], closed_step}. A closure is dated (the year counts): repeat "none" is one occurrence, "yearly" comes back every year, "weekly" every 7 days, until ends the repetition and ranges are the hours the line stays open on those days. |
closed |
Menu used outside the business hours, {steps, keys, retry}, same form as the open one (optional, the business_hours.closed_step is used when it is empty). |
blacklist_enabled |
Hang up on the callers of the organization's blacklist (default true). |
steps |
Ordered steps: {action: play|menu|wait|dial|groupdial|forward|goto|voicemail|hangup|back|queue|random|meeting (meeting: the caller types the code of a video meeting of the organization and enters it by phone, capability video; the step ends the flow), directory (dial by name: the caller types the first letters of the first or last name of a member of the organization on the keypad, hears the names found one at a time spoken by the text-to-speech, 1 rings the member's endpoint (its settings, then its voicemail box, then the on_fail of the step), 2 the next name, * a new search; the members are the users of the organization with an enabled endpoint; after three searches that lead nowhere, the flow goes on), sound_id (message played before the action), seconds, endpoint_id, group_id, flow_id, mailbox (voicemail step: the id of a voice number of the organization whose voicemail takes the message, or of a voicemail box of GET /voice/mailboxes with the voicemail_boxes capability, or empty for the number called), number, ext, screening 0|1|2, display caller|called, on_fail (a step; forward, dial, groupdial, directory, and a menu with extension_dial), timeout, repeat (menu: times the prompt plays, 0 means 2, 5 at most), digit_timeout, extension_dial (menu: the caller may type the short number of an endpoint of the organization; a key of the menu wins, a prefix conflict is settled by digit_timeout; with it, on_fail is allowed on the menu: what follows when the endpoint dialled does not answer, else back to the menu), push_enabled, system_sound (play and menu, instead of sound_id: 1 to 6 standard prompts of GET /voice/system-prompts, only those names (another one: 400 validation_error with the field of the step), fr: or en: before a name fixes its language, an item {name, only: [fr|en]} is played only when the call is in one of those languages), wait ring|music (dial and groupdial: what the caller hears while ringing, absent = the setting of the number)}. |
keys |
{key: step | {description, steps [step], then menu|hangup}}: what a key does during a menu step; a key has 1 to 4 characters among 0-9, * and #. |
retry |
{attempts, step}: how many times the steps repeat, then what to do. |
hours_source |
Follow the hours of a team of the organization instead of typing them twice: {team_id} (or {kind: "team", id}); null = the flow's own business_hours (optional). While it follows, the flow is open when the team is (its ranges, past midnight included, and its closures; a team without hours = always open); its own business_hours are kept but unused, its closed menu and closed_step stay its own. No chain: 400 hours_source_chained when the team follows a flow itself, or when teams follow this flow's hours; 400 validation_error for a team of another organization or a personal inbox. |
Response: flow: The created flow, with hours_source {kind, id, name, missing} (null without link), effective_business_hours (the hours it runs on while it follows a team, else null) and hours_followers [{kind, id, name}] (the teams that follow its hours).
DELETE /api/v1/voice/flows/<flow_id>
Delete a flow. Refused (409 flow_in_use with active_on) while numbers run it, unless ?force=true, which also takes the routing off those numbers. Other flows or groups that jump to it always refuse (409 conflict), and so do teams that follow its hours (409 hours_followed with followers [{kind, id, name}]: remove their link first).
Access: permission voice.routing in the organization (profiles)
API keys: refused to restricted keys (limited to a team, or an integration's), 403 forbidden
Path parameters
| Name | Description |
|---|---|
flow_id |
Flow ID. |
Query parameters
| Name | Description |
|---|---|
force |
true to delete a flow that numbers run (their calls are no longer routed). |
Response: success: True.
GET /api/v1/voice/flows/<flow_id>
One voice flow.
Access: permission voice.use in the organization (profiles)
API keys: refused to restricted keys (limited to a team, or an integration's), 403 forbidden
Path parameters
| Name | Description |
|---|---|
flow_id |
Flow ID. |
Response: flow: The flow with active_on.
PUT /api/v1/voice/flows/<flow_id>
Update a voice flow (same fields as the creation, all optional; a key not given keeps its value).
Access: permission voice.routing in the organization (profiles)
API keys: refused to restricted keys (limited to a team, or an integration's), 403 forbidden
Path parameters
| Name | Description |
|---|---|
flow_id |
Flow ID. |
Response: flow: The updated flow.
POST /api/v1/voice/flows/<flow_id>/assign
Set the numbers that run a flow: the list is the full set, a number left out loses its routing to this flow, a number listed is routed to it (replacing its former routing).
Access: permission voice.routing in the organization (profiles)
API keys: refused to restricted keys (limited to a team, or an integration's), 403 forbidden
Path parameters
| Name | Description |
|---|---|
flow_id |
Flow ID. |
Request body
| Name | Description |
|---|---|
phone_number_ids |
Voice numbers of the organization that run the flow (empty list: none). |
Response: flow: The flow with its new active_on.
POST /api/v1/voice/flows/<flow_id>/duplicate
Copy a flow under a new name (made unique like on creation); the copy is not assigned to any number.
Access: permission voice.routing in the organization (profiles)
API keys: refused to restricted keys (limited to a team, or an integration's), 403 forbidden
Path parameters
| Name | Description |
|---|---|
flow_id |
Flow ID. |
Request body
| Name | Description |
|---|---|
name |
Name of the copy. |
Response: flow: The copy.
GET /api/v1/voice/groups
Call groups of the organization.
Reading with voice.use; creating, changing and deleting need voice.routing.
Access: permission voice.use in the organization (profiles)
API keys: refused to restricted keys (limited to a team, or an integration's), 403 forbidden
Response: groups: List of groups, each with extension (its short number, or null), stages (lists of members), members, fallback and used_by ({flows, numbers}).
POST /api/v1/voice/groups
Create a call group: stages rung one after the other, the members of a stage ring together.
Access: permission voice.routing in the organization (profiles)
API keys: refused to restricted keys (limited to a team, or an integration's), 403 forbidden
Request body
| Name | Description |
|---|---|
name |
Group name. |
extension |
Short number of the group (optional, null or "" for none): 2 to 5 digits, not starting with 0; a phone of the organization dials it to ring the group. Unique in the organization among the endpoints and the call groups (409 conflict with field extension and taken_by endpoint or group); reserved: 600, 601, 602 (tests), 112, 999 and the N11 numbers such as 911 (400 validation_error, field extension). |
stages |
Stages, each a list of members {type "endpoint", endpoint_id} or {type "external", number (North American), ext (digits sent once the call is answered)}. A stage with an extension only holds external numbers sharing it. At most 10 members per stage and 20 in all. |
endpoint_ids |
Endpoints of the group (former shape, used when stages is absent). |
strategy |
"ringall" (all at once, default) or "sequential" (one after the other); former shape, with endpoint_ids. |
timeout |
Ring time of each stage in seconds, 5 to 120 (default 20). |
push_enabled |
Wake the mobile apps by push (default true). |
ringing |
"generated" (the caller hears the ringing tone of the platform, default) or "real" (the caller hears the ringing of the called phones). |
fallback |
Step run when nobody answers: play, forward, voicemail, hangup, dial or goto (optional). |
Response: group: The created group.
DELETE /api/v1/voice/groups/<group_id>
Delete a call group; refused (409 conflict with used_by) while a flow or a number routing uses it.
Access: permission voice.routing in the organization (profiles)
API keys: refused to restricted keys (limited to a team, or an integration's), 403 forbidden
Path parameters
| Name | Description |
|---|---|
group_id |
Group ID. |
Response: success: True.
PUT /api/v1/voice/groups/<group_id>
Update a call group (same fields as the creation, all optional).
Access: permission voice.routing in the organization (profiles)
API keys: refused to restricted keys (limited to a team, or an integration's), 403 forbidden
Path parameters
| Name | Description |
|---|---|
group_id |
Group ID. |
Response: group: The updated group.
GET /api/v1/voice/moh
Music on hold of the organization: the free library of the platform, its own tracks, the playlists it may choose, and what it plays. Held calls always hear the chosen playlist; ringing plays it instead of the ringback tone while phones ring (groups, flows, forwards).
Access: permission voice.use in the organization (profiles)
API keys: refused to restricted keys (limited to a team, or an integration's), 403 forbidden
Response: library: Tracks of the free library [{id, name, duration_s, collection, author, author_url, license {name, url}, source_url}]. tracks: Tracks of the organization [{id, name, duration_s, size, rights_confirmed, used_by [{type class, id, name}]}]. classes: Playlists it may choose [{id, name, name_en (English name of a playlist of the platform, null for its own), platform, platform_default, sound_ids, order random|alpha}]: those of the platform, then its own. settings: Choice of the organization {class_id (null = the default of the platform), ringing}. numbers: Its voice numbers [{id, number, label, class_id (null = the organization's), ringing (null = the organization's)}]. limits: Limits of a track {max_per_account, min_duration_s, max_duration_s, max_bytes, formats}.
POST /api/v1/voice/moh/classes
Create a playlist of the organization (20 at most) from tracks of the library and of its own.
Access: permission voice.routing in the organization (profiles)
API keys: refused to restricted keys (limited to a team, or an integration's), 403 forbidden
Request body
| Name | Description |
|---|---|
name |
1 to 60 characters (required). |
sound_ids |
Tracks, 1 to 50, in this order (required). |
order |
random (default) or alpha (the order of the names). |
Response: class: The playlist.
DELETE /api/v1/voice/moh/classes/<class_id>
Delete a playlist of the organization; the organization and the numbers that chose it play the default music.
Access: permission voice.routing in the organization (profiles)
API keys: refused to restricted keys (limited to a team, or an integration's), 403 forbidden
Path parameters
| Name | Description |
|---|---|
class_id |
Playlist ID. |
Response: success: True.
PUT /api/v1/voice/moh/classes/<class_id>
Change a playlist of the organization (those of the platform cannot change: 404).
Access: permission voice.routing in the organization (profiles)
API keys: refused to restricted keys (limited to a team, or an integration's), 403 forbidden
Path parameters
| Name | Description |
|---|---|
class_id |
Playlist ID. |
Request body
| Name | Description |
|---|---|
name |
1 to 60 characters (optional). |
sound_ids |
Tracks, 1 to 50 (optional). |
order |
random or alpha (optional). |
Response: class: The playlist.
PUT /api/v1/voice/moh/numbers/<phone_id>
What one voice number plays, over the choice of the organization.
Access: permission voice.routing in the organization (profiles)
API keys: refused to restricted keys (limited to a team, or an integration's), 403 forbidden
Path parameters
| Name | Description |
|---|---|
phone_id |
Phone number ID. |
Request body
| Name | Description |
|---|---|
class_id |
Playlist ID, or null = the organization's (optional). |
ringing |
true, false, or null = the organization's (optional). |
Response: number: {id, number, label, class_id, ringing}.
PUT /api/v1/voice/moh/settings
What the organization plays: a playlist (its own or one of the platform; null = the default of the platform) and whether the music replaces the ringback tone while phones ring.
Access: permission voice.routing in the organization (profiles)
API keys: refused to restricted keys (limited to a team, or an integration's), 403 forbidden
Request body
| Name | Description |
|---|---|
class_id |
Playlist ID, or null (optional). |
ringing |
true: the music instead of the ringback tone; false: the ringback tone (optional). |
Response: settings: {class_id, ringing}.
POST /api/v1/voice/moh/tracks
Upload a track of music on hold (multipart/form-data). The organization must confirm it holds the rights to broadcast it on the phone (who and when are kept). Limits: 30 tracks, wav/mp3/m4a/ogg, 20 MB, 5 seconds to 15 minutes; refused uploads answer 400 with a code (format_invalid, empty_file, file_too_large, audio_unreadable, duration_too_short, duration_too_long, account_limit).
Access: permission voice.routing in the organization (profiles)
API keys: refused to restricted keys (limited to a team, or an integration's), 403 forbidden
Request body
| Name | Description |
|---|---|
file |
The audio file (required). |
name |
Name of the track (default: the file name). |
rights_confirmed |
true, the confirmation of the broadcast rights (required). |
Response: track: The created track.
DELETE /api/v1/voice/moh/tracks/<sound_id>
Delete a track of the organization; its playlists lose it (a playlist left empty plays the default music).
Access: permission voice.routing in the organization (profiles)
API keys: refused to restricted keys (limited to a team, or an integration's), 403 forbidden
Path parameters
| Name | Description |
|---|---|
sound_id |
Track ID. |
Response: success: True.
PUT /api/v1/voice/moh/tracks/<sound_id>
Rename a track of the organization.
Access: permission voice.routing in the organization (profiles)
API keys: refused to restricted keys (limited to a team, or an integration's), 403 forbidden
Path parameters
| Name | Description |
|---|---|
sound_id |
Track ID. |
Request body
| Name | Description |
|---|---|
name |
New name (required). |
Response: track: The track.
GET /api/v1/voice/moh/tracks/<sound_id>/file
The audio of a track, to listen to it in the portal: one of the library or one of the organization.
Access: permission voice.use in the organization (profiles)
API keys: refused to restricted keys (limited to a team, or an integration's), 403 forbidden
Path parameters
| Name | Description |
|---|---|
sound_id |
Track ID. |
Response: The file (audio/*).
GET /api/v1/voice/my-devices
The devices of the signed-in user (installations of the mobile app, each with its own SIP account): they ring for every endpoint of the user.
Access: authenticated (JWT or API key)
API keys: refused, 403 forbidden (API key not allowed on this route)
Response: devices: As GET /voice/endpoints/<id>/devices.
GET /api/v1/voice/my-endpoints
The endpoints of the current user in the current organization, with their settings (to set one's own do not disturb, forwards and follow me).
Needs the sip capability on the organization. Not available to API keys.
Access: permission voice.use in the organization (profiles); Only the endpoints assigned to the user.
API keys: refused, 403 forbidden (API key not allowed on this route)
Response: endpoints: [{id, label, extension, enabled, settings (as GET /voice/endpoints)}].
PUT /api/v1/voice/my-endpoints/<endpoint_id>/settings
Set one's own endpoint: do not disturb, forwards, follow me and the recording of the calls it makes (the other settings are an administrator's). A change of the recording is journalled, as PUT /voice/call-info/recording; a rule of the organization still wins on outbound calls.
Needs the sip capability on the organization. Not available to API keys.
Access: permission voice.use in the organization (profiles)
API keys: refused, 403 forbidden (API key not allowed on this route)
Path parameters
| Name | Description |
|---|---|
endpoint_id |
An endpoint of the current user in the current organization (404 not_found otherwise). |
Request body
| Name | Description |
|---|---|
dnd |
As the settings of PUT /voice/endpoints/<id>. Another setting: 400 validation_error; a forward the organization may not make: 422 destination_not_allowed. |
forward |
As the settings of PUT /voice/endpoints/<id>. Another setting: 400 validation_error; a forward the organization may not make: 422 destination_not_allowed. |
follow_me |
As the settings of PUT /voice/endpoints/<id>. Another setting: 400 validation_error; a forward the organization may not make: 422 destination_not_allowed. |
recording |
As the settings of PUT /voice/endpoints/<id>. Another setting: 400 validation_error; a forward the organization may not make: 422 destination_not_allowed. |
Response: settings: The settings of the endpoint after the change.
GET /api/v1/voice/my-live-calls
Your calls in progress now, wherever they ring or talk (an extension, the mobile app, a tab of the web phone), with whether they are recorded now: the pastille « Enregistré » of the web phone (and of the mobile app). Never the calls of others.
Access: authenticated (JWT or API key)
API keys: refused, 403 forbidden (API key not allowed on this route)
Response: calls: [{id, call_id, direction (inbound, outbound, internal), state (talking, hold, ringing, dialing, parked...), recording (a part of the call is being recorded now: the rules of the number, of the extension, of the organization, or an AI plan), accounts (your SIP accounts in the call: wb… for a tab, dv… for the app, the extension's name; the one that places the call, talks in it or rings for it), started_at, answered_at, duration_seconds}]. call_id: What to pass as is in call_id of POST /team-chat/phone-messages (and wherever a call is attached to something): the id of the call record when one is written already (a part of the call that ended, one you see), else live-<id> while no record exists (the voice server writes it when the call hangs up); the server finds the record once it is written. Never null.
Errors 403 forbidden: an API key.
GET /api/v1/voice/numbers
Phone numbers of the organization with voice enabled, and how each one is routed.
A number gets its voice from the platform (a trunk set by the platform administrator for a number of a platform account) or from the domain administrator (a number of the domain's own accounts, on its own trunks); the organization decides where its calls go (permission voice.routing, PUT /voice/numbers/<id>/routing).
Access: permission voice.use in the organization (profiles)
API keys: refused to restricted keys (limited to a team, or an integration's), 403 forbidden
Query parameters
| Name | Description |
|---|---|
status |
active, paused, released (the trash) or pending; default: everything but the trash. |
q |
Text matched in the name and in the digits of the number. |
skip |
Pagination offset (default 0). |
limit |
Page size (default 50, at most 100). |
with_stats |
1 adds stats ({calls, missed, duration, cost}, see GET /voice/stats) to each number, over the calls of the period (optional; 0 or absent: no figures); without voice.calls.all, only the calls of the user's own endpoints. |
from |
With with_stats, only the calls started at or after this ISO 8601 date or datetime (optional). |
to |
With with_stats, only the calls started at or before this ISO 8601 datetime; a date alone covers the whole day (optional). |
direction |
With with_stats, only the calls of this direction, inbound or outbound (optional). |
Response: numbers: The page of phone numbers, each with state {status, enabled, sleep, released_at, expires_at}, features {voicemail, recording, sms}, routing (null when calls are refused), server_id and, with with_stats, stats. total: Number of numbers matching the filters. counts: {active, paused, released, pending} after the text filter. skip: Offset applied. limit: Page size applied.
PUT /api/v1/voice/numbers/<phone_id>/routing
Route the incoming calls of a number.
Access: permission voice.routing in the organization (profiles)
API keys: refused to restricted keys (limited to a team, or an integration's), 403 forbidden
Path parameters
| Name | Description |
|---|---|
phone_id |
Phone number ID (voice-enabled, in the organization). |
Request body
| Name | Description |
|---|---|
action |
"dial" (ring an endpoint), "dial-then-playback" (ring, then play a message), "playback", "voicemail", "flow" (run a voice flow), "groupdial" (ring a group), "forward" (forward to an external number), "moh" (answer and play the music on hold of the number, else of the organization, until the caller hangs up, 30 minutes at most), "queue" (the call waits in the call queue of a team: capability call_queues, 403 capability_required without it), "meeting" (the caller types the 6-digit code of a video meeting of the organization in progress and enters it by phone: capability video, 403 capability_required without it), "fax" (a number dedicated to fax: every call is answered and received as a fax, kept for the team of the number, sent by e-mail and to an adapter port as set in PUT /fax/numbers/<id>; capability fax, 403 capability_required without it; the number must belong to a team, 400 otherwise), "custom" (sets the AGI variables of variables, then runs next_action; reserved to the platform and domain administrators, 403 forbidden for a member of the organization), or null to refuse calls. |
endpoint_id |
Endpoint to ring (dial actions). |
flow_id |
Voice flow to run (flow). |
group_id |
Ring group (groupdial). |
team_id |
The team whose call queue takes the calls (queue; a team of the organization, see GET /voice/queues/<team_id>). |
forward_number |
External number to forward the calls to (forward), 10-digit North American; billed as an outbound call. 422 destination_not_allowed (with reason and country) when the organization's forward countries or the premium-rate block refuse it (E47). |
forward |
Options of the forward (forward; absent or null: the defaults), {ext: digits, # and * sent once the destination answers, 8 at most, or null; screening: 0 none (default), 1 the forwarded person accepts the call after hearing the caller's name, 2 accepts without the name; display: caller (the caller's number, default) or called (this number) shown on the forwarded call; fallback: voicemail (default: when the box of the number is on, the forward rings for the box's own delay, then the box takes the message) or hangup (rings timeout seconds, then the call ends, never a box)}. 400 validation_error with field (forward.ext, forward.screening, forward.display, forward.fallback) for anything else. |
timeout |
Ring time in seconds, 5 to 120 (default 30); for a forward, used when its fallback is hangup or the box of the number is off. |
push_enabled |
Wake the mobile app by push before ringing (default true). |
sound_id |
Sound of the organization to play (playback, dial-then-playback): uploaded or recorded with POST /voice/sounds; it wins over sound. 400 validation_error (field sound_id) for a sound of another organization. |
sound |
Name of a sound file of the voice server to play instead (playback, dial-then-playback), such as "hello-world" or "custom/welcome": 1 to 64 letters, digits, "_", ".", "/" or "-". 400 validation_error (field sound) for anything else, a line break included. |
mailbox |
Voicemail box (voicemail): the id of a voice number of the organization or of a voicemail box (GET /voice/mailboxes); empty: the box of the number. 400 validation_error (field mailbox) for anything else. |
variables |
Object of AGI variables, names [A-Za-z_][A-Za-z0-9_]* and plain string or number values (custom). |
next_action |
AGI action run after the variables, default hangup (custom). |
Response: number: The phone number with its new routing.
Errors 409 e911_number_of_phone: the 9-1-1 number of a phone always rings that phone (the emergency centre's callback); it is changed only from the phone.
GET /api/v1/voice/oncall/calls
Emergencies: the calls that entered an on-call line, newest first.
Access: permission voice.routing or voice.calls.all in the organization (profiles)
API keys: refused to restricted keys (limited to a team, or an integration's), 403 forbidden
Query parameters
| Name | Description |
|---|---|
line_id |
Only this line. |
from |
Start of the period (ISO 8601; default 30 days before to). |
to |
End of the period, excluded (default now). 400 days at most. |
status |
refused, connected, accepted_no_connection, voicemail, abandoned or error. |
client_id |
Only this client of a line. |
technician |
Only the calls where this technician (their number) was rung. |
hours |
business (inside the hours of the flow that led to the line, or a flow without hours) or after (its closed menu). |
skip |
Entries to skip (default 0). |
limit |
Entries returned, 1 to 200 (default 50). |
Response: calls: Each {id, number (#1042), line_id, line_name, client {id, name} or null, caller, status, after_hours, started_at, ended_at, connected_at, connect_seconds, talk_seconds, technician {name, number, rank, attempt} or null, has_identify, has_message, notified_at, claim {name, number, at} or null, claim_seconds, call_id (the call record, for its recording)}. total, skip, limit.
GET /api/v1/voice/oncall/calls/<call_id>
One emergency with its timeline.
Access: permission voice.routing or voice.calls.all in the organization (profiles)
API keys: refused to restricted keys (limited to a team, or an integration's), 403 forbidden
Path parameters
| Name | Description |
|---|---|
call_id |
Emergency ID. |
Response: call: As in the list, plus attempts ([{rank, attempt, name, number, result accepted|refused|no_key|no_answer|busy|failed|caller_gone, started_at, ended_at}]), events ([{kind, at, ...}]), notified ([{name, number, status sent|failed, error, at}]) and audio ({identify, message: {duration}}).
GET /api/v1/voice/oncall/calls/<call_id>/audio/<role>
The identification (identify) or the message (message) of an emergency, MP3.
Access: permission voice.routing or voice.calls.all in the organization (profiles)
API keys: refused to restricted keys (limited to a team, or an integration's), 403 forbidden
Path parameters
| Name | Description |
|---|---|
call_id |
Emergency ID. |
role |
identify or message. |
Response: The MP3 (audio/mpeg).
GET /api/v1/voice/oncall/calls/export
The emergencies of a period as CSV (same filters as the list, 10 000 rows at most).
Access: permission voice.routing or voice.calls.all in the organization (profiles)
API keys: refused to restricted keys (limited to a team, or an integration's), 403 forbidden
Query parameters
| Name | Description |
|---|---|
line_id |
Only this line. |
from |
Start (ISO 8601). |
to |
End, excluded. |
status |
Only this outcome. |
client_id |
Only this client. |
technician |
Only the calls where this technician (their number) was rung. |
hours |
business or after. |
Response: The CSV (text/csv): number, started_at, line, client, caller, status, after_hours (yes or no), technician, rank, attempt, connect_seconds, talk_seconds, attempts, refusals, notified_at, claimed_by, claim_seconds.
GET /api/v1/voice/oncall/lines
On-call lines of the organization.
A line is reached by the oncall step of a flow (a key of a menu, or the flow of a dedicated number): the caller types the access code of a client, says their name and their emergency, then the technicians are rung in order; nobody takes the call: a message, then a text to every recipient.
Access: permission voice.routing in the organization (profiles)
API keys: refused to restricted keys (limited to a team, or an integration's), 403 forbidden
Response: lines: The lines, each with on_duty ({technician_id, name, reason override|rotation|order, until}: who is called first now), upcoming (the next periods of the rotation), rotation, overrides, name, enabled, language, clients ({id, name, enabled, code_length}: the codes are never returned), technicians and notify ({id, name, number}), notify_technicians, sms_number_id, the timings (max_code_attempts, attempts, ring_seconds, pause_seconds, accept_seconds, record_seconds, voicemail_seconds), link_hours, sounds ({message: sound id}), worst_wait_seconds and used_by ({flows}).
POST /api/v1/voice/oncall/lines
Create an on-call line.
Access: permission voice.routing in the organization (profiles)
API keys: refused to restricted keys (limited to a team, or an integration's), 403 forbidden
Request body
| Name | Description |
|---|---|
name |
Name of the line (1 to 80 characters). |
enabled |
Whether the line takes calls (default true); a disabled line sends the caller to the on_fail of its step. |
language |
Language of the texts and of the page of their link, fr or en (default fr); what the caller hears follows the language of the flow. |
clients |
Clients allowed to call, each {id (to keep an existing client), name, code (4 to 10 digits; required for a new client, absent = unchanged), enabled}. Two clients never share a code. 200 at most. |
technicians |
Technicians rung in this order, each {name, number (North American)}. 1 to 10. |
attempts |
Calls to each technician, 1 to 3 (default 2); a technician who presses 2 passes the call to the next one at once. |
ring_seconds |
Ringing of one attempt, 10 to 60 (default 20). |
pause_seconds |
Pause before calling the same technician again, 0 to 60 (default 10). |
accept_seconds |
Time the technician has to press 1 or 2 once the call is presented, 5 to 30 (default 10). |
max_code_attempts |
Codes the caller may try, 1 to 5 (default 3). |
record_seconds |
Length of the identification (name and emergency), 0 to 60 (default 20; 0 = not asked). |
voicemail_seconds |
Longest message, 30 to 300 (default 120). |
sms_number_id |
Number of the organization the texts are sent from (and the answers received on). |
notify_technicians |
Text the technicians when nobody took the call (default true). |
notify |
Other people texted, each {name, number}. 10 at most. |
link_hours |
Hours the link of the text stays valid, 1 to 720 (default 72). |
rotation |
The automatic on-call calendar, {enabled, every (week or day), start (YYYY-MM-DD: the first technician is on duty from this day), handover (HH:MM, default 08:00), timezone}: at each handover the next technician of the list is called first, the others after them. |
overrides |
Replacements, [{technician_id (the id of a technician of the line), start, end (local YYYY-MM-DDTHH:MM)}]: that technician is called first between the two (the last one wins when they overlap). 50 at most. |
sounds |
Sounds of the organization played in place of the standard messages, {message: sound id}; messages: oncall_code, oncall_code_wrong, oncall_refused, oncall_identify, oncall_searching, oncall_voicemail, oncall_thanks, oncall_tech_intro, oncall_tech_prompt. |
Response: line: The created line.
DELETE /api/v1/voice/oncall/lines/<line_id>
Delete an on-call line; refused (409 conflict with used_by) while a flow uses it. Its emergencies stay in the journal.
Access: permission voice.routing in the organization (profiles)
API keys: refused to restricted keys (limited to a team, or an integration's), 403 forbidden
Path parameters
| Name | Description |
|---|---|
line_id |
Line ID. |
Response: success: True.
GET /api/v1/voice/oncall/lines/<line_id>
One on-call line.
Access: permission voice.routing in the organization (profiles)
API keys: refused to restricted keys (limited to a team, or an integration's), 403 forbidden
Path parameters
| Name | Description |
|---|---|
line_id |
Line ID. |
Response: line: The line (same shape as in the list).
PUT /api/v1/voice/oncall/lines/<line_id>
Replace an on-call line (the whole line, as at the creation; a client given without code keeps its code).
Access: permission voice.routing in the organization (profiles)
API keys: refused to restricted keys (limited to a team, or an integration's), 403 forbidden
Path parameters
| Name | Description |
|---|---|
line_id |
Line ID. |
Response: line: The updated line.
GET /api/v1/voice/oncall/stats
Report of the emergencies of a period (the telephone performance; it does not certify a service commitment).
Access: permission voice.routing or voice.calls.all in the organization (profiles)
API keys: refused to restricted keys (limited to a team, or an integration's), 403 forbidden
Query parameters
| Name | Description |
|---|---|
line_id |
Only this line. |
from |
Start (ISO 8601; default 30 days before to). |
to |
End, excluded (default now). |
client_id |
Only this client. |
technician |
Only the calls where this technician (their number) was rung. |
hours |
business or after. |
Response: stats: {total, authorized (code accepted), connected, connected_rate (connected / authorized), avg_connect_seconds (entry into the line to the technician on the line), notified, claimed, avg_claim_seconds (text sent to the first valid answer), by_status {status: count}, distribution [{rank, attempt, name, count}] (who connected, at which attempt), technicians [{name, number, rung, accepted, refused, no_answer}] (every time each one was rung), attempts {rung, accepted, refused, no_answer}, hours {business, after: {authorized, connected_rate}}}.
GET /api/v1/voice/parked
The calls parked now in the organization (« Parquer » of the web phone), by slot: any member may take one back, by « Reprendre » (POST /voice/parked/<id>/pickup) or by dialing its code (*7<slot>) from a phone. Read it again on voice_presence {organization_id}, as the colleagues.
For the app, after « Parquer » (the REFER of the call to park): read GET /voice/parked?mine=1 again and show the first one (its slot and its code). The voice server writes the slot when the parked call reaches it, usually within a second after the REFER is accepted, and then sends voice_presence {organization_id}: read on that event, or again a second later. Still empty: the call was not parked (every slot is taken: it rings you back).
Access: authenticated (JWT or API key)
API keys: refused, 403 forbidden (API key not allowed on this route)
Query parameters
| Name | Description |
|---|---|
organization_id |
The organization (one where you have an extension and voice.use); default: the current one, else the organization of your first such extension. |
mine |
1 (or true) for the calls you parked only (parked_by.mine), the most recent first. |
Response: organization_id: The organization. parked: [{id, slot (1 to 20), code (what a phone dials to take it back: *7<slot>), state (parked; claimed or ringing: someone is taking it; returning: it rings back the one who parked it), caller {number, name (the address book first), contact_id}, parked_by {user_id, name, extension, mine}, parked_at, parked_seconds, return_at (when it rings back the one who parked it), returns, taking {user_id, name, mine} (who is taking it, null otherwise)}]. settings: {return_seconds}: how long a call stays parked before it rings back the one who parked it.
Errors 400 validation_error (field: organization_id or mine). 403 forbidden. 404 no_endpoint.
POST /api/v1/voice/parked/<park_id>/pickup
Take a parked call back (« Reprendre »): the voice server rings the tab that asks within two seconds (it answers by itself), else your phones in the organization of the call (never your forwards). Not answered: the call goes back to its slot.
Access: authenticated (JWT or API key)
API keys: refused, 403 forbidden (API key not allowed on this route)
Rate limit: 60 per minute
Request body
| Name | Description |
|---|---|
organization_id |
The organization of the call (default as GET /voice/parked). |
web_phone |
The SIP account of your web phone (wb…, from POST /voice/web-phone), to ring that tab first. |
Response: parked: The parked call, as GET /voice/parked (state claimed, taking = you).
Errors 400 validation_error (field: web_phone). 403 forbidden. 404 not_found: no such call parked in the organization (taken, gone). 409 parked_call_busy: someone is taking it, or it rings back the one who parked it.
GET /api/v1/voice/parking/settings
How the parked calls of the current organization behave.
Access: permission voice.routing in the organization (profiles)
API keys: refused to restricted keys (limited to a team, or an integration's), 403 forbidden
Response: parking: {return_seconds (how long a call stays parked before it rings back the one who parked it, then their forwards and their mailbox; 180 by default)}.
PUT /api/v1/voice/parking/settings
Change how the parked calls of the current organization behave. Journalled.
Access: permission voice.routing in the organization (profiles)
API keys: refused to restricted keys (limited to a team, or an integration's), 403 forbidden
Request body
| Name | Description |
|---|---|
return_seconds |
30 to 1800 seconds (required). |
Response: parking: As GET.
Errors 400 validation_error (field: return_seconds).
GET /api/v1/voice/provision
SIP account of the current user for the Voice tab of the Telma mobile app.
Called by the app after login and when the organization changes. The voice accounts of a user are the enabled SIP endpoints assigned to them in every organization that has the voice service and the sip capability, whatever the current organization and whether or not they are a member of it (the assignment by a member who has voice.endpoints there is the grant; no permission of the current organization is needed): the Voice tab shows as soon as there is one. The provisioned one is the one asked with endpoint_id, otherwise the first of the current organization, otherwise the first one (sorted by organization then name); endpoints lists them all so that the app can offer the choice. The app registers its push token with POST /api/v1/push/register (app: "textos", the name of the Telma app) so that incoming calls wake it up.
Without any voice account, the error tells why for the current organization: 403 voice_not_enabled without voxos, 403 capability_required (with capability: sip) without sip, 404 no_endpoint otherwise.
Access: authenticated (JWT or API key)
API keys: refused to restricted keys (limited to a team, or an integration's), 403 forbidden
Query parameters
| Name | Description |
|---|---|
endpoint_id |
Endpoint to provision among the user's (optional); an unknown or disabled one falls back to the default. |
Response: sip: {server, port, transport, srtp, username, password, display_name} of the user's SIP account; the server is the one the endpoint is placed on, transport (udp, tcp or tls) one of its active listeners; srtp is "sdes" when the transport is tls (the app offers SRTP with keys in the SDP, AES_CM_128_HMAC_SHA1_80, and applies it when the answer accepts it), null otherwise. endpoint: {id, name, username, extension, label (the label of the endpoint, else the user's name, else its name: what the app shows instead of the SIP account), organization {id, name}} of the provisioned voice endpoint. endpoints (array): Every voice account of the user, {id, name, username, extension, label, organization {id, name}, sip (as sip above, for this endpoint)}, sorted by organization then name. A phone rings for every endpoint of its user: on a call push for another one (handle = its name), the app registers that endpoint for the call, then comes back to its own. call_info: What the next call of the provisioned endpoint will be like, as GET /voice/call-info (caller ID, recording, diagnostics level). organization: {id, name} of the organization of the provisioned endpoint. push: {app} the value to register the push token with.
Errors 404 no_endpoint: no enabled SIP endpoint is assigned to the user in an organization with the voice service.
GET /api/v1/voice/queues
The queues the current user is an agent of, in the current organization, and their own state.
Access: permission voice.use in the organization (profiles)
API keys: refused to restricted keys (limited to a team, or an integration's), 403 forbidden
Response: enabled: Whether the organization has the call queues switched on. queues: [{team_id, name, penalty, enabled, strategy, status, pause_reason, wrapup_seconds}]: the queues the user serves (penalty: a lower one is offered the calls first; status and pause_reason: the user in THIS queue, logged_out, paused or the user's own status: logged out of a single queue or paused in it, see POST /voice/queues/login with team_id; wrapup_seconds: the wrap-up after a call of this queue). agent: The user's state {user_id, status (logged_out, available, paused, ringing, in_call, wrapup), pause_reason, since, endpoint_id, calls_answered, last_call_at, wrapup_until (end of the wrap-up; POST /voice/queues/ready ends it sooner), pause_requested (a pause asked during a call, it starts at the end of the call), dnd (do not disturb in force: the voice server offers no call, as on a pause)}. Its changes are also sent in real time: event queue_agent {organization_id, agent} in the room of the user. pause_reasons: The reasons a pause may have. endpoints: The user's extensions in the organization [{id, label, extension}], one of which takes the calls.
GET /api/v1/voice/queues/<team_id>
The queue of a team: its settings and its agents.
Access: permission queues.manage or queues.supervise in the organization (profiles)
API keys: refused to restricted keys (limited to a team, or an integration's), 403 forbidden
Path parameters
| Name | Description |
|---|---|
team_id |
Team ID. |
Response: queue: {team_id, name, settings, agents}. settings: {enabled, strategy (ringall, leastrecent, fewestcalls, random, rrmemory, linear, wrandom), agent_timeout, retry, wrapup_seconds, max_wait, max_len, join_empty, leave_when_empty, moh_class_id, announce {position {enabled, frequency}, hold_time {enabled}, periodic {enabled, frequency, sound_id}, entry {sound_id}}, overflow {type (group, voicemail, flow, external, hangup), target_id, number}}. agents: [{user_id, name, email, penalty, status, pause_reason, since, endpoint_id, calls_answered, last_call_at}]. strategies, overflows, pause_reasons: The values accepted.
Errors 404 not_found: Not a team of the organization.
PUT /api/v1/voice/queues/<team_id>
Change the queue of a team: its settings, its agents, or both.
Access: permission queues.manage in the organization (profiles)
API keys: refused to restricted keys (limited to a team, or an integration's), 403 forbidden
Path parameters
| Name | Description |
|---|---|
team_id |
Team ID. |
Request body
| Name | Description |
|---|---|
settings |
The settings to change (partial: what is absent keeps its value; see GET): enabled, strategy, agent_timeout (5-120 s of ringing per attempt), retry (0-300 s before an agent who did not answer is offered another call), wrapup_seconds (0-3600 after a call), max_wait (0-7200 s, 0 = unlimited; then the overflow), max_len (calls waiting, 0 = unlimited), join_empty (enter the queue with no agent logged in), leave_when_empty (leave it when the last agent logs out), moh_class_id (a playlist, null = the one of the number or of the organization), announce {position {enabled, frequency 15-600}, hold_time {enabled}, periodic {enabled, frequency 15-900, sound_id}, entry {sound_id}}, overflow {type, target_id (group, flow or voicemail box of the organization), number (external, E.164)}. |
agents |
The agents of the queue, replacing the list: [{user_id (a member of the organization), penalty (0-9, lower = offered first)}]. |
Response: queue: The queue after the change (see GET).
Errors 400 validation_error (field): A value out of bounds, a reference that is not the organization's. 404 not_found: Not a team of the organization.
POST /api/v1/voice/queues/<team_id>/agents/<user_id>/<action>
A supervisor logs an agent of the queue in or out, or pauses them.
Access: permission queues.supervise in the organization (profiles)
API keys: refused to restricted keys (limited to a team, or an integration's), 403 forbidden
Path parameters
| Name | Description |
|---|---|
team_id |
Team ID. |
user_id |
The agent (a member of the organization who serves the queue). |
action |
login, logout, pause or unpause. |
Request body
| Name | Description |
|---|---|
reason |
Reason of the pause (pause only; break, lunch, meeting, training, other; default other). |
endpoint_id |
The extension that takes the calls (login only; default: the agent's first one). |
scope |
all (default: every queue of the agent, as before) or queue (this queue only, see POST /voice/queues/login with team_id). |
Response: agent: The agent's state (see GET /voice/queues).
Errors 403 plan_feature (feature supervision): The plan of the organization does not include the supervision. 400 validation_error: Unknown action, agent not logged in (pause, unpause), no extension (login). 404 not_found: Not a team of the organization, or not an agent of the queue.
GET /api/v1/voice/queues/<team_id>/live
The queue now: the calls waiting (with their position and wait), the calls in progress, the agents and their status.
Access: permission queues.supervise in the organization (profiles)
API keys: refused to restricted keys (limited to a team, or an integration's), 403 forbidden
Path parameters
| Name | Description |
|---|---|
team_id |
Team ID. |
Response: live: {team_id, name, settings, waiting [{call_id, caller, caller_name, state, entered_at, waiting_seconds, position, offered_to}], in_call [{call_id, caller, caller_name, answered_by, answered_at, wait_seconds, talk_seconds}], agents (see GET /voice/queues/<team_id>; each with presence: the one presence of the member, as GET /voice/colleagues, read only: in a meeting, a manual status, a do not disturb...), counts {waiting, longest_wait_seconds, in_call_calls, available, paused, ringing, in_call, wrapup, logged_out}, at}.
Errors 403 plan_feature (feature supervision): The plan of the organization does not include the supervision. 404 not_found: Not a team of the organization.
GET /api/v1/voice/queues/<team_id>/stats
Statistics of the queue over a period.
Access: permission queues.supervise in the organization (profiles)
API keys: refused to restricted keys (limited to a team, or an integration's), 403 forbidden
Path parameters
| Name | Description |
|---|---|
team_id |
Team ID. |
Query parameters
| Name | Description |
|---|---|
from |
Start of the period (ISO 8601; default: 7 days before to). |
to |
End of the period, excluded (ISO 8601; default: now). One year at most. |
Response: stats: {team_id, from, to, received, answered, abandoned, overflowed, in_progress, service_level {seconds, ratio}, average_wait_seconds, max_wait_seconds, average_talk_seconds, agents [{user_id, name, offered, answered, refused (declined), no_answer (rang without an answer), talk_seconds, average_talk_seconds, connected_seconds (logged in to this queue, pauses included), paused_seconds, pause_by_reason {reason: seconds}, wrapup_seconds}], hours [{hour (0-23, time zone of the team), received, answered, abandoned, overflowed, average_wait_seconds}], times_since (when the log started to keep the times of connection, pause and wrap-up; null: not yet), timezone}.
Errors 400 validation_error (field from or to): A date that cannot be read, or a period of more than a year. 404 not_found: Not a team of the organization.
GET /api/v1/voice/queues/<team_id>/stats/export
The statistics of the queue over a period, as a CSV file (UTF-8 with BOM, comma separated, seconds as numbers).
Access: permission queues.supervise in the organization (profiles)
API keys: refused to restricted keys (limited to a team, or an integration's), 403 forbidden
Path parameters
| Name | Description |
|---|---|
team_id |
Team ID. |
Query parameters
| Name | Description |
|---|---|
from |
The period (see GET /voice/queues/<team_id>/stats). |
to |
The period (see GET /voice/queues/<team_id>/stats). |
part |
agents (default: one row per agent, a column per pause reason) or hours (one row per hour of the day). |
Response: A text/csv attachment.
Errors 400 validation_error (field from, to or part). 404 not_found: Not a team of the organization.
PUT /api/v1/voice/queues/enable
Switch the call queues of the organization on or off.
The domain offers them to every organization that has the voice; the organization decides. Switching them off keeps the settings of the queues and the agents, calls routed to a queue then go to its overflow.
Access: permission queues.manage in the organization (profiles)
API keys: refused to restricted keys (limited to a team, or an integration's), 403 forbidden
Response: enabled: The state after the change.
Errors 403 voice_not_enabled: The organization has no voice service. 403 capability_required (capability call_queues): The domain does not offer the call queues.
POST /api/v1/voice/queues/login
Log in as an agent: the calls of every queue the user serves may ring them.
Access: permission voice.use in the organization (profiles)
API keys: refused to restricted keys (limited to a team, or an integration's), 403 forbidden
Request body
| Name | Description |
|---|---|
endpoint_id |
The extension that takes the calls (one of the user's in the organization; default: their first one). |
team_id |
Log in to this queue only (one the user serves). Logged out: logged in, but out of the other queues; already logged in: back in this queue. Without it: every queue (« tout connecter »). |
Response: agent: The user's state (see GET /voice/queues).
Errors 409 no_queue: The user is an agent of no queue. 400 validation_error (field endpoint_id): No extension to take the calls on. 400 validation_error (field team_id): Not a queue the user serves.
POST /api/v1/voice/queues/logout
Log out as an agent: no more calls of the queues (a call in progress goes on).
Access: permission voice.use in the organization (profiles)
API keys: refused to restricted keys (limited to a team, or an integration's), 403 forbidden
Request body
| Name | Description |
|---|---|
team_id |
Out of this queue only (out of the last one = logged out). Without it: every queue. |
Response: agent: The user's state.
Errors 400 validation_error (field team_id): Not a queue the user serves.
GET /api/v1/voice/queues/overview
Every queue of the organization with its live counts (the supervision page).
Access: permission queues.supervise or queues.manage in the organization (profiles)
API keys: refused to restricted keys (limited to a team, or an integration's), 403 forbidden
Response: queues: [{team_id, name, enabled, strategy, counts {waiting, longest_wait_seconds, in_call_calls, available, paused, ringing, in_call, wrapup, logged_out}, at}]. teams: The teams of the organization that are not queues yet [{team_id, name}] (queues.manage: to make one).
POST /api/v1/voice/queues/pause
Pause: logged in, but no call offered until the pause ends (a call in progress goes on, the pause starts after it).
Access: permission voice.use in the organization (profiles)
API keys: refused to restricted keys (limited to a team, or an integration's), 403 forbidden
Request body
| Name | Description |
|---|---|
reason |
break, lunch, meeting, training or other (default other). |
team_id |
Paused in this queue only, at once (the other queues go on offering calls). Without it: every queue (« tout mettre en pause »). |
Response: agent: The user's state.
Errors 400 validation_error (field status): The user is not logged in (or not to this queue). 400 validation_error (field team_id): Not a queue the user serves.
POST /api/v1/voice/queues/ready
« Prêt »: end the wrap-up after a call before its time, the next call may come at once.
Outside a wrap-up nothing changes (same answer).
Access: permission voice.use in the organization (profiles)
API keys: refused to restricted keys (limited to a team, or an integration's), 403 forbidden
Response: agent: The user's state.
POST /api/v1/voice/queues/unpause
End the pause: the user is available again.
Access: permission voice.use in the organization (profiles)
API keys: refused to restricted keys (limited to a team, or an integration's), 403 forbidden
Request body
| Name | Description |
|---|---|
team_id |
This queue only (paused everywhere: available, but still paused in the other queues). Without it: every queue, the pauses of single queues included. |
Response: agent: The user's state.
Errors 400 validation_error (field team_id): Not a queue the user serves.
GET /api/v1/voice/sounds
Audio prompts of the organization, with the places that use them.
Reading with voice.use; uploading, renaming and deleting need voice.routing.
Access: permission voice.use in the organization (profiles)
API keys: refused to restricted keys (limited to a team, or an integration's), 403 forbidden
Query parameters
| Name | Description |
|---|---|
kind |
ivr (messages of the flows), greeting (voicemail greetings) or system (messages the platform plays; the organization's own and, as inherited, the ones of its domain) (optional). |
Response: sounds: List of sounds {id, name, slug, kind, filename, extension, size, duration_s, used_by [{type flow|group|number, id, name}], attached_to, key and language (system)}. limits: The limits of the domain {max_per_account, min_duration_s, max_duration_s, max_bytes, formats}.
POST /api/v1/voice/sounds
Upload an audio prompt (multipart/form-data). The limits of the domain are checked here: count, formats, size and the duration measured from the file (defaults: 20 sounds, wav/mp3/m4a/ogg/webm, 5 MB, 1 to 90 seconds). Refused uploads answer 400 with a code (format_invalid, empty_file, file_too_large, audio_unreadable, duration_too_short, duration_too_long, account_limit).
A system sound replaces the one of the organization with the same key and language.
Access: permission voice.routing in the organization (profiles)
API keys: refused to restricted keys (limited to a team, or an integration's), 403 forbidden
Request body
| Name | Description |
|---|---|
file |
The audio file. |
name |
Name of the sound (default: the file name). |
kind |
ivr (default), greeting or system. |
key |
System sound only: filtering (announcement before a filtered call), name_prompt (asks the caller's name), invalid_key (wrong key in a menu), voicemail_greeting (default voicemail message), paused (number paused or asleep) or recording (legal announcement of a recorded call). |
language |
System sound only: fr, en or es. |
Response: sound: The created sound, with duration_s.
DELETE /api/v1/voice/sounds/<sound_id>
Delete a sound. Refused (409 conflict with used_by) while a flow, a group or the routing of a number (its message, playback or dial-then-playback) uses it; the check comes first, nothing is touched when it fails. The numbers that play it as their voicemail greeting lose it (voicemail.sound_id becomes null).
Access: permission voice.routing in the organization (profiles)
API keys: refused to restricted keys (limited to a team, or an integration's), 403 forbidden
Path parameters
| Name | Description |
|---|---|
sound_id |
Sound ID. |
Response: success: True.
PUT /api/v1/voice/sounds/<sound_id>
Rename a sound.
Access: permission voice.routing in the organization (profiles)
API keys: refused to restricted keys (limited to a team, or an integration's), 403 forbidden
Path parameters
| Name | Description |
|---|---|
sound_id |
Sound ID. |
Request body
| Name | Description |
|---|---|
name |
New name. |
Response: sound: The updated sound.
PUT /api/v1/voice/sounds/<sound_id>/attach
Attach a voicemail greeting to numbers (the full set; a number has one greeting, so it leaves the others).
The greeting becomes the voicemail.sound_id of each number (the same fact as PATCH /voice/numbers/<id>), and the numbers that leave the set lose it.
Access: permission voice.routing in the organization (profiles)
API keys: refused to restricted keys (limited to a team, or an integration's), 403 forbidden
Path parameters
| Name | Description |
|---|---|
sound_id |
Sound ID (kind greeting). |
Request body
| Name | Description |
|---|---|
phone_number_ids |
Voice numbers of the organization that play this greeting (empty list: none). |
Response: sound: The sound with attached_to and used_by.
GET /api/v1/voice/sounds/<sound_id>/file
The uploaded audio file, to listen to it in the portal (the system sounds of the domain too).
Readable with voice.use, like the list of sounds.
Access: permission voice.use in the organization (profiles)
API keys: refused to restricted keys (limited to a team, or an integration's), 403 forbidden
Path parameters
| Name | Description |
|---|---|
sound_id |
Sound ID. |
Response: The file (audio/*).
GET /api/v1/voice/sounds/tts
What text-to-speech can do for the sounds: the standard voice of the platform and, when the platform has them, the natural voices (Google, several accents and voices per language).
Access: permission voice.routing in the organization (profiles)
API keys: refused to restricted keys (limited to a team, or an integration's), 403 forbidden
Response: available (boolean): Whether text-to-speech is offered (false: the portal hides it). languages: Languages it speaks (fr, en, es; only those that have a voice). voices: Voices offered, {id, engine (piper = standard voice, google = natural voice), language, locale (fr-CA, fr-FR, en-US... null for the standard voice), name, gender (female, male or null)}. default_voices: Voice used for each language when none is asked, {fr: id, ...}. max_length: Longest text accepted, in characters. max_preview_length: Longest text a preview speaks (POST /voice/sounds/tts/preview).
POST /api/v1/voice/sounds/tts
Create a sound from a text (text-to-speech). The sound counts like an uploaded one (same limits of the domain: count, size, duration) and keeps its text and voice (tts).
Access: permission voice.routing in the organization (profiles)
API keys: refused to restricted keys (limited to a team, or an integration's), 403 forbidden
Rate limit: 100 per hour;300 per day
Request body
| Name | Description |
|---|---|
text |
Text to speak (required, 1000 characters at most). |
language |
fr, en or es (required; one of languages of GET /voice/sounds/tts). |
voice |
Id of a voice of the language (voices of GET /voice/sounds/tts); default: the default voice of the language. |
name |
Name of the sound (default: the start of the text). |
kind |
ivr (default) or greeting. |
Response: sound: The created sound, with duration_s and tts {text, language, engine, voice}.
Errors 400 validation_error: text missing or too long (field text), unknown language (field language), voice not offered for the language (field voice), kind (field kind). 400 with code as POST /voice/sounds (duration_too_long, account_limit...). 503 tts_unavailable: the text-to-speech service is off or failed.
POST /api/v1/voice/sounds/tts/preview
Hear a voice before creating a sound: the start of the text spoken by the voice, nothing is stored.
Access: permission voice.routing in the organization (profiles)
API keys: refused to restricted keys (limited to a team, or an integration's), 403 forbidden
Rate limit: 60 per hour
Request body
| Name | Description |
|---|---|
text |
Text to speak (required, 300 characters at most). |
language |
fr, en or es (required). |
voice |
Id of a voice of the language (GET /voice/sounds/tts); default: the default voice of the language. |
Response: The audio (audio/wav).
Errors 400 validation_error: text missing or too long (field text), unknown language (field language), voice not offered for the language (field voice). 503 tts_unavailable: the text-to-speech service is off or failed.
GET /api/v1/voice/stats
Call statistics of the organization: totals and one row per number, per endpoint and per team (dashboard, numbers list, statistics page).
Needs the voxos capability (403 voice_not_enabled otherwise). Aggregated on the call records (CDR) of the organization, blocked calls included in calls. answered is the calls answered, missed those neither answered nor blocked by the blacklist, duration the billable seconds of the answered calls, cost the sum of the cost of the rated calls (a call not rated yet counts for 0). Without voice.calls.all, only the calls of the user's own SIP endpoints. Each call counts for one endpoint and one team, so each table adds up to the totals: the endpoint is the one that placed the call, else the one it rang or that answered it, else the one whose follow me or forward took it outside (an internal call counts for the caller); the team is the one of the call queue the call went through, else the team the number of the call is assigned to. A call of no endpoint or of no team is listed last with a null id.
Access: permission voice.use in the organization (profiles)
API keys: refused to restricted keys (limited to a team, or an integration's), 403 forbidden
Query parameters
| Name | Description |
|---|---|
from |
Calls started at or after this ISO 8601 date or datetime (optional; no time zone means UTC). |
to |
Calls started at or before this ISO 8601 datetime; a date alone (2026-10-31) covers that whole day (optional). |
number_id |
Only the calls of this phone number (optional). |
direction |
"inbound" or "outbound" (aliases "in" and "out"; optional). |
call_type |
direct, flow, forward, voicemail, screened, blocked, callcode, internal, queue, fax_in, fax_out or fax_ata (optional). |
Response: stats: totals ({calls, answered, missed, duration, cost}), by_number (list of {phone_number_id, number, calls, missed, duration, cost}, the busiest number first; calls without number are listed with null), by_endpoint (list of {endpoint_id, extension, label (null when the endpoint has no label of its own), user_name (the member of the endpoint, null without one), name (label, else member, else extension), calls, missed, duration, cost}, the busiest first, the calls of no endpoint last with endpoint_id null), by_team (list of {team_id, name, color (null or a color key, see PUT /teams/<id>), calls, missed, duration, cost}, the busiest first, the calls of no team last with team_id null), currency (CAD unless the domain sets another one for voice billing).
GET /api/v1/voice/system-prompts
Standard prompts of the voice server that a flow can play (play and menu steps, system_sound).
Installed in French and English on every voice server. A step plays each one in the language of the call (the flow's, or the one the caller switched to), or in a fixed language with fr: or en: before the name ("en:for-english-press" in a French menu), or only in some languages of the call ({name, only: ["fr"]}); up to 6 in a row. GET /voice/system-prompts/<name>/audio plays one.
Access: permission voice.use in the organization (profiles)
API keys: refused to restricted keys (limited to a team, or an integration's), 403 forbidden
Response: prompts: [{name, group (greeting, menu, keys, digits, waiting, info, voicemail, errors, end), text {fr, en}}]. languages: Languages they exist in. max: Most prompts in one step.
GET /api/v1/voice/system-prompts/<path:name>/audio
Listen to a standard prompt of GET /voice/system-prompts (the IVR editor plays it before choosing it).
Access: permission voice.use in the organization (profiles)
API keys: refused to restricted keys (limited to a team, or an integration's), 403 forbidden
Path parameters
| Name | Description |
|---|---|
name |
Name of a prompt of the catalog (without fr: or en:), e.g. if-u-know-ext-dial or digits/9. |
Query parameters
| Name | Description |
|---|---|
language |
fr (default) or en. |
Response: The prompt as a WAV file (audio/wav, 8 kHz mono), kept an hour in the browser.
Errors 404 not_found: not a prompt of the catalog, or no voice server gave it. 400 validation_error: unknown language (field language).
POST /api/v1/voice/web-calls
A call of the phone of the web app was answered: open its web call, to take notes while it goes on.
The notes of the web call become the notes of the call as soon as the voice server wrote its record (a few seconds after the hangup): the event web_call_linked {web_call_id, call_id} then comes to the user.
Access: authenticated (JWT or API key)
API keys: refused, 403 forbidden (API key not allowed on this route)
Request body
| Name | Description |
|---|---|
number |
The other party (as the phone shows it), 32 characters at most. |
endpoint_id |
The endpoint the call is made as or rang for, one of the endpoints of the web phone (default: the first one). |
Response: web_call: {id, direction, number, endpoint_id, started_at, ended_at, call_id (null until linked)} (201).
Errors 400 validation_error (fields tab_id, direction, number, endpoint_id). 404 not_found: no open web phone for this tab. 429 too_many_web_calls: 10 web calls of the user without end (POST .../end) in the last 8 hours.
GET /api/v1/voice/web-calls/<web_call_id>
A web call of the user: call_id tells whether its record came (the notes are then the notes of that call).
Access: authenticated (JWT or API key)
API keys: refused, 403 forbidden (API key not allowed on this route)
Path parameters
| Name | Description |
|---|---|
web_call_id |
The web call. |
Response: web_call: As POST /voice/web-calls.
Errors 404 not_found: unknown web call, or of another user.
POST /api/v1/voice/web-calls/<web_call_id>/end
The call of the web call ended (hangup in the tab): its record is looked for from now on.
Access: authenticated (JWT or API key)
API keys: refused, 403 forbidden (API key not allowed on this route)
Path parameters
| Name | Description |
|---|---|
web_call_id |
The web call. |
Response: web_call: As POST /voice/web-calls (call_id set when the record is already there).
Errors 404 not_found: unknown web call, or of another user.
GET /api/v1/voice/web-calls/<web_call_id>/notes
The notes of a web call, oldest first (the same notes as the call's, once linked).
Access: authenticated (JWT or API key); The user of the web call, with voice.use in its organization; once linked to its call, as GET /voice/calls/<id>/notes.
API keys: refused, 403 forbidden (API key not allowed on this route)
Path parameters
| Name | Description |
|---|---|
web_call_id |
The web call. |
Response: notes: As GET /voice/calls/<id>/notes, with web_call_id. total: Number of notes.
Errors 404 not_found: unknown web call, or of another user.
POST /api/v1/voice/web-calls/<web_call_id>/notes
Add a note to a web call, while the call goes on or after it (a note of the call once linked).
Access: authenticated (JWT or API key); The user of the web call, with voice.use in its organization; once linked to its call, as GET /voice/calls/<id>/notes.
API keys: refused, 403 forbidden (API key not allowed on this route)
Path parameters
| Name | Description |
|---|---|
web_call_id |
The web call. |
Request body
| Name | Description |
|---|---|
body |
Note text (required, 4000 characters max after trimming spaces). |
Response: note: The created note (201).
Errors 400 validation_error (field body). 404 not_found: unknown web call, or of another user.
DELETE /api/v1/voice/web-calls/<web_call_id>/notes/<note_id>
Delete a note of a web call (its author).
Access: authenticated (JWT or API key)
API keys: refused, 403 forbidden (API key not allowed on this route)
Path parameters
| Name | Description |
|---|---|
web_call_id |
The web call. |
note_id |
Note ID. |
Response: success: True.
Errors 403 forbidden: a note of another author. 404 not_found.
PUT /api/v1/voice/web-calls/<web_call_id>/notes/<note_id>
Edit the text of a note of a web call (its author: the user of the web call).
Access: authenticated (JWT or API key)
API keys: refused, 403 forbidden (API key not allowed on this route)
Path parameters
| Name | Description |
|---|---|
web_call_id |
The web call. |
note_id |
Note ID. |
Request body
| Name | Description |
|---|---|
body |
New note text (required, 4000 characters max after trimming spaces). |
Response: note: The updated note.
Errors 400 validation_error (field body). 403 forbidden: a note of another author. 404 not_found.
POST /api/v1/voice/web-phone
The SIP account of this tab of the web app, for the phone of the agent dashboard (capability webphone).
Ask for it when the tab shows the phone, then again every hour while it stays open (the account lives 12 hours after the last time it was asked for; the same tab keeps its name and password while it lives). The account works only over the WebSocket of sip.ws_url (the voice edge refuses it anywhere else), only for calls as one of endpoints, and it is not registered all the time: connect without registering, join the Socket.IO room of the account (event webphone_join {name}), and register when the event webphone_wake comes (an incoming call for one of the endpoints): the voice server rings the account as soon as it registered. A call made by the tab names the endpoint it is made as in the header X-Telma-Poste (its name), else the first one, and may name the number it presents in the header X-Telma-Number (the id of one of the numbers GET /contacts/<id>/reach offers under voice; the voice server keeps the endpoint's own number for any other). At most 5 open tabs per user: a sixth closes the one asked for the longest ago. Not available to API keys nor to a session opened as a member (the account would outlive it).
Access: authenticated (JWT or API key)
API keys: refused, 403 forbidden (API key not allowed on this route)
Request body
| Name | Description |
|---|---|
tab_id |
Id the page generated when it loaded (a reloaded or duplicated tab has its own), 8 to 64 letters, digits or dashes (required). |
Response: web_phone: {name, expires_at} of the account of the tab. sip: {ws_url, domain, username, password, display_name}: the WebSocket of the voice edge, the SIP domain of the URI (sip:<username>@<domain>) and the credentials. ice_servers (array): The ICE servers to give the browser (empty: the voice edge has a public address). endpoints (array): The endpoints the tab rings for and calls as, {id, name, label, extension, organization {id, name}}, sorted by organization then name. default_endpoint_id: The endpoint of the current organization, else the first one.
Errors 400 validation_error (field tab_id). 403 capability_required (capability webphone): no organization of the user's endpoints has the web phone. 404 no_endpoint: no enabled SIP endpoint is assigned to the user in an organization with the voice service.
DELETE /api/v1/voice/web-phone/<tab_id>
The tab signs out or closes: the SIP account of this tab stops working at once.
Access: authenticated (JWT or API key)
API keys: refused, 403 forbidden (API key not allowed on this route)
Path parameters
| Name | Description |
|---|---|
tab_id |
The tab id sent to POST /voice/web-phone. |
Response: closed (boolean): Whether an open account of the user was closed.
Number voice features
Pause, sleep mode, voicemail, call recording and limits per number. voxos capability.
GET /api/v1/voice/calls/<call_id>/recording
The recording of a call (MP3). Permission voice.recordings only (the Admin profile): a recording is a private conversation.
Answers 200 with the audio; 202 {status: "processing", retry_after} while the file is being prepared (try again after retry_after seconds); 410 recording_expired once the retention is over or after a deletion; 404 not_found for an unknown call, a call that was not recorded and a recording that was lost.
Access: permission voice.recordings in the organization (profiles)
API keys: refused to restricted keys (limited to a team, or an integration's), 403 forbidden
Path parameters
| Name | Description |
|---|---|
call_id |
Call ID. |
Query parameters
| Name | Description |
|---|---|
download |
1 to get it as an attachment (default: inline). |
Response: The MP3 (audio/mpeg).
GET /api/v1/voice/limits
The limits that apply to the organization's voice service.
Set by the domain administrator (PUT /domains/<id>/organizations/<organization_id>/voice-limits, PUT /domains/<id>/voice-limits); with the phone system of a subscription, max_channels follows its lines.
Access: permission voice.use in the organization (profiles)
API keys: refused to restricted keys (limited to a team, or an integration's), 403 forbidden
Response: limits: {max_channels (simultaneous calls, a forward counts two; null: no limit), source (subscription: the lines of the phone system, organization, formula, domain or none), forward_countries (ISO codes a forward or an outbound call may go to), allowed_prefixes (extra destinations allowed), premium_blocked, max_call_seconds, max_call_cost, spend_limit, spend_window_minutes, suspend_on_cap, international_hours, loop_max_attempts, loop_window_seconds, unknown_rate_per_minute}. outbound_suspension: Why the outbound calls of the organization are suspended {reason (spend, call_cost, manual, platform: the switch of the whole platform), detail, at}; null when they are not. Only a domain or platform administrator lifts it (POST /domains/<id>/organizations/<organization_id>/voice-outbound/resume; the platform switch: PUT /system/voice-security).
GET /api/v1/voice/mailboxes
The voicemail boxes of the endpoints and the standalone boxes the user listens to: the box of their own endpoints and the standalone boxes they are a member of (all of them with voice.routing).
The boxes of the numbers are the voice settings of each number (GET /voice/numbers, PATCH /voice/numbers/<id>).
Access: permission voice.use in the organization (profiles)
API keys: refused to restricted keys (limited to a team, or an integration's), 403 forbidden
Query parameters
| Name | Description |
|---|---|
member_only |
true = the view of the mobile app: a member who has voice.routing gets every standalone box and the box of their own endpoints, not the boxes of the other users' endpoints (optional; nothing changes for the others). |
Response: enabled (boolean): Whether the organization has the voicemail_boxes capability (no box otherwise). mailboxes: [{id, kind (endpoint or standalone), name, enabled, endpoint_id, endpoint {id, label, user_id}, greeting_sound_id, language, emails, delay, member_ids, unread, used_by}]; used_by (for the members who have voice.routing only) = {flows [{id, name}], groups [{id, name}], numbers [{phone_number_id, number}]}: the call flows with a voicemail step that names the box, the groups whose fallback names it, the numbers whose voicemail routing names it.
POST /api/v1/voice/mailboxes
Create the box of an endpoint or a standalone box (capability voicemail_boxes).
Access: permission voice.routing in the organization (profiles)
API keys: refused to restricted keys (limited to a team, or an integration's), 403 forbidden
Request body
| Name | Description |
|---|---|
kind |
endpoint (the box of an endpoint: it takes the message when the endpoint does not answer a number whose routing rings that endpoint alone, dial or dial-then-playback of PUT /voice/numbers/<id>/routing, a dial step of a call flow without on_fail, a call from another endpoint, or the short number of the endpoint dialed in a call flow menu; never in a ring group) or standalone (a box named by mailbox in a voicemail step of a call flow or in a voicemail routing of a number) (required). |
endpoint_id |
The endpoint (kind endpoint; one box per endpoint). |
name |
1 to 60 characters (standalone: required; endpoint: default the endpoint's label). |
enabled |
Default true. |
greeting_sound_id |
A sound of the organization played before the beep (empty: the system greeting). |
language |
fr, en or es (default fr). |
emails |
Up to 5 addresses that receive each message (MP3 attached). |
delay |
Seconds the endpoint rings before the box answers, 5 to 120 (kind endpoint, default 20); used by the routing of a number that rings the endpoint alone; a dial step of a flow rings for its own timeout, a call from another endpoint for the endpoint's own ring time, a short number dialed in a menu for 30 seconds or the endpoint's own ring time. The bounds of delay and emails are checked on write only: a value stored before them is accepted again unchanged (PUT), a longer list of addresses may lose some. |
member_ids |
Users who listen to it (standalone; the members who have voice.routing always do). |
Response: mailbox: The box.
Errors 403 capability_required: the organization does not have voicemail_boxes.
DELETE /api/v1/voice/mailboxes/<mailbox_id>
Delete a box. Its messages are kept (only the members who have voice.routing see them afterwards).
A box still named somewhere is refused (409 box_in_use with used_by): a voicemail step of a call flow (anywhere: steps, keys, on_fail, retry, the closed menu), the fallback of a group, the voicemail routing of a number. With ?force=true these references are taken out first (a voicemail step of a flow or of a group's fallback becomes hangup; a voicemail routing of a number takes the messages in the box of the number), which is journaled (mailbox.release). A box that is disabled, or whose organization lost the voicemail_boxes capability, is skipped at call time: a call flow says that nobody is available, a voicemail routing of a number uses the box of the number when it is on.
Access: permission voice.routing in the organization (profiles)
API keys: refused to restricted keys (limited to a team, or an integration's), 403 forbidden
Path parameters
| Name | Description |
|---|---|
mailbox_id |
Box ID. |
Query parameters
| Name | Description |
|---|---|
force |
true to delete a box in use, after taking it out of the flows, groups and routings that name it. |
Response: success: True. released: {flows, groups, numbers}: what named the box and was changed (force; empty lists otherwise).
Errors 409 box_in_use: the box is named by a flow, a group or a routing; used_by = {flows [{id, name}], groups [{id, name}], numbers [{phone_number_id, number}]}.
PUT /api/v1/voice/mailboxes/<mailbox_id>
Change a box (the fields given; see POST, kind and endpoint_id cannot change).
Access: permission voice.routing in the organization (profiles)
API keys: refused to restricted keys (limited to a team, or an integration's), 403 forbidden
Path parameters
| Name | Description |
|---|---|
mailbox_id |
Box ID. |
Response: mailbox: The box.
PATCH /api/v1/voice/numbers/<phone_id>
Change the voice functions of a number: pause, sleep mode, voicemail, call recording, name as caller ID.
The fields given are changed (voicemail and recording field by field). A paused number (enabled: false) plays a message and hangs up; a number in sleep mode goes to the voicemail when it is on, else plays the same message, and sends no SMS push. Pausing a number takes it out of sleep mode. Sleep mode is refused (409 function_not_allowed) on a paused number and on a number routed to a call flow. Switching the voicemail off removes a routing that points at it. A number in the trash answers 409 conflict.
Access: permission voice.routing in the organization (profiles)
API keys: refused to restricted keys (limited to a team, or an integration's), 403 forbidden
Path parameters
| Name | Description |
|---|---|
phone_id |
Phone number ID (voice-enabled, in the organization). |
Request body
| Name | Description |
|---|---|
enabled |
false pauses the number (calls get a message), true resumes it. A pause of the balance lifecycle (paused_reason: balance) is not changed by this. |
sleep |
true puts the number in sleep mode, false takes it out. |
use_label_as_caller_id |
Present the number's name as the caller name on outgoing calls (needs a name). |
voicemail |
{enabled, delay (ring seconds before the voicemail, 5 to 120; also the ring time of a forward whose fallback is voicemail), emails (at most 5 addresses that receive the message as an MP3), sound_id (own greeting, a sound of the organization, null for the system message), language (fr, en or es), mailbox_id (id of a standalone box of the organization, which needs the voicemail_boxes capability: it takes the messages of the number's box, with its own greeting, language, emails and listeners, after the number's delay; null: the number's own box; 400 field voicemail.mailbox_id otherwise; deleting the box puts it back to null)}. The bounds are checked on write only: a delay or a list of addresses stored before them (1 to 240 s, 10 addresses) is accepted again unchanged, and such a list may lose addresses, but a new value must be within the bounds (400 validation_error, field voicemail.delay or voicemail.emails). |
recording |
{enabled (record the calls of this number), announce (play the legal announcement; null follows the domain)}. |
ai_endpoint_id |
Extension whose Telma AI plan transcribes and summarizes the recorded calls of this number that no extension took (a call flow that only plays sounds); id of an extension of the organization, used only while it has a plan; null removes it (400 field ai_endpoint_id otherwise). |
Response: number: The number with state {enabled, sleep}, features {voicemail, recording}, ai_endpoint_id and routing.
POST /api/v1/voice/numbers/sleep
Put several numbers in sleep mode, or take them out, in one request (all or none).
Access: permission voice.routing in the organization (profiles)
API keys: refused to restricted keys (limited to a team, or an integration's), 403 forbidden
Request body
| Name | Description |
|---|---|
number_ids |
IDs of the numbers (voice-enabled, in the organization), 1 to 100. |
sleep |
true to put them in sleep mode, false to take them out. |
Response: numbers: The numbers after the change. 409 function_not_allowed (with number_id) when one of them is paused or routed to a call flow, 409 e911_number_of_phone when one is the 9-1-1 number of a phone; none is changed then.
GET /api/v1/voice/rating/max-duration
The longest call to a destination a credit pays for, at the organization's retail price (increments, minimum and connection fee included), capped by the domain's longest call.
Access: permission voice.use in the organization (profiles)
API keys: refused to restricted keys (limited to a team, or an integration's), 403 forbidden
Query parameters
| Name | Description |
|---|---|
destination |
The number called (required). |
credit |
The amount to spend (default: the organization's balance). |
Response: seconds: The longest call (0: the credit does not pay for a call). credit: The credit used. rate: The rate applied, or null when no price covers the destination (then seconds is 0 and reason no_rate). reason: null, no_rate or insufficient_balance.
GET /api/v1/voice/rating/quote
What a call to a destination is billed to the organization (its retail price), from the cost of the trunk its outbound rules choose and the margins. The platform and domain administrators also see the wholesale price; the platform administrator the cost.
Access: permission voice.use in the organization (profiles)
API keys: refused to restricted keys (limited to a team, or an integration's), 403 forbidden
Query parameters
| Name | Description |
|---|---|
destination |
The number called (required). |
seconds |
Length of the call (default 60). |
Response: quote: {destination, prefix, seconds, retail {per_minute, amount, billed_seconds, rules, mode} or null (the domain bills with its own price list: see rate)}, or null when no cost covers the destination. rate: The rate that applies to the organization (as the domain's price list or the margin gives it): {rate_per_min, connection_fee, increment, min_seconds, currency, source} or null.
DELETE /api/v1/voice/recordings
Delete the recordings of some calls (the call records stay).
Access: permission voice.recordings in the organization (profiles)
API keys: refused to restricted keys (limited to a team, or an integration's), 403 forbidden
Request body
| Name | Description |
|---|---|
call_ids |
IDs of the calls, 1 to 100. Calls of other organizations and calls without a recording are ignored. |
Response: deleted: IDs of the calls whose recording was deleted.
GET /api/v1/voice/voicemails
Voicemail messages of the organization, newest first.
Only the messages the user may hear (the rule of every /voice/voicemails route and of the push of a new message). The box of a number (mailbox_id null): the members who have voice.calls.all or voice.routing, and a member whose SIP endpoint the routing of that number rings, directly, through a ring group (a stage or its fallback) or through a call flow (a dial or groupdial step, or a goto to such a flow: a number behind an IVR counts). The box of an endpoint: the user of the endpoint, and the members who have voice.routing. A standalone box: its members (member_ids), and the members who have voice.routing. A box deleted since: the members who have voice.routing. The platform and domain administrators hear every message.
Access: permission voice.use in the organization (profiles)
API keys: refused to restricted keys (limited to a team, or an integration's), 403 forbidden
Query parameters
| Name | Description |
|---|---|
member_only |
true = the view of the mobile app (optional): a member who has voice.routing (an admin) gets their own things and the shared boxes, not their colleagues': the boxes of the numbers, every standalone box and the box of their own endpoints, not the box of another user's endpoint nor a box deleted since; nothing changes for the others. |
number_id |
Only the messages of this number (optional). |
mailbox_id |
Only the messages of this box (an id of GET /voice/mailboxes), or "numbers" for the boxes of the numbers (optional). |
listened |
true for the listened messages, false for the new ones (optional). |
caller |
Only the messages left by this phone number (E.164 or a North American number in any usual notation; optional). 400 validation_error (field caller) for anything else. |
skip |
Pagination offset (default 0). |
limit |
Page size (default 50, at most 100). |
Response: voicemails: The page: id, phone_number_id, mailbox_id (null: the box of the number), number, caller, caller_name, duration (seconds), size, language, listened_at, created_at, expires_at, transcript (Telma AI: the text of the message, null until it is transcribed), ai_state (pending, processing, done, failed, waiting_credit, waiting_plan, or null: not transcribed), ai (Telma AI: the summary of the message, null when there is none: {state, status, summary, reason, actions, actions_done, actions_due (beside actions: the deadline the message stated, YYYY-MM-DD or an ISO instant in UTC, else null), actions_overdue, urgency (low, normal or high, as Telma AI judged it; null before 2026-10-29), caller_name (the name the caller gave for themselves, to suggest when the contact has none), criteria, summary_language, criteria_labels {key: {label, type}}}). total: Number of messages matching the filters. skip: Offset applied. limit: Page size applied.
DELETE /api/v1/voice/voicemails/<voicemail_id>
Delete a voicemail message and its audio.
A member who has voice.routing deletes any message; a listener of the box of an endpoint or of a standalone box (the rule of GET /voice/voicemails) deletes its messages; the messages of the box of a number need voice.routing (403 forbidden otherwise, voice.calls.all is not enough). A message the user may not hear: 404 not_found.
Access: permission voice.use in the organization (profiles)
API keys: refused to restricted keys (limited to a team, or an integration's), 403 forbidden
Path parameters
| Name | Description |
|---|---|
voicemail_id |
Voicemail ID. |
Response: success: True.
GET /api/v1/voice/voicemails/<voicemail_id>
One voicemail message (the link of a notification, of a call or of a contact opens it on the Voicemail page).
Only a message the user may hear (the rule of GET /voice/voicemails); 404 not_found otherwise.
Access: permission voice.use in the organization (profiles)
API keys: refused to restricted keys (limited to a team, or an integration's), 403 forbidden
Path parameters
| Name | Description |
|---|---|
voicemail_id |
Voicemail ID. |
Response: voicemail: The message, as in GET /voice/voicemails.
PUT /api/v1/voice/voicemails/<voicemail_id>
Mark a voicemail message listened or new.
Only a message the user may hear (the rule of GET /voice/voicemails); 404 not_found otherwise.
Access: permission voice.use in the organization (profiles)
API keys: refused to restricted keys (limited to a team, or an integration's), 403 forbidden
Path parameters
| Name | Description |
|---|---|
voicemail_id |
Voicemail ID. |
Request body
| Name | Description |
|---|---|
listened |
true marks it listened (the first time is kept), false marks it new. |
Response: voicemail: The message.
PUT /api/v1/voice/voicemails/<voicemail_id>/ai/actions/<index>
Mark an action of the summary of a voicemail message done (or open again): « call Marielle back tonight » once called back. Whoever may hear the message may mark its actions (the rule of GET /voice/voicemails), in the organization of the message (it need not be the current one); 404 not_found otherwise. The mark follows the text of the action, as for a call (PUT /voice/calls/<id>/ai/actions/<index>). The listeners of the message get the event voicemail_ai_update.
Access: permission voice.use in the organization (profiles)
API keys: refused to restricted keys (limited to a team, or an integration's), 403 forbidden
Path parameters
| Name | Description |
|---|---|
voicemail_id |
Voicemail ID. |
index |
Position of the action in ai.actions (from 0); 404 not_found when there is no such action. |
Request body
| Name | Description |
|---|---|
done |
true marks the action done (who and when are kept), false opens it again (required). |
Response: voicemail: The message, with ai.actions_done updated.
Errors 400 validation_error (field done): done missing or not a boolean. 409 conflict: the message has no summary.
GET /api/v1/voice/voicemails/<voicemail_id>/file
The audio of a voicemail message (MP3).
Only a message the user may hear (the rule of GET /voice/voicemails); 404 not_found otherwise.
Access: permission voice.use in the organization (profiles)
API keys: refused to restricted keys (limited to a team, or an integration's), 403 forbidden
Path parameters
| Name | Description |
|---|---|
voicemail_id |
Voicemail ID. |
Query parameters
| Name | Description |
|---|---|
download |
1 to get it as an attachment (default: inline). |
Response: The MP3 (audio/mpeg).
Telma AI (transcription and summary)
Transcription and summary of the recorded calls: context and criteria of the summaries, plans of the extensions, transcripts of the calls. voxos and transcription capabilities.
GET /api/v1/voice/ai
Telma AI of the organization: settings of the summaries, prices of the domain, usage of the period, endpoints and their plan.
Needs the voice service and the transcription capability (403 capability_required with capability transcription).
Access: permission voice.routing or voice.endpoints or billing.view in the organization (profiles)
API keys: refused to restricted keys (limited to a team, or an integration's), 403 forbidden
Response: available (boolean): The platform transcribes now (its switch is on and the domain has the capability). settings: {summary {context, criteria [{key, label, instructions, type (text, yes_no, number, date, choice), options}]}, vocabulary, masking, health_masking, summary_language, alerts [{id, criterion, value, recipients, email, push, enabled}], outbound_announce (none, sound or standard: what the called party of an outbound call of an extension with a plan hears), outbound_announce_sound_id}. pricing: {currency, plans [{key, name {fr, en} | null, label (in the language of the user), price, hours, included (the plan of the organization includes it: an extension that takes it pays nothing), active (offered to the organizations; an extension keeps a plan no longer offered)}] sorted by price, overage_tiers [{up_to_hours (null for the last), price (per hour)}], rounding_minutes}. usage: {period_start, period_end, included_hours, used_hours, overage_hours, overage_amount, currency} of the current billing period (from the anniversary day of the organization). endpoints: [{id, label, extension, user {id, name}, plan (key of a plan of the grid, or null), plan_label, pending_plan (a key, none, or null: the change at the next period), pending_plan_label, suspended ({since} while its plan is unpaid, else null), has_overrides (the endpoint completes the settings)}]. members: [{id, name, email}] the members who can receive an alert: those with voice.recordings, who read the summaries (with voice.routing only, else absent).
GET /api/v1/voice/ai/endpoints/<endpoint_id>
Telma AI of one endpoint: its plan, what it adds to the settings of the organization, and the settings in force for its calls.
Access: permission voice.endpoints in the organization (profiles)
API keys: refused to restricted keys (limited to a team, or an integration's), 403 forbidden
Path parameters
| Name | Description |
|---|---|
endpoint_id |
Endpoint ID. |
Response: endpoint: {id, label, extension, plan, plan_label, pending_plan, pending_plan_label, suspended, summary {context, criteria (each with disabled: true drops the criterion of the organization of the same key)}, vocabulary, effective {summary, vocabulary}}.
PUT /api/v1/voice/ai/endpoints/<endpoint_id>
Give an endpoint a plan, change or remove it, and set what the endpoint adds to the settings of the summaries.
A plan given during a period debits the remaining part of its price now and opens the same part of its hours; a dearer plan debits the difference for the remaining part; a cheaper plan or removing applies at the next period (pending_plan). 402 insufficient_credit (with amount) when the credit cannot pay what is due now (the automatic recharge is tried first): nothing changes.
Access: permission voice.endpoints in the organization (profiles)
API keys: refused to restricted keys (limited to a team, or an integration's), 403 forbidden
Path parameters
| Name | Description |
|---|---|
endpoint_id |
Endpoint ID. |
Request body
| Name | Description |
|---|---|
plan |
The key of a plan the domain offers (pricing.plans of GET /voice/ai, active), or null to remove it (optional); 400 validation_error (field plan) for an unknown plan or one no longer offered. |
summary |
{context, criteria} of the endpoint (as PUT /voice/ai/settings; a criterion {key, disabled: true} drops the one of the organization), optional. |
vocabulary |
Words of the endpoint added to the organization's (optional). |
Response: endpoint: As GET /voice/ai/endpoints/<id>. charge: {amount, hours, kind (prorata, upgrade or deferred), effective_at} when the plan changed, else null.
GET /api/v1/voice/ai/endpoints/<endpoint_id>/quote
What changing the plan of an endpoint would cost now (to confirm before PUT).
Access: permission voice.endpoints in the organization (profiles)
API keys: refused to restricted keys (limited to a team, or an integration's), 403 forbidden
Path parameters
| Name | Description |
|---|---|
endpoint_id |
Endpoint ID. |
Query parameters
| Name | Description |
|---|---|
plan |
The key of a plan of the grid of the domain (pricing.plans of GET /voice/ai), or none. |
Response: amount: Debited now (the remaining part of the period). hours: Hours added to the reserve of this period. kind: prorata (a plan given), upgrade (a dearer plan), deferred (a cheaper plan or removing: at the next period, nothing debited now) or none. effective_at: When the change applies (ISO 8601), null for none.
POST /api/v1/voice/ai/preview
Summarize an already transcribed call with settings not saved yet (« try on a recent call »); nothing is kept or counted.
Access: permission voice.routing in the organization (profiles)
API keys: refused to restricted keys (limited to a team, or an integration's), 403 forbidden
Rate limit: 20 per hour
Request body
| Name | Description |
|---|---|
call_id |
A call of the organization with a transcript (required); 409 not_transcribed without one. |
endpoint_id |
The endpoint whose settings complete the organization's (optional; default: the endpoint of the call). |
settings |
The settings being edited, tried instead of the saved ones (optional): {summary, vocabulary} of the endpoint when endpoint_id is given, else {summary, vocabulary, masking, health_masking, summary_language} of the organization; or both as {organization, endpoint}. |
Response: result: {status (conversation or no_conversation), summary, reason, actions, criteria}.
PUT /api/v1/voice/ai/settings
Change how the calls of the organization are summarized (the fields given change).
Access: permission voice.routing in the organization (profiles)
API keys: refused to restricted keys (limited to a team, or an integration's), 403 forbidden
Request body
| Name | Description |
|---|---|
summary |
{context (2000 characters at most: what the organization does, what matters in a call, the tone), criteria (15 at most: {key ([a-z][a-z0-9_]*, 40 characters at most, unique), label (1 to 80), instructions (300 at most), type (text, yes_no, number, date or choice), options (1 to 20 labels, for choice only)})}. |
vocabulary |
Names, products and jargon the transcription should recognize (600 characters at most). |
masking |
Hide the card and social insurance numbers, and the dates of birth (a date said about a birth or an age), in the transcripts and the summaries (default true). |
health_masking |
Also hide health information (illnesses, diagnoses, medications, treatments) in the transcripts and the summaries, and ask the summary to leave it out (default true since 2026-10-30; an organization that switches it off keeps false). |
summary_language |
Language of the summaries: user (default: the language of the user of the endpoint of the call, else of the organization) or call (the language spoken in the call). Criteria keys and choice options stay as set, whatever the language. |
outbound_announce |
What the called party of an outbound call of an extension with a plan hears when it answers (its recording is imposed): none (default: the user tells the person), sound (the sound outbound_announce_sound_id) or standard (the standard message). Incoming calls keep their announcement. |
outbound_announce_sound_id |
A sound of the organization (GET /voice/sounds), for sound; null for none. |
inbound_announce |
What the caller of an incoming call that a plan records hears before anyone answers: standard (default: the call is recorded and transcribed) or none (nothing; a number that announces its own recording still does). |
alerts |
Alerts on a criterion (20 at most, the list replaces the current one): [{id (kept from GET, generated when absent), criterion (key of a criterion), value (text up to 60 characters, number or true/false: yes/no and numbers compared as such, a choice or a date without case nor accents, a text criterion when it contains the value), recipients (1 to 20 member IDs, members with voice.recordings only: 400 field: alerts.<n>.recipients otherwise; a saved recipient who lost it since is dropped), email (boolean, default true), push (boolean, default true: push and in-app notice), enabled (boolean, default true), sources (one or more of call, voicemail, conversation, fax: the summaries the rule watches; default all of them), when (always, or closed: only what came while the team of the number was closed)}]. Each matching call is sent once per alert, a summary made again included; the email carries the criteria, the other party, the date and a link, never the transcript nor the summary. |
Response: settings: The settings now in force.
GET /api/v1/voice/calls/<call_id>/ai
The summary and the transcription of a call. voice.recordings (like the recording itself) reads everything; the user of an endpoint that placed the call or rang for it reads its summary, without the transcript nor the recording (the mobile app). The call is looked up in the organizations of the user, not only the current one; 404 not_found for a call the user may not read.
Access: member of the organization
API keys: refused to restricted keys (limited to a team, or an integration's), 403 forbidden
Path parameters
| Name | Description |
|---|---|
call_id |
Call ID. |
Response: ai: {state (pending, processing, done, failed, waiting_credit, waiting_plan, deleted), status (conversation, no_conversation), summary, reason, actions (sentences), actions_done (beside actions: null, or {at, by, by_name} once marked done with PUT ./ai/actions/<index>), actions_due (beside actions: the deadline the call stated, YYYY-MM-DD for a day or an ISO instant in UTC for a time, null without one; null everywhere for a summary made before 2026-10-29), actions_overdue (beside actions: the deadline passed), caller_name (the name the caller gave for themselves, to suggest when the contact has none; never applied), criteria {key: value or null}, language (detected in the call), summary_language (the language the summary is written in), error (failed only), counted_seconds, done_at, endpoint_id, plan}, null when the call is not transcribed. transcript: {language, segments [{speaker (local: our side, remote: the contact, mixed: both in one track), start, end (seconds from the start of the recording), text}], text}; null without one or without voice.recordings. transcript_allowed (boolean): The user may read the transcript (voice.recordings). recording_allowed (boolean): The user may listen to the recording (voice.recordings). criteria_labels: {key: {label, type}} of the criteria in force for the call. note_draft: {text, language} or null: the note of the agent after the call, filled from the summary (« Reprendre le résumé dans la note », 2026-10-30): the reason, the summary and the actions with their deadline, labels in the language of the user; null without a summary of a conversation. Never stored: the client puts it in the note being written, the agent changes it and saves it with POST /voice/calls/<id>/notes.
PUT /api/v1/voice/calls/<call_id>/ai/actions/<index>
Mark an action of the summary of a call done (or open again): « call back on Thursday » once called back. Whoever reads the summary may mark its actions (voice.recordings, or the user of an endpoint of the call); the call is looked up like GET /voice/calls/<id>/ai (404 not_found for a call the user may not read). The mark follows the text of the action: a new summary that keeps the action keeps it done. The viewers of the call get the event call_ai_update.
Access: member of the organization
API keys: refused to restricted keys (limited to a team, or an integration's), 403 forbidden
Path parameters
| Name | Description |
|---|---|
call_id |
Call ID. |
index |
Position of the action in actions (from 0); 404 not_found when there is no such action. |
Request body
| Name | Description |
|---|---|
done |
true marks the action done (who and when are kept), false opens it again (required). |
Response: ai: As GET /voice/calls/<id>/ai (actions_done updated).
Errors 400 validation_error (field done): done missing or not a boolean. 409 conflict: the call has no summary.
POST /api/v1/voice/calls/<call_id>/ai/draft
Propose the follow-up text message of a summarized call, written by Telma AI from its summary (what was agreed), in the language of the call: « Proposer une réponse ». Nothing is sent nor stored: the text fills the « Écrire » window and the agent reads, changes and sends it. Whoever reads the summary (as GET /voice/calls/<id>/ai) and may send text messages (messages.send) may ask. 30 drafts an hour per user, 300 per organization.
Access: permission messages.send in the organization (profiles)
API keys: refused to restricted keys (limited to a team, or an integration's), 403 forbidden
Path parameters
| Name | Description |
|---|---|
call_id |
Call ID. |
Response: draft: {text, language (of the call)}.
Errors 404 not_found: a call the user may not read. 409 nothing_to_answer: the call has no summary of a conversation. 429 rate_limited. 502 provider_error, 503 unavailable: the service did not answer, try again.
POST /api/v1/voice/calls/<call_id>/ai/resummarize
Make the summary of a transcribed call again with the settings in force now (no new transcription, nothing counted). An action marked done stays done when the new summary only rewords it (the same words up to case, accents, punctuation and small words, or 80 % of the words in common for actions of 3 words or more, always the same numbers); never by position.
Access: permission voice.recordings in the organization (profiles)
API keys: refused to restricted keys (limited to a team, or an integration's), 403 forbidden
Path parameters
| Name | Description |
|---|---|
call_id |
Call ID. |
Response: ai: As GET /voice/calls/<id>/ai.
POST /api/v1/voice/calls/<call_id>/ai/transcribe
Transcribe a call again: one that failed, waited for credit or for its plan, or a recorded call that never was (an endpoint with a plan took part in it).
409 conflict when it is queued, being processed or done; 409 not_eligible without recording or without an endpoint with a plan.
Access: permission voice.recordings in the organization (profiles)
API keys: refused to restricted keys (limited to a team, or an integration's), 403 forbidden
Path parameters
| Name | Description |
|---|---|
call_id |
Call ID. |
Response: ai: As GET /voice/calls/<id>/ai.
GET /api/v1/voice/calls/last-summary
The last summarized call with a number (« last exchange », shown by the mobile app on its call screen and by the web phone): among the calls of the user's own endpoints in the organization of the endpoint given (every call of that organization with voice.recordings), 30 days back at most. Since 2026-10-29 also the last analyzed text conversation (Telma AI on the messages, the teams the user reads) and the last summarized voicemail message (the messages the user hears) with that number, and the most recent of the three.
Access: member of the organization
API keys: refused to restricted keys (limited to a team, or an integration's), 403 forbidden
Query parameters
| Name | Description |
|---|---|
number |
The contact, E.164 or 10 digits (required). |
endpoint_id |
One of the user's own endpoints (required); its organization is the one searched (404 not_found for an endpoint of someone else). |
Response: summary: The last summarized call {call_id, at (ISO 8601 UTC), direction, summary, reason, actions}, null when there is none (unchanged: the older apps read it). messages: The last analysis of a text conversation {conversation_id, message_ai_id, at, summary, reason, actions}, or null. voicemail: The last summarized voicemail message {voicemail_id, at, summary (its text when it has no summary), reason, actions}, or null. latest: The most recent of the three, with source (call, messages or voicemail) and the fields of its kind, or null.
Search in the summaries
One search in the summaries of Telma AI: calls, voicemail, texts and meetings, by words or by meaning, with the rights of each source.
GET /api/v1/ai/search
Search in what Telma AI summarized in the current organization: the calls, the voicemail messages, the text conversations, the recorded meetings and the received faxes, each with the rights of its own page, in one list (« Rechercher » of the web, MCP search_summaries).
Access: member of the organization; Calls: voice.recordings reads every summary, otherwise voice.use reads the summaries of the calls of their own endpoints. Voicemail messages: the ones the user may hear (rule of GET /voice/voicemails). Text conversations: the teams the user reads (GET /conversations), messages.read. Meetings: the host, voice.recordings, a member who took part. Faxes: the received faxes of the teams of the fax numbers the user works with, fax.read (rule of GET /fax). The organization needs the voice service and the transcription capability (calls, voicemail), message_ai (conversations), video (meetings), fax and fax_ai (faxes).
API keys: refused to restricted keys (limited to a team, or an integration's), 403 forbidden
Query parameters
| Name | Description |
|---|---|
q |
Words searched, each one must appear (case and accents ignored) in the summary, the reason or the actions (and the text of a voicemail message; the transcripts of the calls too with voice.recordings; the sender and the useful data of a fax, never the text read on its pages); 200 characters and 10 words at most. Newest first. |
meaning |
A question in plain words instead of q ("customers unhappy about the delay", 300 characters at most): the items closest in meaning first, each with score (0 to 1). Compares the 5000 newest summarized calls and the 5000 newest other summaries of the period; vectors computed when the summary is made (the older ones of the last 90 days are filled in little by little). 30 searches a minute per user and 600 an hour per organization (429 rate_limited). |
sources |
Comma separated among call, voicemail, conversation, meeting, fax (default: every source the user may search). A source the user may not search is ignored and listed in skipped. |
from |
Items at or after this moment (ISO 8601). |
to |
Items before this moment (ISO 8601). |
skip |
Offset (default 0, at most 500). |
limit |
Page size, 1 to 50 (default 20). |
Response: results (array): [{source (call, voicemail, conversation, meeting, fax), id, at (ISO 8601 UTC), direction (inbound, outbound, or null for a meeting), number (the other party, E.164; null for a meeting), name (caller id name, name of the contact of the conversation, title of the meeting, name the fax machine sent or the sender Telma AI read), summary (an excerpt; for a voicemail message without a summary, its text), reason, actions, score (by meaning only), matched_in (by words: summary, reason, actions, sender), and the ids to open it: call_id (a call), voicemail_id and mailbox_id (a voicemail message), conversation_id, message_ai_id and team_id (a text conversation), meeting_id and recording_id (a meeting), fax_id and team_id (a fax: /fax?fax=<id>); access (calls and meetings: full when the user reads the transcript too, else summary); urgency (a voicemail message); duration (a voicemail message, seconds); sender and pages (a fax)}]. total: How many items match (by words: in all the sources; by meaning: kept above the threshold). sources: The sources searched. skipped: [{source, reason (not_allowed: the capability of the organization or the permission of the user is missing)}]. mode: words or meaning. skip, limit: The page.
Errors 400 validation_error (field q, meaning, sources, from or to; q or meaning is required, not both). 403 forbidden: no organization. 429 rate_limited (by meaning). 503 semantic_search_unavailable: the search by meaning does not answer right now.
Telma AI (domain and platform)
Prices of Telma AI in a domain (margin of at least 60 %) and platform settings. No API key.
GET /api/v1/domains/<domain_id>/ai-pricing
Prices of Telma AI in a domain (defaults for what it does not set).
Access: platform permission platform_admin or domain_admin (domain_admin: only its domains, domain_id)
API keys: refused, 403 forbidden (API key not allowed on this route)
Path parameters
| Name | Description |
|---|---|
domain_id |
Domain ID. |
Response: pricing: {currency, plans [{key, name {fr, en} | null (null: the brand label of standard / pro), price, hours, active (offered to the organizations), wholesale (super admin only: what the domain pays the platform, number or null)}] sorted by price, overage_tiers [{up_to_hours, price}], rounding_minutes}. limits: {min_hour_price, max_hours_per_dollar}: the margin rule a grid must keep. cost_per_hour: Cost of an hour for the platform (super admin only).
PUT /api/v1/domains/<domain_id>/ai-pricing
Change the prices of Telma AI in a domain (the fields given change). Every price keeps a margin of at least 60 % over the cost of the platform: an hour costs at least limits.min_hour_price, a plan includes at most limits.max_hours_per_dollar hours per dollar (400 validation_error with field otherwise).
Access: platform permission platform_admin or domain_admin (domain_admin: only its domains, domain_id)
API keys: refused, 403 forbidden (API key not allowed on this route)
Path parameters
| Name | Description |
|---|---|
domain_id |
Domain ID. |
Request body
| Name | Description |
|---|---|
plans |
The list of plans, which replaces the current one (a plan left out is removed; 20 at most): [{key (^[a-z][a-z0-9_-]{1,30}$, unique; absent = made of the French name), name {fr (required, except for standard and pro, labelled by the brand without one), en} (60 characters each), price (0.5 to 10000), hours (0 to 10000), active (boolean, default true: offered to the organizations; false keeps it for the extensions that hold it), wholesale (super admin only, number 0 to 10000 or null; ignored for a domain admin)}]. 409 plan_in_use {field, plan, organizations} when a plan left out is held by an extension of the domain (or waited for at its next period). Also accepted: {standard {price, hours}, pro {price, hours}} (older clients: those plans change, the others stay). Optional. |
overage_tiers |
1 to 6 tiers {up_to_hours (going up; null for the last), price (per hour)} (optional). |
rounding_minutes |
1, 5, 6, 10, 15, 30 or 60: the step the extra hours of a period are rounded up to (optional). |
currency |
CAD, USD or EUR (optional). |
Response: pricing: The prices now in force (as GET). limits: The margin rule.
GET /api/v1/system/ai-settings
Telma AI settings of the platform.
Access: platform permission platform_admin
API keys: refused, 403 forbidden (API key not allowed on this route)
Response: settings: {enabled (the worker transcribes; off: nothing is queued), cost_per_hour (cost of an hour of call for the platform, base of the margin rule of the prices), transcription_model, summary_model, concurrency (calls transcribed at once by a worker), embedding_model (vectors of the search by meaning, bge-m3; another model: the worker computes the vectors again), message_ai_daily_limit (Telma AI on the text messages: analyses a day (UTC) per organization, 500 by default, 0 = no cap; past it the conversations of the day are not analyzed, which the log notes once a day per organization), fax_ai_daily_limit (Telma AI on the received faxes: faxes read a day (UTC) per organization, 200 by default, 0 = no cap; past it a fax is not read, its ai says skipped with error daily_limit)}.
PUT /api/v1/system/ai-settings
Change the Telma AI settings of the platform (the fields given change).
Access: platform permission platform_admin
API keys: refused, 403 forbidden (API key not allowed on this route)
Request body
| Name | Description |
|---|---|
enabled |
The switch of the platform. |
cost_per_hour |
0.01 to 100. |
transcription_model |
Name of the model of the provider. |
summary_model |
Name of the model of the provider. |
embedding_model |
Name of the embedding model of the provider (search by meaning). |
concurrency |
1 to 32 (read when the worker starts). |
message_ai_daily_limit |
0 to 100000 analyses a day per organization (0 = no cap). |
fax_ai_daily_limit |
0 to 100000 faxes read a day per organization (0 = no cap). |
Response: settings: The settings now in force.
Domain voice settings
Retention of recordings and messages, channel and destination limits (domain admin).
GET /api/v1/domains/<domain_id>/call-costs
Report of the rated calls of the domain's organizations with their prices (Coûts C6): what each call was billed to the customer (retail) and what the platform bills the domain for it (wholesale), summed by organization, domain or destination country, or listed call by call. The platform administrator also sees what the call cost the platform (cost), the platform's margin, the trunk and the cost table; a domain administrator never does.
A call counts once rated (billed, or free: minutes of a phone system's pool, zero rate); a call rated before the wholesale price was noted on calls counts with its retail price only (without_wholesale).
Errors are {error, message}: 400 validation_error with field (from, to, destination, group_by, organization_id, skip, limit).
Access: platform permission platform_admin or domain_admin (domain_admin: only its domains, domain_id)
Path parameters
| Name | Description |
|---|---|
domain_id |
Domain ID. |
Query parameters
| Name | Description |
|---|---|
from |
ISO 8601 date or datetime, start of the period (UTC; default: the 1st of the current month). |
to |
ISO 8601 date (the whole day) or datetime, end of the period (default: now). At most 366 days. |
organization_id |
Only the calls of this organization. |
destination |
Only the calls to numbers starting with these digits (33, +33, 1514). |
group_by |
domain, organization, destination (country of the number) or call (the calls one by one, newest first). |
skip |
Calls to skip (group_by=call; default 0). |
limit |
Calls per page (group_by=call; default 50, at most 100). |
Response: from, to: The period (ISO 8601, UTC; to excluded). group_by: The grouping (default organization). rows: [{key (ID, or ISO country code), label (name, or country code), calls, billed_minutes, retail, wholesale, domain_margin (retail - wholesale), without_wholesale; platform administrator: cost, platform_margin (wholesale - cost, over the calls whose cost is known), uncosted (calls without a known cost)}], largest retail first. totals: The same fields over the period. truncated (boolean): Only the first 200000 calls are summed. calls: (group_by=call, instead of rows and totals) [{id, start, organization_id, organization, domain_id, domain, direction, destination, country, talk_seconds, billed_seconds, retail, wholesale, wholesale_source (margin: computed from the cost; ratio: share of the retail price); platform administrator: cost, trunk_id, trunk, table_id, table}], with total, skip, limit.
GET /api/v1/domains/<domain_id>/call-costs/export
The report of GET /domains/<id>/call-costs as a CSV file (UTF-8 with BOM, comma separated): one line per group and a total line, or one line per call (group_by=call, at most 50000: 413 too_many_rows beyond). Same filters, same visibility (cost, platform margin, trunk and cost table for the platform administrator only).
Access: platform permission platform_admin or domain_admin (domain_admin: only its domains, domain_id)
Path parameters
| Name | Description |
|---|---|
domain_id |
Domain ID. |
Query parameters
| Name | Description |
|---|---|
from |
ISO 8601 date or datetime, start of the period (UTC; default: the 1st of the current month). |
to |
ISO 8601 date (the whole day) or datetime, end of the period (default: now). At most 366 days. |
organization_id |
Only the calls of this organization. |
destination |
Only the calls to numbers starting with these digits (33, +33, 1514). |
group_by |
domain, organization, destination (country of the number) or call (the calls one by one, newest first). |
Response: A text/csv attachment. Groups: <group_by>, calls, billed_minutes, retail, wholesale, domain_margin (+ cost, platform_margin, uncosted), without_wholesale. Calls: start, domain, organization, direction, destination, country, talk_seconds, billed_seconds, retail, wholesale, wholesale_source (+ cost, trunk, cost_table), call_id.
GET /api/v1/domains/<domain_id>/organizations/<organization_id>/office-networks
Office addresses of an organization for the voice edge (platform admin only): the public networks its phones and web tabs all leave from (an office behind one address, a call center).
From these addresses the voice edge accepts 2000 open connections and 1000 web phone connections at once instead of 200 and 100, never limits the requests by rate, and counts only the refused passwords toward a ban (not the challenges of phones registering all at once). Applied within a minute and a half.
Access: platform permission platform_admin
Path parameters
| Name | Description |
|---|---|
domain_id |
Domain ID. |
organization_id |
Organization ID. |
Response: networks: [{network (address or network in CIDR notation), note, added_at}].
PUT /api/v1/domains/<domain_id>/organizations/<organization_id>/office-networks
Replace the office addresses of an organization for the voice edge (platform admin only). Journalled.
Access: platform permission platform_admin
Path parameters
| Name | Description |
|---|---|
domain_id |
Domain ID. |
organization_id |
Organization ID. |
Request body
| Name | Description |
|---|---|
networks |
The whole list (required), at most 20: {network (a public IPv4 address or network up to /24, IPv6 up to /48; a private or reserved range is refused: it is never limited), note (120 characters)}, or the network alone as text. An empty list removes them all. |
Response: networks: The networks after the change.
GET /api/v1/domains/<domain_id>/organizations/<organization_id>/voice-limits
Voice limits of an organization: its own overrides and what applies after the domain's defaults.
Access: platform permission platform_admin or domain_admin (domain_admin: only its domains, domain_id)
Path parameters
| Name | Description |
|---|---|
domain_id |
Domain ID. |
organization_id |
Organization ID. |
Response: voice_limits: The organization's overrides {max_channels, forward_countries, allowed_prefixes, max_call_seconds, max_call_cost, spend_limit, spend_window_minutes, suspend_on_cap, international_hours} (null: the domain's value). effective: What applies: {max_channels, source (subscription: the lines of the phone system, organization, formula, domain or none), forward_countries, allowed_prefixes, premium_blocked} and the fraud guards (the organization's value, else the domain's). suspension: Why the outbound calls of the organization are suspended {reason (spend, call_cost, manual, platform: the switch of the whole platform, which comes first), detail, at, by (ID of the administrator for manual, "platform" for platform)}, null when they are not.
PUT /api/v1/domains/<domain_id>/organizations/<organization_id>/voice-limits
Change the voice limits of an organization (the fields given are changed, null removes an override). Journalled.
Access: platform permission platform_admin or domain_admin (domain_admin: only its domains, domain_id)
Path parameters
| Name | Description |
|---|---|
domain_id |
Domain ID. |
organization_id |
Organization ID. |
Request body
| Name | Description |
|---|---|
max_channels |
Simultaneous calls allowed, 1 to 10000 (null: the domain's rule, or the lines of the phone system when the organization has it). A forward counts two. A value set here wins over the lines of the phone system until it is cleared. |
forward_countries |
ISO codes a forward or a call may go to (null: the domain's list; ["*"]: every country, premium numbers still refused). |
allowed_prefixes |
Digit prefixes (country code first) always allowed as a destination, at most 100 (null: none). |
max_call_seconds |
As the domain's (PUT /domains/<id>/voice-limits); null: the domain's value. |
max_call_cost |
As the domain's (PUT /domains/<id>/voice-limits); null: the domain's value. |
spend_limit |
As the domain's (PUT /domains/<id>/voice-limits); null: the domain's value. |
spend_window_minutes |
As the domain's (PUT /domains/<id>/voice-limits); null: the domain's value. |
suspend_on_cap |
As the domain's (PUT /domains/<id>/voice-limits); null: the domain's value. |
international_hours |
As the domain's (PUT /domains/<id>/voice-limits); null: the domain's value. |
Response: voice_limits: The organization's overrides after the change. effective: What applies.
GET /api/v1/domains/<domain_id>/organizations/<organization_id>/voice-outbound
Outbound call rules of an organization: default trunk and rules on the destination (see services/voice_outbound.py).
Access: platform permission platform_admin or domain_admin (domain_admin: only its domains, domain_id)
Path parameters
| Name | Description |
|---|---|
domain_id |
Domain ID. |
organization_id |
Organization ID. |
Query parameters
| Name | Description |
|---|---|
destination |
A number to test (E.164, or 10 digits for North America): test tells which trunk the rules choose. |
Response: voice_outbound: {default_trunk_id, rules: [{pattern, trunk_id, label}]} (rules applied in order, the first whose regular expression matches the destination in E.164, e.g. +15145551234, wins; then the default trunk; then the former order: the number's trunk, the trunk of arrival, a shared trunk). trunks: The trunks it may choose [{id, label, scope domain|platform, outbound_enabled, enabled}]; a platform trunk is named by its description (and its name for a super admin). test: With destination: {destination (E.164), trunk_id (null: the rules say nothing)}.
PUT /api/v1/domains/<domain_id>/organizations/<organization_id>/voice-outbound
Replace the outbound call rules of an organization. Journalled.
Access: platform permission platform_admin or domain_admin (domain_admin: only its domains, domain_id)
API keys: refused, 403 forbidden (API key not allowed on this route)
Path parameters
| Name | Description |
|---|---|
domain_id |
Domain ID. |
organization_id |
Organization ID. |
Request body
| Name | Description |
|---|---|
default_trunk_id |
Trunk for every outbound call no rule matches (null: the former order). |
rules |
Ordered [{pattern, trunk_id, label}] (50 at most): pattern = Python regular expression (1 to 100 characters) searched in the destination in E.164, e.g. "^+1(514|438)" or "^+33"; trunk_id = a trunk of trunks that allows outbound calls; label = free text (80 characters). |
Response: voice_outbound: The rules now in force. trunks: As GET.
Errors 400 validation_error (field default_trunk_id or rules): invalid regular expression, trunk the organization may not use or without outbound calls.
POST /api/v1/domains/<domain_id>/organizations/<organization_id>/voice-outbound/resume
Resume the outbound calls of an organization suspended by the fraud guards (spending over the window, a call cut at its maximum cost) or by an administrator. The organization itself cannot do it. Journalled with the suspension it lifts.
Access: platform permission platform_admin or domain_admin (domain_admin: only its domains, domain_id)
Path parameters
| Name | Description |
|---|---|
domain_id |
Domain ID. |
organization_id |
Organization ID. |
Request body
| Name | Description |
|---|---|
note |
What was checked (optional string, kept in the journal). |
Response: suspension: null.
POST /api/v1/domains/<domain_id>/organizations/<organization_id>/voice-outbound/suspend
Suspend the outbound calls of an organization (calls of its endpoints, its forwards); the calls in progress are hung up within seconds, incoming calls go on. Journalled; the administrators receive an alert.
Access: platform permission platform_admin or domain_admin (domain_admin: only its domains, domain_id)
Path parameters
| Name | Description |
|---|---|
domain_id |
Domain ID. |
organization_id |
Organization ID. |
Request body
| Name | Description |
|---|---|
note |
Why (optional string, kept up to 500 characters). |
Response: suspension: {reason: manual, detail {note}, at, by (ID of the administrator)}.
GET /api/v1/domains/<domain_id>/organizations/<organization_id>/voice-recording
Recording rules of the outbound calls of the endpoints of an organization (they win over the endpoint's own setting; see services/voice_recording.py).
Access: platform permission platform_admin or domain_admin (domain_admin: only its domains, domain_id)
Path parameters
| Name | Description |
|---|---|
domain_id |
Domain ID. |
organization_id |
Organization ID. |
Response: voice_recording: {outbound_always (every outbound call of its endpoints is recorded), outbound_follows_number (the outbound calls presenting a number whose recording is on are recorded), recording_skip_allowed (a user may skip the imposed recording of his next outbound call, from the app)}.
PUT /api/v1/domains/<domain_id>/organizations/<organization_id>/voice-recording
Change the recording rules of the outbound calls of an organization (the fields given; the others are kept). Journalled.
Access: platform permission platform_admin or domain_admin (domain_admin: only its domains, domain_id)
Path parameters
| Name | Description |
|---|---|
domain_id |
Domain ID. |
organization_id |
Organization ID. |
Request body
| Name | Description |
|---|---|
outbound_always |
Record every outbound call of its endpoints. |
outbound_follows_number |
Record the outbound calls that present a number whose recording is on. |
recording_skip_allowed |
A user may skip the imposed recording of his next outbound call (PUT /voice/call-info/recording/skip-next). |
Response: voice_recording: The rules now in force, as GET.
GET /api/v1/domains/<domain_id>/voice-limits
Voice limits of a domain: channels, destinations and the fraud guards of outbound calls (E47). By default an organization has 10 simultaneous calls, calls to the public network (endpoints, forwards, external members of a group) go to Canada and the United States only, premium-rate numbers are refused, a call is cut after 4 hours or at 10 of cost, and 10 of cost in 5 minutes suspends the outbound calls of the organization. The voice server applies them.
Access: platform permission platform_admin or domain_admin (domain_admin: only its domains, domain_id)
Path parameters
| Name | Description |
|---|---|
domain_id |
Domain ID. |
Response: voice_limits: {default_max_channels (10 by default), channels_per_destination, min_channels, forward_countries, premium_blocked, max_call_seconds, max_call_cost, spend_limit, spend_window_minutes, suspend_on_cap, international_hours, loop_max_attempts, loop_window_seconds, unknown_rate_per_minute} (meaning and defaults: see PUT).
PUT /api/v1/domains/<domain_id>/voice-limits
Change the voice limits of a domain (the fields given are changed).
Access: platform permission platform_admin or domain_admin (domain_admin: only its domains, domain_id)
Path parameters
| Name | Description |
|---|---|
domain_id |
Domain ID. |
Request body
| Name | Description |
|---|---|
default_max_channels |
Simultaneous calls of an organization without its own limit, 1 to 10000 (default 10; null: none). A forward counts two. |
channels_per_destination |
Formula by forward destinations: the limit is max(min_channels, distinct forward destinations x this) (null: off). |
min_channels |
Floor of the formula (default 2). |
forward_countries |
ISO 3166-1 alpha-2 codes a forward, a call of an endpoint or a call code may go to (default US and CA); ["*"]: every country, premium numbers still refused). |
premium_blocked |
Refuse premium-rate numbers (900, 976; default true). |
max_call_seconds |
Longest outbound call, 60 to 86400 seconds (default 14400). |
max_call_cost |
The platform's cost (CAD, from the cost table of the trunk) at which an outbound call is cut, 0.5 to 10000 (default 10). |
spend_limit |
The platform's cost (CAD) over the window that suspends the outbound calls of an organization, 0.5 to 100000 (default 10). |
spend_window_minutes |
The sliding window of spend_limit, 1 to 1440 minutes (default 5). |
suspend_on_cap |
A call cut at max_call_cost suspends the outbound calls of the organization (default true). |
international_hours |
Business hours {timezone, schedule {mon..sun: [[start, end]]}, exceptions, closures} outside which a call abroad (outside Canada and the United States) is refused; null: any time (default). |
loop_max_attempts |
The same caller to the same number more often than this in loop_window_seconds is a loop, 1 to 100 (default 3). |
loop_window_seconds |
10 to 3600 (default 60). |
unknown_rate_per_minute |
Cost assumed for a destination in Canada or the United States that no cost table covers, 0 to 10 (default 0.05); elsewhere such a call is refused. |
Response: voice_limits: The limits after the change.
GET /api/v1/domains/<domain_id>/voice-pricing
How the calls of the domain are priced: the platform's margin (what the domain is billed) and the domain's own (what its customers are billed).
Access: platform permission platform_admin or domain_admin (domain_admin: only its domains, domain_id)
Path parameters
| Name | Description |
|---|---|
domain_id |
Domain ID. |
Response: voice_pricing: {wholesale (the rules of the price billed to the domain: markup_percent, min_markup_per_minute, min_billed_seconds, increment_seconds, connection_fee), wholesale_override (super admin only: the rules set for this domain over the platform's), retail {mode (margin: the domain's margin over the wholesale price; rates: the domain's own price list, GET /domains/<id>/voice-rates), markup_percent, min_markup_per_minute, min_billed_seconds, increment_seconds, connection_fee}}.
PUT /api/v1/domains/<domain_id>/voice-pricing
Change the pricing of the domain's calls.
Access: platform permission platform_admin or domain_admin (domain_admin: only its domains, domain_id)
Path parameters
| Name | Description |
|---|---|
domain_id |
Domain ID. |
Request body
| Name | Description |
|---|---|
retail |
{mode (margin or rates), markup_percent, min_markup_per_minute, min_billed_seconds, increment_seconds, connection_fee}: the domain's margin (bounds as PUT /system/voice-pricing). |
wholesale |
The platform's margin for this domain (super admin only, else 400 validation_error): the same rules; a rule set to null goes back to the platform's. |
Response: voice_pricing: As GET.
GET /api/v1/domains/<domain_id>/voice-rating/quote
What a call to a destination costs and is billed, for an organization of the domain (or through a trunk).
The cost and the provider's table are shown to the super admin only.
Access: platform permission platform_admin or domain_admin (domain_admin: only its domains, domain_id)
Path parameters
| Name | Description |
|---|---|
domain_id |
Domain ID. |
Query parameters
| Name | Description |
|---|---|
destination |
The number called (required). |
seconds |
Length of the call (default 60). |
organization_id |
The organization calling (its outbound rules choose the trunk). |
trunk_id |
A trunk the domain may use, instead. |
Response: quote: {destination, prefix, seconds, wholesale {per_minute, amount, billed_seconds, rules}, retail ({per_minute, amount, billed_seconds, rules, mode} or null: the domain's own price list applies), trunk_id; super admin: cost {per_minute, currency, amount, source_per_minute, source_currency}, trunk_name, table_id, table_name, description}, or null when no cost covers the destination.
GET /api/v1/domains/<domain_id>/voice-security
Voice security of a domain: its organizations whose outbound calls are suspended and their latest security events.
Access: platform permission platform_admin or domain_admin (domain_admin: only its domains, domain_id)
Path parameters
| Name | Description |
|---|---|
domain_id |
Domain ID. |
Response: platform_suspended (boolean): Every outbound call of the platform is suspended. suspended: [{organization_id, name, suspension {reason, detail, at, by}}]. events: The latest 100 security events of the domain's organizations, newest first [{id, organization_id, organization_name, type (outbound_suspended, call_cost_reached, call_duration_reached, refused_destination, refused_international_hours, refused_loop, refused_no_rate, refused_source, new_country, endpoint_locked, night_volume...), detail, at, notified (an alert was sent)}].
GET /api/v1/domains/<domain_id>/voice-settings
Voice settings of a domain: retention of recordings and voicemail messages, voicemail recording limits (E27, E31).
Access: platform permission platform_admin or domain_admin (domain_admin: only its domains, domain_id)
Path parameters
| Name | Description |
|---|---|
domain_id |
Domain ID. |
Response: voice_settings: {recording_days (days a recording is kept, 0: forever; null by default: the retention of the files of the domain, one year unless GET /domains/<id>/retention-settings says otherwise, or the tier of the organization), recording_announce (play the legal announcement on recorded calls unless the number says otherwise; default false), voicemail {retention_days (null by default: the retention of the files, as recording_days; 0: forever), max_seconds (longest message, default 180), silence_seconds (silence that ends a message, default 5), min_seconds (shorter messages are dropped, default 1)}, auto_softphone (every organization of the domain gets a SIP endpoint for the softphone of the mobile app and its voice numbers ring it; default false)}.
PUT /api/v1/domains/<domain_id>/voice-settings
Change the voice settings of a domain (the fields given are changed). New recordings and messages use them; those already stored keep their expiry.
Access: platform permission platform_admin or domain_admin (domain_admin: only its domains, domain_id)
Path parameters
| Name | Description |
|---|---|
domain_id |
Domain ID. |
Request body
| Name | Description |
|---|---|
recording_days |
Days a recording is kept, 0 to 3650 (0: forever), or null for the retention of the files of the domain. A tier of the organization keeps them longer, never shorter. |
recording_announce |
Play the legal announcement on recorded calls (boolean). |
voicemail |
{retention_days 0-3650 or null (the retention of the files of the domain), max_seconds 10-600, silence_seconds 2-30, min_seconds 0-10}. |
auto_softphone |
Automatic softphone. An organization created in the domain from then on (sign-up, OAuth sign-up, creation by an admin) receives the capabilities voxos and sip of the domain and a SIP endpoint for its owner, once they hold a membership in it (label: their name; the calls it does not answer go to the owner's verified phone when they have one); a voice number the organization receives without routing (purchase, assignment by the domain admin, port completed) rings that endpoint, with the push of the mobile app, and becomes the number its calls present. Existing organizations: the operator's catch-up command. Turning it off changes nothing already created. |
Response: voice_settings: The settings after the change.
Voice (internal)
Deposit of voicemail messages and recordings by the voice servers, service token. Not for users or API keys.
POST /api/v1/internal/voice/call-ai-events
Emit the real-time event of a call whose transcription changed (service token; the Telma AI worker runs apart from the web server and asks it to emit).
Access: service token (Authorization: Bearer $VOICE_INTERNAL_TOKEN), neither a user nor an API key
API keys: refused, 403 forbidden (API key not allowed on this route)
Request body
| Name | Description |
|---|---|
call_id |
ID of the call (or voicemail_id, message_ai_id, fax_id). |
voicemail_id |
ID of the voicemail message (or call_id, message_ai_id, fax_id). |
message_ai_id |
ID of an analysis of a text conversation (the event conversation_ai_update to its team, then its alerts and its webhook conversation.summarized). |
fax_id |
ID of a received fax Telma AI read (the event fax_ai_update to its team, its e-mail held for the summary, then its alerts and its webhook fax.summarized). |
Response: ok: True (also for an unknown call: nothing to emit).
Errors 401 unauthorized: the Authorization: Bearer header is missing or is not the service token. 503 internal_api_disabled: VOICE_INTERNAL_TOKEN is not set on the server.
GET /api/v1/internal/voice/edge/office-networks
Office addresses of every organization, for the voice edge (its own service token, read every minute).
Access: service token (Authorization: Bearer $VOICE_EDGE_TOKEN), neither a user nor an API key
API keys: refused, 403 forbidden (API key not allowed on this route)
Response: networks: [{network (CIDR), tag (account code of the organization, else its ID)}], sorted, each network once.
Errors 401 unauthorized: the Authorization: Bearer header is missing or is not the token of the edge. 503 internal_api_disabled: VOICE_EDGE_TOKEN is not set on the server.
GET /api/v1/internal/voice/endpoints/<endpoint_id>/voicemails
The voicemail messages an extension's phone plays (*97, the Messages key; service token): those its user hears in the mobile app, or its own box for an extension without a user. Newest unheard first, then the heard ones.
Access: service token (Authorization: Bearer $VOICE_INTERNAL_TOKEN), neither a user nor an API key
API keys: refused, 403 forbidden (API key not allowed on this route)
Response: language: fr or en, the language of the extension (else of its user). messages: [{id, caller, caller_name, created_at, duration, listened}], 50 at most.
Errors 401 unauthorized: not the service token. 404 not_found: unknown or disabled extension. 503 internal_api_disabled: VOICE_INTERNAL_TOKEN is not set.
DELETE /api/v1/internal/voice/endpoints/<endpoint_id>/voicemails/<voicemail_id>
Delete a message from the phone (service token), with the rule of DELETE /voice/voicemails/<id> for the extension's user.
Access: service token (Authorization: Bearer $VOICE_INTERNAL_TOKEN), neither a user nor an API key
API keys: refused, 403 forbidden (API key not allowed on this route)
Errors 401 unauthorized. 403 forbidden: a message of a number's box, the user is not an admin of the boxes. 404 not_found.
PUT /api/v1/internal/voice/endpoints/<endpoint_id>/voicemails/<voicemail_id>
Mark a message heard (or new again) from the phone (service token), as the extension's user.
Access: service token (Authorization: Bearer $VOICE_INTERNAL_TOKEN), neither a user nor an API key
API keys: refused, 403 forbidden (API key not allowed on this route)
Request body
| Name | Description |
|---|---|
listened |
true or false. |
Errors 400 validation_error. 401 unauthorized. 404 not_found.
GET /api/v1/internal/voice/endpoints/<endpoint_id>/voicemails/<voicemail_id>/file
The audio (MP3) of a message the extension may hear, for the voice server to play (service token).
Access: service token (Authorization: Bearer $VOICE_INTERNAL_TOKEN), neither a user nor an API key
API keys: refused, 403 forbidden (API key not allowed on this route)
Errors 401 unauthorized. 404 not_found: unknown extension, or a message it may not hear. 503 store_unavailable: the file store is unreachable.
POST /api/v1/internal/voice/events
Publish an event of the voice server to the connected applications of the organization (service token): today call.ringing, when an endpoint rings for an incoming call. The connectors that know the caller's record (Zoho CRM, QuickBooks) look it up and tell the user of the endpoint in real time (event app_lookup {call_uniqueid, app, caller, endpoint_id, found, name, url, kind, id, extra, records}, room of the user; QuickBooks: only the extensions chosen in its settings, none chosen = every extension); the user of the endpoint also gets the event call_live {state: ringing, call_uniqueid, endpoint_id, number_id, caller} (the live notice of the web app). call.live (2026-10-28): the calls in progress of an organization changed (« Activité en direct »); its members who hold activity.live get live_activity {organization_id} and read GET /live again; its members who have the web phone get voice_presence {organization_id} and read GET /voice/colleagues again.
Access: service token (Authorization: Bearer $VOICE_INTERNAL_TOKEN), neither a user nor an API key
API keys: refused, 403 forbidden (API key not allowed on this route)
Request body
| Name | Description |
|---|---|
event |
The event (required): call.ringing, call.live or call.emergency (a phone dialed 9-1-1: {organization_id, endpoint_id, number, routed, dialed, call_uniqueid}; the administrators of the organization and of the platform get an e-mail). |
data |
Its data (required). call.live: {organization_id}. call.ringing: {call_uniqueid, endpoint_id (the endpoint that rings), user_id (its user), caller {number, e164, name}, number_id (the number called)}; the organization is the endpoint's (else the number's). |
Response: ok: True. deliveries: How many connected applications took the event (0 when the organization has none, or the endpoint is unknown); for call.live, how many members were told.
Errors 400 validation_error: unknown event or data not an object (field). 401 unauthorized: the Authorization: Bearer header is missing or is not the service token. 503 internal_api_disabled: VOICE_INTERNAL_TOKEN is not set on the server.
POST /api/v1/internal/voice/faxes
Deposit a fax a voice server received (service token): on a fax number (phone_number_id), or from the fax machine on an ATA port, to send (direction out, endpoint_id, to).
Depositing the same call_uniqueid again changes nothing and answers 200, so the voice server can retry safely.
Access: service token (Authorization: Bearer $VOICE_INTERNAL_TOKEN), neither a user nor an API key
API keys: refused, 403 forbidden (API key not allowed on this route)
Request body
| Name | Description |
|---|---|
file |
The fax, TIFF (multipart, 20 MB at most; absent when the reception failed). |
phone_number_id |
The fax number it arrived on (a received fax). |
direction |
"in" (default) or "out" (from an ATA port, to send). |
endpoint_id |
The endpoint of the ATA port (direction out). |
to |
The number the fax machine dialed (direction out). |
caller |
Caller ID as the carrier gave it. caller_name: Caller name (optional). |
call_uniqueid |
Unique id of the call on the voice server (makes the deposit idempotent). |
pages |
Pages received. status: "received" or "failed". error: Reason of a failure. remote_station: The fax ID the other machine sent. |
Response: fax: The stored fax. 201 when new, 200 when this call's fax was already deposited.
POST /api/v1/internal/voice/faxes/<fax_id>/result
The outcome of an attempt to send a fax (service token): retried or ended by textos-app.
Request body (JSON): status: sent, failed, busy, no_answer or refused. pages: Pages sent. error: Reason. call_uniqueid, duration, remote_station.
Access: service token (Authorization: Bearer $VOICE_INTERNAL_TOKEN), neither a user nor an API key
API keys: refused, 403 forbidden (API key not allowed on this route)
Response: fax: The fax. A result for a fax that is not being sent any more is ignored (200, unchanged).
GET /api/v1/internal/voice/faxes/<fax_id>/tiff
The TIFF of an outgoing fax the voice server is about to send (service token); 404 for a fax not being sent.
Access: service token (Authorization: Bearer $VOICE_INTERNAL_TOKEN), neither a user nor an API key
API keys: refused, 403 forbidden (API key not allowed on this route)
POST /api/v1/internal/voice/oncall/audio
Deposit the identification or the message of a call to an on-call line (service token).
Depositing again replaces the file: the voice server can retry safely.
Access: service token (Authorization: Bearer $VOICE_INTERNAL_TOKEN), neither a user nor an API key
API keys: refused, 403 forbidden (API key not allowed on this route)
Request body
| Name | Description |
|---|---|
file |
The audio, MP3 (multipart, 8 MB at most). |
key |
The id of the call on the voice server (the same as in its result). |
line_id |
The on-call line the call entered (404 when it is unknown). |
role |
identify (name and emergency) or message (left when nobody took the call). |
duration |
Length in seconds. |
Response: ok: True.
Errors 401 unauthorized: the Authorization: Bearer header is missing or is not the service token. 503 internal_api_disabled: VOICE_INTERNAL_TOKEN is not set on the server.
POST /api/v1/internal/voice/oncall/result
The outcome of a call to an on-call line, deposited once the call is over (service token).
The first deposit of a key is kept; the same key again answers 200 and changes nothing (nothing is sent twice). A call nobody took (voicemail, abandoned, accepted_no_connection, error) of an authenticated client texts every recipient of the line.
Access: service token (Authorization: Bearer $VOICE_INTERNAL_TOKEN), neither a user nor an API key
API keys: refused, 403 forbidden (API key not allowed on this route)
Request body
| Name | Description |
|---|---|
key |
The id of the call on the voice server. |
line_id |
The on-call line. |
status |
refused, connected, accepted_no_connection, voicemail, abandoned or error. |
client_id |
The client whose code was accepted (absent when refused). |
caller |
Caller ID. caller_name: Caller name. called: Number called. uniqueid: Unique id of the channel (links the call record). |
started_at |
Entry into the line (ISO 8601 UTC). ended_at: End of the call. connected_at: Technician on the line. |
talk_seconds |
Length of the conversation with the technician. |
after_hours |
True when the call came through the closed menu of a flow (outside its business hours). |
technician |
{name, number, rank, attempt} of the technician who took the call. |
attempts |
[{rank, attempt, name, number, result, dial_status, started_at, ended_at}]. |
events |
[{kind, at, rank, attempt, name, result, detail}] (the timeline). |
Response: call: The emergency (its number, its status). 201 when stored now, 200 when it was already.
Errors 401 unauthorized: the Authorization: Bearer header is missing or is not the service token. 503 internal_api_disabled: VOICE_INTERNAL_TOKEN is not set on the server.
GET /api/v1/internal/voice/ping
Check the service token (the voice server calls it at start-up).
Access: service token (Authorization: Bearer $VOICE_INTERNAL_TOKEN), neither a user nor an API key
API keys: refused, 403 forbidden (API key not allowed on this route)
Response: ok: True.
Errors 401 unauthorized: the Authorization: Bearer header is missing or is not the service token. 503 internal_api_disabled: VOICE_INTERNAL_TOKEN is not set on the server.
POST /api/v1/internal/voice/recordings
Deposit the recording of a call (service token). The call record must exist: the voice server retries on 404 call_not_found.
Access: service token (Authorization: Bearer $VOICE_INTERNAL_TOKEN), neither a user nor an API key
API keys: refused, 403 forbidden (API key not allowed on this route)
Request body
| Name | Description |
|---|---|
file |
The recording, MP3 (multipart, 30 MB at most). |
call_uniqueid |
Unique id of the call on the voice server (required). |
duration |
Length in seconds (optional). |
track_local |
The two directions of the call apart (what our side said, what the contact said), MP3, optional and only both together; kept only when the call is transcribed (Telma AI), the mixed recording serves otherwise. The whole request stays under 32 MB: a long call is deposited without them. |
track_remote |
The two directions of the call apart (what our side said, what the contact said), MP3, optional and only both together; kept only when the call is transcribed (Telma AI), the mixed recording serves otherwise. The whole request stays under 32 MB: a long call is deposited without them. |
leg_dstchannel |
The leg the recording is of (dstchannel of its call record), optional: a call recorded in parts (a blind transfer), each part to its leg. Without it, the answered leg that lasted longest. |
reason |
Why the voice server recorded, optional: ai_plan = only because an endpoint with a Telma AI plan could take the call; such a recording is dropped when no endpoint with a plan took that part (200, recording: null, discarded: true). |
Response: recording: {state, available_at, expires_at, size, duration}. 201 when stored, 200 when this call already has its recording.
Errors 401 unauthorized: the Authorization: Bearer header is missing or is not the service token. 503 internal_api_disabled: VOICE_INTERNAL_TOKEN is not set on the server.
GET /api/v1/internal/voice/sounds/<sound_id>/file
The audio of a sound (a prompt, a greeting, a system sound or music on hold) for the voice server to convert (service token). The voice server keeps reading the sound itself (voice_sounds) for the rest.
Access: service token (Authorization: Bearer $VOICE_INTERNAL_TOKEN), neither a user nor an API key
API keys: refused, 403 forbidden (API key not allowed on this route)
Response: The file as stored (MP3), its type in Content-Type; header X-File-Id = the file id of the sound (it changes when the sound is uploaded again).
Errors 401 unauthorized: the Authorization: Bearer header is missing or is not the service token. 404 not_found: no such sound, or its file is gone. 503 internal_api_disabled: VOICE_INTERNAL_TOKEN is not set on the server. 503 store_unavailable: the file store is unreachable, try again later.
POST /api/v1/internal/voice/spoken-name
The name of a member spoken by the text-to-speech, for the dial by name of a flow (directory step): the voice server plays it to the caller before asking whether this is the person sought, converts it once and keeps it (service token).
Access: service token (Authorization: Bearer $VOICE_INTERNAL_TOKEN), neither a user nor an API key
API keys: refused, 403 forbidden (API key not allowed on this route)
Request body
| Name | Description |
|---|---|
text |
The name, 80 characters at most (required). |
language |
The language of the call (fr, en, es); a language without a voice takes the first one that has one. |
Response: The audio (WAV, Content-Type audio/wav), spoken by the default voice of the language.
Errors 400 validation_error: text missing or longer than 80 characters (field text). 401 unauthorized: the Authorization: Bearer header is missing or is not the service token. 503 internal_api_disabled: VOICE_INTERNAL_TOKEN is not set on the server. 503 tts_unavailable: the text-to-speech is off or failed (the voice server then says the short number of the member, or spells the name).
POST /api/v1/internal/voice/star-codes
Apply a star code dialed on a phone (service token; the voice server recognized it and checked the SIP account): unconditional forward on (*72<number>) or off (*73), do not disturb on (*78) or off (*79). Written with the same checks as the settings an extension's user sets in the portal; the do not disturb of an extension that has a user is that user's (every extension of theirs, as PUT /auth/me/dnd without end). Journalled.
Access: service token (Authorization: Bearer $VOICE_INTERNAL_TOKEN), neither a user nor an API key
API keys: refused, 403 forbidden (API key not allowed on this route)
Request body
| Name | Description |
|---|---|
endpoint_id |
The extension the phone calls as (required). |
code |
forward_on, forward_off, dnd_on or dnd_off (required). |
number |
The digits dialed after *72 (forward_on): a 10-digit North American number (or 1 + 10 digits) or the short number of another extension of the organization. |
Response: code: The code applied. endpoint_id: The extension. settings: Its settings after the change (as GET /voice/my-endpoints).
Errors 400 validation_error: bad code or number (field). 401 unauthorized: the Authorization: Bearer header is missing or is not the service token. 404 not_found: unknown or disabled extension. 422 destination_not_allowed: a forward the organization may not make. 503 internal_api_disabled: VOICE_INTERNAL_TOKEN is not set on the server.
POST /api/v1/internal/voice/voicemails
Deposit a voicemail message recorded by a voice server (service token).
Depositing the same call_uniqueid again changes nothing and answers 200 with the stored message, so the voice server can retry safely.
Access: service token (Authorization: Bearer $VOICE_INTERNAL_TOKEN), neither a user nor an API key
API keys: refused, 403 forbidden (API key not allowed on this route)
Request body
| Name | Description |
|---|---|
file |
The message, MP3 (multipart, 4 MB at most). |
phone_number_id |
ID of the number whose box it is (required; an unknown or unassigned number is 404). |
caller |
Caller ID as the carrier gave it. |
caller_name |
Caller name (optional). |
duration |
Length in seconds (required). |
call_uniqueid |
Unique id of the call on the voice server (makes the deposit idempotent). |
language |
fr, en or es (optional; default: the language of the box). |
mailbox_id |
The box of an endpoint or the standalone box the message was left in (optional; it must belong to the organization of the number, else 404); absent: the box of the number. |
recorded_at |
When the message was left, ISO 8601 UTC (optional; default now). |
Response: voicemail: The stored message. 201 when new, 200 when this call's message was already deposited.
Errors 401 unauthorized: the Authorization: Bearer header is missing or is not the service token. 503 internal_api_disabled: VOICE_INTERNAL_TOKEN is not set on the server.
POST /api/v1/internal/voice/web-wake
Wake the web phones (tabs of the web app with the phone open) for an incoming call (service token): each account whose tab is connected now gets the Socket.IO event webphone_wake {name, call_uuid, caller_id, caller_name, called, endpoint}, registers, and is rung by the voice server, which waits for the registration of the accounts woken.
Access: service token (Authorization: Bearer $VOICE_INTERNAL_TOKEN), neither a user nor an API key
API keys: refused, 403 forbidden (API key not allowed on this route)
Request body
| Name | Description |
|---|---|
accounts |
The SIP names of the web phones to wake (wb + 10 hex digits), at most 20 (required). |
call |
{call_uuid, caller_id, caller_name, called (what the phone shows of the endpoint that rings), endpoint (its SIP name)}. |
Response: woken (array): The accounts woken: active, with a tab connected now.
Errors 400 validation_error: accounts is not a list of at most 20 names (field). 401 unauthorized: the Authorization: Bearer header is missing or is not the service token. 503 internal_api_disabled: VOICE_INTERNAL_TOKEN is not set on the server.
Mail (internal)
Fax by e-mail: the mail server hands over the e-mails sent to a fax number @fax.telma.ca, service token. Not for users or API keys.
POST /api/v1/internal/mail/fax
One e-mail for the fax domain: checked, then sent as fax(es); see services/fax/mail_in.py.
Access: public (no authentication)
API keys: refused, 403 forbidden (API key not allowed on this route)
Metrics
Volumes, performance, export.
GET /api/v1/metrics/agents
Get list of agents with message counts.
Integrations (hidden service accounts) are not agents and are not listed; the messages they send still count in the team totals.
Access: permission metrics.all or metrics.team in the organization (profiles)
API keys: refused to restricted keys (limited to a team, or an integration's), 403 forbidden
Query parameters
| Name | Description |
|---|---|
team_id |
Team ID or comma-separated list of team IDs (optional; default: every team the caller can access, only the team they are placed in with metrics.team alone; a team outside them gets 403 forbidden). |
start_date |
Start date ISO format. |
end_date |
End date ISO format. |
days |
Number of days to look back (default 30). |
Response: agents: The agents with their message counts (integrations are not listed): id, name, count (messages sent), conversations_taken (conversations they became the person in charge of in the period, by « je m'en occupe », a colleague or by answering). period: {start, end} (ISO 8601) of the period.
GET /api/v1/metrics/export
Export metrics data as JSON.
Access: permission view_global_metrics (now metrics.all)
API keys: refused to restricted keys (limited to a team, or an integration's), 403 forbidden
Query parameters
| Name | Description |
|---|---|
team_id |
Team ID (optional; default: every team the caller can access in the current domain; a team outside them gets 403 forbidden). |
start_date |
Start date ISO format. |
end_date |
End date ISO format. |
days |
Number of days to look back (default 30). |
Response: Comprehensive metrics data for export.
GET /api/v1/metrics/overview
Get overview metrics.
Access: permission metrics.all or metrics.team in the organization (profiles)
API keys: refused to restricted keys (limited to a team, or an integration's), 403 forbidden
Query parameters
| Name | Description |
|---|---|
team_id |
Team ID or comma-separated list of team IDs (optional; default: every team the caller can access in the current domain, only the team they are placed in with metrics.team alone; a team outside them gets 403 forbidden). |
user_id |
User ID or comma-separated list of user IDs (optional, filters by sent_by). |
start_date |
Start date ISO format. |
end_date |
End date ISO format. |
days |
Number of days to look back (default 30). |
Response: Overview metrics.
GET /api/v1/metrics/performance
Get performance metrics (response times, delivery rates).
Access: permission metrics.all or metrics.team in the organization (profiles)
API keys: refused to restricted keys (limited to a team, or an integration's), 403 forbidden
Query parameters
| Name | Description |
|---|---|
team_id |
Team ID (optional; default: every team the caller can access in the current domain, only the team they are placed in with metrics.team alone; a team outside them gets 403 forbidden). |
start_date |
Start date ISO format. |
end_date |
End date ISO format. |
days |
Number of days to look back (default 30). |
Response: period: {start, end} (ISO 8601) of the period. delivery_rate: Share of the messages delivered. messages_by_status: Number of messages per status. response_time: Response time statistics.
GET /api/v1/metrics/team/<team_id>
Get detailed metrics for a specific team.
by_user lists the agents only: integrations (hidden service accounts) are left out, their messages still count in the overview. With metrics.team alone (no metrics.all), only the team the caller is placed in (403 forbidden for another one).
Access: permission metrics.all or metrics.team in the organization (profiles); team access (team_id)
API keys: refused to restricted keys (limited to a team, or an integration's), 403 forbidden
Path parameters
| Name | Description |
|---|---|
team_id |
Team ID. |
Query parameters
| Name | Description |
|---|---|
start_date |
Start date ISO format. |
end_date |
End date ISO format. |
days |
Number of days to look back (default 30). |
Response: Detailed team metrics.
GET /api/v1/metrics/user/<user_id>
Get metrics for a specific user.
The messages counted are those sent in the teams the caller can access (a user who writes in several organizations shows each caller only what happened in theirs; a platform_admin sees all). One's own metrics: metrics.team is enough (counted in the team one is placed in); another user's: metrics.all and the right to manage that user (403 forbidden otherwise).
Access: permission metrics.all or metrics.team in the organization (profiles)
API keys: refused to restricted keys (limited to a team, or an integration's), 403 forbidden
Path parameters
| Name | Description |
|---|---|
user_id |
User ID. |
Query parameters
| Name | Description |
|---|---|
start_date |
Start date ISO format. |
end_date |
End date ISO format. |
days |
Number of days to look back (default 30). |
Response: User metrics.
GET /api/v1/metrics/volume
Get message volume metrics by time period.
Access: permission metrics.all or metrics.team in the organization (profiles)
API keys: refused to restricted keys (limited to a team, or an integration's), 403 forbidden
Query parameters
| Name | Description |
|---|---|
team_id |
Team ID or comma-separated list of team IDs (optional; default: every team the caller can access in the current domain, only the team they are placed in with metrics.team alone; a team outside them gets 403 forbidden). |
user_id |
User ID or comma-separated list of user IDs (optional, filters by sent_by). |
start_date |
Start date ISO format. |
end_date |
End date ISO format. |
days |
Number of days to look back (default 30). |
granularity |
hour, day, week, or month (default day). |
group_by_team |
If "true", group results by team (default false). |
group_by_user |
If "true", group results by user (default false); integrations (service accounts) get no row of their own. |
Response: Volume data by period.
Billing
Credits, usage, invoices, the plan of the organization, admin operations.
GET /api/v1/billing
Billing overview of the current organization.
Not available to restricted API keys (a key limited to a team, or an integration's key): 403 with error forbidden.
Errors are {error, message}: 400 no_organization when the user has no organization.
Access: permission billing.view or billing.manage in the organization (profiles)
API keys: refused to restricted keys (limited to a team, or an integration's), 403 forbidden
Response: billing: Billing record (credit_balance, auto_recharge, min_recharge (the smallest recharge the domain accepts, manual or automatic), threshold_choices (the thresholds the domain allows for the low-balance alert and the automatic recharge; null: any), payment_method without secrets, billing_email, and the negative-balance lifecycle of E46: balance_state ok, negative_grace, suspended, limbo or released, with negative_since, grace_ends_at, suspended_at, limbo_at, release_at, released_at in UTC ISO 8601 with Z, null when they do not apply; monthly: the invoice of the 1st, as in GET /billing/balance). current_month_usage: Usage of the billing period by type, with total_cost and total_messages. billing_period: start and end of the current billing period. recent_transactions: The latest credit transactions.
POST /api/v1/billing/admin/add-credits
Add credits to an organization by hand (super admin only). Errors are {error, message}: 400 validation_error with field (organization_id missing, amount not above zero).
Access: platform permission platform_admin
API keys: refused, 403 forbidden (API key not allowed on this route)
Request body
| Name | Description |
|---|---|
organization_id |
Organization ID (required). |
amount |
Credits to add, above zero (required). |
description |
Label of the transaction. |
Response: success: true. new_balance: Balance after the credit.
PUT /api/v1/billing/auto-recharge
Change the auto-recharge settings. When the balance is at or under threshold, the card is charged: mode fixed buys amount credits each time, top_up_to buys what brings the balance up to amount. Turning it on with a balance already at or under the threshold recharges at once. A failed attempt is remembered (last_failure_at): no new attempt for 24 hours unless the card or the settings change, and the members who hold billing.manage are told by email, SMS, push and the real-time event auto_recharge_failed.
Errors are {error, message}: 400 validation_error with field (enabled not a boolean, threshold below zero, not a number or not among the domain's choices, amount not above zero or under the minimum or over the balance cap, mode, payment_method_id missing or not a card of the organization, amount not above threshold in top_up_to mode).
Access: permission billing.manage in the organization (profiles)
API keys: refused to restricted keys (limited to a team, or an integration's), 403 forbidden
Request body
| Name | Description |
|---|---|
enabled |
Whether the balance is recharged automatically. |
threshold |
Balance at or under which a recharge starts (default 20, at least 0). |
amount |
Credits bought by each recharge (fixed) or balance to reach (top_up_to) (default 100, above zero). |
mode |
fixed (default; the previous behavior) or top_up_to. |
payment_method_id |
The card to charge (default: the main card). |
Response: auto_recharge: The settings {enabled, threshold, amount, mode, payment_method_id, last_failure_at}.
GET /api/v1/billing/balance
Current credit balance of the organization (the real-time event balance_update announces each change).
Not available to restricted API keys (a key limited to a team, or an integration's key): 403 with error forbidden.
Errors are {error, message}: 400 no_organization when the user has no organization.
Access: permission billing.view or billing.manage in the organization (profiles)
API keys: refused to restricted keys (limited to a team, or an integration's), 403 forbidden
Response: credit_balance: Balance in CAD (negative after a call rated after the fact, E46). auto_recharge: Auto-recharge settings {enabled, threshold, amount, mode, payment_method_id, last_failure_at}. balance_state: ok, negative_grace, suspended, limbo or released (E46); anything but ok comes with the dates below. negative_since: When the balance became negative (UTC, ISO 8601 with Z), or null. grace_ends_at: End of the grace period, when sending and calls are suspended, or null. suspended_at: When the account was suspended, or null. limbo_at: When the numbers were put in reserve, or null. release_at: When the numbers go back to the pool of the domain, or null. released_at: When they did, or null. monthly: The invoice of the 1st {postpaid (billed each month: a card on file, or allowed by the administration; never stopped by its balance during the month), postpaid_approved, billing_paused (the administration paused its billing while it is being installed: nothing is billed), billing_paused_since (ISO 8601 with Z, or null), unbilled (what was used since the last invoice, on the next one), amount_due (what an invoice left unpaid still asks), next_invoice_at (YYYY-MM-DD), last_collection {at, result paid|failed, code, amount} | null}.
POST /api/v1/billing/check-balance
Check whether the balance covers a message, without sending or charging anything.
Not available to restricted API keys (a key limited to a team, or an integration's key): 403 with error forbidden.
Errors are {error, message}: 400 no_organization when the user has no organization.
Access: authenticated (JWT or API key)
API keys: refused to restricted keys (limited to a team, or an integration's), 403 forbidden
Request body
| Name | Description |
|---|---|
body |
Text of the message (segments are counted from it). |
has_media |
true for an MMS (default false). |
Response: has_balance: Whether the balance covers the cost. estimated_cost: Cost of the message. current_balance: Current balance. segments: Number of SMS segments.
GET /api/v1/billing/credit-position
Where the organization stands with its credit: the balance and its state, what was used in the period and its projection, the next statement and whether the balance covers it, the auto-recharge and the last recharge (F28).
Errors are {error, message}: 400 no_organization.
Access: permission billing.view or billing.manage in the organization (profiles)
API keys: refused to restricted keys (limited to a team, or an integration's), 403 forbidden
Response: currency: Currency of the amounts. state: ok, low (zero, or at or under the low-balance threshold when the alert is on), negative (below zero, or in the grace period) or suspended (the account is suspended, its numbers held or released). risk: 0 (suspended) to 4 (ok): the order « at risk first » of the domain's table (3: ok but short of the next statement). balance: Credit balance. balance_state: The negative-balance lifecycle: ok, negative_grace, suspended, limbo or released. low_balance: The low-balance alert {enabled, threshold}. period: The period of the anniversary {start, end, elapsed (0 to 1)}. usage: {spent (everything debited in the period), communications (messages, calls, Telma AI hours debited), projection (communications projected to the end of the period; null the first day), remaining (what the usage should still cost until then; null the first day)}. next_statement: The next statement {date (null when nothing is to come), total} (as next of GET /billing/overview). covers_next: The balance (counted from zero when it is negative) pays the next statement. shortfall: What is missing to pay it (0 when covered). projected_shortfall: What would be missing with the remaining usage of the period too (null the first day); it never changes covers_next. auto_recharge: {enabled, mode (fixed or top_up_to), threshold, amount, last_failure_at (null)}. last_recharge: null, or the last credit paid or given {date, amount, kind (manual: by card, auto: auto-recharge, admin: given by the administration)}.
GET /api/v1/billing/invoices
Invoices of the organization, newest first.
Not available to restricted API keys (a key limited to a team, or an integration's key): 403 with error forbidden.
Access: permission billing.view or billing.manage in the organization (profiles)
API keys: refused to restricted keys (limited to a team, or an integration's), 403 forbidden
Query parameters
| Name | Description |
|---|---|
status |
Invoice status (draft, paid...). |
skip |
Offset (default 0). |
limit |
Page size (default 50, brought back into 1-100). A skip or limit that is not an integer is refused (400 validation_error with field). |
Response: invoices: The page of invoices. total: Number of invoices matching the filters, whatever the page. skip: Offset applied. limit: Page size applied.
GET /api/v1/billing/invoices/<invoice_id>
One invoice of the organization.
Not available to restricted API keys (a key limited to a team, or an integration's key): 403 with error forbidden.
Errors are {error, message}: 404 not_found, 403 forbidden (invoice of another organization).
Access: permission billing.view or billing.manage in the organization (profiles)
API keys: refused to restricted keys (limited to a team, or an integration's), 403 forbidden
Path parameters
| Name | Description |
|---|---|
invoice_id |
Invoice ID. |
Response: invoice: The invoice with its lines and taxes.
GET /api/v1/billing/overview
What the organization was billed and what it will be: the last statement, the next one estimated with each line explained, and the usage of the current period with what it already cost and a straight-line projection (an estimate).
Errors are {error, message}: 400 no_organization.
Access: permission billing.view or billing.manage in the organization (profiles)
API keys: refused to restricted keys (limited to a team, or an integration's), 403 forbidden
Response: currency: Currency of the amounts. balance: Credit balance. plan: The key of the plan the organization holds (GET /billing/subscription). lines: With the phone system, as subscription.lines of GET /billing/subscription, else null. period: The current period of the plan {start, end, elapsed (0 to 1)}: anniversary to anniversary. last_statement: null, or the last monthly statement {id, number, total, date, period_start, period_end}. next: The next invoice: everything that is not debited when it is used {date (the first dated charge; null when nothing is to come), groups [{source, date, estimated, lines, total}], lines [{code, description, detail (why: what is counted, what is included), quantity, unit_price, amount, source}] (all the groups), total}. Sources, each with its own date: subscription (the invoice of the 1st estimated with the seats of today and what was used since the last invoice, as GET /billing/subscription/estimate), ai_rounding (the extra Telma AI hours of the period rounded up at its end), assistant (estimated: the users without a plan who used the connected assistant this period, a month each if they use it again), unpaid (date null: plans and assistant months of the current period waiting for credit). A statement worth nothing is not issued: no line and date null. usage: The current period {spent {category: amount debited}, total_spent, communications (messages, calls and Telma AI hours debited), by_subtype (the communications by subtype: sms_out, call, ai_overage... each {amount, count}), recurring (the fixed charges already debited in the period by subtype: subscription_monthly, ai_plan_monthly, mcp_assistant_monthly... each {amount, count}), messages null or {used, included, beyond, cost}, minutes null or {used, included, beyond, cost}, lines_on_demand null (no phone system) or {days, lines, amount} (the lines on demand debited in the period, a day each, subtype voice_line_on_demand), ai null (no Telma AI) or {period_start, period_end, included_hours, used_hours, overage_hours, overage_amount, currency} (its own period: the anniversary day)}. projection: {usage (communications projected to the end of the period), total (the next invoice with the projected usage in place of the usage already counted)}; both null in the first day of the period. previous_month: Debits of the last calendar month {start, total}.
GET /api/v1/billing/payment-config
Public configuration of the payment providers of the domain (no secret key).
Not available to restricted API keys (a key limited to a team, or an integration's key): 403 with error forbidden.
Errors are {error, message}: 400 no_organization, 404 domain_not_found.
Access: permission billing.view or billing.manage in the organization (profiles)
API keys: refused to restricted keys (limited to a team, or an integration's), 403 forbidden
Response: payment_providers: {nuvei: {enabled, merchant_id, merchant_site_id, environment}}, plus fake: {enabled} on a development or test domain that uses the test provider. default_provider: Provider to offer first (nuvei; fake on a development or test domain that uses it).
POST /api/v1/billing/recharge
Recharge the balance: charge a card of the organization and credit the balance. The credits bought are amount; the taxes of the domain come on top of what the card is charged. A receipt (invoice) is issued and emailed. The balance is credited only after the provider approved the payment.
Send an Idempotency-Key header (or idempotency_key in the body): the same key never charges twice, it returns the first answer (replayed: true).
Errors are {error, message}: 400 validation_error (amount missing, not a number, more than two decimals or under the minimum, with field), 400 configuration_error (no payment method, payment provider not configured), 400 card_expired, 404 not_found (card of another organization), 409 billing_info_required (taxes apply and the billing address is missing), 409 quote_changed (with the new quote; also when the promotional code is no longer good at the moment the payment opens, quote.promo_info.error says why), 409 payment_in_progress (one payment at a time per organization, whatever the number of requests at once), 422 max_balance (with maximum), 402 payment_declined (with reason: card_declined, insufficient_funds, card_expired, cvv_declined or card_restricted), 402 authentication_required (the bank asks for a verification), 502 payment_unknown (the provider did not answer: nothing is credited and the payment is checked afterwards), 502 provider_error.
An unexpected failure answers 500 internal_error.
Access: permission billing.manage in the organization (profiles)
API keys: refused to restricted keys (limited to a team, or an integration's), 403 forbidden
Request body
| Name | Description |
|---|---|
amount |
Credits to buy, a number above zero with at most two decimals. |
payment_method_id |
The card (default: the main card). |
promo_code |
A promotional code (optional). |
quote_total |
The total of the quote the customer saw; a different total is refused with quote_changed. It must be a finite number (400 validation_error with field quote_total otherwise). |
idempotency_key |
Same as the Idempotency-Key header. |
Response: success: true. new_balance: Balance after the recharge. transaction_id: Reference of the payment at the provider. transaction: The ledger row of the credit. invoice: {id, invoice_number} of the receipt. payment_id: The card debit. quote: What was charged {credits, promotion, subtotal, taxes, total, currency, credited}.
GET /api/v1/billing/subscription
The subscription of the organization: the plan it holds, the plans of its domain it may choose, the unit prices, what it uses of the month and its lines.
Every organization holds one plan: a platform fee per organization, a price per user (every active member), what it includes and the features it unlocks. What goes beyond the plan is billed at the unit prices, never blocked. Errors are {error, message}: 400 no_organization.
Access: permission billing.view or billing.manage in the organization (profiles)
API keys: refused to restricted keys (limited to a team, or an integration's), 403 forbidden
Response: plan: The plan held {key, name {fr, en}, platform_fee (per organization and month), user_price (per user and month), voice (the plan includes the phone system), included {messages (texts received and sent a month, for the organization), minutes_per_user (outbound minutes to Canada and the United States, pooled), numbers, teams, widgets, queues, connectors, ai_hours_per_user, lines (simultaneous calls of the organization), lines_per_user (one more for each user), recording_days}, features {video, team_chat, supervision, assistant}, prices (its own unit prices, over those of the domain), message_tiers (its own price of a text beyond those included, or null), overridden (true when the organization has its own values of it)}. pending_plan: The key of the cheaper plan that will apply at the anniversary, or null. since: When the organization took its plan (ISO 8601). period_start, period_end: The month under way (ISO 8601); the statement of the next one is charged at period_end. plans: The plans the organization may choose, cheapest first, as plan, each with billed {prices, message_tiers}: the unit prices and the price of a text that bill the organization on that plan (those of the domain, those of the plan over them, then its own values). prices: The unit prices of the plan held {number, tollfree_number, number_setup, tollfree_number_setup (installation, debited when the number is bought), number_port_in, tollfree_number_port_in (a number ported in, debited when it arrives), port_in_free_days (a port asked this many days from the start of the organization is free), team, widget, connector, assistant_user, contact_center (the module, with contact_center_agents agents), contact_center_agent, fax, line, line_on_demand_day, extra_device, devices_per_user, minute_overage, tollfree_inbound_per_minute, call_increment_seconds, minutes_warn_ratio}. message_tiers: Price of a text beyond those included [{up_to, price}], by position in the month (the last up_to is null). overrides: The values this organization has of its own {plans {key: {fields}}, prices {fields}}. seats: What the statement counts {users, numbers, tollfree_numbers, fax, teams, widgets, queues, queue_agents, connectors, connector_names, purchased_lines, devices}. monthly: The invoice of the 1st, as in GET /billing/balance. usage: {messages, messages_included, seconds (to Canada and the United States, by billed slices), seconds_included}. lines: {included, purchased, burst (lines on demand allowed above them), limit}, or null under a plan without the phone system.
PUT /api/v1/billing/subscription
Change the number of simultaneous lines the organization buys. Its plan is chosen by its domain only (PUT /domains/<id>/organizations/<id>/subscription).
Lines bought during a month are charged at once, pro rata; lines given back are no longer billed from the next statement. Errors are {error, message}: 400 no_organization; 400 validation_error with field purchased_lines (not given, not a whole number from 0 to 1000, or under a plan without the phone system); 403 forbidden with field plan (the plan is chosen by the domain administrator) or burst_lines (the margin is set by the domain); 402 auto_recharge_required (the automatic recharge is off and what is chosen costs something a month).
Access: permission billing.manage in the organization (profiles)
API keys: refused to restricted keys (limited to a team, or an integration's), 403 forbidden
Request body
| Name | Description |
|---|---|
purchased_lines |
Simultaneous lines bought beyond those the plan includes. |
Response: As GET /billing/subscription.
GET /api/v1/billing/subscription/estimate
The next invoice of the organization, or the monthly statement it would have with another plan (its users and what it holds today).
Without plan, the next invoice: the plan of the month that starts and what was used since the last invoice (lines usage:<kind>, the same as the invoice of the 1st will take: texts and minutes beyond the plan, calls received on a toll-free number, lines on demand...). With plan, only the fixed lines of that plan. Errors are {error, message}: 400 no_organization, 400 validation_error with field plan (unknown or inactive plan).
Access: permission billing.view or billing.manage in the organization (profiles)
API keys: refused to restricted keys (limited to a team, or an integration's), 403 forbidden
Query parameters
| Name | Description |
|---|---|
plan |
The key of a plan of the domain; without it, the plan the organization will hold at its anniversary. |
Response: plan: The key of the plan priced. lines: The lines of the statement [{code (platform, user, number, tollfree_number, team, widget, connector, contact_center, contact_center_agent, fax, line, extra_device, ai_plan, retention, storage), description, detail, quantity, unit_price, amount}]. total (number): Their sum. usage_total (number): Without plan, what was used since the last invoice (included in total). seats: What is counted, as GET /billing/subscription.
GET /api/v1/billing/transactions
The operations of the balance (recharges, usage, monthly statements, refunds, gifts, adjustments), newest first.
Not available to restricted API keys (a key limited to a team, or an integration's key): 403 with error forbidden.
Errors are {error, message}: 400 validation_error with field (skip or limit not an integer; from or to not an ISO 8601 date; category, type or number_id invalid).
Access: permission billing.view or billing.manage in the organization (profiles)
API keys: refused to restricted keys (limited to a team, or an integration's), 403 forbidden
Query parameters
| Name | Description |
|---|---|
from |
ISO 8601 date or datetime, lower bound (UTC). |
to |
ISO 8601 date (the whole day) or datetime, upper bound. |
category |
all, communications, payments, recurring or admin. |
type |
all, purchase, usage, refund, adjustment or bonus. |
number_id |
Only the operations of this phone number (calls, installation, port fee). |
skip |
Offset (default 0). |
limit |
Page size (default 50, brought back into 1-100). |
Response: transactions: The page: {id, organization_id, type, category, subtype (machine name: recharge_manual, recharge_auto, sms_out, sms_in, mms_out, mms_in, call, subscription_monthly, did_setup, did_port_in, ai_plan_monthly, ai_overage, voice_line_on_demand, refund, chargeback, gift, admin_credit, admin_fix...), amount, balance_after, currency, description, phone_number_id, call_id, invoice_id, payment_method {brand, last4}, refund_id, reference_id, reference_type, created_at}. total: Number of transactions matching the filters, whatever the page. skip: Offset applied. limit: Page size applied.
GET /api/v1/billing/usage
Usage records (one per charged message), newest first.
Not available to restricted API keys (a key limited to a team, or an integration's key): 403 with error forbidden.
Errors are {error, message}: 400 validation_error with field for a skip or limit that is not an integer or a date that is not ISO 8601.
Access: permission billing.view or billing.manage in the organization (profiles)
API keys: refused to restricted keys (limited to a team, or an integration's), 403 forbidden
Query parameters
| Name | Description |
|---|---|
start_date |
ISO 8601 date or datetime, lower bound (a value without time zone is UTC). |
end_date |
ISO 8601 date or datetime, upper bound. |
type |
Usage type (sms, mms...). |
skip |
Offset (default 0). |
limit |
Page size (default 50, brought back into 1-100). |
Response: usage_records: The page of records. total: Number of records matching the filters, whatever the page. skip: Offset applied. limit: Page size applied.
GET /api/v1/billing/usage/detailed
Detailed usage of the billing period (from the billing anniversary) with totals.
Not available to restricted API keys (a key limited to a team, or an integration's key): 403 with error forbidden.
Access: permission billing.view or billing.manage in the organization (profiles)
API keys: refused to restricted keys (limited to a team, or an integration's), 403 forbidden
Query parameters
| Name | Description |
|---|---|
start_date |
ISO 8601 date or datetime (default: start of the billing period). 400 validation_error when it is not a date. |
end_date |
ISO 8601 date or datetime (default: now, never later). |
Response: detailed: Usage by type with unit prices, discounts and costs. totals: {total_cost}. period: {start, end} as dates.
GET /api/v1/billing/usage/summary
Usage totals by type for a period (the current month by default).
Not available to restricted API keys (a key limited to a team, or an integration's key): 403 with error forbidden.
Access: permission billing.view or billing.manage in the organization (profiles)
API keys: refused to restricted keys (limited to a team, or an integration's), 403 forbidden
Query parameters
| Name | Description |
|---|---|
start_date |
ISO 8601 date or datetime (default: first of the month). 400 validation_error when it is not a date. |
end_date |
ISO 8601 date or datetime (default: now). |
Response: summary: {type: {count, total_cost}}.
GET /api/v1/organizations/<org_id>/billing
Billing overview of any organization (super admin only); same response as GET /billing.
Access: platform permission platform_admin
API keys: refused to restricted keys (limited to a team, or an integration's), 403 forbidden
Path parameters
| Name | Description |
|---|---|
org_id |
Organization ID. |
Response: billing: Billing record. current_month_usage: Usage of the billing period. billing_period: start and end of the period. recent_transactions: The latest credit transactions.
Free trial, account state and settings
Free trial, state of the organization's account and the account settings of a domain (sign-up, trial, deletion, notifications).
GET /api/v1/billing/trial
The free trial of the organization: whether it can be started, and where it stands.
The trial is off until the domain turns it on (settings.trial.enabled), and an organization has one in its life. A trial whose balance reached minimum_credit is converted to a normal account when this is read. In the administration context nothing is eligible (the trial is started by the customer).
Access: member of the organization
API keys: refused to restricted keys (limited to a team, or an integration's), 403 forbidden
Response: trial: eligible (can be started now), active, started_at and expires_at (UTC, null before the start), minimum_credit (the credit that turns the trial into a normal account), duration_days (of a new trial), state (active, ended, converted or null), reason (why it is not eligible, null when it is: trial_disabled, already_used, funded, has_numbers, phone_required, phone_not_verified, phone_country, phone_already_used, admin_context).
POST /api/v1/billing/trial/activate
Start the free trial: a number of the domain pool is given to the organization.
The member who asks must have a verified phone (E04): one phone number opens one trial per domain. The number goes to the organization's default team. Refused in the administration context (403 forbidden).
Access: permission billing.manage in the organization (profiles)
API keys: refused to restricted keys (limited to a team, or an integration's), 403 forbidden
Request body
| Name | Description |
|---|---|
country |
CA or US (required; 400 country_unsupported for another one). |
type |
local or tollfree (optional). |
area_code |
Three digits (optional). |
city |
Part of the city name (optional; only for numbers the pool describes with a city). |
Response: 201 with phone_number (the number given) and trial (as GET /billing/trial, now active).
Errors 403 trial_restricted with reason (see GET /billing/trial), 409 number_unavailable (no free number fits), 400 validation_error.
GET /api/v1/domains/<domain_id>/account-settings
The account settings of a domain (domain admin of the domain, or super admin).
Everything here is off or neutral by default, so the existing domains (Telma, VoXoS) are untouched: free sign-up (closed), free trial (off), welcome email (off), the notification defaults (see GET /auth/me/notifications), the grace period of an account deletion (10 days), the default time zone of new accounts (none) and the longest SMS body (800 characters).
Access: platform permission platform_admin or domain_admin (domain_admin: only its domains, domain_id)
API keys: refused to restricted keys (limited to a team, or an integration's), 403 forbidden
Path parameters
| Name | Description |
|---|---|
domain_id |
Domain ID. |
Response: account_settings: signup ({enabled, initial_credit, max_per_ip_per_day, blocked_email_domains, captcha: {provider, site_key, secret (masked), min_score}, terms_url}), trial ({enabled, duration_days, minimum_credit, initial_credit, require_verified_phone, phone_countries, cleanup_enabled, cleanup_months}), account_deletion ({grace_days}), notifications ({welcome_email, defaults}), profile ({default_timezone}), sms ({max_body_length}), terms ({version, url: {fr, en}, privacy_url: {fr, en}}: the current version of the terms of use that every person of the domain accepts in the web or mobile app, null = none asked).
PUT /api/v1/domains/<domain_id>/account-settings
Change the account settings of a domain: the sections and fields given are changed, the others kept.
Access: platform permission platform_admin or domain_admin (domain_admin: only its domains, domain_id)
API keys: refused, 403 forbidden (API key not allowed on this route)
Path parameters
| Name | Description |
|---|---|
domain_id |
Domain ID. |
Request body
| Name | Description |
|---|---|
signup |
Any of enabled (boolean), initial_credit (0 to 1000), max_per_ip_per_day (1 to 1000), blocked_email_domains (list of domain names), captcha ({provider: none, recaptcha or turnstile, site_key, secret, min_score}; the secret sent as ******** keeps the stored one), terms_url (https URL or null). |
trial |
Any of enabled, duration_days (1 to 90), minimum_credit, initial_credit (0 to 1000), require_verified_phone, phone_countries (list of ISO codes or null), cleanup_enabled, cleanup_months (1 to 36). |
account_deletion |
{grace_days: 0 to 90}. |
notifications |
{welcome_email: boolean, defaults: {email: {...}, push: {...}} as GET /auth/me/notifications}. |
profile |
{default_timezone: IANA name or null}. |
sms |
{max_body_length: 0 (no limit) to 5000}. |
terms |
Any of version (text of 1 to 40 characters, or null: nothing asked), url and privacy_url ({fr, en}, https URLs or null). A new version asks every person of the domain to accept it again at their next use of the web or mobile app (API keys and the MCP connector are never stopped). url is required while a version is set. An unknown section or field, or a wrong value, gets 400 validation_error with field. |
Response: account_settings: All the settings after the change, as GET.
POST /api/v1/domains/<domain_id>/trial/run
Run now the round that converts, reminds and ends the free trials of the domain (the server does the same every ten minutes; idempotent).
Access: platform permission platform_admin or domain_admin (domain_admin: only its domains, domain_id)
API keys: refused to restricted keys (limited to a team, or an integration's), 403 forbidden
Path parameters
| Name | Description |
|---|---|
domain_id |
Domain ID. |
Request body
| Name | Description |
|---|---|
dry_run |
Count what is due, write and send nothing (boolean, default false). |
Response: result: {examined, converted, reminders, ended, cleaned}.
GET /api/v1/organizations/current/status
The state of the account in one call: active, suspended (negative balance, E46) or trial.
Access: member of the organization
API keys: refused to restricted keys (limited to a team, or an integration's), 403 forbidden
Response: status: state (suspended while the balance cycle blocks the account, trial during the free trial, else active), balance, currency, low_balance (the balance is low or empty, see balance_update), trial ({active, expires_at}), capabilities (the capabilities of the organization, or of its domain when it has none of its own).
Billing: cards and receipts
Billing address, cards (verified with the payment provider), recharge quote, low-balance alert, history export, PDF receipts and statements.
GET /api/v1/billing/info
Billing address of the organization (the empty shape when none was saved yet).
Not available to restricted API keys: 403 forbidden. Errors are {error, message}: 400 no_organization.
Access: permission billing.view or billing.manage in the organization (profiles)
API keys: refused to restricted keys (limited to a team, or an integration's), 403 forbidden
Response: billing_info: {usage (personal or business), company_name, first_name, last_name, address_1, address_2, city, state, postal_code, country, confirm_not_canadian, tax_region (the province, US, INTL, or null when the address is not usable)}.
PUT /api/v1/billing/info
Save the billing address. It decides the taxes of the recharges (tax table of the domain).
Errors are {error, message}: 400 validation_error with field (usage, company_name, first_name, last_name, address_1, city, country, state, postal_code, confirm_not_canadian).
Access: permission billing.manage in the organization (profiles)
API keys: refused to restricted keys (limited to a team, or an integration's), 403 forbidden
Request body
| Name | Description |
|---|---|
usage |
personal or business. |
company_name |
Company name (required for business). |
first_name |
First name. |
last_name |
Last name. |
address_1 |
Street address. |
address_2 |
Second line (optional). |
city |
City. |
state |
Province (Canada: AB, BC, MB, NB, NL, NS, NT, NU, ON, PE, QC, SK, YT) or US state. |
postal_code |
Canadian postal code (A1A 1A1) or US ZIP. |
country |
ISO 3166-1 alpha-2 code. |
confirm_not_canadian |
Must be true for an address outside Canada. |
Response: billing_info: The saved address with its tax_region.
GET /api/v1/billing/invoices/<invoice_id>/pdf
The receipt of an invoice as a PDF (seller, buyer, lines, taxes with the seller's registration numbers, card), in the language the receipt was issued in.
Not available to restricted API keys: 403 forbidden. Errors are {error, message}: 404 not_found, 403 forbidden (invoice of another organization).
Access: permission billing.view or billing.manage in the organization (profiles)
API keys: refused to restricted keys (limited to a team, or an integration's), 403 forbidden
Path parameters
| Name | Description |
|---|---|
invoice_id |
Invoice ID. |
Response: application/pdf.
PUT /api/v1/billing/low-balance
Set the low-balance alert: by email, push and the real-time event low_balance when the balance falls to the threshold, at most every 7 days.
Errors are {error, message}: 400 validation_error with field (enabled not a boolean, threshold not a number or not among the domain's choices).
Access: permission billing.manage in the organization (profiles)
API keys: refused to restricted keys (limited to a team, or an integration's), 403 forbidden
Request body
| Name | Description |
|---|---|
enabled |
Whether the alert is on. |
threshold |
Balance (CAD) at or under which the alert is sent, 0 or more. |
Response: low_balance: {enabled, threshold}.
GET /api/v1/billing/payment-methods
The cards of the organization, oldest first.
Not available to restricted API keys: 403 forbidden. Errors are {error, message}: 400 no_organization.
Access: permission billing.view or billing.manage in the organization (profiles)
API keys: refused to restricted keys (limited to a team, or an integration's), 403 forbidden
Response: payment_methods: [{id, provider, brand, last4, exp_month, exp_year, card_type, cardholder_name, is_default, is_expired, used_by_auto_recharge}]. No token is ever returned. billing_policy: The billing policy a new card accepts {required, version, url (in the language of the user)}. billing_policy_accepted: The last acceptance of the organization {version, accepted_at, email}, or null.
POST /api/v1/billing/payment-methods
Add a card from the token the SDK returned. The server asks the provider what the token is and stores brand, last four digits, expiry and fingerprint from the provider's answer, never from the client. The first card becomes the main one.
Errors are {error, message}: 400 card_invalid / card_expired (with field), 400 billing_policy_required (the domain names a billing policy and accept_billing_policy is not true; with version), 409 billing_policy_changed (billing_policy_version is not the current one; with version), 409 duplicate_payment_method, 422 card_unsupported (only Visa and Mastercard) / too_many_payment_methods, 502 provider_error.
Access: permission billing.manage in the organization (profiles)
API keys: refused to restricted keys (limited to a team, or an integration's), 403 forbidden
Rate limit: 30 per hour
Request body
| Name | Description |
|---|---|
provider |
The provider (default: the domain's). |
user_payment_option_id |
The card token returned by the SDK (required). |
user_token_id |
The user_token_id of the session (must be the organization's). |
cardholder_name |
Name on the card. |
initial_transaction_id |
The provider's id of the verification transaction, used by the automatic recharge. |
make_default |
Make it the main card. |
accept_billing_policy |
The person accepts the billing policy of the domain and authorizes the charges of the 1st on this card (required when the domain names a policy, see GET /billing/payment-methods). |
billing_policy_version |
The version of the policy the page showed. |
Response: payment_method: The stored card (201).
DELETE /api/v1/billing/payment-methods/<payment_method_id>
Delete a card. If it was the main card the oldest remaining card takes over; the automatic recharge follows it, and goes off with the last card.
Errors are {error, message}: 404 not_found.
Access: permission billing.manage in the organization (profiles)
API keys: refused to restricted keys (limited to a team, or an integration's), 403 forbidden
Path parameters
| Name | Description |
|---|---|
payment_method_id |
Card ID. |
Response: success: true. payment_methods: The remaining cards.
POST /api/v1/billing/payment-methods/<payment_method_id>/default
Make a card the main one.
Errors are {error, message}: 404 not_found.
Access: permission billing.manage in the organization (profiles)
API keys: refused to restricted keys (limited to a team, or an integration's), 403 forbidden
Path parameters
| Name | Description |
|---|---|
payment_method_id |
Card ID. |
Response: payment_methods: The cards of the organization.
POST /api/v1/billing/payment-methods/session
Open a session of the payment provider for the browser SDK. The card is collected by the SDK on the provider's side and never reaches this server; the SDK gives back a token that POST /billing/payment-methods then verifies.
Errors are {error, message}: 400 configuration_error (no payment provider), 502 provider_error / provider_unavailable.
Access: permission billing.manage in the organization (profiles)
API keys: refused to restricted keys (limited to a team, or an integration's), 403 forbidden
Rate limit: 30 per hour
Response: session: {provider, session_token, client_request_id, user_token_id (give it to the SDK as userTokenId), merchant_id, merchant_site_id, environment, expires_at}.
POST /api/v1/billing/payment-methods/tokenize
Turn a TEST card into a token. Only with the fake payment provider of development and test domains; any real provider answers 404 tokenize_unavailable: a real card number never goes through this server.
Errors are {error, message}: 400 card_invalid / card_expired (with field), 422 card_unsupported, 404 tokenize_unavailable.
Access: permission billing.manage in the organization (profiles)
API keys: refused to restricted keys (limited to a team, or an integration's), 403 forbidden
Rate limit: 30 per hour
Request body
| Name | Description |
|---|---|
card_number |
A test card number (4242 4242 4242 4242 works; 4000 0000 0000 3220 asks for a verification, code 123456). |
exp_month |
Expiry month. |
exp_year |
Expiry year (four digits). |
cvv |
Security code (not kept). |
cardholder_name |
Name on the card. |
Response: user_payment_option_id, user_token_id, brand, last4; or verification {id, type, expires_at} when the card needs a verification.
POST /api/v1/billing/payment-methods/tokenize/verify
Complete the verification of a TEST card (fake provider only), three attempts.
Errors are {error, message}: 404 not_found (unknown or expired), 400 invalid_code, 400 verification_failed (third failure).
Access: permission billing.manage in the organization (profiles)
API keys: refused to restricted keys (limited to a team, or an integration's), 403 forbidden
Rate limit: 30 per hour
Request body
| Name | Description |
|---|---|
verification_id |
The id returned by tokenize. |
code |
The code (123456 for the test provider). |
Response: user_payment_option_id, user_token_id, brand, last4.
POST /api/v1/billing/recharge/quote
What a recharge would cost, computed by the server: credits, promotion, subtotal, taxes line by line (tax table of the domain, billing address of the organization) and total. Nothing is charged.
Errors are {error, message}: 400 validation_error (amount: not a number, more than two decimals, under the minimum), 409 billing_info_required (the domain charges taxes and the address is missing or unusable), 422 max_balance (the balance would pass the cap; with maximum).
Access: authenticated (JWT or API key)
API keys: refused to restricted keys (limited to a team, or an integration's), 403 forbidden
Request body
| Name | Description |
|---|---|
amount |
Credits to buy. |
promo_code |
A promotional code (optional). A refused code does not fail the quote: promo_info.error says why. |
Response: quote: {credits, promotion, subtotal, taxes [{code, label, rate, amount}], total, currency, minimum, maximum (null: no cap), credited (credits plus a promotional gift), promo_info ({code, operation, error, min_credit} or null), expires_at}.
GET /api/v1/billing/transactions/export
The transaction history as a CSV file (UTF-8 with a byte-order mark, opens in a spreadsheet), same filters as GET /billing/transactions, newest first, at most 20000 rows.
Errors are {error, message}: 400 validation_error with field (from, to, category, type, number_id, format), 413 too_many_rows.
Access: permission billing.view or billing.manage in the organization (profiles)
API keys: refused to restricted keys (limited to a team, or an integration's), 403 forbidden
Query parameters
| Name | Description |
|---|---|
from |
ISO 8601 date or datetime, lower bound (UTC). |
to |
ISO 8601 date (the whole day) or datetime, upper bound. |
category |
all, communications, payments, recurring or admin. |
type |
all, purchase, usage, refund, adjustment or bonus. |
number_id |
Only the operations of this phone number. |
format |
csv (the only one). |
Response: A text/csv attachment: date, type, category, subtype, description, amount, balance_after, currency, number, call_id, invoice_number, card.
Domain billing
Billing settings and tax table, payment provider, promotional codes, payments and refunds, plans and prices of the domain (domain administrators).
GET /api/v1/domains/<domain_id>/billing-overview
What the organizations of the domain are billed: one row each (plan, last statement, next statement estimated, debits of the month, communications, last month, balance) and the totals.
Access: platform permission platform_admin or domain_admin (domain_admin: only its domains, domain_id)
API keys: refused, 403 forbidden (API key not allowed on this route)
Path parameters
| Name | Description |
|---|---|
domain_id |
Domain ID. |
Response: month: The current calendar month {start, end}. organizations: [{id, name, plan, plan_name (in the language of the request), overridden (the organization has its own values of the plan or of the prices), users, lines (phone system: {included, purchased, burst, limit, manual, max_channels, peak, at, on_demand_days, on_demand_amount}, else null), balance, last_statement null or {total, date}, next {date (null when nothing is to come), total}, this_month (debits since the 1st), communications (usage debited since the 1st), previous_month (debits of the last calendar month), credit (its credit position)}], sorted by name. truncated (boolean): Only the first 2000 organizations are listed. totals: {this_month, communications, previous_month, next, balance}. credit_states: How many organizations are in each state of their credit, and short of their next statement {ok, low, negative, suspended, short}. Each organization also has credit, its credit position (F28): {state (ok, low, negative or suspended), risk (0 suspended, 1 negative, 2 low, 3 short of the next statement, 4 ok: sort by it for « at risk first »), balance, balance_state, low_balance {enabled, threshold}, next_statement {date, total}, covers_next, shortfall, projected_shortfall (always null here), auto_recharge {enabled, mode, threshold, amount, last_failure_at}, last_recharge null or {date, amount, kind manual|auto|admin}} (see GET /billing/credit-position).
GET /api/v1/domains/<domain_id>/billing-policy
The billing policy a customer accepts when adding a card.
Access: platform permission platform_admin or domain_admin (domain_admin: only its domains, domain_id)
API keys: refused, 403 forbidden (API key not allowed on this route)
Path parameters
| Name | Description |
|---|---|
domain_id |
Domain ID. |
Response: billing_policy: {version (null: nothing asked), url {fr, en}}.
PUT /api/v1/domains/<domain_id>/billing-policy
Name the current version of the billing policy and where it is read (publish the text first). A new version is asked of every card added from then on. Journaled.
Errors are {error, message}: 400 validation_error with field (url required with a version, https only).
Access: platform permission platform_admin or domain_admin (domain_admin: only its domains, domain_id)
API keys: refused, 403 forbidden (API key not allowed on this route)
Path parameters
| Name | Description |
|---|---|
domain_id |
Domain ID. |
Request body
| Name | Description |
|---|---|
version |
A short label of the text in force (1 to 40 characters), or null to ask nothing. |
url |
{fr, en}: https links to the policy. |
Response: billing_policy: The settings after the change.
GET /api/v1/domains/<domain_id>/billing-settings
What the domain decides about prepaid billing (settings.billing), defaults filled in. A domain that never set them has no taxes, no balance cap and the recharge it always had.
Access: platform permission platform_admin or domain_admin (domain_admin: only its domains, domain_id)
API keys: refused, 403 forbidden (API key not allowed on this route)
Path parameters
| Name | Description |
|---|---|
domain_id |
Domain ID. |
Response: billing_settings: {currency (CAD), min_recharge, max_balance (null: no cap), tax_rates ({region: [{code, label, rate, number}]} or null for no taxes; regions are the Canadian province codes, US and INTL), seller ({name, address_1, address_2, city, state, postal_code, country, email, phone} printed on receipts), invoice_prefix, billing_path (page the emails link to), quote_ttl_minutes, receipt_email, auto_recharge_retry_hours, threshold_choices (null: any), low_balance_repeat_days, low_balance_alerts (alert on for organizations that never chose)}. tax_presets: Names of the tax tables tax_preset can fill in (canada).
PUT /api/v1/domains/<domain_id>/billing-settings
Change the billing settings of the domain (the fields given are changed, the others kept). Journaled.
Errors are {error, message}: 400 validation_error with field.
Access: platform permission platform_admin or domain_admin (domain_admin: only its domains, domain_id)
API keys: refused, 403 forbidden (API key not allowed on this route)
Path parameters
| Name | Description |
|---|---|
domain_id |
Domain ID. |
Request body
| Name | Description |
|---|---|
min_recharge |
Smallest recharge and smallest automatic recharge, CAD (default 1). |
max_balance |
Cap of the balance after a recharge, or null for none. |
tax_preset |
canada: fill the tax table with the federal and provincial rates (TPS, TVQ, TVH); tax_numbers {tps, tvq, tvh} adds the seller's registration numbers. |
tax_numbers |
Registration numbers by tax code, used with tax_preset. |
tax_rates |
The whole tax table {region: [{code, label, rate, number}]}, or null / {} for no taxes. A line is computed on the subtotal and rounded to the cent. |
seller |
Name and address printed on receipts. |
invoice_prefix |
Receipts are numbered <prefix>-<year>-<sequence> (2 to 8 capital letters or digits); give each seller its own. |
billing_path |
Path of the page the emails send customers to (default /settings/billing). |
quote_ttl_minutes |
How long a quote is shown as valid (1 to 120). |
receipt_email |
Send a receipt by email after a recharge. |
auto_recharge_retry_hours |
Hours without a new automatic attempt after a failure (0 to 720). |
threshold_choices |
Allowed thresholds of the automatic recharge and the low-balance alert (a list, or null for any). |
low_balance_repeat_days |
Least days between two low-balance alerts (0 to 365). |
low_balance_alerts |
Turn the low-balance alert (threshold 10) on for organizations that never chose. |
Response: billing_settings: The settings after the change (as GET).
GET /api/v1/domains/<domain_id>/organizations/<organization_id>/billing-overview
What an organization of the domain was billed and what it will be: its next invoice detailed and what it used in the current period (as GET /billing/overview).
Access: platform permission platform_admin or domain_admin (domain_admin: only its domains, domain_id)
API keys: refused, 403 forbidden (API key not allowed on this route)
Path parameters
| Name | Description |
|---|---|
domain_id |
Domain ID. |
organization_id |
Organization ID. Errors are {error, message}: 404 not_found (no such domain, or the organization is not in it). |
Response: As GET /billing/overview.
GET /api/v1/domains/<domain_id>/organizations/<organization_id>/credit-position
Where an organization of the domain stands with its credit (as GET /billing/credit-position).
Access: platform permission platform_admin or domain_admin (domain_admin: only its domains, domain_id)
API keys: refused, 403 forbidden (API key not allowed on this route)
Path parameters
| Name | Description |
|---|---|
domain_id |
Domain ID. |
organization_id |
Organization ID. Errors are {error, message}: 404 not_found (no such domain, or the organization is not in it). |
Response: As GET /billing/credit-position.
GET /api/v1/domains/<domain_id>/organizations/<organization_id>/subscription
The subscription of an organization of the domain (as GET /billing/subscription).
Access: platform permission platform_admin or domain_admin (domain_admin: only its domains, domain_id)
API keys: refused, 403 forbidden (API key not allowed on this route)
Path parameters
| Name | Description |
|---|---|
domain_id |
Domain ID. |
organization_id |
Organization ID. |
Response: As GET /billing/subscription.
PUT /api/v1/domains/<domain_id>/organizations/<organization_id>/subscription
Set the subscription of an organization of the domain: its plan, its own prices, its discount, its lines, the contact centre module. Journaled.
The same rules as PUT /billing/subscription, without requiring its automatic recharge. Errors are {error, message}: 404 not_found (organization not in the domain); 400 validation_error with field (plan unknown or inactive, overrides or discount invalid, purchased_lines or burst_lines not a whole number from 0 to 1000, purchased lines under a plan without the phone system, nothing given).
Access: platform permission platform_admin or domain_admin (domain_admin: only its domains, domain_id)
API keys: refused, 403 forbidden (API key not allowed on this route)
Path parameters
| Name | Description |
|---|---|
domain_id |
Domain ID. |
organization_id |
Organization ID. |
Request body
| Name | Description |
|---|---|
plan |
The key of a plan of the domain. |
overrides |
The values this organization has of its own, replacing those it had: {plans {key: {platform_fee, user_price, included {...}, features {...}}}, prices {name: value}}; null or {} removes them all. |
discount |
The discount of the organization, replacing the one it had: {kind percent|amount, value (a percentage from 0 to 100, or an amount per month), label (shown on the statement; default "Rabais" / "Discount"), until (YYYY-MM-DD, the first period start it no longer applies to; null: for as long as it is not removed)}; null or {} removes it. It reduces the subscription lines of each statement (platform, users, numbers, teams, widgets, connected applications, contact centre, fax, on-call lines, lines, devices), never the usage nor the Telma IA plans, the retention or the storage; a percentage also reduces a pro rata charge. |
purchased_lines |
Simultaneous lines bought beyond those the plan includes. |
burst_lines |
The lines on demand allowed above the included and purchased ones; null: the rule (5 up to 10 users, 10 beyond). |
contact_center |
Take the advanced contact centre module (supervision of the call queues included, billed at the price contact_center with its agents) even without more queues than the plan includes; only with a plan that has the phone system and does not include supervision. |
postpaid_approved |
Bill the organization each month without a card on file (it pays its invoice of the 1st by transfer or cheque): never stopped by its balance during the month, only by an invoice left unpaid. An organization with a card on file is billed each month anyway. |
billing_paused |
Pause the billing of the organization while it is being installed (true), or resume it (false). While paused nothing is billed: what it uses is still listed then given back in one credit at the 1st and when the billing resumes, no invoice of the 1st is issued, it is never stopped by its balance; once resumed its subscription is billed from that day (the rest of the month pro rata on the next invoice of the 1st). |
Response: As GET /billing/subscription.
GET /api/v1/domains/<domain_id>/organizations/<organization_id>/subscription/estimate
The monthly statement an organization of the domain would have with a plan (as GET /billing/subscription/estimate).
Access: platform permission platform_admin or domain_admin (domain_admin: only its domains, domain_id)
API keys: refused, 403 forbidden (API key not allowed on this route)
Path parameters
| Name | Description |
|---|---|
domain_id |
Domain ID. |
organization_id |
Organization ID. |
Query parameters
| Name | Description |
|---|---|
plan |
The key of a plan of the domain; without it, the plan the organization will hold at its anniversary. |
Response: As GET /billing/subscription/estimate.
Errors 400 validation_error (field plan): unknown or inactive plan. 404 not_found: not an organization of the domain.
GET /api/v1/domains/<domain_id>/payment-setup
Where the payment provider stands for this domain: what is configured, the URL to give the processor for its notifications (DMN), and a checklist of what is still missing before going live. No secret is returned.
Access: platform permission platform_admin or domain_admin (domain_admin: only its domains, domain_id)
API keys: refused, 403 forbidden (API key not allowed on this route)
Path parameters
| Name | Description |
|---|---|
domain_id |
Domain ID. |
Response: payment_setup: {provider (the one the domain pays with, or null), enabled_providers, nuvei {enabled, environment, merchant_id, merchant_site_id, has_secret_key, notification_url}, fake_allowed, checks [{key, ok, detail?}], ready (every check but nuvei_production, tax_numbers and tax_table is ok)}.
POST /api/v1/domains/<domain_id>/payment-setup/test
Check the credentials of the domain's payment provider by opening a session with the processor (Nuvei getSessionToken). Calls the processor for real: use it after entering the sandbox credentials. Nothing is charged or stored.
Errors are {error, message}: 400 configuration_error (no provider enabled or credentials missing), 502 provider_error / provider_unavailable (the processor refused: bad merchant id, site id or secret key, or unreachable).
Access: platform permission platform_admin or domain_admin (domain_admin: only its domains, domain_id)
API keys: refused, 403 forbidden (API key not allowed on this route)
Path parameters
| Name | Description |
|---|---|
domain_id |
Domain ID. |
Response: ok: true. provider: The provider tested. environment: sandbox or production.
GET /api/v1/domains/<domain_id>/payments
Card payments of the organizations of the domain, newest first (the card debits, apart from the credits and receipts they produced).
Access: platform permission platform_admin or domain_admin (domain_admin: only its domains, domain_id)
API keys: refused, 403 forbidden (API key not allowed on this route)
Path parameters
| Name | Description |
|---|---|
domain_id |
Domain ID. |
Query parameters
| Name | Description |
|---|---|
organization_id |
Only this organization. |
status |
pending, approved, completing, completed, declined, failed, requires_action or unknown. |
skip |
Offset (default 0). |
limit |
Page size (default 50, 1-100). |
Response: payments: [{id, organization_id, kind (manual or auto), provider, status, card {brand, last4}, credits, promotion, credited, promo_code, subtotal, taxes, total, currency, provider_transaction_id, decline_code, error, invoice_id, transaction_id, refunded_total, created_at, completed_at}]. total: Number of payments matching. skip: Offset applied. limit: Page size applied.
POST /api/v1/domains/<domain_id>/payments/<payment_id>/refund
Refund a completed payment to the customer's card and take the credits back. The credits come off proportionally to the money refunded (all of them, gift included, for a full refund); the balance may go negative, which hands the account to the negative-balance lifecycle. A full refund cancels the receipt. Journaled.
Errors are {error, message}: 404 not_found, 409 conflict (not completed, already refunded, another refund in progress), 400 validation_error (amount), 502 refund_failed (the provider refused: nothing was taken back).
Access: platform permission platform_admin or domain_admin (domain_admin: only its domains, domain_id)
API keys: refused, 403 forbidden (API key not allowed on this route)
Path parameters
| Name | Description |
|---|---|
domain_id |
Domain ID. |
payment_id |
Payment ID. |
Request body
| Name | Description |
|---|---|
amount |
Money to give back (default: all that is left to refund). |
reason |
Note for the audit log. |
Response: refund: {id, payment_id, amount, credits (taken off the balance), reason, status, provider_refund_id, created_at}. payment: The payment after the refund. transaction: The ledger row of the debit.
POST /api/v1/domains/<domain_id>/payments/<payment_id>/resolve
Settle a payment whose outcome is unknown (the processor did not answer) after checking it in the processor's console: approved credits the customer, failed closes it without crediting. Journaled.
Errors are {error, message}: 404 not_found, 409 conflict (the payment is not unknown), 400 validation_error with field.
Access: platform permission platform_admin or domain_admin (domain_admin: only its domains, domain_id)
API keys: refused, 403 forbidden (API key not allowed on this route)
Path parameters
| Name | Description |
|---|---|
domain_id |
Domain ID. |
payment_id |
Payment ID. |
Request body
| Name | Description |
|---|---|
outcome |
approved or failed. |
provider_transaction_id |
The processor's transaction id (required for approved). |
Response: payment: The payment after it was settled.
GET /api/v1/domains/<domain_id>/plans
The price grid of the domain: its plans, its unit prices and the tiers of the additional texts.
Access: platform permission platform_admin or domain_admin (domain_admin: only its domains, domain_id)
API keys: refused, 403 forbidden (API key not allowed on this route)
Path parameters
| Name | Description |
|---|---|
domain_id |
Domain ID. |
Response: plans: The plans, cheapest first [{key, name {fr, en}, active, platform_fee, user_price, voice, included {messages, minutes_per_user, numbers, teams, widgets, queues, connectors, ai_hours_per_user, lines (simultaneous calls of the organization), lines_per_user (one more for each user), recording_days}, features {video, team_chat, supervision, assistant}, prices (the unit prices of its own, over those of the domain: only those given), message_tiers (its own price of a text beyond those included, as the tiers below; null: those of the domain), wholesale {platform_fee, user_price} or null (platform administrator only), holders (organizations that hold it or will at their anniversary)}]. prices: The unit prices, as GET /billing/subscription. message_tiers: Price of a text beyond those included [{up_to, price}].
PUT /api/v1/domains/<domain_id>/plans
Change the price grid of the domain (what is given is changed). Journaled.
plans is the whole list: a plan with a known key is changed (the fields given), one without a key is created (its key comes from its French name), one left out is removed. Errors are {error, message}: 400 validation_error with field; 409 plan_in_use {plan, organizations}: organizations hold a plan that would be removed or deactivated. The capabilities of the organizations of the domain follow the new grid at once (what a plan now includes comes on, what it no longer offers goes).
Access: platform permission platform_admin or domain_admin (domain_admin: only its domains, domain_id)
API keys: refused, 403 forbidden (API key not allowed on this route)
Path parameters
| Name | Description |
|---|---|
domain_id |
Domain ID. |
Request body
| Name | Description |
|---|---|
plans |
The whole list of plans, each {key (absent for a new plan), name {fr, en}, active, platform_fee, user_price, voice, included {...}, features {...}, wholesale {platform_fee, user_price} or null (platform administrator only; ignored otherwise)}. |
prices |
Unit prices to change {name: value}. |
message_tiers |
The tiers of the additional texts [{up_to, price}], rising, the last up_to null. |
Response: As GET /domains/<id>/plans.
GET /api/v1/domains/<domain_id>/promo-codes
Promotional codes of the domain, newest first.
Access: platform permission platform_admin or domain_admin (domain_admin: only its domains, domain_id)
API keys: refused, 403 forbidden (API key not allowed on this route)
Path parameters
| Name | Description |
|---|---|
domain_id |
Domain ID. |
Query parameters
| Name | Description |
|---|---|
skip |
Offset (default 0). |
limit |
Page size (default 50, 1-100). |
Response: promo_codes: [{id, code, operation (gift or discount), value, min_credit, valid_from, valid_to, per_account_limit, max_uses, uses, active, description, created_at}]. total: Number of codes. skip: Offset applied. limit: Page size applied.
POST /api/v1/domains/<domain_id>/promo-codes
Create a promotional code. A gift adds value credits (a separate gift ledger row) on top of the credits bought; a discount lowers the price of the credits by value (taxes are computed after it).
Errors are {error, message}: 400 validation_error with field, 409 conflict (the code exists).
Access: platform permission platform_admin or domain_admin (domain_admin: only its domains, domain_id)
API keys: refused, 403 forbidden (API key not allowed on this route)
Path parameters
| Name | Description |
|---|---|
domain_id |
Domain ID. |
Request body
| Name | Description |
|---|---|
code |
The code, 3 to 32 letters, digits, - or _ (case does not matter). |
operation |
gift or discount. |
value |
Amount in CAD. |
min_credit |
Smallest recharge it applies to (default 0). |
valid_from |
ISO 8601 start of validity (optional). |
valid_to |
ISO 8601 end of validity (optional). |
per_account_limit |
Times one organization can use it (default 1). |
max_uses |
Times it can be used in all (default unlimited). |
active |
Whether it can be used (default true). |
description |
Note for the administrators. |
Response: promo_code: The created code (201).
DELETE /api/v1/domains/<domain_id>/promo-codes/<promo_id>
Delete a promotional code that was never redeemed; a redeemed one is kept for the history (deactivate it with active: false).
Errors are {error, message}: 404 not_found, 409 conflict (already redeemed).
Access: platform permission platform_admin or domain_admin (domain_admin: only its domains, domain_id)
API keys: refused, 403 forbidden (API key not allowed on this route)
Path parameters
| Name | Description |
|---|---|
domain_id |
Domain ID. |
promo_id |
Code ID. |
Response: success: true.
PUT /api/v1/domains/<domain_id>/promo-codes/<promo_id>
Change a promotional code (the fields given). The code itself and its operation cannot change once redeemed.
Errors are {error, message}: 404 not_found, 400 validation_error with field, 409 conflict.
Access: platform permission platform_admin or domain_admin (domain_admin: only its domains, domain_id)
API keys: refused, 403 forbidden (API key not allowed on this route)
Path parameters
| Name | Description |
|---|---|
domain_id |
Domain ID. |
promo_id |
Code ID. |
Request body
| Name | Description |
|---|---|
value |
Amount in CAD. |
min_credit |
Smallest recharge it applies to. |
valid_from |
ISO 8601 start of validity, or null. |
valid_to |
ISO 8601 end of validity, or null. |
per_account_limit |
Times one organization can use it. |
max_uses |
Times it can be used in all, or null. |
active |
Whether it can be used. |
description |
Note for the administrators. |
code |
New code (only while never redeemed). |
operation |
gift or discount (only while never redeemed). |
Response: promo_code: The code after the change.
GET /api/v1/domains/<domain_id>/wholesale
What the platform bills this domain (F19): the wholesale charges of the month so far, by kind, and the last monthly statements. Nothing for an exempt domain.
Access: platform permission platform_admin or domain_admin (domain_admin: only its domains, domain_id)
API keys: refused, 403 forbidden (API key not allowed on this route)
Path parameters
| Name | Description |
|---|---|
domain_id |
Domain ID. |
Response: settings: {exempt, ratio} (ratio: the share of a retail price billed to the domain when nothing more precise applies). month: {period, retail (what the organizations paid), wholesale (what the domain owes), count, by_subtype {subtype: {retail, wholesale, count}}}. statements: [{id, period, total, retail, charges, status, created_at}] (newest first).
PUT /api/v1/domains/<domain_id>/wholesale-settings
Change what the platform bills a domain (F19; platform administrators). Journaled.
Access: platform permission platform_admin
API keys: refused, 403 forbidden (API key not allowed on this route)
Path parameters
| Name | Description |
|---|---|
domain_id |
Domain ID. |
Request body
| Name | Description |
|---|---|
exempt |
The domain is not billed (telma by default). |
ratio |
Share of a retail price billed to the domain when no wholesale price applies (0 to 1, 0.6 by default). |
Response: settings: {exempt, ratio} after the change.
Payment notifications
URL called by the payment provider (Nuvei DMN) to confirm a payment, a refund or a chargeback.
GET /webhook/billing/<provider>/<secret>
Receive a notification of the payment processor (public: the secret of the URL and the signature authenticate it).
Errors are {error, message}: 404 not_found (unknown provider or secret), 401 invalid_signature, 400 provider_unsupported.
Access: public (no authentication)
Rate limit: exempt from the general per-address limit
Path parameters
| Name | Description |
|---|---|
provider |
nuvei. |
secret |
The webhook_secret of the provider's settings in the domain. |
Response: The text OK (the processor retries until it gets a 200).
Errors 500 internal_error: the notification could not be processed (the processor retries).
POST /webhook/billing/<provider>/<secret>
Receive a notification of the payment processor (public: the secret of the URL and the signature authenticate it).
Errors are {error, message}: 404 not_found (unknown provider or secret), 401 invalid_signature, 400 provider_unsupported.
Access: public (no authentication)
Rate limit: exempt from the general per-address limit
Path parameters
| Name | Description |
|---|---|
provider |
nuvei. |
secret |
The webhook_secret of the provider's settings in the domain. |
Response: The text OK (the processor retries until it gets a 200).
Errors 500 internal_error: the notification could not be processed (the processor retries).
Domains
Whitelabel domains: settings, numbers, providers, domain admins, voice.
GET /api/v1/domains
List all domains (platform_admin), or only the domains a domain_admin administers.
Access: platform permission platform_admin or domain_admin
Response: domains: The domains.
POST /api/v1/domains
Create a new domain.
Access: platform permission platform_admin
Request body
| Name | Description |
|---|---|
name |
Domain identifier (slug), a string of 1 to 120 characters (400 validation_error otherwise). |
hostnames |
List of hostnames to match (can include port). |
display_name |
Display name for the domain, a string of 1 to 120 characters. |
Response: domain: The created domain. message: Confirmation.
DELETE /api/v1/domains/<domain_id>
Delete a domain.
Access: platform permission platform_admin
Path parameters
| Name | Description |
|---|---|
domain_id |
Domain ID. |
Response: Success message.
GET /api/v1/domains/<domain_id>
Get a domain by ID.
Access: platform permission platform_admin or domain_admin (domain_admin: only its domains, domain_id)
Path parameters
| Name | Description |
|---|---|
domain_id |
Domain ID. |
Response: Domain details.
PUT /api/v1/domains/<domain_id>
Update a domain.
A body with name or hostnames is refused to any request authenticated by an API key, ordinary or restricted: 403 (error forbidden, message "API key not allowed on this route"). The hostnames give the address of the links of the domain's emails (password reset, invitations), so only a session (JWT) changes them. The body must be a JSON object and its fields of the documented types (else 400 validation_error).
Access: platform permission platform_admin or domain_admin (domain_admin: only its domains, domain_id)
API keys: refused when the body contains hostnames, name
Path parameters
| Name | Description |
|---|---|
domain_id |
Domain ID. |
Request body
| Name | Description |
|---|---|
name |
Domain identifier (slug), a string of 1 to 120 characters. |
hostnames |
List of hostnames to match (strings; a single string is accepted). |
display_name |
Display name for the domain, a string of 1 to 120 characters. |
capabilities |
List of capabilities of the domain (adding sip, call_codes, voicemail_boxes, transcription, mcp, zoho or quickbooks is reserved to a platform_admin: 403 forbidden for a domain_admin): textos, voxos, sip (SIP endpoints and softphone provisioning), call_codes (call codes, legacy without interface: no app uses them any more), voicemail_boxes (voicemail boxes of the endpoints and standalone boxes), transcription (Telma AI: transcription and summary of the recorded calls), mcp (assistants connected to the accounts by the MCP connector of the domain; removing it disconnects every assistant of the domain), zoho and quickbooks (connected applications: the right to plug a Zoho CRM or QuickBooks Online account, /api/v1/apps; they need nothing else); sip, call_codes, voicemail_boxes and transcription need voxos in the same list, else 400 validation_error (field capabilities). An organization of the domain holds a subset of this list (PUT /organizations/<id>/capabilities). |
Response: Updated domain.
GET /api/v1/domains/<domain_id>/admins
List all domain admins and pending invitations for a domain.
Access: platform permission platform_admin or domain_admin (domain_admin: only its domains, domain_id)
Path parameters
| Name | Description |
|---|---|
domain_id |
Domain ID. |
Response: admins: The domain admin users. pending_invitations: The invitations to become domain admin that are not accepted yet.
POST /api/v1/domains/<domain_id>/admins
Add a domain admin to a domain.
If the user exists, add them immediately. If the user doesn't exist, create an invitation.
Answers 201 in both cases. 400 validation_error: email missing, or the account is a super admin. 409 conflict: already a domain admin of this domain. 403 forbidden: the account belongs to organizations the caller does not administer (only a super admin turns such an account into a domain admin).
Access: platform permission platform_admin or domain_admin (domain_admin: only its domains, domain_id)
API keys: refused, 403 forbidden (API key not allowed on this route)
Path parameters
| Name | Description |
|---|---|
domain_id |
Domain ID. |
Request body
| Name | Description |
|---|---|
email |
Email of the user to add as domain admin. |
Response: For an existing account: admin (the user, now domain admin), message and invited false. For an email with no account: invitation (with its token), message, invited true and email_sent (whether the email went out).
DELETE /api/v1/domains/<domain_id>/admins/<user_id>
Remove a domain admin from a domain.
The domain leaves the account's domain_ids; without any domain left, the account loses the platform permission domain_admin and its role becomes the one its profiles give in its current organization (agent without membership). 400 validation_error when the account is not a domain_admin.
Access: platform permission platform_admin or domain_admin (domain_admin: only its domains, domain_id)
API keys: refused, 403 forbidden (API key not allowed on this route)
Path parameters
| Name | Description |
|---|---|
domain_id |
Domain ID. |
user_id |
User ID to remove. |
Response: message: Confirmation. new_role: domain_admin when the user still administers other domains, else the role held in the current organization (agent without membership).
DELETE /api/v1/domains/<domain_id>/admins/invitations/<invitation_id>
Delete a pending domain admin invitation.
Access: platform permission platform_admin or domain_admin (domain_admin: only its domains, domain_id)
Path parameters
| Name | Description |
|---|---|
domain_id |
Domain ID. |
invitation_id |
Invitation ID to delete. |
Response: Success message.
GET /api/v1/domains/<domain_id>/negative-balance
Settings of the negative-balance lifecycle of a domain (E46).
Voice calls are debited after they took place, so a balance can become negative. The organization then goes through a grace period (notices by email and SMS), is suspended (sending and calls refused, numbers paused), held in limbo (numbers kept in reserve) and released (numbers back in the pool of the domain). It runs only when enabled is true (off by default, independent of the call billing since 2026-10-27).
Access: platform permission platform_admin or domain_admin (domain_admin: only its domains, domain_id)
Path parameters
| Name | Description |
|---|---|
domain_id |
Domain ID. |
Response: negative_balance: {enabled, grace_days, suspended_days, limbo_days, notice_days (null: the default steps), effective_notice_days, channels ({email, sms}), recharge_guard_minutes}. active: Whether the lifecycle runs for the domain now.
PUT /api/v1/domains/<domain_id>/negative-balance
Change the settings of the negative-balance lifecycle of a domain (the fields given are changed).
Access: platform permission platform_admin or domain_admin (domain_admin: only its domains, domain_id)
Path parameters
| Name | Description |
|---|---|
domain_id |
Domain ID. |
Request body
| Name | Description |
|---|---|
enabled |
Run the lifecycle (boolean, default false; independent of the call billing). |
grace_days |
Days between the balance becoming negative and the suspension, 0 to 365 (default 10). |
suspended_days |
Days the account stays suspended (numbers paused, kept) before the limbo, 0 to 365 (default 0). |
limbo_days |
Days the numbers are held in reserve before they go back to the pool, 0 to 730 (default 35). |
notice_days |
Days after the balance became negative at which a notice goes out during the grace period: null for the default steps (at once, half way, 2 days and 1 day before the end), or at most 4 days below grace_days. |
channels |
{email, sms} booleans (both true by default); the SMS only goes to admins with a verified phone. |
recharge_guard_minutes |
Minutes after an automatic recharge (running, succeeded or failed) during which the organization is not moved forward, 0 to 1440 (default 30). |
Response: negative_balance: The settings after the change (as GET). active: Whether the lifecycle runs for the domain now.
GET /api/v1/domains/<domain_id>/negative-balance/organizations
Organizations of the domain whose balance is negative or in the middle of the lifecycle.
Access: platform permission platform_admin or domain_admin (domain_admin: only its domains, domain_id)
Path parameters
| Name | Description |
|---|---|
domain_id |
Domain ID. |
Query parameters
| Name | Description |
|---|---|
state |
Only this state: negative_grace, suspended, limbo or released (optional). |
skip |
Pagination offset (default 0). |
limit |
Page size (default 50, brought back into 1-100). |
Response: organizations: The page of {organization_id, name, credit_balance, balance_state, negative_since, grace_ends_at, suspended_at, limbo_at, release_at, released_at, numbers ({paused, held, released})}; dates are UTC (ISO 8601 with Z). total: Number of organizations matching. skip: Offset applied. limit: Page size applied.
GET /api/v1/domains/<domain_id>/organizations
List organizations in a domain.
Access: platform permission platform_admin or domain_admin (domain_admin: only its domains, domain_id)
Path parameters
| Name | Description |
|---|---|
domain_id |
Domain ID. |
Response: organizations: All the organizations of the domain. total: Number of organizations.
POST /api/v1/domains/<domain_id>/organizations/<organization_id>/credit
Add credit to, or take credit back from, an organization of the domain by hand (administrator of the domain or super admin).
A negative amount is a correction (admin_fix in the ledger): it needs a reason and may bring the balance below zero, which starts the negative-balance lifecycle like any debt. The credit is written in the ledger as an administrative operation (admin_credit, with the administrator and the reason in the audit journal). A negative balance brought back to zero or above leaves the negative-balance lifecycle like after a recharge; messages held for lack of credit are sent. Not available to API keys.
Access: platform permission platform_admin or domain_admin (domain_admin: only its domains, domain_id)
API keys: refused, 403 forbidden (API key not allowed on this route)
Path parameters
| Name | Description |
|---|---|
domain_id |
Domain ID. |
organization_id |
Organization ID (must belong to the domain). |
Request body
| Name | Description |
|---|---|
amount |
Credit to add (above zero) or to take back (below zero), 100000 at most in absolute value, not zero (required). |
description |
Label shown in the ledger of the organization (optional, 200 characters at most; default "Ajout manuel de crédit" or "Correction manuelle"). |
reason |
Why, kept in the audit journal only (300 characters at most; required for a correction). |
Response: success: true. new_balance: Balance after the operation. transaction_id: Ledger row written.
POST /api/v1/domains/<domain_id>/organizations/<organization_id>/grace-extension
Force a longer grace period for an organization whose balance is negative (journalled).
The organization goes back to negative_grace whatever its state: a suspended account is put back in service (numbers resume or return) and its grace period now ends days days from now. The reminders and the suspension notice are armed again for the new end.
Access: platform permission platform_admin or domain_admin (domain_admin: only its domains, domain_id)
Path parameters
| Name | Description |
|---|---|
domain_id |
Domain ID. |
organization_id |
Organization ID. |
Request body
| Name | Description |
|---|---|
days |
Days from now, 1 to 90 (required). |
reason |
Why, kept in the audit journal (optional text of 300 characters at most). |
Response: billing_state: {balance_state, negative_since, grace_ends_at, suspended_at, limbo_at, release_at, released_at, credit_balance}. 400 validation_error with field when days is out of bounds or the balance is not negative.
GET /api/v1/domains/<domain_id>/phone-numbers
List phone numbers in a domain.
Access: platform permission platform_admin or domain_admin (domain_admin: only its domains, domain_id)
Path parameters
| Name | Description |
|---|---|
domain_id |
Domain ID. |
Response: phone_numbers: The numbers of the domain (pool and organizations), each with organization_name when it belongs to an organization; provider_account_id = its SMS provider account (null: the provider settings of the domain); for a domain admin, a number bound to a platform account shows the provider "platform". total: Number of numbers.
POST /api/v1/domains/<domain_id>/phone-numbers
Create phone number(s) in domain pool (batch support).
Always answers 201 once the domain exists, even when no number was created: read created_count and errors (a number that already exists, or that cannot be stored, is listed there and the others are still created). The numbers are created in the pool of the domain, without a team. The provider configuration of a number is not set here (PUT .../phone-numbers/<phone_id>/provider).
Access: platform permission platform_admin or domain_admin (domain_admin: only its domains, domain_id)
Path parameters
| Name | Description |
|---|---|
domain_id |
Domain ID. |
Request body
| Name | Description |
|---|---|
numbers |
List of phone numbers in E.164 format. |
number |
Single phone number (legacy, use numbers instead). |
provider |
SMS provider name (optional); it must be enabled for the domain, else 400 validation_error. |
provider_account_id |
SMS provider account of the numbers (GET /domains/<id>/sms-accounts: an account of the domain or a platform account allowed for it; 400 validation_error otherwise). It sets the provider; provider is then ignored. |
Response: phone_numbers: The numbers created. created_count: How many were created. errors: One string per number that was not created ("<number>: already exists", or the reason). message: Confirmation with the count.
DELETE /api/v1/domains/<domain_id>/phone-numbers/<phone_id>
Delete a phone number from domain pool.
Access: platform permission platform_admin or domain_admin (domain_admin: only its domains, domain_id)
Path parameters
| Name | Description |
|---|---|
domain_id |
Domain ID. |
phone_id |
Phone number ID. |
Response: Success message.
PUT /api/v1/domains/<domain_id>/phone-numbers/<phone_id>
Update a phone number in domain pool.
Access: platform permission platform_admin or domain_admin (domain_admin: only its domains, domain_id)
Path parameters
| Name | Description |
|---|---|
domain_id |
Domain ID. |
phone_id |
Phone number ID. |
Request body
| Name | Description |
|---|---|
label |
Friendly label (no control character or line break: the label can become the caller name of the calls; 400 validation_error otherwise). |
provider |
SMS provider name (refused with 400 validation_error while the number is bound to an account: the account decides). |
provider_account_id |
SMS provider account of the number (an account of the domain or a platform account allowed for it, GET /domains/<id>/sms-accounts; 400 validation_error otherwise); null unbinds (back to the provider settings of the domain). |
provider_config |
Provider configuration. |
is_active |
Whether number is active, a boolean (400 validation_error otherwise). An inactive number is not counted in the monthly statement and cannot send. |
voice_trunk_id |
Voice trunk of the number, a trunk of this domain or a platform trunk allowed for it (400 validation_error otherwise; null turns the voice off). Super admin only for a number of the platform (bound to a platform SMS account, or whose current or new trunk is a platform trunk): 403 forbidden for a domain admin, the platform sets it in the Providers page (PUT /system/phone-numbers/<id>/voice). |
purpose |
"access" makes the number an access number of the call codes (E23, legacy without interface; read by the voice server), null removes it. An access number must belong to the pool (no organization), have the voice enabled and a country. |
country |
ISO 3166-1 alpha-2 country of an access number (CA, US...). |
temporary |
true marks a number of an organization as temporary: it is never counted in the monthly statement (subscription and wholesale) while it stays with that organization; given to another organization it is billed again. false removes the mark. A boolean, and only for a number assigned to an organization (400 validation_error otherwise). |
Response: phone_number: The updated number. message: Confirmation.
POST /api/v1/domains/<domain_id>/phone-numbers/<phone_id>/assign
Assign a phone number to an organization.
The number goes to the default team of the organization (flag is_default; the only team of an organization counts as default), created when the organization has no team yet, so that SMS work at once. An organization with several teams and none flagged default keeps the number without team: its admin assigns it (POST /phone-numbers/<id>/assign). Unassigning (organization_id null) also clears the team.
Access: platform permission platform_admin or domain_admin (domain_admin: only its domains, domain_id)
Path parameters
| Name | Description |
|---|---|
domain_id |
Domain ID. |
phone_id |
Phone number ID. |
Request body
| Name | Description |
|---|---|
organization_id |
Organization ID to assign (null to unassign). |
Response: phone_number: The number, with team_id set to the default team when there is one. message: Result message.
Errors 409 number_order_pending: the number was ordered from the provider and is not delivered yet.
PUT /api/v1/domains/<domain_id>/phone-numbers/<phone_id>/assigned-at
Update the organization assignment date for a phone number.
Access: platform permission platform_admin or domain_admin (domain_admin: only its domains, domain_id)
Path parameters
| Name | Description |
|---|---|
domain_id |
Domain ID. |
phone_id |
Phone number ID. |
Request body
| Name | Description |
|---|---|
assigned_at |
ISO date string or null. |
Response: phone_number: The updated number.
PUT /api/v1/domains/<domain_id>/phone-numbers/<phone_id>/provider
Configure SMS provider for a phone number.
Access: platform permission platform_admin or domain_admin (domain_admin: only its domains, domain_id)
Path parameters
| Name | Description |
|---|---|
domain_id |
Domain ID. |
phone_id |
Phone number ID. |
Request body
| Name | Description |
|---|---|
provider |
SMS provider name. |
config |
Provider configuration. |
test_first |
Whether to test before saving (default true). |
Response: phone_number: The updated number. message: Confirmation.
Errors 400 validation_error: provider missing. 400 provider_error: the connection test failed (skip it with test_first false). 404 not_found: domain or number unknown.
GET /api/v1/domains/<domain_id>/platform-voice-trunks
Which platform voice trunks a domain may use (super admin only).
Access: platform permission platform_admin
Path parameters
| Name | Description |
|---|---|
domain_id |
Domain ID. |
Response: voice_trunks: Every platform trunk {id, name, description, provider, host, enabled, allowed (whether the domain may use it), numbers (how many numbers of the domain name it)}.
PUT /api/v1/domains/<domain_id>/platform-voice-trunks
Set which platform voice trunks a domain may use (super admin only).
Access: platform permission platform_admin
API keys: refused, 403 forbidden (API key not allowed on this route)
Path parameters
| Name | Description |
|---|---|
domain_id |
Domain ID. |
Request body
| Name | Description |
|---|---|
trunk_ids |
Ids of the platform trunks the domain may use (the whole list; [] = none). |
Response: voice_trunks: As GET.
Errors 400 validation_error: an id is not a platform trunk. 409 conflict: a trunk taken away is still named by numbers of the domain (trunk_id, numbers in the answer).
GET /api/v1/domains/<domain_id>/security-settings
Security settings of a domain: who must sign in with a second factor.
A second factor (authenticator app or passkey) is expected of the platform and domain admins; this setting adds the organization admins (members holding members.admin) of the domain's organizations. While the platform's MFA_ENFORCE is off (today) it is only recommended: the sign-in carries mfa_setup, nothing is refused (mfa_enforced false; the page says it will become mandatory). Once enforced (mfa_enforced true), with a grace period (MFA_GRACE_DAYS, 14 days by default) counted from the first time the account was seen needing one.
Access: platform permission platform_admin or domain_admin (domain_admin: only its domains, domain_id)
Path parameters
| Name | Description |
|---|---|
domain_id |
Domain ID. |
Response: security: mfa_organization_admins (boolean, false by default), mfa_enforced (boolean, read only: the platform imposes the second factor; false = only recommended), mfa_grace_days (the platform's grace period once enforced, read only).
PUT /api/v1/domains/<domain_id>/security-settings
Change the security settings of a domain.
Journaled (audit_logs, domain_security_changed). Never through an API key.
Access: platform permission platform_admin or domain_admin (domain_admin: only its domains, domain_id)
API keys: refused, 403 forbidden (API key not allowed on this route)
Path parameters
| Name | Description |
|---|---|
domain_id |
Domain ID. |
Request body
| Name | Description |
|---|---|
mfa_organization_admins |
The organization admins of the domain must have a second factor too (required). |
Response: security: The settings after the change (as GET).
GET /api/v1/domains/<domain_id>/settings/branding
Get the branding (theme) of a domain.
Every key is present; null (or the historical default) when unset: each application then uses its own default. Nothing in it is secret: the same object is in GET /domains/current.
Access: platform permission platform_admin or domain_admin (domain_admin: only its domains, domain_id)
Path parameters
| Name | Description |
|---|---|
domain_id |
Domain ID. |
Response: branding: {accent_color_fr, accent_color_en, logo_url, logo_signin_url, favicon_url, theme {primary, primary_text, navbar_bg, navbar_fg, body_bg, font, radius}, support {help_url, status_url, tickets_url, updates_url}, footer_text, tagline {fr, en}}, see PUT /domains/<domain_id>/settings/branding.
Errors 404 not_found: domain unknown.
PUT /api/v1/domains/<domain_id>/settings/branding
Update the branding (theme) of a domain: how every application served by the domain looks.
Partial update: only the keys sent change. theme and support merge key by key; a key sent as null (or an empty string) is removed, theme or support sent as null removes all their keys. Unset = the default of each application. Every value is checked (400 validation_error with field = its path, e.g. theme.primary): colors are #rgb or #rrggbb, stored as lowercase #rrggbb; URLs are https:// (never javascript:, data: or http:), 500 characters at most; an unknown key of theme or support is refused. Each change is journaled (audit_logs, domain_branding_changed, the names of the keys sent).
Access: platform permission platform_admin or domain_admin (domain_admin: only its domains, domain_id)
Path parameters
| Name | Description |
|---|---|
domain_id |
Domain ID. |
Request body
| Name | Description |
|---|---|
accent_color_fr |
Accent color for the French locale, #rgb or #rrggbb (null or empty: back to #003DA5). |
accent_color_en |
Accent color for the English locale, #rgb or #rrggbb (null or empty: back to #D52B1E). |
logo_url |
Logo of the domain, an https:// URL or an absolute path starting with / (null or empty: none). |
logo_signin_url |
Logo of the sign-in page, an https:// URL or an absolute path starting with / (null: removed). |
favicon_url |
Favicon, an https:// URL or an absolute path starting with / (null: removed). |
theme |
Colors and shape of the interface, merged key by key (null: all removed): primary (brand color: buttons, links, underlines), primary_text (text on primary; null: contrast computed by the client), navbar_bg, navbar_fg, body_bg (colors #rgb or #rrggbb), font (one of source-sans, system, inter, roboto), radius (corner radius in pixels, an integer from 0 to 16). |
support |
Links of the ASSISTANCE menu, https:// URLs merged key by key (null: all removed): help_url, status_url, tickets_url, updates_url. |
footer_text |
Footer, plain text of 500 characters at most (line breaks allowed, no HTML tag; null: removed). |
tagline |
Line under the name on the sign-in page, per language, merged key by key (null: all removed): fr, en (one line of plain text, 120 characters at most; null: the app's own). |
home |
What the web app puts first for the domain (its first page after sign-in and the top of its menu): messages, numbers or calls (null: messages). Another value gets 400 validation_error with field home. |
Response: branding: The whole branding after the change, as GET /domains/<domain_id>/settings/branding. message: Confirmation.
Errors 400 validation_error: a value is refused (field = its path), or the body is not a JSON object. 404 not_found: domain unknown.
PUT /api/v1/domains/<domain_id>/settings/default-payment-provider
Set default payment provider for a domain.
Access: platform permission platform_admin or domain_admin (domain_admin: only its domains, domain_id)
API keys: refused, 403 forbidden (API key not allowed on this route)
Path parameters
| Name | Description |
|---|---|
domain_id |
Domain ID. |
Request body
| Name | Description |
|---|---|
provider |
Provider name (nuvei; fake on development and test domains). |
Response: default_payment_provider: The provider now offered first. message: Confirmation.
GET /api/v1/domains/<domain_id>/settings/oauth
Get OAuth settings for a domain.
Access: platform permission platform_admin or domain_admin (domain_admin: only its domains, domain_id)
Path parameters
| Name | Description |
|---|---|
domain_id |
Domain ID. |
Response: oauth: {google, microsoft, apple}. Google and Microsoft: {enabled} only (sign-in uses the platform's credentials, the domain only turns it on). Apple: {enabled, client_id, team_id, key_id, private_key}, the private key masked as "********".
PUT /api/v1/domains/<domain_id>/settings/oauth/<provider>
Turn an OAuth provider on or off for a domain, and set the domain's Apple credentials.
Google and Microsoft sign in with the platform's credentials: the domain only turns them on (enabled), any other field of the body is ignored. Apple uses the domain's credentials and is replaced as a whole: a field left out takes its default (enabled false, empty strings); the private key is kept when it is left out, empty or sent as "********". The other providers are left alone.
Access: platform permission platform_admin or domain_admin (domain_admin: only its domains, domain_id)
API keys: refused, 403 forbidden (API key not allowed on this route)
Path parameters
| Name | Description |
|---|---|
domain_id |
Domain ID. |
provider |
Provider name (google, microsoft, apple). |
Request body
| Name | Description |
|---|---|
enabled |
Whether the provider is offered on the domain (default false). |
client_id |
Apple only: Services ID. |
team_id |
Apple only: team ID. |
key_id |
Apple only: key ID. |
private_key |
Apple only: private key (omitted, empty or "********" keeps the stored one). |
Response: google | microsoft | apple: The settings of the provider after the change, as GET /domains/<domain_id>/settings/oauth shows them, under the name of the provider in the URL. message: Confirmation.
GET /api/v1/domains/<domain_id>/settings/payment-providers
Get payment provider settings for a domain.
Access: platform permission platform_admin or domain_admin (domain_admin: only its domains, domain_id)
Path parameters
| Name | Description |
|---|---|
domain_id |
Domain ID. |
Response: payment_providers: Settings of each payment provider, secrets masked. default_payment_provider: The provider offered first.
PUT /api/v1/domains/<domain_id>/settings/payment-providers/<provider>
Update payment provider settings for a domain.
Access: platform permission platform_admin or domain_admin (domain_admin: only its domains, domain_id)
API keys: refused, 403 forbidden (API key not allowed on this route)
Path parameters
| Name | Description |
|---|---|
domain_id |
Domain ID. |
provider |
Provider name (nuvei; fake, the offline test provider, on development and test domains only: 400 validation_error elsewhere). |
Request body
| Name | Description |
|---|---|
enabled |
Whether the provider is enabled (a field left out keeps its stored value). |
secret_key |
Nuvei only: secret key (omitted, empty or "********" keeps the stored one). |
merchant_id |
Nuvei only: merchant ID. |
merchant_site_id |
Nuvei only: merchant site ID. |
environment |
Nuvei only: "production" (default) or "sandbox"; anything else is 400 validation_error with field environment. |
Response: nuvei | fake: The settings of the provider after the change, under the name of the provider in the URL (secret_key and webhook_secret, the generated secret of Nuvei's notification URL, masked as "********"). message: Confirmation.
GET /api/v1/domains/<domain_id>/settings/smtp
Get SMTP settings for a domain.
Access: platform permission platform_admin or domain_admin (domain_admin: only its domains, domain_id)
Path parameters
| Name | Description |
|---|---|
domain_id |
Domain ID. |
Response: smtp: {host, port, username, password ("********" when set), from_email, from_name, use_tls}; an empty object when never configured.
PUT /api/v1/domains/<domain_id>/settings/smtp
Update SMTP settings for a domain.
The settings are replaced as a whole: a field left out takes its default (port 587, use_tls true, an empty string for the others, from_name = display name of the domain), it does not keep its stored value. Only the password is kept when it is left out, empty or sent as "********" (the masked value GET returns).
Access: platform permission platform_admin or domain_admin (domain_admin: only its domains, domain_id)
API keys: refused, 403 forbidden (API key not allowed on this route)
Path parameters
| Name | Description |
|---|---|
domain_id |
Domain ID. |
Request body
| Name | Description |
|---|---|
host |
SMTP server hostname (in production a domain admin cannot give a private, loopback or link-local address: 400 validation_error; a host already saved is not re-checked). |
port |
SMTP port, 1 to 65535 (default 587; 400 validation_error otherwise). |
username |
SMTP username. |
password |
SMTP password (omitted, empty or "********" keeps the stored one). |
from_email |
From email address. |
from_name |
From name (default: the display name of the domain). |
use_tls |
Whether to use TLS (default true). |
Response: smtp: The configuration after the change (password masked as "********", empty when none). message: Confirmation.
POST /api/v1/domains/<domain_id>/settings/smtp/test
Send a test email through the SMTP settings of a domain.
Access: platform permission platform_admin or domain_admin (domain_admin: only its domains, domain_id)
API keys: refused, 403 forbidden (API key not allowed on this route)
Path parameters
| Name | Description |
|---|---|
domain_id |
Domain ID. |
Request body
| Name | Description |
|---|---|
to_email |
Address the test email goes to (required). |
Response: success: Whether the email was sent. message: Confirmation, or the SMTP error (400).
GET /api/v1/domains/<domain_id>/sms-logs
Get SMS logs for a domain.
Access: platform permission platform_admin or domain_admin (domain_admin: only its domains, domain_id)
Path parameters
| Name | Description |
|---|---|
domain_id |
Domain ID. |
Query parameters
| Name | Description |
|---|---|
direction |
Filter by direction (inbound/outbound). |
account_id |
Only the entries of the numbers bound to this SMS provider account (a platform account the domain may use, or one of its own; 400 validation_error otherwise). |
provider |
Filter by provider type (super admin only; ignored for anyone else, it would name the provider of a platform account). |
start_date |
Filter by start date (ISO format). |
end_date |
Filter by end date (ISO format). |
skip |
Number of records to skip (default 0; a value that is not an integer is refused: 400 validation_error). |
limit |
Maximum records to return (default 50, max 100; a value that is not an integer is refused: 400 validation_error). |
Response: logs: The log entries of the page, each with provider_account_id and provider_description (the account of its number as the domain sees it: a platform account by the description the super admin wrote, never by its name; both null for a number bound to no account) and provider (reads "platform" for a domain admin when the account is the platform's). total: Number of entries before skip and limit. skip: Offset applied. limit: Page size applied.
GET /api/v1/domains/<domain_id>/sms-providers
Get SMS provider settings for a domain.
Access: platform permission platform_admin or domain_admin (domain_admin: only its domains, domain_id)
Path parameters
| Name | Description |
|---|---|
domain_id |
Domain ID. |
Response: sms_providers: Settings of each SMS provider of the domain, secrets masked.
PUT /api/v1/domains/<domain_id>/sms-providers/<provider>
Update SMS provider settings for a domain.
Access: platform permission platform_admin or domain_admin (domain_admin: only its domains, domain_id)
API keys: refused, 403 forbidden (API key not allowed on this route)
Path parameters
| Name | Description |
|---|---|
domain_id |
Domain ID. |
provider |
Provider type (one of GET /api/v1/providers). |
Request body
| Name | Description |
|---|---|
enabled |
Whether provider is enabled. |
sms_token |
SMS token of the provider. |
mms_account_id |
MMS account ID. |
webhook_secret |
Webhook secret. |
Response: message: Confirmation. provider: The provider name. enabled: Whether the provider is enabled after the change.
GET /api/v1/domains/<domain_id>/voice-billing
Voice billing settings of a domain (E22).
The billing of the calls is always on (F27, 2026-10-27): enabled is always true in the answer (a stored value is ignored). A destination that no rate covers is refused once the domain has a price list (or a default rate, or the margin mode); without any price list yet, such a call is allowed, capped by max_call_seconds and not billed.
Access: platform permission platform_admin or domain_admin (domain_admin: only its domains, domain_id)
Path parameters
| Name | Description |
|---|---|
domain_id |
Domain ID. |
Response: voice_billing: {enabled (always true since 2026-10-27: calls are always billed), currency, default_rate ({rate_per_min, connection_fee, increment} or null), max_call_seconds, safety_margin_seconds, reserve}.
PUT /api/v1/domains/<domain_id>/voice-billing
Change the voice billing settings of a domain (the fields given are changed).
Access: platform permission platform_admin or domain_admin (domain_admin: only its domains, domain_id)
Path parameters
| Name | Description |
|---|---|
domain_id |
Domain ID. |
Request body
| Name | Description |
|---|---|
enabled |
Ignored (calls are always billed since 2026-10-27; a domain without a price list lets calls through, capped and not billed). |
default_rate |
Rate for the destinations no prefix covers: {rate_per_min, connection_fee, increment} or null. |
max_call_seconds |
Longest call allowed, 60 to 86400 (default 7200). |
safety_margin_seconds |
Seconds taken off the duration the balance allows, 0 to 600 (default 10). |
reserve |
Part of the balance a call may never use (default 0). |
currency |
CAD (the only credit currency). |
Response: voice_billing: The settings after the change.
GET /api/v1/domains/<domain_id>/voice-rates
Voice rates of a domain, by direction then prefix.
Access: platform permission platform_admin or domain_admin (domain_admin: only its domains, domain_id)
Path parameters
| Name | Description |
|---|---|
domain_id |
Domain ID. |
Query parameters
| Name | Description |
|---|---|
direction |
outbound or inbound (optional). |
prefix |
Only the rates whose prefix starts with these digits (optional). |
skip |
Pagination offset (default 0). |
limit |
Page size (default 50, brought back into 1-100). |
Response: rates: The page of rates {id, domain_id, prefix, direction, rate_per_min, connection_fee, increment, currency, label, enabled, created_at, updated_at}. total: Number of rates matching the filters. skip: Offset applied. limit: Page size applied.
POST /api/v1/domains/<domain_id>/voice-rates
Add a voice rate to a domain.
A rate bills the destinations whose number starts with prefix; the longest prefix wins. Example: prefix 1 (North America) 0.02 per minute, prefix 1514 (Montreal) 0.015, prefix 44 (United Kingdom) 0.05.
Access: platform permission platform_admin or domain_admin (domain_admin: only its domains, domain_id)
Path parameters
| Name | Description |
|---|---|
domain_id |
Domain ID. |
Request body
| Name | Description |
|---|---|
prefix |
Destination prefix in digits, country code first, no + (required). |
rate_per_min |
Price of a minute (required). |
connection_fee |
Fixed price added to every billed call (default 0). |
increment |
Billing step in seconds, 1 to 3600 (default 60). |
min_seconds |
Shortest duration billed, 0 to 3600 seconds (default 0; e.g. 30 with an increment of 6). |
direction |
outbound (default) or inbound (inbound calls are not billed yet). |
label |
Name of the destination (optional). |
enabled |
A disabled rate is ignored (default true). |
currency |
CAD. |
Response: rate: The created rate. 409 conflict when the prefix already has a rate in this direction.
DELETE /api/v1/domains/<domain_id>/voice-rates/<rate_id>
Delete a voice rate (the calls it already billed keep their cost).
Access: platform permission platform_admin or domain_admin (domain_admin: only its domains, domain_id)
Path parameters
| Name | Description |
|---|---|
domain_id |
Domain ID. |
rate_id |
Rate ID. |
Response: success: True.
PUT /api/v1/domains/<domain_id>/voice-rates/<rate_id>
Change a voice rate (the fields given are changed).
Access: platform permission platform_admin or domain_admin (domain_admin: only its domains, domain_id)
Path parameters
| Name | Description |
|---|---|
domain_id |
Domain ID. |
rate_id |
Rate ID. |
Request body
| Name | Description |
|---|---|
prefix |
Destination prefix. |
rate_per_min |
Price of a minute. |
connection_fee |
Fixed price per billed call. |
increment |
Billing step in seconds. |
direction |
outbound or inbound. |
label |
Name of the destination. |
enabled |
Whether the rate applies. |
Response: rate: The rate after the change. 409 conflict when the new prefix already has a rate.
GET /api/v1/domains/<domain_id>/voice-rates/export
Download the whole price list of the domain's calls as a CSV file.
The file sent back unchanged to POST /voice-rates/import gives exactly the same price list. Outbound rates only (the price list bills outbound calls).
Access: platform permission platform_admin or domain_admin (domain_admin: only its domains, domain_id)
Path parameters
| Name | Description |
|---|---|
domain_id |
Domain ID. |
Response: A text/csv attachment (UTF-8 with a byte order mark, comma separated, decimal point), one line per prefix, by prefix. Columns: prefix, rate_per_min, connection_fee, increment, min_seconds, label, enabled (yes or no).
POST /api/v1/domains/<domain_id>/voice-rates/import
Send a price list of the domain's calls as a CSV file: a preview first, then the writing.
Without apply, nothing is written: the answer says what the file would do. With apply=true the same file is written. All or nothing: one invalid line refuses the whole file, and a failed write leaves the price list as it was. Journaled (audit_logs, voice_rates_imported: who, when, mode, file name and counts).
The file is UTF-8 (with or without a byte order mark), 5 MB and 50 000 rates at most, comma or semicolon separated, amounts with a decimal point or a decimal comma, with a title line. Columns: prefix (digits, country code first) and rate_per_min (also read: rate_per_minute, rate) are required; connection_fee, increment, min_seconds, label (also read: description, destination) and enabled (yes or no) are optional. A column the file does not have changes nothing on a prefix already in the price list; a new prefix then takes no connection fee, no label, enabled, and the increment and min_seconds given in the form. Every rate is outbound, in CAD.
Access: platform permission platform_admin or domain_admin (domain_admin: only its domains, domain_id)
Path parameters
| Name | Description |
|---|---|
domain_id |
Domain ID. |
Request body
| Name | Description |
|---|---|
file |
The CSV file (multipart/form-data, required). |
mode |
merge (default: prefixes of the file are added or updated, the others stay) or replace (the prefixes absent from the file are removed). |
apply |
true writes; anything else is a preview. |
increment |
Billing step in seconds given to a new prefix when the file has no increment column, 1 to 3600 (default: the most frequent one of the price list, else 60). |
min_seconds |
Shortest duration billed given to a new prefix when the file has no min_seconds column, 0 to 3600 (default: the most frequent one of the price list, else 0). |
Response: applied: Whether the price list was written. file: Name of the file. mode: merge or replace. lines: Rates read in the file. added: Prefixes added. updated: Prefixes whose rate changes. unchanged: Prefixes of the file already identical in the price list. absent: Prefixes of the price list that the file does not have. removed: Prefixes removed (absent in mode replace, 0 in mode merge). before: Rates in the price list before. after: Rates in the price list after. columns: Columns found in the file. missing_columns: Columns of the downloaded file that this file does not have. new_prefix_defaults: {increment, min_seconds} given to a new prefix when the file has no such column.
Errors 400 invalid_file: the file cannot be read (reason: missing, empty, too_large, not_utf8, no_prefix_column, no_rate_column, no_rows, too_many_rows). 400 invalid_rows: lines are not rates; errors lists the first 200 as {line, column, reason, message} (reason: prefix_invalid, rate_per_min_invalid, connection_fee_invalid, increment_invalid, min_seconds_invalid, label_too_long, enabled_invalid, duplicate, too_many_cells), error_count counts them all.
GET /api/v1/domains/<domain_id>/voice-rates/resolve
The rate that would bill a call to a destination (longest prefix, else the default rate).
Access: platform permission platform_admin or domain_admin (domain_admin: only its domains, domain_id)
Path parameters
| Name | Description |
|---|---|
domain_id |
Domain ID. |
Query parameters
| Name | Description |
|---|---|
destination |
Destination number (required). |
Response: rate: {source ("prefix" or "default"), rate_id, prefix, rate_per_min, connection_fee, increment, currency}, or null when nothing covers the destination. destination: The destination in E.164, or null when it is not a phone number. plan: What the plan of an organization does with this destination before any rate: "included" (Canada or the United States outside the excluded regions: the minutes of the plan, then its price per extra minute), "tollfree" (a toll-free number: free), or null (the rate above applies).
GET /api/v1/domains/<domain_id>/voice-sound-limits
Limits applied to the audio prompts uploaded in the organizations of a domain.
Access: platform permission platform_admin or domain_admin (domain_admin: only its domains, domain_id)
Path parameters
| Name | Description |
|---|---|
domain_id |
Domain ID. |
Response: voice_sound_limits: {max_per_account (20), min_duration_s (1), max_duration_s (90), max_bytes (5 MB), formats (wav, mp3, m4a, ogg, webm)}.
PUT /api/v1/domains/<domain_id>/voice-sound-limits
Change the limits of the audio prompts of a domain (the fields given are changed; the existing sounds are kept).
Access: platform permission platform_admin or domain_admin (domain_admin: only its domains, domain_id)
Path parameters
| Name | Description |
|---|---|
domain_id |
Domain ID. |
Request body
| Name | Description |
|---|---|
max_per_account |
Sounds an organization may keep, 1 to 500 (the system sounds do not count). |
min_duration_s |
Shortest sound in seconds, 0 to 30. |
max_duration_s |
Longest sound in seconds, 1 to 600. |
max_bytes |
Largest file, 10 KB to 12 MB. |
formats |
Accepted formats, among wav, mp3, m4a, ogg, webm. |
Response: voice_sound_limits: The limits after the change.
GET /api/v1/domains/<domain_id>/voice-sounds
System sounds of a domain, the default of every organization that has not recorded its own.
Access: platform permission platform_admin or domain_admin (domain_admin: only its domains, domain_id)
Path parameters
| Name | Description |
|---|---|
domain_id |
Domain ID. |
Response: sounds: List of {id, name, kind "system", key, language, duration_s, size...}. keys: The keys that exist (filtering, name_prompt, invalid_key, voicemail_greeting, paused, recording). languages: fr, en and es.
POST /api/v1/domains/<domain_id>/voice-sounds
Upload the system sound of a key and a language for the whole domain (replaces the previous one). Same checks as the sounds of an organization: formats, size, measured duration.
Access: platform permission platform_admin or domain_admin (domain_admin: only its domains, domain_id)
Path parameters
| Name | Description |
|---|---|
domain_id |
Domain ID. |
Request body
| Name | Description |
|---|---|
file |
The audio file (multipart/form-data). |
key |
filtering, name_prompt, invalid_key, voicemail_greeting, paused or recording. |
language |
fr, en or es. |
name |
Name (default: the file name). |
Response: sound: The created sound.
DELETE /api/v1/domains/<domain_id>/voice-sounds/<sound_id>
Delete a system sound of the domain (the voice servers fall back on their built-in sound).
Access: platform permission platform_admin or domain_admin (domain_admin: only its domains, domain_id)
Path parameters
| Name | Description |
|---|---|
domain_id |
Domain ID. |
sound_id |
Sound ID. |
Response: success: True.
GET /api/v1/domains/<domain_id>/voice-sounds/<sound_id>/file
The audio file of a system sound of the domain.
Access: platform permission platform_admin or domain_admin (domain_admin: only its domains, domain_id)
Path parameters
| Name | Description |
|---|---|
domain_id |
Domain ID. |
sound_id |
Sound ID. |
Response: The file (audio/*).
GET /api/v1/domains/<domain_id>/voice-trunks
The voice trunks a domain can give its numbers.
Access: platform permission platform_admin or domain_admin (domain_admin: only its domains, domain_id)
Path parameters
| Name | Description |
|---|---|
domain_id |
Domain ID. |
Response: voice_trunks: The domain's own trunks, with their credentials (password masked) and numbers (how many numbers name each). platform_trunks: The platform trunks the super admin allowed for the domain: for a domain admin only {id, scope "platform", name null, provider null, description, enabled, outbound_enabled} (description = what the super admin wrote); a super admin also gets the name, host and provider. own_trunks_allowed (boolean): Whether the domain's admins may add their own trunks (the "own providers" permission of the domain, PUT /domains/<id>/sms-account-settings; off by default).
POST /api/v1/domains/<domain_id>/voice-trunks
Create a voice trunk of the domain (a reseller's own trunk).
Access: platform permission platform_admin or domain_admin (domain_admin: only its domains, domain_id)
API keys: refused, 403 forbidden (API key not allowed on this route)
Path parameters
| Name | Description |
|---|---|
domain_id |
Domain ID. |
Request body
| Name | Description |
|---|---|
name |
Trunk name (unique), 1 to 64 characters: no control character or line break, no double quote, backslash, comma, ampersand, pipe, dollar sign, brace or backtick (the name is written into the voice server's commands); 400 validation_error with field otherwise. |
host |
SIP server hostname or IP address (400 validation_error otherwise; in production a domain admin cannot give a private, loopback or link-local address; a public provider address is fine). |
username |
SIP username (a string without control character). |
password |
SIP password. |
provider |
Name of the provider (free text, for the administrators). |
description |
Free description of the trunk (up to 200 characters). |
port |
SIP port (default: 5060). |
server_id |
Voice server that registers this trunk; default: the least loaded enabled server. |
trunk_type |
"registration" (default) or "ip_auth" (the provider identifies us by IP). |
outbound_enabled |
Calls may go out through it (default: yes for registration, no for ip_auth). |
inbound_enabled |
Calls may come in through it (default: yes; false: outbound only; not both false). |
outbound_trunk_id |
A trunk without outbound: another trunk of the same owner, open to outbound, that its outbound calls and forwards take instead (empty: none). |
max_channels |
Simultaneous calls it carries, inbound and outbound together (empty: no limit). |
allowed_ips |
ip_auth only: other IP addresses the carrier calls from (list, or one per line); the host is always accepted. |
Response: voice_trunk: The created trunk, with its credentials. message: Confirmation.
Errors 403 own_accounts_not_allowed: the domain may not add its own providers (PUT /domains/<id>/sms-account-settings), whoever asks; platform trunks are created under /system/voice-trunks.
DELETE /api/v1/domains/<domain_id>/voice-trunks/<trunk_id>
Delete a voice trunk of the domain.
Access: platform permission platform_admin or domain_admin (domain_admin: only its domains, domain_id)
API keys: refused, 403 forbidden (API key not allowed on this route)
Path parameters
| Name | Description |
|---|---|
domain_id |
Domain ID. |
trunk_id |
Trunk ID. |
Response: Success message.
PUT /api/v1/domains/<domain_id>/voice-trunks/<trunk_id>
Update a voice trunk of the domain.
Access: platform permission platform_admin or domain_admin (domain_admin: only its domains, domain_id)
API keys: refused, 403 forbidden (API key not allowed on this route)
Path parameters
| Name | Description |
|---|---|
domain_id |
Domain ID. |
trunk_id |
Trunk ID (a trunk of this domain; a platform trunk answers 404). |
Request body
| Name | Description |
|---|---|
name |
Trunk name (same rules as at the creation, cannot be empty). |
description |
Free description of the trunk. |
host |
SIP server hostname or address (same rule as at creation; the host the trunk already has is not re-checked). |
username |
SIP username. |
password |
SIP password. |
port |
SIP port. |
enabled |
Whether trunk is enabled. |
server_id |
Voice server that registers this trunk. |
outbound_enabled |
Calls may go out through it (outbound calls, forwards). |
inbound_enabled |
Calls may come in through it (false: outbound only; not both false). |
outbound_trunk_id |
A trunk without outbound: another trunk of the domain, open to outbound, that its outbound calls and forwards take instead (empty: none). |
max_channels |
Simultaneous calls it carries, inbound and outbound together (empty: no limit). |
allowed_ips |
ip_auth only: other IP addresses the carrier calls from. |
static_config |
false hands a trunk still marked as defined in the voice server's static configuration to the database (true is ignored). |
Response: voice_trunk: The updated trunk, with its credentials. message: Confirmation.
GET /api/v1/domains/<domain_id>/voice-trunks/status
Get the state of the voice trunks, from the voice server.
Access: platform permission platform_admin or domain_admin (domain_admin: only its domains, domain_id)
Path parameters
| Name | Description |
|---|---|
domain_id |
Domain ID. |
Response: registrations: State of each own trunk of the domain, by trunk name: Registered, Rejected... for a registration trunk; Reachable, Unreachable or Unknown for an IP trunk (the voice server checks it regularly). platform_registrations: State of the platform trunks the domain may use, by trunk id (their names stay hidden).
GET /api/v1/domains/current
Get current domain info based on host header.
Public, never rate limited (a read of the domain resolved for every request anyway).
Access: public (no authentication)
Rate limit: exempt from the general per-address limit
Response: Public domain information.
Errors 404 domain_not_found: no domain matches X-Frontend-Host.
System
Global SMTP, OAuth and provider webhooks.
GET /api/v1/system/app-settings
OAuth client credentials of the platform for the connected applications (Zoho CRM, QuickBooks Online, LeadConnector), for the Infrastructure page.
Access: platform permission platform_admin
Response: app_settings: {zoho {client_id, client_secret ("********" when set), accounts_url (the Zoho accounts server the sign-in starts at), configured, redirect_uri}, quickbooks {client_id, client_secret (masked), environment (sandbox or production), configured, redirect_uri}, ghl {client_id, client_secret (masked), conversation_provider_id (the id of the SMS conversation provider declared in the marketplace app), channel (sms: replaces the default SMS provider of the CRM account; custom: an additional channel), white_label (consent page of marketplace.leadconnectorhq.com), configured, redirect_uri, webhook_url (the delivery URL to declare on the conversation provider)}, updated_at}. redirect_uri is the address to register at the provider; configured says whether a connection is possible. Each application also has keys [{ref, client_id (truncated), environment (sandbox or production), role (main: the keys above; sandbox: the development keys, for the organizations that connect to test companies; previous: keys replaced here, kept for the connections they issued), connected, reconnect (connections that use it)}], unknown {connected, reconnect} (connections bound to a key the platform no longer knows: not refreshed) and unbound {connected, reconnect} (connections from before the binding of keys). Never a secret.
PUT /api/v1/system/app-settings
Change the client credentials of the connected applications (the applications given; a secret omitted, empty or sent as "********" keeps the stored one, null erases it). The secret is never logged.
Access: platform permission platform_admin
Request body
| Name | Description |
|---|---|
zoho |
{client_id, client_secret, accounts_url (one of the Zoho accounts servers, default https://accounts.zoho.com)} (optional). |
quickbooks |
{client_id, client_secret, environment (sandbox or production)} (optional). |
ghl |
{client_id, client_secret, conversation_provider_id, channel (sms or custom), white_label (boolean)} (optional). A replaced client_id is kept as a previous key: the connections it issued keep refreshing with it (each connection only ever uses the key that issued its tokens). Each application also takes forget_keys (a list of ref of keys) to drop previous keys that no linked connection uses. |
Response: app_settings: As GET.
Errors 400 validation_error: a field is wrong (field, e.g. zoho.accounts_url, ghl.channel; <app>.forget_keys for a key that is not a previous one or is still used).
GET /api/v1/system/billing-overview
What every domain bills its organizations this month, summed up by domain (platform administrators).
Access: platform permission platform_admin
Response: month: The current calendar month {start, end}. domains: [{id, name (display name), organizations (how many), subscriptions (active subscriptions), this_month (debits since the 1st), communications (usage debited since the 1st), previous_month (debits of the last calendar month), next (next statements of the subscriptions, estimated; 0 when the domain does not offer subscriptions)}]. totals: {this_month, communications, previous_month, next}.
GET /api/v1/system/call-costs
Report of the rated calls of every domain with their three prices (Coûts C6; platform administrators): what each call cost the platform (cost), what the platform bills the domain (wholesale) and what the organization was billed (retail), with the platform's and the domain's margins, by domain, organization or destination country, or call by call. Same report as GET /domains/<id>/call-costs, over every domain.
Errors are {error, message}: 400 validation_error with field (domain_id, from, to, destination, group_by, organization_id, skip, limit).
Access: platform permission platform_admin
Query parameters
| Name | Description |
|---|---|
domain_id |
Only the calls of this domain. |
from |
ISO 8601 date or datetime, start of the period (UTC; default: the 1st of the current month). |
to |
ISO 8601 date (the whole day) or datetime, end of the period (default: now). At most 366 days. |
organization_id |
Only the calls of this organization. |
destination |
Only the calls to numbers starting with these digits (33, +33, 1514). |
group_by |
domain (default), organization, destination (country of the number) or call (the calls one by one, newest first). |
skip |
Calls to skip (group_by=call; default 0). |
limit |
Calls per page (group_by=call; default 50, at most 100). |
Response: from, to: The period (ISO 8601, UTC; to excluded). group_by: The grouping. rows: [{key, label, calls, billed_minutes, retail, wholesale, domain_margin, without_wholesale, cost, platform_margin, uncosted}], largest retail first. totals: The same fields over the period. truncated (boolean): Only the first 200000 calls are summed. calls: (group_by=call, instead of rows and totals) [{id, start, organization_id, organization, domain_id, domain, direction, destination, country, talk_seconds, billed_seconds, retail, wholesale, wholesale_source, cost, trunk_id, trunk, table_id, table}], with total, skip, limit.
GET /api/v1/system/call-costs/export
The report of GET /system/call-costs as a CSV file (UTF-8 with BOM, comma separated; platform administrators): one line per group and a total line, or one line per call (group_by=call, at most 50000: 413 too_many_rows beyond).
Access: platform permission platform_admin
Query parameters
| Name | Description |
|---|---|
domain_id |
Only the calls of this domain. |
from |
ISO 8601 date or datetime, start of the period (UTC; default: the 1st of the current month). |
to |
ISO 8601 date (the whole day) or datetime, end of the period (default: now). At most 366 days. |
organization_id |
Only the calls of this organization. |
destination |
Only the calls to numbers starting with these digits (33, +33, 1514). |
group_by |
domain (default), organization, destination or call. |
Response: A text/csv attachment. Groups: <group_by>, calls, billed_minutes, retail, wholesale, domain_margin, cost, platform_margin, uncosted, without_wholesale. Calls: start, domain, organization, direction, destination, country, talk_seconds, billed_seconds, retail, wholesale, wholesale_source, cost, trunk, cost_table, call_id.
GET /api/v1/system/domain-billing
What the platform bills every reseller domain at the wholesale prices (F19): this month so far and the last statement of each domain (platform administrators).
Every debit of an organization writes a wholesale charge of its domain (a call: the wholesale amount of its costing; a statement: the plans' wholesale prices; anything else: the domain's ratio of the retail amount). The statements close on the 1st for the month that ended. An exempt domain (telma by default) has no charge.
Access: platform permission platform_admin
Query parameters
| Name | Description |
|---|---|
period |
Month to show (YYYY-MM, default: the current month). |
Response: period: The month shown. domains: [{id, name, exempt, ratio, month {retail, wholesale, count}, last_statement {id, period, total, retail, charges, status, created_at} or null}]. totals: {retail, wholesale} of the month over the domains.
GET /api/v1/system/oauth
Get OAuth provider settings for current domain.
Access: platform permission platform_admin
Response: oauth: As GET /domains/<domain_id>/settings/oauth: Google and Microsoft {enabled}, Apple its credentials (private key masked).
Errors 404 domain_not_found: no domain matches X-Frontend-Host.
PUT /api/v1/system/oauth/<provider>
Turn an OAuth provider on or off for the current domain, and set its Apple credentials (as PUT /domains/<domain_id>/settings/oauth/<provider>).
Google and Microsoft sign in with the platform's credentials: only enabled is read. Apple is replaced as a whole, the private key kept when it is left out, empty or "********". 404 domain_not_found when no domain matches X-Frontend-Host.
Access: platform permission platform_admin
API keys: refused, 403 forbidden (API key not allowed on this route)
Path parameters
| Name | Description |
|---|---|
provider |
Provider name (google, microsoft, apple). |
Request body
| Name | Description |
|---|---|
enabled |
Whether the provider is offered on the domain (default false). |
client_id |
Apple only: Services ID. |
team_id |
Apple only: team ID. |
key_id |
Apple only: key ID. |
private_key |
Apple only: private key (omitted, empty or "********" keeps the stored one). |
Response: google | microsoft | apple: The settings of the provider after the change, under the name of the provider in the URL. message: Confirmation.
GET /api/v1/system/provider-webhooks
List all provider webhooks.
Access: platform permission platform_admin
Response: webhooks: The global provider webhooks. total: Number of webhooks.
POST /api/v1/system/provider-webhooks
Create a new provider webhook.
Access: platform permission platform_admin
Request body
| Name | Description |
|---|---|
provider |
Provider type (one of GET /api/v1/providers). |
display_name |
Display name. |
secret |
Webhook secret (optional, generated if not provided). |
enabled |
Whether the webhook is enabled. |
Response: webhook: The created webhook (with its secret). message: Confirmation.
DELETE /api/v1/system/provider-webhooks/<webhook_id>
Delete a provider webhook.
Access: platform permission platform_admin
Path parameters
| Name | Description |
|---|---|
webhook_id |
Webhook ID. |
Response: Success message.
PUT /api/v1/system/provider-webhooks/<webhook_id>
Update a provider webhook.
Access: platform permission platform_admin
Path parameters
| Name | Description |
|---|---|
webhook_id |
Webhook ID. |
Request body
| Name | Description |
|---|---|
display_name |
Display name (optional). |
enabled |
Whether the webhook is enabled (optional). |
config |
Provider-specific configuration (optional). |
Response: webhook: The updated webhook. message: Confirmation.
POST /api/v1/system/provider-webhooks/<webhook_id>/regenerate
Regenerate provider webhook secret.
Access: platform permission platform_admin
Path parameters
| Name | Description |
|---|---|
webhook_id |
Webhook ID. |
Response: webhook: The webhook with its new secret. message: Confirmation.
GET /api/v1/system/smtp
Get SMTP settings of the current domain (the domain of the host, X-Frontend-Host); a domain admin only for a domain they administer (403 forbidden otherwise, 404 domain_not_found without a domain).
Access: platform permission platform_admin or domain_admin
Response: smtp: {host, port, username, password ("********" when set), from_email, from_name, use_tls}; the defaults when never configured.
PUT /api/v1/system/smtp
Update SMTP settings of the current domain (the domain of the host, X-Frontend-Host); a domain admin only for a domain they administer (403 forbidden otherwise, 404 domain_not_found without a domain).
The settings are replaced as a whole: a field left out takes its default (port 587, use_tls true, an empty string for the others, from_name = display name of the domain), it does not keep its stored value. Only the password is kept when it is left out, empty or sent as "********".
Access: platform permission platform_admin or domain_admin
API keys: refused, 403 forbidden (API key not allowed on this route)
Request body
| Name | Description |
|---|---|
host |
SMTP server host. |
port |
SMTP server port (default 587). |
username |
SMTP username. |
password |
SMTP password (omitted, empty or "********" keeps the stored one). |
from_email |
From email address. |
from_name |
From name (default: the display name of the domain). |
use_tls |
Whether to use TLS (default true). |
Response: smtp: The configuration after the change (password masked). message: Confirmation.
POST /api/v1/system/smtp/test
Test SMTP connection of the current domain (the domain of the host, X-Frontend-Host); a domain admin only for a domain they administer (403 forbidden otherwise, 404 domain_not_found without a domain).
Access: platform permission platform_admin or domain_admin
Request body
| Name | Description |
|---|---|
to_email |
Email address to send test to. |
Response: Success or error message.
GET /api/v1/system/storage
The space the files take on the file store, by domain and the largest organizations (platform administrators; « Stockage des fichiers »).
Access: platform permission platform_admin
Response: domains: [{id, name, organizations (with files), bytes, files, used_gb (files of its organizations), own_bytes, own_files (sounds of the domain itself), estimated_amount (what the next statements would bill beyond the included space)}], the largest first. top: The 20 largest organizations [{id, name, domain_id, domain_name, bytes, files, by_kind, used_gb, billable_gb, estimated_amount}]. platform: {bytes, files} of the files of the platform (its music on hold). unknown: {bytes, files} of the files whose owner is not known (described before 2026-11-02 and not found by python -m app.cli.files_owner). totals: {bytes, files, used_gb} of the whole store.
GET /api/v1/system/voice-security
Security of the voice platform: the switch that suspends every outbound call, the organizations whose outbound calls are suspended and the latest security events.
Access: platform permission platform_admin
Response: state: {outbound_suspended, at (last change, ISO 8601, null before any), by (ID of the account that changed it), note}. suspended: The organizations whose outbound calls are suspended, 500 at most [{organization_id, name, domain_id, suspension {reason (spend, call_cost, manual), detail, at, by}}]. events: The latest 100 security events [{id, organization_id, organization_name, type, detail, at, notified}].
PUT /api/v1/system/voice-security
Suspend or resume every outbound call of the platform (calls of the endpoints, forwards, call codes). The calls in progress are hung up within seconds; incoming calls go on. Journalled; the platform admins receive an alert.
Access: platform permission platform_admin
Request body
| Name | Description |
|---|---|
outbound_suspended |
true suspends, false resumes (required). |
note |
Why (optional string, cut at 500 characters). |
Response: state: {outbound_suspended, at (ISO 8601), by (ID of the account), note}.
GET /api/v1/system/voice-servers
Voice servers the SIP endpoints and trunks are placed on.
A domain admin reads what an endpoint needs to pick a server (id, name, host, port, transport, listeners, enabled, count), never the internal layout of the platform (TLS files, bind address, management API, local networks: super admin only).
Access: platform permission platform_admin or domain_admin
Response: voice_servers: List of servers with their endpoint count.
POST /api/v1/system/voice-servers
Declare a voice server.
Access: platform permission platform_admin
Request body
| Name | Description |
|---|---|
name |
Unique short name, the one the voice server is configured with (e.g. "voice1"). |
host |
IP address or hostname the apps and phones register on. |
port |
SIP port (default 5060). |
transport |
"udp" (default), "tcp" or "tls". |
description |
Free text (optional). |
enabled |
Whether new endpoints may be placed on it (default true). |
listeners |
{udp, tcp, tls: {enabled, port}}: what the server listens on (default UDP 5060 alone). The transport and port given to the apps must be one that is on (400 validation_error, field transport). |
tls |
{cert_file, key_file}: certificate and key of the TLS listener, paths on the voice server (default: the certificate the deployment installs there). |
external_address |
Public IP address or host name the server announces behind a NAT (empty: none). |
bind_address |
Local IPv4 address the voice listens on and sends SIP and RTP from (empty: every address). Needed with an additional (movable) IP given to providers that authenticate by address. |
local_nets |
Networks reached without the NAT (list of CIDR, e.g. ["10.0.0.0/8"]). |
api_url |
Address of the management API of the voice server, as this platform reaches it (e.g. http://10.1.1.180:8090 on the private network; http or https, a host and a port, nothing else). Empty: the voice server on the machine of the platform. Its state, its restart, the state of its endpoints and trunks and the reloads go there. |
Response: voice_server: The created server.
DELETE /api/v1/system/voice-servers/<server_id>
Delete a voice server that has no endpoint nor trunk left.
Access: platform permission platform_admin
Path parameters
| Name | Description |
|---|---|
server_id |
Server ID. |
Response: success: True.
PUT /api/v1/system/voice-servers/<server_id>
Update a voice server. Endpoints already placed on it keep its new address at their next provisioning.
Access: platform permission platform_admin
Path parameters
| Name | Description |
|---|---|
server_id |
Server ID. |
Request body
| Name | Description |
|---|---|
name |
Fields to change (all optional; see POST). The voice server applies listeners, TLS, address and networks at its next start (POST .../restart). |
host |
Fields to change (all optional; see POST). The voice server applies listeners, TLS, address and networks at its next start (POST .../restart). |
port |
Fields to change (all optional; see POST). The voice server applies listeners, TLS, address and networks at its next start (POST .../restart). |
transport |
Fields to change (all optional; see POST). The voice server applies listeners, TLS, address and networks at its next start (POST .../restart). |
description |
Fields to change (all optional; see POST). The voice server applies listeners, TLS, address and networks at its next start (POST .../restart). |
enabled |
Fields to change (all optional; see POST). The voice server applies listeners, TLS, address and networks at its next start (POST .../restart). |
listeners |
Fields to change (all optional; see POST). The voice server applies listeners, TLS, address and networks at its next start (POST .../restart). |
tls |
Fields to change (all optional; see POST). The voice server applies listeners, TLS, address and networks at its next start (POST .../restart). |
external_address |
Fields to change (all optional; see POST). The voice server applies listeners, TLS, address and networks at its next start (POST .../restart). |
bind_address |
Fields to change (all optional; see POST). The voice server applies listeners, TLS, address and networks at its next start (POST .../restart). |
local_nets |
Fields to change (all optional; see POST). The voice server applies listeners, TLS, address and networks at its next start (POST .../restart). |
api_url |
Fields to change (all optional; see POST). The voice server applies listeners, TLS, address and networks at its next start (POST .../restart). |
Response: voice_server: The updated server.
POST /api/v1/system/voice-servers/<server_id>/restart
Write the server's SIP transports and restart it as soon as no call is up (it reads its transports at start only).
Access: platform permission platform_admin
Path parameters
| Name | Description |
|---|---|
server_id |
Server ID. |
Response: status: restart_scheduled (the server restarts once its calls have ended; registered phones come back by themselves).
Errors 502 voice_server_unreachable: the voice server did not answer, or the management API reached is the one of another voice server (nothing is restarted).
GET /api/v1/system/voice-servers/<server_id>/runtime
What the voice server really runs, asked to it: version, SIP transports, audio (RTP) ports, time zone, active calls, and whether its saved settings wait for a restart.
Access: platform permission platform_admin
Path parameters
| Name | Description |
|---|---|
server_id |
Server ID. |
Response: runtime: {server (its name), version, timezone, transports [{name, protocol, bind}], expected_transports, rtp {start, end}, active_calls, restart_needed, ami_connected}, or null when the voice server does not answer. reachable (boolean): Whether the voice server answered.
GET /api/v1/system/voice-settings
Settings of the voice platform, applied by every voice server within 30 seconds.
Access: platform permission platform_admin
Response: voice_settings: {push_wait_seconds (longest wait, after the push that wakes the app, for the app to register again: the endpoint rings as soon as it did, 0 to 15), max_contacts (devices registered at once on one endpoint, 1 to 10, default 3: the app on a phone or a tablet, a SIP desk phone; they all ring together; beyond, the oldest registration is replaced; an endpoint may set its own), inbound_trunk_check (off, warn or enforce: a call that comes in on a trunk not allowed for the number is let through, logged, or refused), callcode {max_failures, failure_window (seconds), require_verified_phone}, test_extensions (600 echo and 601 hello world for the endpoints), updated_at}.
PUT /api/v1/system/voice-settings
Change settings of the voice platform (the fields given).
Access: platform permission platform_admin
Request body
| Name | Description |
|---|---|
push_wait_seconds |
0 to 15 (longest wait for the app woken by a push; 0 = ring at once). |
max_contacts |
1 to 10 (devices registered at once on one endpoint, unless the endpoint sets its own). |
inbound_trunk_check |
off, warn or enforce. |
callcode |
{max_failures (1 to 1000), failure_window (60 to 86400 seconds), require_verified_phone (boolean)}. |
test_extensions |
Boolean. |
Response: voice_settings: As GET.
Platform SMS provider accounts
Accounts at an SMS provider configured once and shared by the allowed domains (super admin).
GET /api/v1/system/sms-accounts
List the platform SMS provider accounts.
Access: platform permission platform_admin
Response: accounts: The platform accounts, secrets masked, each with numbers (how many numbers name it) and domains (the domains allowed to use it, [{id, name}]).
POST /api/v1/system/sms-accounts
Create a platform SMS provider account.
Access: platform permission platform_admin
API keys: refused, 403 forbidden (API key not allowed on this route)
Request body
| Name | Description |
|---|---|
provider |
Provider type, one of GET /api/v1/providers (required). |
name |
Name of the account (required; never shown to a domain admin). |
description |
What the domain admins of the allowed domains see of this account (up to 200 characters), in place of its name and provider. |
config |
Credentials, the fields of GET /api/v1/providers/<provider>/schema. |
webhook_secret |
Secret of the inbound webhook URL (16 to 128 letters, digits, - and _); generated when absent. |
enabled |
Whether the account sends and receives (default true). |
Response: account: The created account (webhook_path = path of its inbound webhook).
DELETE /api/v1/system/sms-accounts/<account_id>
Delete a platform account that no domain and no number uses.
Access: platform permission platform_admin
API keys: refused, 403 forbidden (API key not allowed on this route)
Path parameters
| Name | Description |
|---|---|
account_id |
Account ID. |
Response: message: Confirmation.
Errors 409 conflict: domains are allowed to use it or numbers name it (numbers, domains in the answer).
PUT /api/v1/system/sms-accounts/<account_id>
Update a platform SMS provider account.
Access: platform permission platform_admin
API keys: refused, 403 forbidden (API key not allowed on this route)
Path parameters
| Name | Description |
|---|---|
account_id |
Account ID. |
Request body
| Name | Description |
|---|---|
name |
New name. |
description |
What the domain admins see of the account. |
config |
Credentials to change (a secret left empty or masked keeps its value). |
webhook_secret |
New secret of the inbound webhook URL (16 to 128 letters, digits, - and _); the old URL stops working at once. |
enabled |
Whether the account sends and receives; off, the numbers bound to it cannot send. |
Response: account: The updated account.
PUT /api/v1/system/sms-accounts/<account_id>/domains
Set the domains allowed to use a platform account (the same allowance as PUT /domains/<id>/platform-sms-accounts, seen from the account).
Access: platform permission platform_admin
API keys: refused, 403 forbidden (API key not allowed on this route)
Path parameters
| Name | Description |
|---|---|
account_id |
Account ID. |
Request body
| Name | Description |
|---|---|
domain_ids |
Ids of the domains that may use the account (the whole list; [] = none). |
Response: account: The account with its domains.
Errors 400 validation_error: an id is not a domain. 409 conflict: a domain taken away still has numbers bound to the account (domain_id, numbers in the answer).
GET /api/v1/system/sms-accounts/<account_id>/numbers
The numbers of a platform account (its inventory), every domain included.
Access: platform permission platform_admin
Path parameters
| Name | Description |
|---|---|
account_id |
Account ID. |
Response: numbers: [{id, number, label, domain_id, domain_name, organization_id, organization_name, is_active, removable, assigned, held, pending_order ({status, placed_at} while the provider has not delivered the number, else null)}] (removable false while the number is assigned to an organization, in the trash, held for the balance or not delivered yet).
POST /api/v1/system/sms-accounts/<account_id>/numbers
Add numbers to a platform account: they are created in the pool of a domain allowed to use the account.
Access: platform permission platform_admin
API keys: refused, 403 forbidden (API key not allowed on this route)
Path parameters
| Name | Description |
|---|---|
account_id |
Account ID. |
Request body
| Name | Description |
|---|---|
domain_id |
Domain the numbers belong to (required; a domain allowed to use the account, else 400 validation_error). |
numbers |
Phone numbers in E.164 (up to 500; a text with one number per line is accepted). |
voice_trunk_id |
The voice trunk of the new numbers (a trunk the domain may use, else 400 validation_error); absent = no voice. |
Response: created: The numbers created. created_count: How many. errors: One line per number not created ("<number>: already exists" or "not a phone number"). numbers: The inventory after the change.
DELETE /api/v1/system/sms-accounts/<account_id>/numbers/<phone_id>
Remove a number from a platform account (it leaves the registry).
Access: platform permission platform_admin
API keys: refused, 403 forbidden (API key not allowed on this route)
Path parameters
| Name | Description |
|---|---|
account_id |
Account ID. |
phone_id |
Phone number ID. |
Response: message: Confirmation. numbers: The inventory after the change.
Errors 404 not_found: not a number of this account. 409 number_assigned, number_held or number_order_pending: the number is assigned to an organization, in the trash, held for the balance, or not delivered by the provider yet.
POST /api/v1/system/sms-accounts/<account_id>/numbers/move
Move numbers of a platform account to another domain allowed to use the account (they stay in the registry).
A number assigned to an organization is moved only with release_assigned (it is then taken back from its organization, as by an unassignment: its conversations stay with the organization's team); a number in the trash or held for the balance is never moved. A moved number loses what belonged to its old domain: a voice trunk the new domain may not use (it then arrives without voice: give it a trunk by hand; a platform trunk allowed for the new domain, or no trunk at all, keeps the voice), access number role, a previous owner's settings.
Access: platform permission platform_admin
API keys: refused, 403 forbidden (API key not allowed on this route)
Path parameters
| Name | Description |
|---|---|
account_id |
Account ID. |
Request body
| Name | Description |
|---|---|
phone_ids |
Ids of the numbers to move (required). |
domain_id |
Destination domain (required; a domain allowed to use the account, else 400 validation_error). |
release_assigned |
Also move the numbers assigned to an organization, taking them back from it (default false). |
Response: moved: The numbers moved. moved_count: How many. errors: One line per number not moved. numbers: The inventory after the change.
POST /api/v1/system/sms-accounts/<account_id>/regenerate-secret
Give a platform account a new inbound webhook secret (the old URL stops working at once: change it at the provider).
Access: platform permission platform_admin
API keys: refused, 403 forbidden (API key not allowed on this route)
Path parameters
| Name | Description |
|---|---|
account_id |
Account ID. |
Response: account: The account with its new webhook secret.
POST /api/v1/system/sms-accounts/<account_id>/test
Test the connection of a platform account with its stored credentials.
Access: platform permission platform_admin
Path parameters
| Name | Description |
|---|---|
account_id |
Account ID. |
Response: success: Whether the provider accepted the credentials. message: The provider's answer.
SMS provider accounts of a domain
A domain's own accounts (reseller) and the platform accounts it may use; a number picks its account (provider_account_id).
GET /api/v1/domains/<domain_id>/organizations/<organization_id>/sms-limits
Anti-A2P limits of the text messages of an organization (super admin only): its own values, what applies, and the count of each of its numbers now.
Access: platform permission platform_admin
Path parameters
| Name | Description |
|---|---|
domain_id |
Domain ID. |
organization_id |
Organization ID. |
Response: sms_limits: The organization's overrides {enabled, recipients_per_hour, recipients_per_day, identical_text_per_day, new_account} (null: the domain's value, or for new_account its age). effective: What applies {enabled, new_account, recipients_per_hour, recipients_per_day, identical_text_per_day, sources {<limit>: organization, domain or new_account}}. numbers: Each number of the organization that sends texts, {number, recipients_this_hour, recipients_today, top_text_today (most distinct recipients of one text today)}.
PUT /api/v1/domains/<domain_id>/organizations/<organization_id>/sms-limits
Change the anti-A2P limits of the text messages of an organization (super admin only; the fields given are changed, null removes an override). Journalled.
Access: platform permission platform_admin
Path parameters
| Name | Description |
|---|---|
domain_id |
Domain ID. |
organization_id |
Organization ID. |
Request body
| Name | Description |
|---|---|
enabled |
Apply the limits to this organization (null: the domain's switch). |
recipients_per_hour |
As the domain's (PUT /domains/<id>/sms-limits), taken as is even for a new account; null: the domain's value. |
recipients_per_day |
As the domain's (PUT /domains/<id>/sms-limits), taken as is even for a new account; null: the domain's value. |
identical_text_per_day |
As the domain's (PUT /domains/<id>/sms-limits), taken as is even for a new account; null: the domain's value. |
new_account |
true: the limits of a new account whatever its age; false: never a new account (approved); null: by its age. |
Response: sms_limits: The organization's overrides after the change. effective: What applies.
GET /api/v1/domains/<domain_id>/platform-sms-accounts
Which platform SMS provider accounts a domain may use (super admin only).
Access: platform permission platform_admin
Path parameters
| Name | Description |
|---|---|
domain_id |
Domain ID. |
Response: accounts: Every platform account (no secrets) with allowed (whether the domain may use it) and numbers (how many numbers of the domain name it).
PUT /api/v1/domains/<domain_id>/platform-sms-accounts
Set which platform SMS provider accounts a domain may use (super admin only).
Access: platform permission platform_admin
API keys: refused, 403 forbidden (API key not allowed on this route)
Path parameters
| Name | Description |
|---|---|
domain_id |
Domain ID. |
Request body
| Name | Description |
|---|---|
account_ids |
Ids of the platform accounts the domain may use (the whole list; [] = none). |
Response: accounts: As GET.
Errors 400 validation_error: an id is not a platform account. 409 conflict: an account taken away is still named by numbers of the domain (account_id, numbers in the answer).
PUT /api/v1/domains/<domain_id>/sms-account-settings
What a domain may do with SMS provider accounts (super admin only).
Access: platform permission platform_admin
API keys: refused, 403 forbidden (API key not allowed on this route)
Path parameters
| Name | Description |
|---|---|
domain_id |
Domain ID. |
Request body
| Name | Description |
|---|---|
own_accounts_allowed |
Whether the domain's admins may add their own provider accounts (off by default). Turning it off keeps the accounts already there. |
Response: own_accounts_allowed: The value now in force.
GET /api/v1/domains/<domain_id>/sms-accounts
The SMS provider accounts a domain can bind its numbers to.
Access: platform permission platform_admin or domain_admin (domain_admin: only its domains, domain_id)
Path parameters
| Name | Description |
|---|---|
domain_id |
Domain ID. |
Response: accounts: The domain's own accounts, secrets masked, with numbers (how many numbers name each). platform_accounts: The platform accounts the super admin allowed for the domain: for a domain admin only {id, scope "platform", name null, provider null, description, enabled} (description = what the super admin wrote for them); a super admin also gets the name and provider. own_accounts_allowed (boolean): Whether the domain's admins may add their own provider accounts (set by a super admin; off by default).
POST /api/v1/domains/<domain_id>/sms-accounts
Create an SMS provider account of the domain (a reseller's own account).
Access: platform permission platform_admin or domain_admin (domain_admin: only its domains, domain_id)
API keys: refused, 403 forbidden (API key not allowed on this route)
Path parameters
| Name | Description |
|---|---|
domain_id |
Domain ID. |
Request body
| Name | Description |
|---|---|
provider |
Provider type, one of GET /api/v1/providers (required). |
name |
Name of the account (required). |
config |
Credentials, the fields of GET /api/v1/providers/<provider>/schema. |
webhook_secret |
Secret of the inbound webhook URL (16 to 128 letters, digits, - and _); generated when absent. |
enabled |
Whether the account sends and receives (default true). |
Response: account: The created account (webhook_path = path of its inbound webhook, to configure at the provider).
Errors 403 own_accounts_not_allowed: the domain may not add its own accounts (PUT /domains/<id>/sms-account-settings), whoever asks.
DELETE /api/v1/domains/<domain_id>/sms-accounts/<account_id>
Delete an account of the domain that no number names.
Access: platform permission platform_admin or domain_admin (domain_admin: only its domains, domain_id)
API keys: refused, 403 forbidden (API key not allowed on this route)
Path parameters
| Name | Description |
|---|---|
domain_id |
Domain ID. |
account_id |
Account ID. |
Response: message: Confirmation.
Errors 409 conflict: numbers name it (numbers in the answer).
PUT /api/v1/domains/<domain_id>/sms-accounts/<account_id>
Update an SMS provider account of the domain.
Access: platform permission platform_admin or domain_admin (domain_admin: only its domains, domain_id)
API keys: refused, 403 forbidden (API key not allowed on this route)
Path parameters
| Name | Description |
|---|---|
domain_id |
Domain ID. |
account_id |
Account ID (an account of this domain; a platform account answers 404). |
Request body
| Name | Description |
|---|---|
name |
New name. |
description |
Free description of the account. |
config |
Credentials to change (a secret left empty or masked keeps its value). |
webhook_secret |
New secret of the inbound webhook URL (16 to 128 letters, digits, - and _); the old URL stops working at once. |
enabled |
Whether the account sends and receives. |
Response: account: The updated account.
GET /api/v1/domains/<domain_id>/sms-accounts/<account_id>/numbers
The numbers of an account of the domain (its inventory).
Access: platform permission platform_admin or domain_admin (domain_admin: only its domains, domain_id)
Path parameters
| Name | Description |
|---|---|
domain_id |
Domain ID. |
account_id |
Account ID (an account of this domain; a platform account answers 404). |
Response: numbers: [{id, number, label, domain_id, domain_name, organization_id, organization_name, is_active, removable}].
POST /api/v1/domains/<domain_id>/sms-accounts/<account_id>/numbers
Add numbers to an account of the domain (created in the domain's pool).
Access: platform permission platform_admin or domain_admin (domain_admin: only its domains, domain_id)
API keys: refused, 403 forbidden (API key not allowed on this route)
Path parameters
| Name | Description |
|---|---|
domain_id |
Domain ID. |
account_id |
Account ID. |
Request body
| Name | Description |
|---|---|
numbers |
Phone numbers in E.164 (up to 500; a text with one number per line is accepted). |
Response: created: The numbers created. created_count: How many. errors: One line per number not created. numbers: The inventory after the change.
DELETE /api/v1/domains/<domain_id>/sms-accounts/<account_id>/numbers/<phone_id>
Remove a number from an account of the domain (it leaves the registry).
Access: platform permission platform_admin or domain_admin (domain_admin: only its domains, domain_id)
API keys: refused, 403 forbidden (API key not allowed on this route)
Path parameters
| Name | Description |
|---|---|
domain_id |
Domain ID. |
account_id |
Account ID. |
phone_id |
Phone number ID. |
Response: message: Confirmation. numbers: The inventory after the change.
Errors 404 not_found: not a number of this account. 409 number_assigned or number_held: assigned to an organization, in the trash or held.
POST /api/v1/domains/<domain_id>/sms-accounts/<account_id>/regenerate-secret
Give an account of the domain a new inbound webhook secret (the old URL stops working at once).
Access: platform permission platform_admin or domain_admin (domain_admin: only its domains, domain_id)
API keys: refused, 403 forbidden (API key not allowed on this route)
Path parameters
| Name | Description |
|---|---|
domain_id |
Domain ID. |
account_id |
Account ID. |
Response: account: The account with its new webhook secret.
POST /api/v1/domains/<domain_id>/sms-accounts/<account_id>/test
Test the connection of an account of the domain with its stored credentials.
Access: platform permission platform_admin or domain_admin (domain_admin: only its domains, domain_id)
Path parameters
| Name | Description |
|---|---|
domain_id |
Domain ID. |
account_id |
Account ID. |
Response: success: Whether the provider accepted the credentials. message: The provider's answer.
GET /api/v1/domains/<domain_id>/sms-limits
Anti-A2P limits of the text messages of a domain (super admin only).
Every SMS or MMS that an organization of the domain sends (web, app, API, integrations, connected apps, assistants, website widget) is counted per sending number; beyond a limit the send is refused with 429 sms_limit_reached and the platform admins get one e-mail per number, limit and period. The automatic answers to a text received (welcome, after-hours reply, STOP/START/HELP confirmations), the questionnaires by text and the verification codes are not counted.
Access: platform permission platform_admin
Path parameters
| Name | Description |
|---|---|
domain_id |
Domain ID. |
Response: sms_limits: {enabled (true by default), recipients_per_hour (distinct recipients of one number in a clock hour, 100 by default), recipients_per_day (in a day, Eastern time, 300 by default), identical_text_per_day (distinct recipients of the same text from one number in a day, 50 by default; case, accents, punctuation and spacing ignored, digits kept), new_account_days (an organization created less than this many days ago is a new account, 14 by default; 0: none), new_account_factor (share of the limits a new account gets, 0.5 by default)}.
PUT /api/v1/domains/<domain_id>/sms-limits
Change the anti-A2P limits of the text messages of a domain (super admin only; the fields given are changed). Journalled.
Access: platform permission platform_admin
Path parameters
| Name | Description |
|---|---|
domain_id |
Domain ID. |
Request body
| Name | Description |
|---|---|
enabled |
Apply the limits (true by default). |
recipients_per_hour |
Distinct recipients of one number in a clock hour, 1 to 5000. |
recipients_per_day |
Distinct recipients of one number in a day (Eastern time), 1 to 10000. |
identical_text_per_day |
Distinct recipients of the same text from one number in a day, 1 to 10000. |
new_account_days |
Age (days) under which an organization is a new account, 0 to 365 (0: none). |
new_account_factor |
Share of the domain's limits a new account gets, 0.05 to 1. |
Response: sms_limits: The limits after the change.
Platform number providers
The platform's accounts at the providers that sell numbers (super admin); a domain admin only sees their description.
GET /api/v1/system/number-providers
List the number providers of the platform.
Access: platform permission platform_admin
Response: number_providers: [{id, provider, name, description, enabled, base_url, credentials {username, password (masked)}, sms_account_id, voice_trunk_id, costs {local_setup, local_monthly, port_in, currency}, port_in {trunks, reseller}, numbers (how many numbers were bought from it), capabilities}]. providers: The providers an account can be opened at.
POST /api/v1/system/number-providers
Add a number provider account.
Access: platform permission platform_admin
Request body
| Name | Description |
|---|---|
provider |
The provider (one of providers in GET) (required). |
name |
Name for the super admin (required); never shown to a domain admin. |
description |
What the domain admins see of it (up to 200 characters). |
base_url |
Base URL of its API (default: the provider's). |
credentials |
{username, password}: the access to its API. |
sms_account_id |
The platform SMS account, at the same provider, the numbers bought here send through (required). The domains allowed to use that SMS account may buy from this provider. |
voice_trunk_id |
The platform voice trunk on which the provider delivers the calls (given to the numbers bought, for the domains allowed to use it). |
costs |
{local_setup, local_monthly, port_in, currency (CAD or USD)}: what the provider charges us per number bought, per month and per number ported in (its API gives no price). |
port_in |
{trunks: the provider's circuit ids where ported numbers land (a port request is refused without one), reseller: name sent with the port requests (optional)}. |
enabled |
Default true. |
Response: number_provider: The account (as in GET).
DELETE /api/v1/system/number-providers/<account_id>
Delete a number provider account no number was bought from (disable it otherwise).
Access: platform permission platform_admin
Path parameters
| Name | Description |
|---|---|
account_id |
Account ID. |
Response: message: Confirmation.
Errors 409 conflict: numbers were bought from it (numbers in the answer).
PUT /api/v1/system/number-providers/<account_id>
Change a number provider account (the fields given change; a password empty or masked is kept).
Access: platform permission platform_admin
Path parameters
| Name | Description |
|---|---|
account_id |
Account ID. |
Request body
| Name | Description |
|---|---|
name |
As POST (provider cannot change). |
description |
As POST (provider cannot change). |
base_url |
As POST (provider cannot change). |
credentials |
As POST (provider cannot change). |
sms_account_id |
As POST (provider cannot change). |
voice_trunk_id |
As POST (provider cannot change). |
costs |
As POST (provider cannot change). |
port_in |
As POST (provider cannot change). |
enabled |
As POST (provider cannot change). |
Response: number_provider: The account.
POST /api/v1/system/number-providers/<account_id>/test
Check the connection to a number provider (one read call).
Access: platform permission platform_admin
Path parameters
| Name | Description |
|---|---|
account_id |
Account ID. |
Response: ok: Whether the provider answered and accepted the credentials. message: What happened.
Platform providers
What the platform has at each provider, grouped by type: SMS accounts, trunks, number provider accounts, numbers and their capabilities; the voice trunk of a number (super admin).
GET /api/v1/system/did-inventory
The inventory of a number provider account: the numbers the provider says the account holds, read now, set against the numbers of Telma.
The provider gives only the numbers and whether SMS is on: the comparison is about existence and SMS. A number of Telma is at the provider when it was bought from it, sends through one of its SMS accounts or its calls come in through one of its trunks.
Access: platform permission platform_admin
Query parameters
| Name | Description |
|---|---|
provider_id |
The number provider account (required). |
Response: account_id: The account. read_at: When the provider was read (ISO 8601). provider_count: How many numbers the provider lists. counts: {matched, sms_mismatch, provider_only, ignored, elsewhere, ours_only, pending, duplicates}. matched: [{number, phone_id, label, domain_id, domain_name, organization_id, organization_name, is_active, provider_sms, our_sms, sms_mismatch}]: held at the provider and in Telma at this provider. provider_only: [{number, provider_sms}]: held at the provider, unknown to Telma (to import or to ignore). ignored: [{number, provider_sms, reason, at, by}]: numbers of provider_only left aside, with the reason. elsewhere: [{number, phone_id, label, domain_id, domain_name, organization_id, organization_name, is_active, provider_sms, provider}]: held at the provider, known to Telma but bound to another provider. ours_only: [{number, phone_id, label, domain_id, domain_name, organization_id, organization_name, is_active, our_sms, bought_here, missing_since}]: in Telma at this provider, not listed by it. pending: [{number, phone_id, label, domain_id, domain_name, organization_id, organization_name, is_active, pending_order, provider_sms}]: ordered and not delivered yet (not a gap). duplicates: [{number, count, ids}]: numbers held by more than one record of Telma. note: in each row of a number of Telma (matched, elsewhere, ours_only, pending), the note of the platform ({text, at, by}, PUT /system/phone-numbers/<id>/note) or null.
POST /api/v1/system/did-inventory/ignored
Leave aside a number the account holds and Telma does not know (a number kept at the provider on purpose, to give back...), with the reason. Reversible. Journaled.
Access: platform permission platform_admin
Request body
| Name | Description |
|---|---|
provider_id |
The number provider account (required). |
number |
The number, in E.164 format (required). |
reason |
Why it is left aside, 1 to 200 characters (required). |
Response: ignored: {number, reason, at, by}.
DELETE /api/v1/system/did-inventory/ignored/<number>
Bring an ignored number back among the numbers to settle. Journaled.
Access: platform permission platform_admin
Path parameters
| Name | Description |
|---|---|
number |
The number, in E.164 format. |
Query parameters
| Name | Description |
|---|---|
provider_id |
The number provider account (required). |
Response: success: True.
POST /api/v1/system/did-inventory/import
Put numbers the account holds and Telma does not know into the pool of a domain, as if bought there.
Each number is bound to the account, its SMS account and its voice trunk (when the domain may use them), active and free in the pool; SMS is turned on at the provider when it is off. Nothing is charged. Journaled.
Access: platform permission platform_admin
Request body
| Name | Description |
|---|---|
provider_id |
The number provider account (required). |
domain_id |
The domain whose pool receives the numbers; it must be allowed to use the account (required). |
numbers |
Numbers in E.164 format, at most 100 (required). |
Response: results: [{number, status (imported, known: already in Telma, not_held: the provider does not list it), phone_id, message (SMS could not be turned on)}], in the order asked.
PUT /api/v1/system/phone-numbers/<phone_id>/note
Leave a note on a number (a number the provider does not list, kept for a test...), seen by the platform only: on the Providers page and in the inventory at the provider. Journaled.
Access: platform permission platform_admin
Path parameters
| Name | Description |
|---|---|
phone_id |
Phone number ID. |
Request body
| Name | Description |
|---|---|
note |
The text, 500 characters at most; null or empty removes the note (required). |
Response: note: {text, at, by} or null.
PUT /api/v1/system/phone-numbers/<phone_id>/voice
Set the voice trunk of a number: the trunk its calls come in through (and go out through when it allows it).
The trunk must be one the number's domain may use (a platform trunk allowed for it, or a trunk of the domain).
Access: platform permission platform_admin
Path parameters
| Name | Description |
|---|---|
phone_id |
Phone number ID. |
Request body
| Name | Description |
|---|---|
voice_trunk_id |
The trunk; null turns the voice off (required). |
Response: phone_number: The number (as in the domain's list).
GET /api/v1/system/providers
The providers of the platform: for each type, its SMS accounts, voice trunks and number provider accounts.
The details of each piece come from GET /system/sms-accounts, /system/voice-trunks and /system/number-providers.
Access: platform permission platform_admin
Response: providers: [{type (one of the types of GET /api/v1/providers, or the type a record names), label, sms_account_ids, voice_trunk_ids, number_provider_ids, numbers (how many numbers use the provider)}].
GET /api/v1/system/providers/<kind>/numbers
The numbers at a provider, with their capabilities.
A number is at the provider when it sends through one of its SMS accounts, or its calls come in through one of its trunks, or it was bought from it.
Access: platform permission platform_admin
Path parameters
| Name | Description |
|---|---|
kind |
The provider type (as GET /system/providers). |
Response: numbers: [{id, number, label, domain_id, domain_name, organization_id, organization_name, is_active, removable, assigned, held, pending_order ({status, placed_at} while the provider has not delivered the number, else null), note ({text, at, by} left by the platform, else null), sms {account_id, account_name, account_provider, mms (the provider sends MMS), mms_configured (the account has its MMS account id)}, voice {enabled, trunk_id, trunk_name, trunk_scope (platform or domain), direction (inbound or both), missing_trunk (voice on without a trunk: the calls come in by the address of the provider's IP trunk)}}], sorted by number.
Platform number porting
Every port request with the provider's reference, the cancellations to do by hand, the follow-up on demand (super admin).
GET /api/v1/system/port-requests
Every port request of the platform, with the provider's account and reference.
Access: platform permission platform_admin
Query parameters
| Name | Description |
|---|---|
state |
open, closed or a state (as GET /port-requests); cancel_requested lists the cancellations to ask the provider. |
domain_id |
Only this domain. |
skip |
Offset (default 0). |
limit |
Page size (default 50, at most 100). |
Response: port_requests: As GET /port-requests, plus provider_reference and account {id, name}. total, skip, limit: The page.
GET /api/v1/system/port-requests/<request_id>
A port request with the provider's events (caption, date and reference of each).
Access: platform permission platform_admin
Path parameters
| Name | Description |
|---|---|
request_id |
Port request ID. |
Response: port_request: As GET /port-requests/<id>, plus provider_reference (null while the provider gave none: an order number made of zeros is none), provider_answer {at, text, truncated} (the provider's whole answer to the request, as it came, up to 8000 characters), account {id, name} and, on each event, caption, provider_at and reference.
POST /api/v1/system/port-requests/<request_id>/cancel-done
The cancellation was done at the provider (by hand): the request is closed (cancelled; completed when some numbers had already arrived).
Access: platform permission platform_admin
Path parameters
| Name | Description |
|---|---|
request_id |
Port request ID. |
Response: port_request: As GET /system/port-requests/<id>.
Errors 409 conflict: no cancellation is waiting.
POST /api/v1/system/port-requests/<request_id>/cancel-refused
The provider could not cancel (too late, already moved): the request goes on, the requester is told why.
Access: platform permission platform_admin
Path parameters
| Name | Description |
|---|---|
request_id |
Port request ID. |
Request body
| Name | Description |
|---|---|
reason |
What the provider said (up to 300 characters). |
Response: port_request: As GET /system/port-requests/<id>.
Errors 409 conflict: no cancellation is waiting.
POST /api/v1/system/port-requests/follow
Read the providers' port events now and put in service the numbers that arrived (the periodic task does the same every 5 minutes).
Access: platform permission platform_admin
Response: result: {
Platform 9-1-1
The 9-1-1 addresses waiting, the batches to send to the provider (a file in its format) and their confirmation (super admin).
GET /api/v1/system/e911
9-1-1 subscriptions of the platform: counts, changes waiting for a batch, the last batches.
Access: platform permission platform_admin
API keys: refused, 403 forbidden (API key not allowed on this route)
Response: counts {pending, sent, active, registered}, pending [{phone_number_id, number, organization, action (add, update, delete), porting (still being ported: waits), address}], batches [{id, created_at, confirmed_at, rows, file_name}], sent_today (the day's file already left), next_send (ISO, when the next file leaves).
POST /api/v1/system/e911/batches
Send the day's file to the provider now instead of at the daily hour (the provider wants one file per day: the platform sends it by itself every business day). GET .../file gives its spreadsheet.
Access: platform permission platform_admin
API keys: refused, 403 forbidden (API key not allowed on this route)
Response: batch: {id, created_at, sent_at, sent_to, send_error, confirmed_at, rows [{phone_number_id, number, action, address}], file_name}, 201 (send_error set when the e-mail could not leave: it is retried); 200 with batch null when nothing is pending.
Errors 409 already_sent_today: the day's file already left; what is pending goes with the next one.
POST /api/v1/system/e911/batches/<batch_id>/confirm
The provider has done the batch: its numbers become active (or lose their address). Journalled.
Access: platform permission platform_admin
API keys: refused, 403 forbidden (API key not allowed on this route)
Response: batch: As in POST /system/e911/batches. 409 already_confirmed.
GET /api/v1/system/e911/batches/<batch_id>/file
The spreadsheet of a batch, in the provider's format (one row per number: A add, U update, D delete).
Access: platform permission platform_admin
API keys: refused, 403 forbidden (API key not allowed on this route)
Platform voice trunks
SIP trunks configured once by the super admin and shared by the allowed domains; a domain admin only sees their description.
GET /api/v1/system/voice-cost-tables
The cost tables of the platform's providers (POST /system/voice-cost-tables/import creates one from the provider's files).
Access: platform permission platform_admin
Query parameters
| Name | Description |
|---|---|
archived |
true to include the tables replaced by a newer one. |
Response: voice_cost_tables: [{id, name, currency, scope, effective_at, source, rows, status, replaces, created_at, trunks}] (trunks: the names of the trunks that use the table).
GET /api/v1/system/voice-cost-tables/<table_id>/export
Download a cost table (active or archived) as a CSV file.
The file sent back unchanged to POST /system/voice-cost-tables/import, with the table's currency, gives a table with exactly the same rates.
Access: platform permission platform_admin
Path parameters
| Name | Description |
|---|---|
table_id |
Cost table ID. |
Response: A text/csv attachment (UTF-8 with a byte order mark, comma separated, decimal point), one line per prefix, by prefix. Columns: prefix, description, rate_per_minute (in the table's currency), connection_fee (empty: none).
GET /api/v1/system/voice-cost-tables/<table_id>/lookup
The rate a cost table gives a number (longest prefix).
Access: platform permission platform_admin
Path parameters
| Name | Description |
|---|---|
table_id |
Cost table ID. |
Query parameters
| Name | Description |
|---|---|
number |
The number, E.164 or with its international prefix (required). |
Response: rate: {prefix, description, rate_per_minute, connection_fee} or null when no prefix covers the number. currency: The table's currency.
POST /api/v1/system/voice-cost-tables/import
Create a cost table from the files of a provider: a preview first, then the writing.
Without apply, nothing is written: the answer says what the files hold and what changes. With apply=true the table is created whole (it serves only once all its rates are written), the trunks chosen take it, and a table that no trunk names any more is archived (it stays downloadable). A table is never edited in place. Journaled (audit_logs, voice_cost_table_imported: who, when, name, currency, rows, files, trunks, archived tables).
Each file is UTF-8 (with or without a byte order mark), 5 MB at most, comma or semicolon separated, amounts with a decimal point or a decimal comma. Columns are recognized by their title, after any title-less lines: the prefix is prefix (E.164 digits, a leading + or 011 dropped) or npanxx (6 digits, prefixed with 1); the rate per minute is rate (usd) or rate usd (the table's currency), else rate_per_minute, else rate; optional description (else product (market), destination) and connection_fee. The files are read in the order sent: a prefix found in a later file replaces the earlier one (send the most precise file last). A line that is not a rate is left out and reported.
Access: platform permission platform_admin
Request body
| Name | Description |
|---|---|
name |
Name of the table, 1 to 80 characters (multipart/form-data, required). The active table of the same name is replaced: its trunks take the new table. |
currency |
USD or CAD (required). |
files |
The CSV files, 1 to 5, in the order they are read (repeat the field). |
trunk_ids |
Ids of the platform trunks that take the new table (repeat the field; none: the table serves no call until a trunk names it). |
apply |
true writes; anything else is a preview. |
Response: applied: Whether the table was created. name: Name of the table. currency: Its currency. rows: Prefixes of the table. skipped: Lines left out, all files together. files: Per file, in order: {file, rows, skipped, replaced (prefixes that replace one of an earlier file), rejected: the first 200 lines left out as {line, reason}} (reason: prefix_invalid, rate_invalid, connection_fee_invalid, too_many_cells). trunks: The trunks that take the table: [{id, name}] (those chosen and those of the active table of the same name). comparisons: Per table that the new one replaces on those trunks: {table {id, name, currency, rows}, trunks (names), archived (no trunk names it any more), same_currency, added, removed, changed, unchanged} (changed and unchanged are null when the currencies differ). voice_cost_table: The created table, as GET /system/voice-cost-tables (only when applied).
Errors 400 validation_error: name, currency, files or trunk_ids is invalid (field). 400 invalid_file: a file cannot be read (file, reason: missing, empty, too_large, not_utf8, no_prefix_column, no_rate_column, no_rows, too_many_rows).
GET /api/v1/system/voice-pricing
The platform's margin on the voice calls (the price billed to the domains), and the USD to CAD rate.
Access: platform permission platform_admin
Response: voice_pricing: {markup_percent, min_markup_per_minute, min_billed_seconds, increment_seconds, connection_fee, usd_to_cad}.
PUT /api/v1/system/voice-pricing
Change the platform's margin (the fields given).
Access: platform permission platform_admin
Request body
| Name | Description |
|---|---|
markup_percent |
Margin on the cost, 0 to 1000 %. |
min_markup_per_minute |
The margin per minute is at least this (CAD), 0 to 100. |
min_billed_seconds |
A call that connects bills at least this, 0 to 600 seconds. |
increment_seconds |
Billed in blocks of this, 1 to 600 seconds (1: by the second; 6, 30, 60...). |
connection_fee |
Per call that connects (CAD), 0 to 100. |
usd_to_cad |
Rate applied to a cost table in USD, 0.5 to 3. |
Response: voice_pricing: As GET.
GET /api/v1/system/voice-trunks
List the platform voice trunks.
Access: platform permission platform_admin
Response: voice_trunks: The platform trunks with their credentials (password masked), numbers (how many numbers name each) and domains (the domains allowed to use it, [{id, name}]).
POST /api/v1/system/voice-trunks
Create a platform voice trunk.
Access: platform permission platform_admin
API keys: refused, 403 forbidden (API key not allowed on this route)
Request body
| Name | Description |
|---|---|
name |
Trunk name (unique), 1 to 64 characters, no character that would change a command of the voice server (see POST /domains/<id>/voice-trunks); never shown to a domain admin. |
description |
What the domain admins of the allowed domains see of this trunk (up to 200 characters), in place of its name and host. |
host |
SIP server hostname or IP address. |
username |
SIP username. |
password |
SIP password. |
provider |
Name of the provider (free text, for the administrators). |
port |
SIP port (default: 5060). |
server_id |
Voice server that registers this trunk; default: the least loaded enabled server. |
trunk_type |
"registration" (default) or "ip_auth" (the provider identifies us by IP). |
outbound_enabled |
Calls may go out through it (default: yes for registration, no for ip_auth). |
inbound_enabled |
Calls may come in through it (default: yes; false: outbound only; not both false). |
outbound_trunk_id |
A trunk without outbound: another trunk of the same owner, open to outbound, that its outbound calls and forwards take instead (empty: none). |
max_channels |
Simultaneous calls it carries, inbound and outbound together (empty: no limit). |
allowed_ips |
ip_auth only: other IP addresses the carrier calls from (list, or one per line). |
cost_table_id |
The platform cost table of the provider (GET /system/voice-cost-tables): what a call through the trunk costs us (empty: none). |
Response: voice_trunk: The created trunk, with its credentials and cost_table_id, cost_table_name.
DELETE /api/v1/system/voice-trunks/<trunk_id>
Delete a platform trunk that no domain and no number uses.
Access: platform permission platform_admin
API keys: refused, 403 forbidden (API key not allowed on this route)
Path parameters
| Name | Description |
|---|---|
trunk_id |
Trunk ID. |
Response: message: Confirmation.
Errors 409 conflict: domains are allowed to use it or numbers name it (numbers, domains in the answer).
PUT /api/v1/system/voice-trunks/<trunk_id>
Update a platform voice trunk.
Access: platform permission platform_admin
API keys: refused, 403 forbidden (API key not allowed on this route)
Path parameters
| Name | Description |
|---|---|
trunk_id |
Trunk ID. |
Request body
| Name | Description |
|---|---|
name |
Trunk name. |
description |
What the domain admins see of the trunk. |
host |
SIP server hostname or address. |
username |
SIP username. |
password |
SIP password (empty or "********" keeps it). |
port |
SIP port. |
enabled |
Whether the trunk is enabled. |
server_id |
Voice server that registers this trunk. |
outbound_enabled |
Calls may go out through it. |
inbound_enabled |
Calls may come in through it (default: yes; false: outbound only; not both false). |
outbound_trunk_id |
A trunk without outbound: another trunk of the same owner, open to outbound, that its outbound calls and forwards take instead (empty: none). |
max_channels |
Simultaneous calls it carries (empty: no limit). |
allowed_ips |
ip_auth only: other IP addresses the carrier calls from. |
cost_table_id |
The platform cost table of the provider (empty: none). |
static_config |
false hands a trunk still marked as defined in the voice server's static configuration to the database (every new trunk is generated from the database; true is ignored). |
Response: voice_trunk: The updated trunk.
PUT /api/v1/system/voice-trunks/<trunk_id>/domains
Set the domains allowed to use a platform trunk (the same allowance as PUT /domains/<id>/platform-voice-trunks, seen from the trunk).
Access: platform permission platform_admin
API keys: refused, 403 forbidden (API key not allowed on this route)
Path parameters
| Name | Description |
|---|---|
trunk_id |
Trunk ID. |
Request body
| Name | Description |
|---|---|
domain_ids |
Ids of the domains that may use the trunk (the whole list; [] = none). |
Response: voice_trunk: The trunk with its domains.
Errors 400 validation_error: an id is not a domain. 409 conflict: a domain taken away still has numbers on the trunk (domain_id, numbers in the answer).
GET /api/v1/system/voice-trunks/status
State of the platform trunks, from the voice server.
Access: platform permission platform_admin
Response: registrations: State of each platform trunk, by trunk name: a registration trunk reads Registered, Rejected, Unregistered...; an IP trunk (it does not register) Reachable or Unreachable, from the regular checks of the voice server, or Unknown before the first answer.
Profiles and permissions
Catalogue of the permissions, profiles of the organization and of the domain, profiles of a member, platform permissions of an account.
GET /api/v1/domains/<domain_id>/profiles
The profiles a domain offers to its organizations (copies of the built-in ones the reseller adjusts).
Access: platform permission platform_admin or domain_admin (domain_admin: only its domains, domain_id)
API keys: refused, 403 forbidden (API key not allowed on this route)
Path parameters
| Name | Description |
|---|---|
domain_id |
Domain ID. |
Response: profiles: [{id, name, permissions, domain_id}]. builtin_profiles: The built-in profiles, to copy.
POST /api/v1/domains/<domain_id>/profiles
Create a profile of the domain, offered to all its organizations.
Access: platform permission platform_admin or domain_admin (domain_admin: only its domains, domain_id)
API keys: refused, 403 forbidden (API key not allowed on this route)
Path parameters
| Name | Description |
|---|---|
domain_id |
Domain ID. |
Request body
| Name | Description |
|---|---|
name |
1 to 60 characters (required). |
permissions |
Permission names of GET /api/v1/permissions (required unless copy_of is given). |
copy_of |
A built-in profile (builtin:admin, builtin:user) or another profile of the domain to start from. |
Response: profile: The created profile.
DELETE /api/v1/domains/<domain_id>/profiles/<profile_id>
Delete a profile of the domain; refused while members hold it (409 profile_in_use).
Access: platform permission platform_admin or domain_admin (domain_admin: only its domains, domain_id)
API keys: refused, 403 forbidden (API key not allowed on this route)
Path parameters
| Name | Description |
|---|---|
domain_id |
Domain ID. |
profile_id |
Profile ID. |
Response: success: True.
PUT /api/v1/domains/<domain_id>/profiles/<profile_id>
Rename a profile of the domain or change its permissions (every member holding it in the domain's organizations gets the change).
Access: platform permission platform_admin or domain_admin (domain_admin: only its domains, domain_id)
API keys: refused, 403 forbidden (API key not allowed on this route)
Path parameters
| Name | Description |
|---|---|
domain_id |
Domain ID. |
profile_id |
Profile ID. |
Request body
| Name | Description |
|---|---|
name |
1 to 60 characters (optional). |
permissions |
Permission names of GET /api/v1/permissions, replacing the list (optional). |
Response: profile: The profile.
Errors 409 last_admin: an organization would have nobody left with members.admin (and none goes beyond its plan); organizations as above.
PUT /api/v1/organizations/current/members/<user_id>/profiles
Give profiles to a member of the current organization (they add up: the member holds every permission of each).
The list replaces the member's profiles. The member's real-time rooms follow at once. 404 not_found when the user is not a member of the current organization; 400 validation_error (field profile_ids) for an empty list or a profile the organization cannot give.
Access: permission members.admin in the organization (profiles)
API keys: refused, 403 forbidden (API key not allowed on this route)
Path parameters
| Name | Description |
|---|---|
user_id |
User ID of the member. |
Request body
| Name | Description |
|---|---|
profile_ids |
One or more ids of GET /api/v1/organizations/current/profiles (required). |
Response: member: {user_id, profile_ids, role (the former role it amounts to: admin, manager or agent; a copy), permissions}.
Errors 403 forbidden: the member holds a permission the caller does not hold in the organization, or the profiles give one (field profile_ids). 409 last_admin: the organization would have nobody left who holds members.admin.
GET /api/v1/organizations/current/profiles
The profiles members of the current organization can be given: the built-in ones (Admin, User), those of its domain, its own.
404 no_organization without a current organization.
Access: permission members.manage or members.admin in the organization (profiles)
API keys: refused, 403 forbidden (API key not allowed on this route)
Response: profiles: [{id, key, name, permissions, builtin, organization_id, domain_id (profiles of the domain and of the organization), members (members of the organization who hold it)}], the built-in ones first, then those of the domain, then the organization's own.
POST /api/v1/organizations/current/profiles
Create a profile of the current organization.
404 no_organization without a current organization; 400 validation_error (field name, permissions or copy_of) for a bad name, an unknown permission or an unknown profile to copy.
Access: permission members.admin in the organization (profiles)
API keys: refused, 403 forbidden (API key not allowed on this route)
Request body
| Name | Description |
|---|---|
name |
1 to 60 characters (required). |
permissions |
Permission names of the organization (GET /api/v1/permissions); required unless copy_of is given. |
copy_of |
Id of a profile to start from (builtin:admin, builtin:user, one of the domain or of the organization): its permissions when permissions is absent. |
Response: profile: The created profile.
DELETE /api/v1/organizations/current/profiles/<profile_id>
Delete a profile of the current organization; refused while members hold it (409 profile_in_use).
Access: permission members.admin in the organization (profiles)
API keys: refused, 403 forbidden (API key not allowed on this route)
Path parameters
| Name | Description |
|---|---|
profile_id |
Profile ID. |
Response: success: True.
PUT /api/v1/organizations/current/profiles/<profile_id>
Rename a profile of the current organization or change its permissions (the built-in ones and those of the domain cannot change here: 404).
Access: permission members.admin in the organization (profiles)
API keys: refused, 403 forbidden (API key not allowed on this route)
Path parameters
| Name | Description |
|---|---|
profile_id |
Profile ID. |
Request body
| Name | Description |
|---|---|
name |
1 to 60 characters (optional). |
permissions |
Permission names of GET /api/v1/permissions, replacing the list (optional). |
Response: profile: The profile. The members who hold it get its new permissions at once.
Errors 409 last_admin: the organization would have nobody left with members.admin; nothing is changed.
GET /api/v1/permissions
The catalogue of permissions.
Any authenticated session; closed to API keys.
Access: authenticated (JWT or API key)
API keys: refused, 403 forbidden (API key not allowed on this route)
Response: organization: The permissions of an organization a profile can hold, in the order of the screens: [{name, description}]. platform: The permissions of the platform an account can hold: platform_admin (every domain and organization), domain_admin (the domains of the account), support. builtin_profiles: The built-in profiles of every organization, never changed: [{id, key, name, permissions}].
PUT /api/v1/users/<user_id>/platform-permissions
The platform permissions of an account (platform_admin only). The sessions of the account end (its rights changed).
Never on one's own account (403 forbidden). The stored role follows (super_admin, domain_admin, or the role of its current organization's profiles). support is the grant of PUT /api/v1/users/<id> (permissions).
Access: platform permission platform_admin
API keys: refused, 403 forbidden (API key not allowed on this route)
Path parameters
| Name | Description |
|---|---|
user_id |
User ID. |
Request body
| Name | Description |
|---|---|
permissions |
Any of platform_admin, domain_admin, support (required; [] removes them; the list replaces the current one). |
domain_ids |
The domains a domain_admin administers (optional; absent keeps them). |
Response: user: {id, platform_permissions (support included when granted), domain_ids}.
MCP connector (assistants)
MCP connector, one address for every domain (https://mcp.telma.ca followed by the name of the domain): the MCP endpoint and the OAuth 2.1 authorization server of each domain (metadata, client registration, tokens, revocation). mcp capability.
GET /.well-known/oauth-authorization-server/<domain_name>
Metadata of the authorization server of a domain (RFC 8414), public.
Access: public (no authentication)
API keys: refused, 403 forbidden (API key not allowed on this route)
Rate limit: exempt from the general per-address limit
Path parameters
| Name | Description |
|---|---|
domain_name |
Name of the domain. 404 domain_not_found otherwise. |
Response: issuer: https://mcp.telma.ca/<domain_name>. authorization_endpoint: The consent page of the web app of the domain, https://
GET /.well-known/oauth-protected-resource/<domain_name>/mcp
Metadata of the MCP connector of a domain (RFC 9728), public.
Access: public (no authentication)
API keys: refused, 403 forbidden (API key not allowed on this route)
Rate limit: exempt from the general per-address limit
Path parameters
| Name | Description |
|---|---|
domain_name |
Name of the domain (the connector of a domain is https://mcp.telma.ca/<domain_name>/mcp). 404 domain_not_found otherwise. |
Response: resource: Address of the connector, https://mcp.telma.ca/<domain_name>/mcp. authorization_servers: The authorization server of the domain, https://mcp.telma.ca/<domain_name>. bearer_methods_supported: header. scopes_supported: mcp. resource_name: Name of the domain.
DELETE /<domain_name>/mcp
No server-to-client stream and no session on the MCP connector: 405 (Allow: POST).
Access: public (no authentication)
API keys: refused, 403 forbidden (API key not allowed on this route)
Rate limit: exempt from the general per-address limit
Path parameters
| Name | Description |
|---|---|
domain_name |
Name of the domain. |
GET /<domain_name>/mcp
No server-to-client stream and no session on the MCP connector: 405 (Allow: POST).
Access: public (no authentication)
API keys: refused, 403 forbidden (API key not allowed on this route)
Rate limit: exempt from the general per-address limit
Path parameters
| Name | Description |
|---|---|
domain_name |
Name of the domain. |
POST /<domain_name>/mcp
MCP endpoint of a domain (Model Context Protocol, « Streamable HTTP » transport, JSON answers).
Authorization: Bearer access token of the connector of this domain (/<domain_name>/oauth/token). The first request of a billing period debits the month of connected assistant of a user without an extension with a Telma AI plan (domain price, see GET /api/v1/mcp/authorize); not paid (credit too low), tools/call answers a tool error payment_required (structuredContent.error) until a credit pays it. 401 with WWW-Authenticate (resource_metadata) for a missing, expired or revoked token, a token of another domain, an account deactivated or whose sessions were closed, a member removed from the organization; 403 capability_required (no capability mcp on the domain or the organization) or permission_required (no mcp.use). Methods: initialize, ping, tools/list (only the tools the connection may call), tools/call, prompts/list, resources/list. Every tool call is journaled (tool, outcome, duration, names of the arguments, never their values).
Access: public (no authentication)
API keys: refused, 403 forbidden (API key not allowed on this route)
Rate limit: 60 per minute; 1000 per hour
Path parameters
| Name | Description |
|---|---|
domain_name |
Name of the domain. 404 domain_not_found otherwise. |
Request body
| Name | Description |
|---|---|
jsonrpc |
One JSON-RPC 2.0 message, or a batch (list). A notification gets 202 and no body. |
id |
One JSON-RPC 2.0 message, or a batch (list). A notification gets 202 and no body. |
method |
One JSON-RPC 2.0 message, or a batch (list). A notification gets 202 and no body. |
params |
One JSON-RPC 2.0 message, or a batch (list). A notification gets 202 and no body. |
Response: jsonrpc, id, result: The answer (error for a refused method: -32601 unknown method, -32602 unknown tool or bad parameters).
POST /<domain_name>/oauth/register
Register an MCP client on a domain (dynamic registration, RFC 7591), public.
Public clients only. A client nobody connects with is forgotten after 7 days. An assistant that publishes a client ID metadata document (client_id_metadata_document_supported in the metadata of the server) does not need to register: its client_id is the https address of the document. Limited per address, and behind the TLS demultiplexer every registration counts in the same bucket: 1000 per hour.
Access: public (no authentication)
API keys: refused, 403 forbidden (API key not allowed on this route)
Rate limit: 1000 per hour
Path parameters
| Name | Description |
|---|---|
domain_name |
Name of the domain. 404 domain_not_found otherwise. |
Request body
| Name | Description |
|---|---|
client_name |
Name shown on the consent screen (80 characters, « MCP client » by default). |
token_endpoint_auth_method |
none (anything else: 400 invalid_client_metadata). |
Response: client_id: Identifier of the client on this domain. client_id_issued_at, client_name, redirect_uris, grant_types, response_types, token_endpoint_auth_method, scope: The registration.
POST /<domain_name>/oauth/revoke
Revoke a token of the MCP connector of a domain (RFC 7009): the whole connection ends.
Always 200, whether the token was known or not.
Access: public (no authentication)
API keys: refused, 403 forbidden (API key not allowed on this route)
Rate limit: 60 per hour
Path parameters
| Name | Description |
|---|---|
domain_name |
Name of the domain. 404 domain_not_found otherwise. |
Request body
| Name | Description |
|---|---|
client_id |
The client (ignored). |
Response: Empty body.
POST /<domain_name>/oauth/token
Token endpoint of the MCP connector of a domain (form-encoded, JSON accepted).
The connection must still be usable: account active and its sessions not closed since the consent, still a member of the organization, capability mcp and permission mcp.use (400 invalid_grant otherwise).
Access: public (no authentication)
API keys: refused, 403 forbidden (API key not allowed on this route)
Rate limit: 60 per hour
Path parameters
| Name | Description |
|---|---|
domain_name |
Name of the domain. 404 domain_not_found otherwise. |
Request body
| Name | Description |
|---|---|
code |
For authorization_code: the code (single use, 5 minutes), the same redirect_uri, the PKCE verifier. |
redirect_uri |
For authorization_code: the code (single use, 5 minutes), the same redirect_uri, the PKCE verifier. |
code_verifier |
For authorization_code: the code (single use, 5 minutes), the same redirect_uri, the PKCE verifier. |
refresh_token |
For refresh_token: the refresh token, which rotates (the previous one is spent; replayed after 60 seconds, it ends the connection). |
Response: access_token: Bearer token of the connector (1 hour). token_type: Bearer. expires_in: Seconds. refresh_token: New refresh token (30 days). scope: mcp.
Connected assistants (consent)
Consent screen of an assistant (session of the app, no API key) and the assistants connected to the account.
GET /api/v1/mcp/authorize
What the consent screen of the MCP connector shows (page /oauth/authorize of the web app).
The parameters of the authorization request are those the assistant put in the address of the page. Refused in the administration context (403 forbidden) and in a session opened as another member (403 impersonation_forbidden).
Access: authenticated (JWT or API key)
API keys: refused, 403 forbidden (API key not allowed on this route)
Query parameters
| Name | Description |
|---|---|
client_id |
The authorization request of the assistant (response_type code, PKCE S256). 400 invalid_client (unknown client on this domain, or a metadata document that cannot be fetched or is refused: address not on an accepted host, another client_id inside, a secret, redirections this server refuses) or invalid_request (redirect_uri not registered) without redirect_url; the other errors (unsupported_response_type, invalid_request, invalid_target) carry redirect_url, the address that tells the assistant. |
redirect_uri |
The authorization request of the assistant (response_type code, PKCE S256). 400 invalid_client (unknown client on this domain, or a metadata document that cannot be fetched or is refused: address not on an accepted host, another client_id inside, a secret, redirections this server refuses) or invalid_request (redirect_uri not registered) without redirect_url; the other errors (unsupported_response_type, invalid_request, invalid_target) carry redirect_url, the address that tells the assistant. |
response_type |
The authorization request of the assistant (response_type code, PKCE S256). 400 invalid_client (unknown client on this domain, or a metadata document that cannot be fetched or is refused: address not on an accepted host, another client_id inside, a secret, redirections this server refuses) or invalid_request (redirect_uri not registered) without redirect_url; the other errors (unsupported_response_type, invalid_request, invalid_target) carry redirect_url, the address that tells the assistant. |
code_challenge |
The authorization request of the assistant (response_type code, PKCE S256). 400 invalid_client (unknown client on this domain, or a metadata document that cannot be fetched or is refused: address not on an accepted host, another client_id inside, a secret, redirections this server refuses) or invalid_request (redirect_uri not registered) without redirect_url; the other errors (unsupported_response_type, invalid_request, invalid_target) carry redirect_url, the address that tells the assistant. |
code_challenge_method |
The authorization request of the assistant (response_type code, PKCE S256). 400 invalid_client (unknown client on this domain, or a metadata document that cannot be fetched or is refused: address not on an accepted host, another client_id inside, a secret, redirections this server refuses) or invalid_request (redirect_uri not registered) without redirect_url; the other errors (unsupported_response_type, invalid_request, invalid_target) carry redirect_url, the address that tells the assistant. |
state |
The authorization request of the assistant (response_type code, PKCE S256). 400 invalid_client (unknown client on this domain, or a metadata document that cannot be fetched or is refused: address not on an accepted host, another client_id inside, a secret, redirections this server refuses) or invalid_request (redirect_uri not registered) without redirect_url; the other errors (unsupported_response_type, invalid_request, invalid_target) carry redirect_url, the address that tells the assistant. |
scope |
The authorization request of the assistant (response_type code, PKCE S256). 400 invalid_client (unknown client on this domain, or a metadata document that cannot be fetched or is refused: address not on an accepted host, another client_id inside, a secret, redirections this server refuses) or invalid_request (redirect_uri not registered) without redirect_url; the other errors (unsupported_response_type, invalid_request, invalid_target) carry redirect_url, the address that tells the assistant. |
resource |
The authorization request of the assistant (response_type code, PKCE S256). 400 invalid_client (unknown client on this domain, or a metadata document that cannot be fetched or is refused: address not on an accepted host, another client_id inside, a secret, redirections this server refuses) or invalid_request (redirect_uri not registered) without redirect_url; the other errors (unsupported_response_type, invalid_request, invalid_target) carry redirect_url, the address that tells the assistant. |
Response: client: {name, redirect_host} of the assistant. account: {name, email} of the session. domain: {name} shown on the screen. organizations: The organizations of the account in this domain: [{id, name, eligible, reason, price}] (reason: capability_required when assistants are not enabled there, permission_required without mcp.use; price: null when connecting is free for the account there (an extension with a Telma AI plan, or a price of 0), else {amount, currency, period_end, paid}: the month of the current period, debited from the credit of the organization at the first use of the period, paid true when it is paid already).
POST /api/v1/mcp/authorize
The decision of the consent screen of the MCP connector.
Same refusals as GET /api/v1/mcp/authorize. Allowing creates a connection for the chosen organization; it becomes active when the assistant exchanges its code (5 minutes).
Access: authenticated (JWT or API key)
API keys: refused, 403 forbidden (API key not allowed on this route)
Request body
| Name | Description |
|---|---|
client_id |
The authorization request, unchanged. |
redirect_uri |
The authorization request, unchanged. |
response_type |
The authorization request, unchanged. |
code_challenge |
The authorization request, unchanged. |
code_challenge_method |
The authorization request, unchanged. |
state |
The authorization request, unchanged. |
scope |
The authorization request, unchanged. |
resource |
The authorization request, unchanged. decision (required): allow or deny. |
organization_id |
For allow (required): one of the eligible organizations of GET (403 capability_required or permission_required for another of the account, 404 not_found otherwise). |
Response: redirect_url: The address to send the browser to: back to the assistant with the code, or with access_denied.
GET /api/v1/mcp/connections
The assistants connected to the account (active connections of the MCP connector), all organizations.
Access: authenticated (JWT or API key)
API keys: refused, 403 forbidden (API key not allowed on this route)
Response: connections: [{id, client_name, redirect_host, organization_id, organization_name, created_at, last_used_at}], newest first. Never a token. connector_url: Address of the connector of the current domain, to add in the assistant (https://mcp.telma.ca/
DELETE /api/v1/mcp/connections/<connection_id>
Disconnect an assistant from the account: its tokens stop working at once.
Access: authenticated (JWT or API key)
API keys: refused, 403 forbidden (API key not allowed on this route)
Path parameters
| Name | Description |
|---|---|
connection_id |
Id of the connection (GET /api/v1/mcp/connections). 404 not_found for another account's or an unknown one. |
Response: message: Confirmation.
Uploads
MMS attachments.
GET /api/v1/media-proxy
Proxy and convert remote media files (public, no authentication).
Serves the media of inbound MMS, which live on the SMS provider's servers: browsers load them in image, audio and video elements or open them from a link, and webhook payloads give them as proxied_url. AMR audio is converted to MP3 and 3GPP video to MP4, which browsers cannot play otherwise.
The answer is the file itself, always with X-Content-Type-Options: nosniff. Images, audio and video (image/..., audio/..., video/..., SVG excluded), PDF (application/pdf) and plain text (text/plain, with the charset the provider gives, else utf-8) keep the Content-Type of the fetched file (audio/mpeg or video/mp4 once converted), with Content-Disposition: inline. Any other file is a download: application/octet-stream with Content-Disposition: attachment; filename="media.<ext>", where <ext> is the extension of the fetched type (vcf for a vCard, bin when the type is unknown or missing).
At most 4 files are fetched and 1 converted at once: a request waits its turn, in order of arrival (15 s at most for a fetch, behind 100 others at most; 30 s for a conversion, behind 8 others), else it gets 503 busy at once. A converted file is kept in a cache named after the content fetched (SHA-256), looked up before ffmpeg runs: the same media asked under several URLs is converted once. A file fetched is also kept as is, up to 10 minutes after its fetch (100 MB and 1000 files in all, the oldest go first): the same URL asked again meanwhile, by anyone and whatever its content_type, is served from there (converted or not) without fetching it again, and a request for the same URL while it is being fetched waits for that fetch. Files served from the disk accept Range requests (206 Partial Content).
Access: public (no authentication)
Rate limit: exempt from the general per-address limit
Query parameters
| Name | Description |
|---|---|
url |
Media URL to fetch (required): http:// or https:// (https:// is assumed when the scheme is missing), on port 80 or 443 only, without credentials (nothing before an @), backslash, blank or control character; the host must be a host name (not an IP address) among the SMS providers' media hosts (MEDIA_PROXY_ALLOWED_HOSTS, and their subdomains), and all its addresses public, checked again when connecting (the connection goes to one of these checked addresses). The fragment is dropped. Redirects are not followed; 5 MB max (MEDIA_PROXY_MAX_BYTES), 90 s for the whole fetch. 400 validation_error when missing or not allowed. |
content_type |
Original content type of the media (optional), only used to ask for a conversion: audio/amr (and audio/amr-wb) converts to MP3, video/3gpp (and video/3gpp2) to MP4, as does an URL ending in .amr, .3gp or .3gpp. The file is converted only when it is AMR / 3GPP by the type the provider gives it or by its first bytes (the AMR header, the 3gp / 3g2 brand of a 3GPP file); otherwise it is served unconverted, and a failed conversion serves the original, as the type of the fetched file says. It never sets the Content-Type of the answer. |
Response: The media content, possibly converted. Errors: 404 not_found (no message carries this media URL: pass url exactly as in the message's media_urls[].url), 400 validation_error (url missing or not allowed, including a host that resolves to an address that is not public when the connection is made), 502 fetch_failed (the provider did not answer with the file in time, answered with a redirect, or the file is over 5 MB), 503 busy (too many fetches or conversions in progress: retry a few seconds later). Every error is JSON {error, message}.
POST /api/v1/upload
Upload a file for an MMS attachment.
Send the file as multipart/form-data, then pass the returned url in media_urls of POST /api/v1/sms/send (the only attachments it accepts). A file that no message uses is deleted after 30 days.
Photos are reduced before they are kept, because carriers drop a multimedia message above about 1 MB: a jpg, jpeg, png or webp becomes a JPEG (the stored name ends in .jpg), turned the right way up, without any metadata (no GPS position), 1600 pixels on its longest side at most and 300 KB at most (three photos fit in one message); a transparent image is laid on white. Every photo is re-encoded, even a small one. A gif of 1 MB or less is kept as it is (an animation stays animated); a larger still gif becomes a JPEG, a larger animated gif is refused. Videos and sounds are kept as they are: a video over about 1 MB will probably not reach the phone.
Access: authenticated (JWT or API key)
Rate limit: 60 per hour
Request body
| Name | Description |
|---|---|
file |
The file (multipart/form-data field, required): jpg, jpeg, png, gif, webp, mp4, mov, mp3, wav or m4a (by file name extension), 10 MB max. 400 validation_error when the field is missing or empty, the extension is not accepted, the file is larger, the image has more than 50 million pixels or is an animated gif over 1 MB; 400 invalid_file_type when the content of the file is not of the type its extension says (checked on its first bytes) or the image cannot be read. |
Response: url: Public URL of the file, to pass as is in media_urls of POST /api/v1/sms/send. content_type: MIME type of the stored file (image/jpeg for a reduced photo). filename: Stored file name, .jpg for a reduced photo (201).
Errors 429 rate_limited: more than 60 uploads in an hour for this user or key.
GET /api/v1/uploads/<filename>
Serve an uploaded file (public, no authentication: the SMS provider fetches the media of an outbound MMS here).
Access: public (no authentication)
Rate limit: exempt from the general per-address limit
Path parameters
| Name | Description |
|---|---|
filename |
Name of the uploaded file, as POST /api/v1/upload gave it. |
Response: The file content, with the type of its extension, X-Content-Type-Options: nosniff, an ETag and a long cache (the name never changes content); Range and conditional requests are answered. 404 not_found when there is no such file (never uploaded, or deleted 30 days after no message uses it any more).
Chat files
Files shared in the messages between colleagues and the chat of the meetings: read by a signed link that expires, given to the members only.
GET /api/v1/chat-files/<file_id>/f/<path:name>
A file shared in a chat, by the signed link given to the members (public route: the link is the right).
Access: public (no authentication)
Rate limit: exempt from the general per-address limit
Path parameters
| Name | Description |
|---|---|
file_id |
The file. |
name |
Its name (any: only shown by the browser). |
Query parameters
| Name | Description |
|---|---|
e |
Expiry of the link (seconds since 1970). |
s |
Signature of the link. |
Response: The file: images, videos, sounds and PDF shown in the page, the other documents downloaded under their name.
Errors 403 forbidden: the signature is not right. 410 link_expired: the link is older than its expiry (ask a new one, GET /api/v1/chat-files/<id>/link). 404 not_found: the file was deleted with its message.
GET /api/v1/chat-files/<file_id>/link
A new signed link to a file of a chat, for a member who can read it (the conversation's members, the members of the meeting).
Access: member of the organization
Path parameters
| Name | Description |
|---|---|
file_id |
The file. |
Response: file: {id, url, name, content_type, size}. 404 not_found when the file is unknown or not readable by the member.
Inbound webhooks
URLs called by SMS providers to deliver inbound messages.
GET /webhook/provider/<provider>/<secret_token>
Receive incoming SMS/MMS from a provider.
This endpoint looks up the provider webhook by secret token. The phone number is then used to route to the appropriate team. Never rate limited: the secret token of the URL authenticates the provider, and its deliveries are refused (403) from an address outside the sources configured for it, when some are. The sender must be a phone number (the recipient rule of POST /sms/send), the text is kept up to 4096 characters, and each secret has an hourly budget of 300 new conversations and 300 automatic texts (welcome, outside-hours reply): beyond it, inbound messages are still recorded but nothing is texted back.
Access: public (no authentication)
Rate limit: exempt from the general per-address limit
Path parameters
| Name | Description |
|---|---|
provider |
SMS provider type (one of GET /api/v1/providers). |
secret_token |
Provider webhook secret token. |
Response: For GET: "Ready!" response. For POST: "ok" for SMS, HTTP 200 for MMS.
Errors These routes answer providers, not integrators: their errors are {"error": "<free text>"} without message or stable code. 404 "Invalid provider or webhook token" or "Phone number not found". 400 "Missing destination phone number", "Invalid sender number". 403 "Source not allowed".
POST /webhook/provider/<provider>/<secret_token>
Receive incoming SMS/MMS from a provider.
This endpoint looks up the provider webhook by secret token. The phone number is then used to route to the appropriate team. Never rate limited: the secret token of the URL authenticates the provider, and its deliveries are refused (403) from an address outside the sources configured for it, when some are. The sender must be a phone number (the recipient rule of POST /sms/send), the text is kept up to 4096 characters, and each secret has an hourly budget of 300 new conversations and 300 automatic texts (welcome, outside-hours reply): beyond it, inbound messages are still recorded but nothing is texted back.
Access: public (no authentication)
Rate limit: exempt from the general per-address limit
Path parameters
| Name | Description |
|---|---|
provider |
SMS provider type (one of GET /api/v1/providers). |
secret_token |
Provider webhook secret token. |
Response: For GET: "Ready!" response. For POST: "ok" for SMS, HTTP 200 for MMS.
Errors These routes answer providers, not integrators: their errors are {"error": "<free text>"} without message or stable code. 404 "Invalid provider or webhook token" or "Phone number not found". 400 "Missing destination phone number", "Invalid sender number". 403 "Source not allowed".
API keys: closed routes
This section is generated from backend/app/utils/permissions.py and from the routes (it is not written by hand). An API key (X-API-Key header) does not open everything a session (JWT) opens: the routes that would give another way to sign in, that spend the organization's money or that administer the account are closed to it. The refusal is a 403 {"error": "forbidden", "message": "API key not allowed on this route"}.
Closed to every API key
On these routes a request that carries an X-API-Key header gets 403 as soon as the header is present, whether the key is ordinary, restricted or even invalid:
- Second factor and passkeys: the 13 operations of the group
- Presence: my state and my status: the 4 operations of the group
- Organizations:
GET /api/v1/organizations/<org_id>/mcp/connections,DELETE /api/v1/organizations/<org_id>/mcp/connections/<connection_id>,POST /api/v1/organizations/<org_id>/members/<user_id>/impersonate - Live activity: the 3 operations of the group
- Video meetings: the 29 operations of the group
- Video meetings (internal): the 3 operations of the group
- Video meetings: limits: the 4 operations of the group
- Messages between colleagues: the 15 operations of the group
- Invitations:
POST /api/v1/invitations,POST /api/v1/invitations/<invitation_id>/resend,POST /api/v1/invitations/accept - Users:
POST /api/v1/users - Connected applications: the 11 operations of the group
- Integrations: the 9 operations of the group
- Fax: the 17 operations of the group
- File retention: the 6 operations of the group
- File storage: the 5 operations of the group
- Voice: phones and ATAs: the 13 operations of the group
- Voice: 9-1-1 addresses: the 3 operations of the group
- Telma AI (domain and platform): the 4 operations of the group
- Domain voice settings:
PUT /api/v1/domains/<domain_id>/organizations/<organization_id>/voice-outbound - Voice (internal): the 19 operations of the group
- Mail (internal): the 1 operations of the group
- Billing:
POST /api/v1/billing/admin/add-credits - Free trial, account state and settings:
PUT /api/v1/domains/<domain_id>/account-settings - Domain billing: the 23 operations of the group
- Domains:
POST /api/v1/domains/<domain_id>/admins,DELETE /api/v1/domains/<domain_id>/admins/<user_id>,POST /api/v1/domains/<domain_id>/organizations/<organization_id>/credit,PUT /api/v1/domains/<domain_id>/platform-voice-trunks,PUT /api/v1/domains/<domain_id>/security-settings,PUT /api/v1/domains/<domain_id>/settings/default-payment-provider,PUT /api/v1/domains/<domain_id>/settings/oauth/<provider>,PUT /api/v1/domains/<domain_id>/settings/payment-providers/<provider>,PUT /api/v1/domains/<domain_id>/settings/smtp,POST /api/v1/domains/<domain_id>/settings/smtp/test,PUT /api/v1/domains/<domain_id>/sms-providers/<provider>,POST /api/v1/domains/<domain_id>/voice-trunks,DELETE /api/v1/domains/<domain_id>/voice-trunks/<trunk_id>,PUT /api/v1/domains/<domain_id>/voice-trunks/<trunk_id> - System:
PUT /api/v1/system/oauth/<provider>,PUT /api/v1/system/smtp - Platform SMS provider accounts:
POST /api/v1/system/sms-accounts,DELETE /api/v1/system/sms-accounts/<account_id>,PUT /api/v1/system/sms-accounts/<account_id>,PUT /api/v1/system/sms-accounts/<account_id>/domains,POST /api/v1/system/sms-accounts/<account_id>/numbers,DELETE /api/v1/system/sms-accounts/<account_id>/numbers/<phone_id>,POST /api/v1/system/sms-accounts/<account_id>/numbers/move,POST /api/v1/system/sms-accounts/<account_id>/regenerate-secret - SMS provider accounts of a domain:
PUT /api/v1/domains/<domain_id>/platform-sms-accounts,PUT /api/v1/domains/<domain_id>/sms-account-settings,POST /api/v1/domains/<domain_id>/sms-accounts,DELETE /api/v1/domains/<domain_id>/sms-accounts/<account_id>,PUT /api/v1/domains/<domain_id>/sms-accounts/<account_id>,POST /api/v1/domains/<domain_id>/sms-accounts/<account_id>/numbers,DELETE /api/v1/domains/<domain_id>/sms-accounts/<account_id>/numbers/<phone_id>,POST /api/v1/domains/<domain_id>/sms-accounts/<account_id>/regenerate-secret - Platform 9-1-1: the 4 operations of the group
- Platform voice trunks:
POST /api/v1/system/voice-trunks,DELETE /api/v1/system/voice-trunks/<trunk_id>,PUT /api/v1/system/voice-trunks/<trunk_id>,PUT /api/v1/system/voice-trunks/<trunk_id>/domains - Profiles and permissions: the 11 operations of the group
- MCP connector (assistants): the 8 operations of the group
- Connected assistants (consent): the 4 operations of the group
On these, a valid key, ordinary or restricted, gets 403; an unknown or revoked key gets 401 as anywhere else:
- Phone numbers:
PATCH /api/v1/phone-numbers/<phone_id>,GET /api/v1/phone-numbers/<phone_id>/prices,POST /api/v1/phone-numbers/<phone_id>/release,POST /api/v1/phone-numbers/<phone_id>/restore,PUT /api/v1/phone-numbers/<phone_id>/sms-routing - Number purchase: the 4 operations of the group
- API keys:
POST /api/v1/keys - Voice (VoXoS):
GET /api/v1/voice/access-numbers,GET /api/v1/voice/call-info,PUT /api/v1/voice/call-info/recording,PUT /api/v1/voice/call-info/recording/skip-next,POST /api/v1/voice/call-requests,DELETE /api/v1/voice/call-requests/<request_id>,GET /api/v1/voice/call-requests/<request_id>,GET /api/v1/voice/colleagues,POST /api/v1/voice/devices,PUT /api/v1/voice/devices/<device_id>,DELETE /api/v1/voice/devices/<installation_id>,POST /api/v1/voice/diagnostics,GET /api/v1/voice/directory,GET /api/v1/voice/my-devices,GET /api/v1/voice/my-endpoints,PUT /api/v1/voice/my-endpoints/<endpoint_id>/settings,GET /api/v1/voice/my-live-calls,GET /api/v1/voice/parked,POST /api/v1/voice/parked/<park_id>/pickup,POST /api/v1/voice/web-calls,GET /api/v1/voice/web-calls/<web_call_id>,POST /api/v1/voice/web-calls/<web_call_id>/end,GET /api/v1/voice/web-calls/<web_call_id>/notes,POST /api/v1/voice/web-calls/<web_call_id>/notes,DELETE /api/v1/voice/web-calls/<web_call_id>/notes/<note_id>,PUT /api/v1/voice/web-calls/<web_call_id>/notes/<note_id>,POST /api/v1/voice/web-phone,DELETE /api/v1/voice/web-phone/<tab_id>
Closed to restricted keys
A restricted key (limited to a team, or the key of an integration) acts as an agent of the teams it reaches and never reads organization-wide data. It gets 403 on everything below; an ordinary key has the rights of its creator.
- Organizations (20 operations)
- SMS questionnaires (6 operations)
- Call notes (4 operations)
- Dashboard (4 operations)
- Address book (26 operations)
- Push notifications (6 operations)
- Voice (VoXoS) (110 operations)
- Number voice features (17 operations)
- Telma AI (transcription and summary) (12 operations)
- Search in the summaries (1 operations)
- Metrics (7 operations)
- Billing (19 operations)
- Free trial, account state and settings (6 operations)
- Billing: cards and receipts (13 operations)
GET /api/v1/phone-numbers/unassigned
Closed according to the body
On these routes an API key gets 403 as soon as the request body does what follows (the same call stays open to a session).
PUT /api/v1/domains/<domain_id>: refused when the body containshostnames,namePUT /api/v1/organizations/<org_id>/members/<user_id>: refused when the body gives the roleadmin,domain_admin,super_adminPUT /api/v1/users/<user_id>: refused when the body gives the roleadmin,domain_admin,super_admin; refused when the body containspasswordPUT /api/v1/users/<user_id>/role: refused when the body gives the roleadmin,domain_admin,super_admin