{"openapi":"3.1.2","paths":{"/v1/api-keys":{"get":{"description":"The organization's own keys, for its systems. Members' personal keys are listed apart (`listPersonalApiKeys`).","operationId":"listApiKeys","parameters":[{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Every organization key, revoked ones included.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiKeyList"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `AUTH-1002`: your role lacks the `api.manage` permission. `API-8102`: the API key or app lacks the `credentials:read` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in. `API-8160`: an organization key does not manage credentials.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["credentials:read"]},{"oauth2":["credentials:read"]}],"summary":"List the organization's API keys","tags":["api-keys"]},"post":{"description":"The key acts as you, limited to its scopes: it can never do more than your role allows. It is shown once; Rabt keeps only its hash. A `test` key (`rbk_test_…`) works on the organization's separate test space: messages are simulated, nothing reaches customers or providers, the wallet is never charged and webhooks are marked `test`.","operationId":"createApiKey","parameters":[{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}},{"name":"Idempotency-Key","in":"header","description":"A unique key for this operation (e.g. a UUID, 1 to 255 visible characters), kept 24 hours: repeating the request with the same key returns the first answer (`Idempotent-Replayed: true`) instead of doing it again. Errors: `API-8109` (400) a key that is not valid, `API-8108` (409, retryable) the first request with this key is still running, `API-8107` (422) the key was used for a different request; `API-8118` (409) the first request created something whose secret is shown only once, so its answer is not repeated. An answer with `shown_once` repeats its secret within 10 minutes, then `API-8118`.","required":false,"schema":{"type":"string","minLength":1,"maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateApiKey"}}}},"responses":{"201":{"description":"The key, shown once.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IssuedApiKey"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`API-8153`: the platform organization has no test key. `AUTH-1103`: platform scopes need a session started with this device's unlock.\n\n`AUTH-1040`: you are not a member of the organization named. `AUTH-1003`: your seat was deactivated (view only). `AUTH-1004`: all seats are inactive because the seat charge was not paid (view only). `AUTH-1002`: your role lacks the `api.manage` permission. `API-8102`: the API key or app lacks the `credentials:write` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in. `API-8148`: not available to test keys (API test mode). `API-8160`: an organization key does not manage credentials.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"409":{"description":"`API-8115`: the organization has its maximum of active API keys.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["credentials:write"]},{"oauth2":["credentials:write"]}],"summary":"Create an API key","tags":["api-keys"]}},"/v1/api-keys/{id}":{"patch":{"description":"Sets the expiry (in the future, or none) (OP15). A revoked key cannot be changed. In the audit log (`api_key.updated`).","operationId":"updateApiKey","parameters":[{"name":"id","required":true,"in":"path","description":"The id.","schema":{"type":"string","format":"uuid","description":"The id."}},{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}},{"name":"Idempotency-Key","in":"header","description":"A unique key for this operation (e.g. a UUID, 1 to 255 visible characters), kept 24 hours: repeating the request with the same key returns the first answer (`Idempotent-Replayed: true`) instead of doing it again. Errors: `API-8109` (400) a key that is not valid, `API-8108` (409, retryable) the first request with this key is still running, `API-8107` (422) the key was used for a different request; `API-8118` (409) the first request created something whose secret is shown only once, so its answer is not repeated. An answer with `shown_once` repeats its secret within 10 minutes, then `API-8118`.","required":false,"schema":{"type":"string","minLength":1,"maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateApiKey"}}}},"responses":{"200":{"description":"The key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiKey"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `AUTH-1003`: your seat was deactivated (view only). `AUTH-1004`: all seats are inactive because the seat charge was not paid (view only). `AUTH-1002`: your role lacks the `api.manage` permission. `API-8102`: the API key or app lacks the `credentials:write` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in. `API-8148`: not available to test keys (API test mode). `API-8160`: an organization key does not manage credentials.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"`API-8110`: no such API key in this organization.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["credentials:write"]},{"oauth2":["credentials:write"]}],"summary":"Change an API key's expiry","tags":["api-keys"]},"get":{"operationId":"getApiKey","parameters":[{"name":"id","required":true,"in":"path","description":"The id.","schema":{"type":"string","format":"uuid","description":"The id."}},{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"The key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiKey"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `AUTH-1002`: your role lacks the `api.manage` permission. `API-8102`: the API key or app lacks the `credentials:read` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in. `API-8160`: an organization key does not manage credentials.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"`API-8110`: no such API key in this organization.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["credentials:read"]},{"oauth2":["credentials:read"]}],"summary":"Get an API key","tags":["api-keys"]},"delete":{"description":"It stops working at once and stays in the list and the audit log.","operationId":"revokeApiKey","parameters":[{"name":"id","required":true,"in":"path","description":"The id.","schema":{"type":"string","format":"uuid","description":"The id."}},{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"The revoked key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiKey"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `AUTH-1003`: your seat was deactivated (view only). `AUTH-1004`: all seats are inactive because the seat charge was not paid (view only). `AUTH-1002`: your role lacks the `api.manage` permission. `API-8102`: the API key or app lacks the `credentials:write` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in. `API-8148`: not available to test keys (API test mode). `API-8160`: an organization key does not manage credentials.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"`API-8110`: no such API key in this organization.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["credentials:write"]},{"oauth2":["credentials:write"]}],"summary":"Revoke an API key","tags":["api-keys"]}},"/v1/api-keys/{id}/rotate":{"post":{"description":"A new key for the same id, name and scopes; the old key stops working at once.","operationId":"rotateApiKey","parameters":[{"name":"id","required":true,"in":"path","description":"The id.","schema":{"type":"string","format":"uuid","description":"The id."}},{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}},{"name":"Idempotency-Key","in":"header","description":"A unique key for this operation (e.g. a UUID, 1 to 255 visible characters), kept 24 hours: repeating the request with the same key returns the first answer (`Idempotent-Replayed: true`) instead of doing it again. Errors: `API-8109` (400) a key that is not valid, `API-8108` (409, retryable) the first request with this key is still running, `API-8107` (422) the key was used for a different request; `API-8118` (409) the first request created something whose secret is shown only once, so its answer is not repeated. An answer with `shown_once` repeats its secret within 10 minutes, then `API-8118`.","required":false,"schema":{"type":"string","minLength":1,"maxLength":255}}],"responses":{"201":{"description":"The new key, shown once.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IssuedApiKey"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `AUTH-1003`: your seat was deactivated (view only). `AUTH-1004`: all seats are inactive because the seat charge was not paid (view only). `AUTH-1002`: your role lacks the `api.manage` permission. `API-8102`: the API key or app lacks the `credentials:write` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in. `API-8148`: not available to test keys (API test mode). `API-8160`: an organization key does not manage credentials.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"`API-8110`: no such API key in this organization.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["credentials:write"]},{"oauth2":["credentials:write"]}],"summary":"Rotate an API key","tags":["api-keys"]}},"/v1/personal-api-keys":{"get":{"description":"Members' personal API keys that act in this organization, revoked ones included: each acts as its member, with their permissions here.","operationId":"listPersonalApiKeys","parameters":[{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"The keys.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiKeyList"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `AUTH-1002`: your role lacks the `api.manage` permission. `API-8102`: the API key or app lacks the `credentials:read` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in. `API-8160`: an organization key does not manage credentials.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["credentials:read"]},{"oauth2":["credentials:read"]}],"summary":"List the personal keys acting in the organization","tags":["api-keys"]}},"/v1/personal-api-keys/{id}":{"delete":{"description":"It stops working at once; the member sees it revoked. In the audit log (`api_key.revoked`).","operationId":"revokePersonalApiKey","parameters":[{"name":"id","required":true,"in":"path","description":"The id.","schema":{"type":"string","format":"uuid","description":"The id."}},{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"The revoked key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiKey"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `AUTH-1003`: your seat was deactivated (view only). `AUTH-1004`: all seats are inactive because the seat charge was not paid (view only). `AUTH-1002`: your role lacks the `api.manage` permission. `API-8102`: the API key or app lacks the `credentials:write` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in. `API-8148`: not available to test keys (API test mode). `API-8160`: an organization key does not manage credentials.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"`API-8110`: no member has such a personal key in this organization.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["credentials:write"]},{"oauth2":["credentials:write"]}],"summary":"Revoke a member's personal key","tags":["api-keys"]}},"/v1/oauth-apps":{"get":{"operationId":"listOAuthApps","parameters":[{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"The apps.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OAuthAppList"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `AUTH-1002`: your role lacks the `api.manage` permission. `API-8102`: the API key or app lacks the `credentials:read` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in. `API-8160`: an organization key does not manage credentials.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["credentials:read"]},{"oauth2":["credentials:read"]}],"summary":"List the OAuth apps you registered","tags":["oauth-apps"]},"post":{"description":"An app any organization can install through the consent screen (authorization code with PKCE).","operationId":"registerOAuthApp","parameters":[{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}},{"name":"Idempotency-Key","in":"header","description":"A unique key for this operation (e.g. a UUID, 1 to 255 visible characters), kept 24 hours: repeating the request with the same key returns the first answer (`Idempotent-Replayed: true`) instead of doing it again. Errors: `API-8109` (400) a key that is not valid, `API-8108` (409, retryable) the first request with this key is still running, `API-8107` (422) the key was used for a different request; `API-8118` (409) the first request created something whose secret is shown only once, so its answer is not repeated. An answer with `shown_once` repeats its secret within 10 minutes, then `API-8118`.","required":false,"schema":{"type":"string","minLength":1,"maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateOAuthApp"}}}},"responses":{"201":{"description":"The app (and its secret, once).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RegisteredOAuthApp"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `AUTH-1003`: your seat was deactivated (view only). `AUTH-1004`: all seats are inactive because the seat charge was not paid (view only). `AUTH-1002`: your role lacks the `api.manage` permission. `API-8102`: the API key or app lacks the `credentials:write` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in. `API-8148`: not available to test keys (API test mode). `API-8160`: an organization key does not manage credentials.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"409":{"description":"`API-8117`: the organization has its maximum of OAuth apps.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["credentials:write"]},{"oauth2":["credentials:write"]}],"summary":"Register an OAuth app","tags":["oauth-apps"]}},"/v1/oauth-apps/{id}":{"get":{"operationId":"getOAuthApp","parameters":[{"name":"id","required":true,"in":"path","description":"The id.","schema":{"type":"string","format":"uuid","description":"The id."}},{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"The app.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OAuthApp"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `AUTH-1002`: your role lacks the `api.manage` permission. `API-8102`: the API key or app lacks the `credentials:read` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in. `API-8160`: an organization key does not manage credentials.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"`API-8111`: no such OAuth app in this organization (or it was deleted).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["credentials:read"]},{"oauth2":["credentials:read"]}],"summary":"Get an OAuth app","tags":["oauth-apps"]},"patch":{"operationId":"updateOAuthApp","parameters":[{"name":"id","required":true,"in":"path","description":"The id.","schema":{"type":"string","format":"uuid","description":"The id."}},{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}},{"name":"Idempotency-Key","in":"header","description":"A unique key for this operation (e.g. a UUID, 1 to 255 visible characters), kept 24 hours: repeating the request with the same key returns the first answer (`Idempotent-Replayed: true`) instead of doing it again. Errors: `API-8109` (400) a key that is not valid, `API-8108` (409, retryable) the first request with this key is still running, `API-8107` (422) the key was used for a different request; `API-8118` (409) the first request created something whose secret is shown only once, so its answer is not repeated. An answer with `shown_once` repeats its secret within 10 minutes, then `API-8118`.","required":false,"schema":{"type":"string","minLength":1,"maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateOAuthApp"}}}},"responses":{"200":{"description":"The app.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OAuthApp"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `AUTH-1003`: your seat was deactivated (view only). `AUTH-1004`: all seats are inactive because the seat charge was not paid (view only). `AUTH-1002`: your role lacks the `api.manage` permission. `API-8102`: the API key or app lacks the `credentials:write` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in. `API-8148`: not available to test keys (API test mode). `API-8160`: an organization key does not manage credentials.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"`API-8111`: no such OAuth app in this organization (or it was deleted).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["credentials:write"]},{"oauth2":["credentials:write"]}],"summary":"Update an OAuth app","tags":["oauth-apps"]},"delete":{"description":"Its installations can no longer get or refresh tokens (access tokens already issued end within the hour).","operationId":"deleteOAuthApp","parameters":[{"name":"id","required":true,"in":"path","description":"The id.","schema":{"type":"string","format":"uuid","description":"The id."}},{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}}],"responses":{"204":{"description":"Deleted.","headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `AUTH-1003`: your seat was deactivated (view only). `AUTH-1004`: all seats are inactive because the seat charge was not paid (view only). `AUTH-1002`: your role lacks the `api.manage` permission. `API-8102`: the API key or app lacks the `credentials:write` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in. `API-8148`: not available to test keys (API test mode). `API-8160`: an organization key does not manage credentials.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"`API-8111`: no such OAuth app in this organization (or it was deleted).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["credentials:write"]},{"oauth2":["credentials:write"]}],"summary":"Delete an OAuth app","tags":["oauth-apps"]}},"/v1/oauth-apps/{id}/secret":{"post":{"description":"The old secret stops working at once; the new one is shown once.","operationId":"rotateOAuthAppSecret","parameters":[{"name":"id","required":true,"in":"path","description":"The id.","schema":{"type":"string","format":"uuid","description":"The id."}},{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}},{"name":"Idempotency-Key","in":"header","description":"A unique key for this operation (e.g. a UUID, 1 to 255 visible characters), kept 24 hours: repeating the request with the same key returns the first answer (`Idempotent-Replayed: true`) instead of doing it again. Errors: `API-8109` (400) a key that is not valid, `API-8108` (409, retryable) the first request with this key is still running, `API-8107` (422) the key was used for a different request; `API-8118` (409) the first request created something whose secret is shown only once, so its answer is not repeated. An answer with `shown_once` repeats its secret within 10 minutes, then `API-8118`.","required":false,"schema":{"type":"string","minLength":1,"maxLength":255}}],"responses":{"201":{"description":"The app and its new secret.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RegisteredOAuthApp"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `AUTH-1003`: your seat was deactivated (view only). `AUTH-1004`: all seats are inactive because the seat charge was not paid (view only). `AUTH-1002`: your role lacks the `api.manage` permission. `API-8102`: the API key or app lacks the `credentials:write` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in. `API-8148`: not available to test keys (API test mode). `API-8160`: an organization key does not manage credentials.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"`API-8111`: no such OAuth app in this organization (or it was deleted).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["credentials:write"]},{"oauth2":["credentials:write"]}],"summary":"Rotate a confidential app's secret","tags":["oauth-apps"]}},"/v1/installed-apps":{"get":{"description":"OAuth apps and AI assistants (MCP clients) members connected to act in this organization, each as its member, with their scopes and last use.","operationId":"listInstalledApps","parameters":[{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"The installed apps.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InstalledAppList"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `AUTH-1002`: your role lacks the `api.manage` permission. `API-8102`: the API key or app lacks the `credentials:read` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in. `API-8160`: an organization key does not manage credentials.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["credentials:read"]},{"oauth2":["credentials:read"]}],"summary":"List the apps connected in the organization","tags":["installed-apps"]}},"/v1/installed-apps/{id}":{"delete":{"description":"Every token of the connection stops working at once; the member sees it disconnected. In the audit log (`oauth_grant.revoked`).","operationId":"uninstallApp","parameters":[{"name":"id","required":true,"in":"path","description":"The id.","schema":{"type":"string","format":"uuid","description":"The id."}},{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"The uninstalled app.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InstalledApp"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `AUTH-1003`: your seat was deactivated (view only). `AUTH-1004`: all seats are inactive because the seat charge was not paid (view only). `AUTH-1002`: your role lacks the `api.manage` permission. `API-8102`: the API key or app lacks the `credentials:write` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in. `API-8148`: not available to test keys (API test mode). `API-8160`: an organization key does not manage credentials.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"`API-8112`: no such installed app in this organization.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["credentials:write"]},{"oauth2":["credentials:write"]}],"summary":"Revoke a member's connected app","tags":["installed-apps"]}},"/v1/trusted-issuer":{"get":{"description":"The identity provider whose identity assertions (ID-JAG) connect members' MCP clients without a consent screen; null when none is set.","operationId":"getTrustedIssuer","parameters":[{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"The trusted issuer.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TrustedIssuerAnswer"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `AUTH-1002`: your role lacks the `api.manage` permission. `API-8102`: the API key or app lacks the `credentials:read` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in. `API-8160`: an organization key does not manage credentials.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["credentials:read"]},{"oauth2":["credentials:read"]}],"summary":"Get the organization's trusted issuer","tags":["trusted-issuer"]},"put":{"description":"From then on an MCP client presenting an identity assertion of this issuer (the jwt-bearer grant at the token endpoint) acts as the member with the assertion's confirmed email, with their permissions, without a consent screen; never as the owner in person. The same issuer again changes nothing; another one replaces it and ends the connections the old one made.","operationId":"setTrustedIssuer","parameters":[{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}},{"name":"Idempotency-Key","in":"header","description":"A unique key for this operation (e.g. a UUID, 1 to 255 visible characters), kept 24 hours: repeating the request with the same key returns the first answer (`Idempotent-Replayed: true`) instead of doing it again. Errors: `API-8109` (400) a key that is not valid, `API-8108` (409, retryable) the first request with this key is still running, `API-8107` (422) the key was used for a different request; `API-8118` (409) the first request created something whose secret is shown only once, so its answer is not repeated. An answer with `shown_once` repeats its secret within 10 minutes, then `API-8118`.","required":false,"schema":{"type":"string","minLength":1,"maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SetTrustedIssuer"}}}},"responses":{"200":{"description":"The trusted issuer.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TrustedIssuer"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `AUTH-1003`: your seat was deactivated (view only). `AUTH-1004`: all seats are inactive because the seat charge was not paid (view only). `AUTH-1002`: your role lacks the `api.manage` permission. `API-8102`: the API key or app lacks the `credentials:write` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in. `API-8148`: not available to test keys (API test mode). `API-8160`: an organization key does not manage credentials.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"description":"`API-8001`: some fields are missing or not valid. `details.fields` lists each invalid field with its own code (e.g. `API-8002` required, `API-8012` wrong format). `API-8168`: not an https issuer URL.","headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["credentials:write"]},{"oauth2":["credentials:write"]}],"summary":"Set the organization's trusted issuer","tags":["trusted-issuer"]},"delete":{"description":"Its assertions are refused from then on and the connections it made stop at once. Answers the removed issuer, or null when none was set.","operationId":"removeTrustedIssuer","parameters":[{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"The removed trusted issuer.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TrustedIssuerAnswer"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `AUTH-1003`: your seat was deactivated (view only). `AUTH-1004`: all seats are inactive because the seat charge was not paid (view only). `AUTH-1002`: your role lacks the `api.manage` permission. `API-8102`: the API key or app lacks the `credentials:write` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in. `API-8148`: not available to test keys (API test mode). `API-8160`: an organization key does not manage credentials.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["credentials:write"]},{"oauth2":["credentials:write"]}],"summary":"Remove the organization's trusted issuer","tags":["trusted-issuer"]}},"/v1/webhook-event-types":{"get":{"description":"Every event an endpoint can subscribe to, with the JSON Schema of its `data`. Deliveries carry `{ type, version, timestamp, mode, data }` (`mode` is `test` for events of the API test space, `live` otherwise), signed per Standard Webhooks.","operationId":"listWebhookEventTypes","parameters":[{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"The event types.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEventTypeList"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `API-8102`: the API key or app lacks the `webhooks:read` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["webhooks:read"]},{"oauth2":["webhooks:read"]}],"summary":"List the webhook event types","tags":["webhooks"]}},"/v1/webhook-endpoints":{"get":{"operationId":"listWebhookEndpoints","parameters":[{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"The endpoints.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEndpointList"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `AUTH-1002`: your role lacks the `api.manage` permission. `API-8102`: the API key or app lacks the `webhooks:read` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["webhooks:read"]},{"oauth2":["webhooks:read"]}],"summary":"List the webhook endpoints","tags":["webhooks"]},"post":{"description":"Events of the chosen types are POSTed to the URL, signed with the secret returned here once.","operationId":"createWebhookEndpoint","parameters":[{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}},{"name":"Idempotency-Key","in":"header","description":"A unique key for this operation (e.g. a UUID, 1 to 255 visible characters), kept 24 hours: repeating the request with the same key returns the first answer (`Idempotent-Replayed: true`) instead of doing it again. Errors: `API-8109` (400) a key that is not valid, `API-8108` (409, retryable) the first request with this key is still running, `API-8107` (422) the key was used for a different request; `API-8118` (409) the first request created something whose secret is shown only once, so its answer is not repeated. An answer with `shown_once` repeats its secret within 10 minutes, then `API-8118`.","required":false,"schema":{"type":"string","minLength":1,"maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateWebhookEndpoint"}}}},"responses":{"201":{"description":"The endpoint and its secret.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEndpointWithSecret"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `AUTH-1003`: your seat was deactivated (view only). `AUTH-1004`: all seats are inactive because the seat charge was not paid (view only). `AUTH-1002`: your role lacks the `api.manage` permission. `API-8102`: the API key or app lacks the `webhooks:write` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"409":{"description":"`API-8116`: the organization has its maximum of webhook endpoints.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"description":"`API-8001`: some fields are missing or not valid. `details.fields` lists each invalid field with its own code (e.g. `API-8002` required, `API-8012` wrong format). `API-8140`: the URL is not a public https address. `API-8141`: an event type is not a webhook event.","headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["webhooks:write"]},{"oauth2":["webhooks:write"]}],"summary":"Create a webhook endpoint","tags":["webhooks"]}},"/v1/webhook-endpoints/{id}":{"get":{"operationId":"getWebhookEndpoint","parameters":[{"name":"id","required":true,"in":"path","description":"The id.","schema":{"type":"string","format":"uuid","description":"The id."}},{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"The endpoint.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEndpoint"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `AUTH-1002`: your role lacks the `api.manage` permission. `API-8102`: the API key or app lacks the `webhooks:read` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"`API-8113`: no such webhook endpoint (or it was deleted).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["webhooks:read"]},{"oauth2":["webhooks:read"]}],"summary":"Get a webhook endpoint","tags":["webhooks"]},"patch":{"description":"Its URL, description or event types; or disable and enable it.","operationId":"updateWebhookEndpoint","parameters":[{"name":"id","required":true,"in":"path","description":"The id.","schema":{"type":"string","format":"uuid","description":"The id."}},{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}},{"name":"Idempotency-Key","in":"header","description":"A unique key for this operation (e.g. a UUID, 1 to 255 visible characters), kept 24 hours: repeating the request with the same key returns the first answer (`Idempotent-Replayed: true`) instead of doing it again. Errors: `API-8109` (400) a key that is not valid, `API-8108` (409, retryable) the first request with this key is still running, `API-8107` (422) the key was used for a different request; `API-8118` (409) the first request created something whose secret is shown only once, so its answer is not repeated. An answer with `shown_once` repeats its secret within 10 minutes, then `API-8118`.","required":false,"schema":{"type":"string","minLength":1,"maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateWebhookEndpoint"}}}},"responses":{"200":{"description":"The endpoint.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEndpoint"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `AUTH-1003`: your seat was deactivated (view only). `AUTH-1004`: all seats are inactive because the seat charge was not paid (view only). `AUTH-1002`: your role lacks the `api.manage` permission. `API-8102`: the API key or app lacks the `webhooks:write` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"`API-8113`: no such webhook endpoint (or it was deleted).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"description":"`API-8001`: some fields are missing or not valid. `details.fields` lists each invalid field with its own code (e.g. `API-8002` required, `API-8012` wrong format). `API-8140`: the URL is not a public https address. `API-8141`: an event type is not a webhook event.","headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["webhooks:write"]},{"oauth2":["webhooks:write"]}],"summary":"Update a webhook endpoint","tags":["webhooks"]},"delete":{"description":"Nothing more is sent to it; its deliveries stay in the log.","operationId":"deleteWebhookEndpoint","parameters":[{"name":"id","required":true,"in":"path","description":"The id.","schema":{"type":"string","format":"uuid","description":"The id."}},{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}}],"responses":{"204":{"description":"Deleted.","headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `AUTH-1003`: your seat was deactivated (view only). `AUTH-1004`: all seats are inactive because the seat charge was not paid (view only). `AUTH-1002`: your role lacks the `api.manage` permission. `API-8102`: the API key or app lacks the `webhooks:write` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"`API-8113`: no such webhook endpoint (or it was deleted).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["webhooks:write"]},{"oauth2":["webhooks:write"]}],"summary":"Delete a webhook endpoint","tags":["webhooks"]}},"/v1/webhook-endpoints/{id}/secret":{"post":{"description":"A new secret, shown once (or your own `secret`, never returned). For 24 hours every delivery is signed with both secrets (Standard Webhooks multiple signatures), so the receiver can switch without losing events. Rotation never changes the endpoint's `status`: a disabled endpoint stays disabled (the answer's `note` says so) until `PATCH /v1/webhook-endpoints/{id}` sets `enabled: true`.","operationId":"rotateWebhookSecret","parameters":[{"name":"id","required":true,"in":"path","description":"The id.","schema":{"type":"string","format":"uuid","description":"The id."}},{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}},{"name":"Idempotency-Key","in":"header","description":"A unique key for this operation (e.g. a UUID, 1 to 255 visible characters), kept 24 hours: repeating the request with the same key returns the first answer (`Idempotent-Replayed: true`) instead of doing it again. Errors: `API-8109` (400) a key that is not valid, `API-8108` (409, retryable) the first request with this key is still running, `API-8107` (422) the key was used for a different request; `API-8118` (409) the first request created something whose secret is shown only once, so its answer is not repeated. An answer with `shown_once` repeats its secret within 10 minutes, then `API-8118`.","required":false,"schema":{"type":"string","minLength":1,"maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RotateWebhookSecret"}}}},"responses":{"201":{"description":"The endpoint, its new secret and a `note` on what stayed unchanged.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RotatedWebhookSecret"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `AUTH-1003`: your seat was deactivated (view only). `AUTH-1004`: all seats are inactive because the seat charge was not paid (view only). `AUTH-1002`: your role lacks the `api.manage` permission. `API-8102`: the API key or app lacks the `webhooks:write` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"`API-8113`: no such webhook endpoint (or it was deleted).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["webhooks:write"]},{"oauth2":["webhooks:write"]}],"summary":"Rotate a webhook endpoint's secret","tags":["webhooks"]}},"/v1/webhook-endpoints/{id}/deliveries":{"get":{"description":"The delivery log, newest first.","operationId":"listWebhookDeliveries","parameters":[{"name":"id","required":true,"in":"path","description":"The id.","schema":{"type":"string","format":"uuid","description":"The id."}},{"name":"cursor","required":false,"in":"query","description":"The `next_cursor` of the previous page.","schema":{"description":"The `next_cursor` of the previous page.","type":"string","format":"uuid"}},{"name":"limit","required":false,"in":"query","description":"Items per page (1 to 100, default 50).","schema":{"default":50,"description":"Items per page (1 to 100, default 50).","type":"integer","minimum":1,"maximum":100}},{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"A page of deliveries.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookDeliveryPage"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `AUTH-1002`: your role lacks the `api.manage` permission. `API-8102`: the API key or app lacks the `webhooks:read` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"`API-8113`: no such webhook endpoint (or it was deleted).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["webhooks:read"]},{"oauth2":["webhooks:read"]}],"summary":"List an endpoint's deliveries","tags":["webhooks"]}},"/v1/webhook-deliveries/{id}":{"get":{"description":"The body sent and every attempt, with the endpoint answers and errors.","operationId":"getWebhookDelivery","parameters":[{"name":"id","required":true,"in":"path","description":"The id.","schema":{"type":"string","format":"uuid","description":"The id."}},{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"The delivery.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookDeliveryDetail"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `AUTH-1002`: your role lacks the `api.manage` permission. `API-8102`: the API key or app lacks the `webhooks:read` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"`API-8114`: no such webhook delivery.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["webhooks:read"]},{"oauth2":["webhooks:read"]}],"summary":"Get a webhook delivery","tags":["webhooks"]}},"/v1/webhook-deliveries/{id}/redeliver":{"post":{"description":"Sends the same body again under the same `webhook-id` (receivers de-duplicate by it), with retries.","operationId":"redeliverWebhook","parameters":[{"name":"id","required":true,"in":"path","description":"The id.","schema":{"type":"string","format":"uuid","description":"The id."}},{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}},{"name":"Idempotency-Key","in":"header","description":"A unique key for this operation (e.g. a UUID, 1 to 255 visible characters), kept 24 hours: repeating the request with the same key returns the first answer (`Idempotent-Replayed: true`) instead of doing it again. Errors: `API-8109` (400) a key that is not valid, `API-8108` (409, retryable) the first request with this key is still running, `API-8107` (422) the key was used for a different request; `API-8118` (409) the first request created something whose secret is shown only once, so its answer is not repeated. An answer with `shown_once` repeats its secret within 10 minutes, then `API-8118`.","required":false,"schema":{"type":"string","minLength":1,"maxLength":255}}],"responses":{"202":{"description":"Queued; the attempt appears in the log.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookDelivery"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `AUTH-1003`: your seat was deactivated (view only). `AUTH-1004`: all seats are inactive because the seat charge was not paid (view only). `AUTH-1002`: your role lacks the `api.manage` permission. `API-8102`: the API key or app lacks the `webhooks:write` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"`API-8114`: no such webhook delivery.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"409":{"description":"`API-8146`: the endpoint is disabled; enable it first.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["webhooks:write"]},{"oauth2":["webhooks:write"]}],"summary":"Redeliver a webhook","tags":["webhooks"]}},"/v1/webhook-endpoints/{id}/redeliver-failed":{"post":{"description":"Once the endpoint is enabled again (after Rabt disabled it, `disabled_reason` `failing`): sends again, in one step, every delivery that failed since its last delivered one, oldest first (at most 1000 per call; call again for more), each under its own `webhook-id`, as long as the delivery log keeps them.","operationId":"redeliverFailedWebhooks","parameters":[{"name":"id","required":true,"in":"path","description":"The id.","schema":{"type":"string","format":"uuid","description":"The id."}},{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}},{"name":"Idempotency-Key","in":"header","description":"A unique key for this operation (e.g. a UUID, 1 to 255 visible characters), kept 24 hours: repeating the request with the same key returns the first answer (`Idempotent-Replayed: true`) instead of doing it again. Errors: `API-8109` (400) a key that is not valid, `API-8108` (409, retryable) the first request with this key is still running, `API-8107` (422) the key was used for a different request; `API-8118` (409) the first request created something whose secret is shown only once, so its answer is not repeated. An answer with `shown_once` repeats its secret within 10 minutes, then `API-8118`.","required":false,"schema":{"type":"string","minLength":1,"maxLength":255}}],"responses":{"202":{"description":"How many were queued; their attempts appear in the log.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RedeliveredFailedWebhooks"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `AUTH-1003`: your seat was deactivated (view only). `AUTH-1004`: all seats are inactive because the seat charge was not paid (view only). `AUTH-1002`: your role lacks the `api.manage` permission. `API-8102`: the API key or app lacks the `webhooks:write` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"`API-8113`: no such webhook endpoint (or it was deleted).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"409":{"description":"`API-8146`: the endpoint is disabled; enable it first.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["webhooks:write"]},{"oauth2":["webhooks:write"]}],"summary":"Redeliver the failed webhooks of an endpoint","tags":["webhooks"]}},"/v1/webhook-endpoints/{id}/test-events":{"post":{"description":"Sends the endpoint a sample of the public event type given, built from its schema, marked `mode: \"test\"`, signed and delivered like any event (with retries) and kept in the delivery log; the endpoint need not be subscribed to the type.","operationId":"sendWebhookTestEvent","parameters":[{"name":"id","required":true,"in":"path","description":"The id.","schema":{"type":"string","format":"uuid","description":"The id."}},{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}},{"name":"Idempotency-Key","in":"header","description":"A unique key for this operation (e.g. a UUID, 1 to 255 visible characters), kept 24 hours: repeating the request with the same key returns the first answer (`Idempotent-Replayed: true`) instead of doing it again. Errors: `API-8109` (400) a key that is not valid, `API-8108` (409, retryable) the first request with this key is still running, `API-8107` (422) the key was used for a different request; `API-8118` (409) the first request created something whose secret is shown only once, so its answer is not repeated. An answer with `shown_once` repeats its secret within 10 minutes, then `API-8118`.","required":false,"schema":{"type":"string","minLength":1,"maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookTestEvent"}}}},"responses":{"202":{"description":"Queued; the attempt appears in the log.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookDelivery"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `AUTH-1003`: your seat was deactivated (view only). `AUTH-1004`: all seats are inactive because the seat charge was not paid (view only). `AUTH-1002`: your role lacks the `api.manage` permission. `API-8102`: the API key or app lacks the `webhooks:write` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"`API-8113`: no such webhook endpoint (or it was deleted).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"409":{"description":"`API-8146`: the endpoint is disabled; enable it first.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["webhooks:write"]},{"oauth2":["webhooks:write"]}],"summary":"Send a test event","tags":["webhooks"]}},"/v1/test-mode":{"get":{"description":"The organization's test space: where test keys (`rbk_test_…`) work, when it started and when its test data was last cleared. In the test space every endpoint works on separate data: messages are simulated (sent, then delivered, with no provider call), nothing reaches customers, the wallet is never charged, and webhooks are delivered with `mode: \"test\"`.","operationId":"getTestMode","parameters":[{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"The test mode.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TestMode"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `AUTH-1002`: your role lacks the `api.manage` permission. `API-8102`: the API key or app lacks the `test_mode:read` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["test_mode:read"]},{"oauth2":["test_mode:read"]}],"summary":"Get the API test mode","tags":["test-mode"]}},"/v1/test-mode/clear":{"post":{"description":"Retires the current test space with everything in it (kept, closed: Rabt never deletes); the next request with a test key starts an empty one. Live data is never touched. Nothing to clear changes nothing. Emits `test_mode.cleared`.","operationId":"clearTestData","parameters":[{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}},{"name":"Idempotency-Key","in":"header","description":"A unique key for this operation (e.g. a UUID, 1 to 255 visible characters), kept 24 hours: repeating the request with the same key returns the first answer (`Idempotent-Replayed: true`) instead of doing it again. Errors: `API-8109` (400) a key that is not valid, `API-8108` (409, retryable) the first request with this key is still running, `API-8107` (422) the key was used for a different request; `API-8118` (409) the first request created something whose secret is shown only once, so its answer is not repeated. An answer with `shown_once` repeats its secret within 10 minutes, then `API-8118`.","required":false,"schema":{"type":"string","minLength":1,"maxLength":255}}],"responses":{"200":{"description":"The test mode after clearing.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TestMode"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`API-8147`: a test space is reachable only with test keys.\n\n`AUTH-1040`: you are not a member of the organization named. `AUTH-1003`: your seat was deactivated (view only). `AUTH-1004`: all seats are inactive because the seat charge was not paid (view only). `AUTH-1002`: your role lacks the `api.manage` permission. `API-8102`: the API key or app lacks the `test_mode:write` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["test_mode:write"]},{"oauth2":["test_mode:write"]}],"summary":"Clear the test data","tags":["test-mode"]}},"/v1/organization/setup":{"get":{"description":"The organization’s current setup in brief, for planning a change: members and roles, spaces with their members and routed channels, the routing settings, the connected channels, the AI switches, the integrations, record connectors and webhook endpoints. Each part is read with its own module’s scope and permission; the parts the request may not read are listed in `not_shown` with what they need.","operationId":"getOrganizationSetup","parameters":[{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"The setup.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrganizationSetup"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `API-8102`: the API key or app lacks the `organization:read` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["organization:read"]},{"oauth2":["organization:read"]}],"summary":"Read the organization's setup","tags":["organizations"]}},"/v1/tickets/bulk/status":{"post":{"description":"`POST /v1/tickets/{ticketId}/status` on many tickets. The change of the single call on each ticket (its rules, timeline event, audit entry and webhook event), one at a time: a ticket refused is left as it was and listed in `failed` with its error, one already in the state is `unchanged`. `ticket_ids` (up to 500), or `filter` (the ticket log’s filters, by name too): up to `max` tickets (default 1,000) and 20 s a call, then `next_cursor`. `dry_run` changes nothing and counts. `batch_id` undoes it (`undoBatch`, 24 hours).","operationId":"bulkChangeTicketStatus","parameters":[{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}},{"name":"Idempotency-Key","in":"header","description":"A unique key for this operation (e.g. a UUID, 1 to 255 visible characters), kept 24 hours: repeating the request with the same key returns the first answer (`Idempotent-Replayed: true`) instead of doing it again. Errors: `API-8109` (400) a key that is not valid, `API-8108` (409, retryable) the first request with this key is still running, `API-8107` (422) the key was used for a different request; `API-8118` (409) the first request created something whose secret is shown only once, so its answer is not repeated. An answer with `shown_once` repeats its secret within 10 minutes, then `API-8118`.","required":false,"schema":{"type":"string","minLength":1,"maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkChangeTicketStatus"}}}},"responses":{"200":{"description":"The counts.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkTicketStatusResult"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `AUTH-1003`: your seat was deactivated (view only). `AUTH-1004`: all seats are inactive because the seat charge was not paid (view only). `AUTH-1002`: your role lacks the `tickets.reply` permission. `API-8102`: the API key or app lacks the `tickets:write` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["tickets:write"]},{"oauth2":["tickets:write"]}],"summary":"Pick up, close or reopen many tickets","tags":["tickets"]}},"/v1/tickets/bulk/assign":{"post":{"description":"`POST /v1/tickets/{ticketId}/assign` on many tickets; the member by `membership_id`, or by email or name in `assignee`. The change of the single call on each ticket (its rules, timeline event, audit entry and webhook event), one at a time: a ticket refused is left as it was and listed in `failed` with its error, one already in the state is `unchanged`. `ticket_ids` (up to 500), or `filter` (the ticket log’s filters, by name too): up to `max` tickets (default 1,000) and 20 s a call, then `next_cursor`. `dry_run` changes nothing and counts. `batch_id` undoes it (`undoBatch`, 24 hours).","operationId":"bulkAssignTickets","parameters":[{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}},{"name":"Idempotency-Key","in":"header","description":"A unique key for this operation (e.g. a UUID, 1 to 255 visible characters), kept 24 hours: repeating the request with the same key returns the first answer (`Idempotent-Replayed: true`) instead of doing it again. Errors: `API-8109` (400) a key that is not valid, `API-8108` (409, retryable) the first request with this key is still running, `API-8107` (422) the key was used for a different request; `API-8118` (409) the first request created something whose secret is shown only once, so its answer is not repeated. An answer with `shown_once` repeats its secret within 10 minutes, then `API-8118`.","required":false,"schema":{"type":"string","minLength":1,"maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkAssignTickets"}}}},"responses":{"200":{"description":"The counts.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkTicketStatusResult"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `AUTH-1003`: your seat was deactivated (view only). `AUTH-1004`: all seats are inactive because the seat charge was not paid (view only). `AUTH-1002`: your role lacks the `tickets.assign` permission. `API-8102`: the API key or app lacks the `tickets:write` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["tickets:write"]},{"oauth2":["tickets:write"]}],"summary":"Assign many tickets to a member","tags":["tickets"]}},"/v1/tickets/bulk/move":{"post":{"description":"`POST /v1/tickets/{ticketId}/move` on many tickets (each is handed over: its assignee is cleared); the space by `space_id` or by name in `space`. The change of the single call on each ticket (its rules, timeline event, audit entry and webhook event), one at a time: a ticket refused is left as it was and listed in `failed` with its error, one already in the state is `unchanged`. `ticket_ids` (up to 500), or `filter` (the ticket log’s filters, by name too): up to `max` tickets (default 1,000) and 20 s a call, then `next_cursor`. `dry_run` changes nothing and counts. `batch_id` undoes it (`undoBatch`, 24 hours).","operationId":"bulkMoveTickets","parameters":[{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}},{"name":"Idempotency-Key","in":"header","description":"A unique key for this operation (e.g. a UUID, 1 to 255 visible characters), kept 24 hours: repeating the request with the same key returns the first answer (`Idempotent-Replayed: true`) instead of doing it again. Errors: `API-8109` (400) a key that is not valid, `API-8108` (409, retryable) the first request with this key is still running, `API-8107` (422) the key was used for a different request; `API-8118` (409) the first request created something whose secret is shown only once, so its answer is not repeated. An answer with `shown_once` repeats its secret within 10 minutes, then `API-8118`.","required":false,"schema":{"type":"string","minLength":1,"maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkMoveTickets"}}}},"responses":{"200":{"description":"The counts.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkTicketStatusResult"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `AUTH-1003`: your seat was deactivated (view only). `AUTH-1004`: all seats are inactive because the seat charge was not paid (view only). `AUTH-1002`: your role lacks the `tickets.reply` permission. `API-8102`: the API key or app lacks the `tickets:write` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["tickets:write"]},{"oauth2":["tickets:write"]}],"summary":"Move many tickets to a space","tags":["tickets"]}},"/v1/tickets/bulk/tags":{"post":{"description":"Adds the tags in `add` (made on first use) and removes those in `remove` on many tickets. The change of the single call on each ticket (its rules, timeline event, audit entry and webhook event), one at a time: a ticket refused is left as it was and listed in `failed` with its error, one already in the state is `unchanged`. `ticket_ids` (up to 500), or `filter` (the ticket log’s filters, by name too): up to `max` tickets (default 1,000) and 20 s a call, then `next_cursor`. `dry_run` changes nothing and counts. `batch_id` undoes it (`undoBatch`, 24 hours).","operationId":"bulkTagTickets","parameters":[{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}},{"name":"Idempotency-Key","in":"header","description":"A unique key for this operation (e.g. a UUID, 1 to 255 visible characters), kept 24 hours: repeating the request with the same key returns the first answer (`Idempotent-Replayed: true`) instead of doing it again. Errors: `API-8109` (400) a key that is not valid, `API-8108` (409, retryable) the first request with this key is still running, `API-8107` (422) the key was used for a different request; `API-8118` (409) the first request created something whose secret is shown only once, so its answer is not repeated. An answer with `shown_once` repeats its secret within 10 minutes, then `API-8118`.","required":false,"schema":{"type":"string","minLength":1,"maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkTagTickets"}}}},"responses":{"200":{"description":"The counts.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkTicketStatusResult"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `AUTH-1003`: your seat was deactivated (view only). `AUTH-1004`: all seats are inactive because the seat charge was not paid (view only). `AUTH-1002`: your role lacks the `tickets.reply` permission. `API-8102`: the API key or app lacks the `tickets:write` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["tickets:write"]},{"oauth2":["tickets:write"]}],"summary":"Add or remove tags on many tickets","tags":["tickets"]}},"/v1/tickets/bulk/priority":{"post":{"deprecated":true,"description":"Deprecated: there is no built-in priority (an organization keeps its own classification list instead). Accepted and ignored: every ticket is `unchanged` and no batch is recorded. The change of the single call on each ticket (its rules, timeline event, audit entry and webhook event), one at a time: a ticket refused is left as it was and listed in `failed` with its error, one already in the state is `unchanged`. `ticket_ids` (up to 500), or `filter` (the ticket log’s filters, by name too): up to `max` tickets (default 1,000) and 20 s a call, then `next_cursor`. `dry_run` changes nothing and counts. `batch_id` undoes it (`undoBatch`, 24 hours).","operationId":"bulkSetTicketPriority","parameters":[{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}},{"name":"Idempotency-Key","in":"header","description":"A unique key for this operation (e.g. a UUID, 1 to 255 visible characters), kept 24 hours: repeating the request with the same key returns the first answer (`Idempotent-Replayed: true`) instead of doing it again. Errors: `API-8109` (400) a key that is not valid, `API-8108` (409, retryable) the first request with this key is still running, `API-8107` (422) the key was used for a different request; `API-8118` (409) the first request created something whose secret is shown only once, so its answer is not repeated. An answer with `shown_once` repeats its secret within 10 minutes, then `API-8118`.","required":false,"schema":{"type":"string","minLength":1,"maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkSetTicketPriority"}}}},"responses":{"200":{"description":"The counts.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkTicketStatusResult"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `AUTH-1003`: your seat was deactivated (view only). `AUTH-1004`: all seats are inactive because the seat charge was not paid (view only). `AUTH-1002`: your role lacks the `tickets.reply` permission. `API-8102`: the API key or app lacks the `tickets:write` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["tickets:write"]},{"oauth2":["tickets:write"]}],"summary":"Set the priority of many tickets (deprecated)","tags":["tickets"]}},"/v1/tickets/bulk/undo":{"post":{"description":"Restores the previous status, assignee, space, priority or tags of the tickets a bulk change changed, each only while it is still as the batch left it (a ticket changed since is `unchanged`); each restore is a normal change with its own audit entry. Within 24 hours (`TKT-6311`); a batch once (`TKT-6310`). A ticket that was unassigned in a space goes back to its queue.","operationId":"undoBatch","parameters":[{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}},{"name":"Idempotency-Key","in":"header","description":"A unique key for this operation (e.g. a UUID, 1 to 255 visible characters), kept 24 hours: repeating the request with the same key returns the first answer (`Idempotent-Replayed: true`) instead of doing it again. Errors: `API-8109` (400) a key that is not valid, `API-8108` (409, retryable) the first request with this key is still running, `API-8107` (422) the key was used for a different request; `API-8118` (409) the first request created something whose secret is shown only once, so its answer is not repeated. An answer with `shown_once` repeats its secret within 10 minutes, then `API-8118`.","required":false,"schema":{"type":"string","minLength":1,"maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UndoTicketBatch"}}}},"responses":{"200":{"description":"The counts.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkTicketStatusResult"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `AUTH-1003`: your seat was deactivated (view only). `AUTH-1004`: all seats are inactive because the seat charge was not paid (view only). `AUTH-1002`: your role lacks the `tickets.reply` permission. `API-8102`: the API key or app lacks the `tickets:write` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["tickets:write"]},{"oauth2":["tickets:write"]}],"summary":"Undo a bulk change","tags":["tickets"]}},"/v1/tickets":{"get":{"description":"The tickets you may see (your own, your spaces, all with `tickets.view_all`), newest activity first, with filters: status, space, assignee, channel, contact, `q` (number, subject, contact), dates created and of last activity (`*_from` inclusive, `*_to` exclusive, UTC), `text` (words of the conversation) and `unread` (only those you have not read); a page after `cursor` or at `offset` (numbered pages), with the `total` matching. Tickets in Spam are listed only with `spam=true` (`tickets.view_all`). While the Rabt team has paused non-essential features during an incident, `q` and `text` answer `SYS-1071`.","operationId":"listTickets","parameters":[{"name":"status","required":false,"in":"query","description":"Statuses, comma-separated (e.g. `open,in_progress`).","schema":{"description":"Statuses, comma-separated (e.g. `open,in_progress`).","type":"string","maxLength":40,"pattern":"^(open|in_progress|closed)(,(open|in_progress|closed))*$"}},{"name":"space_id","required":false,"in":"query","description":"A department space, or `none` for tickets in no department space.","schema":{"description":"A department space, or `none` for tickets in no department space.","type":"string","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}|none)$"}},{"name":"assignee_membership_id","required":false,"in":"query","description":"A member (membership id), or `none` for unassigned tickets (the queue).","schema":{"description":"A member (membership id), or `none` for unassigned tickets (the queue).","type":"string","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}|none)$"}},{"name":"channel_type","required":false,"in":"query","description":"Only this channel.","schema":{"description":"Only this channel.","$ref":"#/components/schemas/ChannelType"}},{"name":"classification_option_id","required":false,"in":"query","description":"Only tickets with this option of a classification list (`GET /v1/ticket-classifications`).","schema":{"description":"Only tickets with this option of a classification list (`GET /v1/ticket-classifications`).","type":"string","format":"uuid"}},{"name":"tag_id","required":false,"in":"query","description":"Only tickets with this tag (`GET /v1/ticket-tags`).","schema":{"description":"Only tickets with this tag (`GET /v1/ticket-tags`).","type":"string","format":"uuid"}},{"name":"contact_id","required":false,"in":"query","description":"Only this contact's tickets.","schema":{"description":"Only this contact's tickets.","type":"string","format":"uuid"}},{"name":"updated_since","required":false,"in":"query","description":"Only tickets changed at or after this time (ISO 8601): a ticket’s fields, or a new item on it.","schema":{"description":"Only tickets changed at or after this time (ISO 8601): a ticket’s fields, or a new item on it.","type":"string","format":"date-time"}},{"name":"spam","required":false,"in":"query","description":"`true`: the tickets in Spam instead (the Spam view: `tickets.view_all`); they are never in the other lists.","schema":{"description":"`true`: the tickets in Spam instead (the Spam view: `tickets.view_all`); they are never in the other lists.","type":"string","enum":["true","false"]}},{"name":"unread","required":false,"in":"query","description":"`true`: only the tickets you have not read (a customer message you have not seen; never closed ones).","schema":{"description":"`true`: only the tickets you have not read (a customer message you have not seen; never closed ones).","type":"string","enum":["true","false"]}},{"name":"q","required":false,"in":"query","description":"A ticket number (`1283` or `#1283`), words of the subject, a part of the contact's name, number or address, or words of a message or internal note (each word of at least 2 letters; prefixes match, Arabic-aware): a ticket matching any of them.","schema":{"description":"A ticket number (`1283` or `#1283`), words of the subject, a part of the contact's name, number or address, or words of a message or internal note (each word of at least 2 letters; prefixes match, Arabic-aware): a ticket matching any of them.","type":"string","maxLength":200}},{"name":"created_from","required":false,"in":"query","description":"Created at or after this time (inclusive) (ISO 8601, UTC).","schema":{"description":"Created at or after this time (inclusive) (ISO 8601, UTC).","type":"string","format":"date-time"}},{"name":"created_to","required":false,"in":"query","description":"Created before this time (exclusive) (ISO 8601, UTC).","schema":{"description":"Created before this time (exclusive) (ISO 8601, UTC).","type":"string","format":"date-time"}},{"name":"last_activity_from","required":false,"in":"query","description":"Last activity at or after this time (inclusive) (ISO 8601, UTC).","schema":{"description":"Last activity at or after this time (inclusive) (ISO 8601, UTC).","type":"string","format":"date-time"}},{"name":"last_activity_to","required":false,"in":"query","description":"Last activity before this time (exclusive) (ISO 8601, UTC).","schema":{"description":"Last activity before this time (exclusive) (ISO 8601, UTC).","type":"string","format":"date-time"}},{"name":"text","required":false,"in":"query","description":"Words of the conversation: tickets with a message or internal note containing every word (prefixes match, Arabic-aware).","schema":{"description":"Words of the conversation: tickets with a message or internal note containing every word (prefixes match, Arabic-aware).","type":"string","maxLength":200}},{"name":"channel_id","required":false,"in":"query","description":"Only this connected channel (one WhatsApp number, one mailbox): its id from `GET /v1/channels`, also of a disconnected one.","schema":{"description":"Only this connected channel (one WhatsApp number, one mailbox): its id from `GET /v1/channels`, also of a disconnected one.","type":"string","format":"uuid"}},{"name":"cursor","required":false,"in":"query","description":"The `next_cursor` of the previous page.","schema":{"description":"The `next_cursor` of the previous page.","type":"string","maxLength":200,"pattern":"^[A-Za-z0-9_-]+$"}},{"name":"offset","required":false,"in":"query","description":"Tickets to skip, for numbered pages (0 to 10000); instead of `cursor` (ignored with an offset).","schema":{"description":"Tickets to skip, for numbered pages (0 to 10000); instead of `cursor` (ignored with an offset).","type":"integer","minimum":0,"maximum":10000}},{"name":"limit","required":false,"in":"query","description":"Items per page (1 to 500, default 25).","schema":{"default":25,"description":"Items per page (1 to 500, default 25).","type":"integer","minimum":1,"maximum":500}},{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"A page of tickets.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TicketPage"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `API-8102`: the API key or app lacks the `tickets:read` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["tickets:read"]},{"oauth2":["tickets:read"]}],"summary":"List tickets (the ticket log)","tags":["tickets"]},"post":{"description":"A ticket for a contact on a channel with its first reply or internal note (`first_message`, required), assigned to you (docs/13 \"created by a member\"). The ticket, its number, its assignment and the first message are created together: a start refused for any reason creates nothing and uses no number, and one sent again with the same `first_message.client_key` answers the same ticket (`duplicate: true`). A WhatsApp conversation opens with an approved template (`first_message.whatsapp_template`). On a conversation-threaded channel (WhatsApp, X, Instagram, Messenger and TikTok DMs, web chat; `GET /v1/channels/capabilities` `threading`), a contact has one open conversation per channel account: when they already have an open or in-progress ticket where their message would land (a phone thread’s on a phone-addressed channel), the first message goes to that ticket and it is returned with `200` and `created: false` (yours when nobody had it). Email and public comments keep their own threads and always create.","operationId":"createTicket","parameters":[{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}},{"name":"Idempotency-Key","in":"header","description":"A unique key for this operation (e.g. a UUID, 1 to 255 visible characters), kept 24 hours: repeating the request with the same key returns the first answer (`Idempotent-Replayed: true`) instead of doing it again. Errors: `API-8109` (400) a key that is not valid, `API-8108` (409, retryable) the first request with this key is still running, `API-8107` (422) the key was used for a different request; `API-8118` (409) the first request created something whose secret is shown only once, so its answer is not repeated. An answer with `shown_once` repeats its secret within 10 minutes, then `API-8118`.","required":false,"schema":{"type":"string","minLength":1,"maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateTicket"}}}},"responses":{"200":{"description":"The contact’s open conversation on that channel account, with the first message added (`created: false`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StartedTicket"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"201":{"description":"A new ticket with its first message (`created: true`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StartedTicket"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `AUTH-1003`: your seat was deactivated (view only). `AUTH-1004`: all seats are inactive because the seat charge was not paid (view only). `AUTH-1002`: your role lacks the `tickets.reply` permission. `API-8102`: the API key or app lacks the `tickets:write` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"`CRM-6001`: no such contact. `WA-2109`: no such template.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"409":{"description":"`TKT-6217`: the contact’s open ticket on that channel account is a teammate’s that you cannot see (its number is in the problem). `CRM-6003`/`CRM-6004`: the `recipient` phone or email is another contact’s (`existing_contact_id`; merge them first).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"description":"`API-8001`: some fields are missing or not valid. `details.fields` lists each invalid field with its own code (e.g. `API-8002` required, `API-8012` wrong format). `API-8001`: no `first_message` (`body.first_message`: `API-8002`) or one without text (`TKT-6228`). `TKT-6140`: the recipient is not the contact’s on this channel (a phone or email not on the contact is added to it with `contacts:write`). `TKT-6197`: only the customer starts conversations on this channel (web chat, store reviews). `TKT-6226`: an email ticket needs a `subject` (every email of the ticket carries it). `WA-2108`: the template is not approved.","headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["tickets:write"]},{"oauth2":["tickets:write"]}],"summary":"Start a ticket","tags":["tickets"]}},"/v1/tickets/counts":{"get":{"description":"Open, in progress, in queue, closed, of the tickets you may see: in one department space (`space_id`), of one member (`assignee_membership_id`: your own for «مساحتي», My space), or all of them. Any other filter of the ticket log (status, channel, contact, tag, classification, `unread`, `q`, `text`, dates) adds `total`; `group_by` (`day`, `status`, `channel`, `space`, `assignee`, `contact`, `sender_domain`; `group_limit` keeps the top ones) adds `groups`.","operationId":"countTickets","parameters":[{"name":"space_id","required":false,"in":"query","description":"A department space, or `none` for tickets in no department space.","schema":{"description":"A department space, or `none` for tickets in no department space.","type":"string","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}|none)$"}},{"name":"assignee_membership_id","required":false,"in":"query","description":"A member (membership id), or `none` for unassigned tickets (the queue).","schema":{"description":"A member (membership id), or `none` for unassigned tickets (the queue).","type":"string","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}|none)$"}},{"name":"status","required":false,"in":"query","description":"Statuses, comma-separated (e.g. `open,in_progress`).","schema":{"description":"Statuses, comma-separated (e.g. `open,in_progress`).","type":"string","maxLength":40,"pattern":"^(open|in_progress|closed)(,(open|in_progress|closed))*$"}},{"name":"channel_type","required":false,"in":"query","description":"Only this channel.","schema":{"description":"Only this channel.","$ref":"#/components/schemas/ChannelType"}},{"name":"classification_option_id","required":false,"in":"query","description":"Only tickets with this option of a classification list (`GET /v1/ticket-classifications`).","schema":{"description":"Only tickets with this option of a classification list (`GET /v1/ticket-classifications`).","type":"string","format":"uuid"}},{"name":"tag_id","required":false,"in":"query","description":"Only tickets with this tag (`GET /v1/ticket-tags`).","schema":{"description":"Only tickets with this tag (`GET /v1/ticket-tags`).","type":"string","format":"uuid"}},{"name":"contact_id","required":false,"in":"query","description":"Only this contact's tickets.","schema":{"description":"Only this contact's tickets.","type":"string","format":"uuid"}},{"name":"updated_since","required":false,"in":"query","description":"Only tickets changed at or after this time (ISO 8601): a ticket’s fields, or a new item on it.","schema":{"description":"Only tickets changed at or after this time (ISO 8601): a ticket’s fields, or a new item on it.","type":"string","format":"date-time"}},{"name":"spam","required":false,"in":"query","description":"`true`: the tickets in Spam instead (the Spam view: `tickets.view_all`); they are never in the other lists.","schema":{"description":"`true`: the tickets in Spam instead (the Spam view: `tickets.view_all`); they are never in the other lists.","type":"string","enum":["true","false"]}},{"name":"unread","required":false,"in":"query","description":"`true`: only the tickets you have not read (a customer message you have not seen; never closed ones).","schema":{"description":"`true`: only the tickets you have not read (a customer message you have not seen; never closed ones).","type":"string","enum":["true","false"]}},{"name":"q","required":false,"in":"query","description":"A ticket number (`1283` or `#1283`), words of the subject, a part of the contact's name, number or address, or words of a message or internal note (each word of at least 2 letters; prefixes match, Arabic-aware): a ticket matching any of them.","schema":{"description":"A ticket number (`1283` or `#1283`), words of the subject, a part of the contact's name, number or address, or words of a message or internal note (each word of at least 2 letters; prefixes match, Arabic-aware): a ticket matching any of them.","type":"string","maxLength":200}},{"name":"created_from","required":false,"in":"query","description":"Created at or after this time (inclusive) (ISO 8601, UTC).","schema":{"description":"Created at or after this time (inclusive) (ISO 8601, UTC).","type":"string","format":"date-time"}},{"name":"created_to","required":false,"in":"query","description":"Created before this time (exclusive) (ISO 8601, UTC).","schema":{"description":"Created before this time (exclusive) (ISO 8601, UTC).","type":"string","format":"date-time"}},{"name":"last_activity_from","required":false,"in":"query","description":"Last activity at or after this time (inclusive) (ISO 8601, UTC).","schema":{"description":"Last activity at or after this time (inclusive) (ISO 8601, UTC).","type":"string","format":"date-time"}},{"name":"last_activity_to","required":false,"in":"query","description":"Last activity before this time (exclusive) (ISO 8601, UTC).","schema":{"description":"Last activity before this time (exclusive) (ISO 8601, UTC).","type":"string","format":"date-time"}},{"name":"text","required":false,"in":"query","description":"Words of the conversation: tickets with a message or internal note containing every word (prefixes match, Arabic-aware).","schema":{"description":"Words of the conversation: tickets with a message or internal note containing every word (prefixes match, Arabic-aware).","type":"string","maxLength":200}},{"name":"channel_id","required":false,"in":"query","description":"Only this connected channel (one WhatsApp number, one mailbox): its id from `GET /v1/channels`, also of a disconnected one.","schema":{"description":"Only this connected channel (one WhatsApp number, one mailbox): its id from `GET /v1/channels`, also of a disconnected one.","type":"string","format":"uuid"}},{"name":"group_by","required":false,"in":"query","description":"Count by `day` (created, UTC), `status`, `channel`, `space`, `assignee`, `contact` or `sender_domain` (the domain of the contact’s email address) as well (in `groups`, most tickets first; `group_limit` keeps the top ones).","schema":{"description":"Count by `day` (created, UTC), `status`, `channel`, `space`, `assignee`, `contact` or `sender_domain` (the domain of the contact’s email address) as well (in `groups`, most tickets first; `group_limit` keeps the top ones).","type":"string","enum":["day","status","channel","space","assignee","contact","sender_domain"]}},{"name":"group_limit","required":false,"in":"query","description":"With `group_by`: the most groups to answer (the top ones; default all).","schema":{"description":"With `group_by`: the most groups to answer (the top ones; default all).","type":"integer","minimum":1,"maximum":1000}},{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"The counters.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TicketCounts"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `API-8102`: the API key or app lacks the `tickets:read` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["tickets:read"]},{"oauth2":["tickets:read"]}],"summary":"Count tickets (the live counters)","tags":["tickets"]}},"/v1/tickets/unread-count":{"get":{"description":"How many tickets you have not read (the «التذاكر» tab, the page title and the app badge): assigned to you or in your department spaces, never closed, Spam or deleted ones. Each ticket has its own `unread_count`.","operationId":"countUnreadTickets","parameters":[{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Your unread tickets.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnreadTicketCount"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `API-8102`: the API key or app lacks the `tickets:read` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["tickets:read"]},{"oauth2":["tickets:read"]}],"summary":"Count your unread tickets","tags":["tickets"]}},"/v1/tickets/metrics":{"get":{"description":"The tickets you may see (not in Spam) of a period, `from` (inclusive) to `to` (exclusive), at most 366 days: created, closed, open at the end, first response and resolution times, reopenings, and closes after the AI agent took part, in one group or grouped, with the ticket log's filters (`status`: current statuses). Definitions: `created`: created in the period; `closed`: tickets whose latest close is in the period (merged tickets count in `created` only); `open_at_end`: created before the end and not closed then by their latest close (a later reopening is not replayed); `first_response_seconds`: the first member reply after creation, of the tickets created in the period that a customer started (AI replies and notes do not count); `resolution_seconds`: closing time minus creation time of the tickets closed in the period; `reopened`: reopenings (closed → open) in the period; `closed_after_ai`: closed tickets in which the AI agent took part (the AI never closes tickets), `closed_by_members`: the other closed ones. `handled` (group_by `member` only): closed in the period by that member. Medians and 90th percentiles are interpolated, in whole seconds rounded half up, null without tickets. Imported chat history is in no metric. No SLA, business hours or satisfaction score.","operationId":"getTicketMetrics","parameters":[{"name":"from","required":true,"in":"query","description":"The period’s start, ISO 8601 UTC (inclusive).","schema":{"type":"string","format":"date-time","description":"The period’s start, ISO 8601 UTC (inclusive)."}},{"name":"to","required":true,"in":"query","description":"The period’s end, ISO 8601 UTC (exclusive): after `from`, at most 366 days later (TKT-6255).","schema":{"type":"string","format":"date-time","description":"The period’s end, ISO 8601 UTC (exclusive): after `from`, at most 366 days later (TKT-6255)."}},{"name":"group_by","required":false,"in":"query","description":"How to group the tickets (default `none`). `group_by`: `none` (one group), `day` or `week` (UTC days, ISO weeks from Monday; every bucket of the period, each metric in the bucket of its own time (first response by creation, resolution by close), `open_at_end` at the bucket's end; `key` is the bucket's first date), `space`, `member` (the assignee), `channel` (the ticket's current ones), `tag` or `classification_option` (a ticket counts in each of its tags or options of live lists; at most 100 groups, most created first). `key` null is the none bucket (no space, unassigned, no tag or option).","schema":{"default":"none","description":"How to group the tickets (default `none`). `group_by`: `none` (one group), `day` or `week` (UTC days, ISO weeks from Monday; every bucket of the period, each metric in the bucket of its own time (first response by creation, resolution by close), `open_at_end` at the bucket's end; `key` is the bucket's first date), `space`, `member` (the assignee), `channel` (the ticket's current ones), `tag` or `classification_option` (a ticket counts in each of its tags or options of live lists; at most 100 groups, most created first). `key` null is the none bucket (no space, unassigned, no tag or option).","type":"string","enum":["none","day","week","month","space","member","channel","tag","classification_option"]}},{"name":"space_id","required":false,"in":"query","description":"A department space, or `none` for tickets in no department space.","schema":{"description":"A department space, or `none` for tickets in no department space.","type":"string","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}|none)$"}},{"name":"assignee_membership_id","required":false,"in":"query","description":"A member (membership id), or `none` for unassigned tickets (the queue).","schema":{"description":"A member (membership id), or `none` for unassigned tickets (the queue).","type":"string","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}|none)$"}},{"name":"channel_type","required":false,"in":"query","description":"Only this channel.","schema":{"description":"Only this channel.","$ref":"#/components/schemas/ChannelType"}},{"name":"tag_id","required":false,"in":"query","description":"Only tickets with this tag (`GET /v1/ticket-tags`).","schema":{"description":"Only tickets with this tag (`GET /v1/ticket-tags`).","type":"string","format":"uuid"}},{"name":"classification_option_id","required":false,"in":"query","description":"Only tickets with this option of a classification list (`GET /v1/ticket-classifications`).","schema":{"description":"Only tickets with this option of a classification list (`GET /v1/ticket-classifications`).","type":"string","format":"uuid"}},{"name":"status","required":false,"in":"query","description":"Current statuses, comma-separated (e.g. `open,in_progress`).","schema":{"description":"Current statuses, comma-separated (e.g. `open,in_progress`).","type":"string","maxLength":40,"pattern":"^(open|in_progress|closed)(,(open|in_progress|closed))*$"}},{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"The metrics.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TicketMetrics"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `API-8102`: the API key or app lacks the `tickets:read` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["tickets:read"]},{"oauth2":["tickets:read"]}],"summary":"Ticket metrics of a period","tags":["tickets"]}},"/v1/tickets/start-options":{"get":{"description":"Each of the contact’s email addresses, phone numbers and channel identities, with the connected channels that can open a conversation there, those not connected yet, and those only the customer starts (web chat; App Store, Google Play and Google Maps reviews); and `choices`, what to offer a member: one per connected channel of ours that reaches the contact, named by our side, one of them `preselected` (never an email choice: the member chooses the sender address, `TKT-6274` without one). Give exactly one of `contact_id`, or a `phone` (E.164) or `email` that is no contact yet: the channels that reach that kind of address, so the contact can be made when the first message is sent. Start one with `createTicket`, or `startConversation` for a bare number or address (docs/12, docs/13).","operationId":"listTicketStartOptions","parameters":[{"name":"contact_id","required":false,"in":"query","description":"The contact.","schema":{"description":"The contact.","type":"string","format":"uuid"}},{"name":"phone","required":false,"in":"query","description":"A number (E.164), no contact yet.","schema":{"description":"A number (E.164), no contact yet.","type":"string","pattern":"^\\+[1-9]\\d{6,14}$"}},{"name":"email","required":false,"in":"query","description":"An address, no contact yet.","schema":{"description":"An address, no contact yet.","type":"string","maxLength":320,"format":"email"}},{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"The options.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TicketStartOptions"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `AUTH-1003`: your seat was deactivated (view only). `AUTH-1004`: all seats are inactive because the seat charge was not paid (view only). `AUTH-1002`: your role lacks the `tickets.reply` permission. `API-8102`: the API key or app lacks the `tickets:read` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"`TKT-6101`: no such ticket, or it is in a space you cannot access (the same answer, so nothing is revealed).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["tickets:read"]},{"oauth2":["tickets:read"]}],"summary":"Where a ticket can be started for a contact, or for a number or address","tags":["tickets"]}},"/v1/tickets/by-number/{number}":{"get":{"operationId":"getTicketByNumber","parameters":[{"name":"number","required":true,"in":"path","description":"The ticket number (#1283).","schema":{"type":"integer","minimum":1,"maximum":9007199254740991,"description":"The ticket number (#1283)."}},{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"The ticket.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Ticket"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `API-8102`: the API key or app lacks the `tickets:read` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"`TKT-6101`: no such ticket, or it is in a space you cannot access (the same answer, so nothing is revealed).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["tickets:read"]},{"oauth2":["tickets:read"]}],"summary":"Get a ticket by its number","tags":["tickets"]}},"/v1/ticket-references":{"post":{"description":"For ticket, contact and company notes and internal chat: the tickets you may see link to them, the others answer only `accessible: false`.","operationId":"resolveTicketReferences","parameters":[{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResolveTicketReferences"}}}},"responses":{"200":{"description":"The references.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TicketReferences"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `API-8102`: the API key or app lacks the `tickets:read` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["tickets:read"]},{"oauth2":["tickets:read"]}],"summary":"Resolve #<number> references","tags":["tickets"]}},"/v1/tickets/{ticketId}":{"get":{"operationId":"getTicket","parameters":[{"name":"ticketId","required":true,"in":"path","description":"The ticket id.","schema":{"type":"string","format":"uuid","description":"The ticket id."}},{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"The ticket.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Ticket"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `API-8102`: the API key or app lacks the `tickets:read` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"`TKT-6101`: no such ticket, or it is in a space you cannot access (the same answer, so nothing is revealed).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["tickets:read"]},{"oauth2":["tickets:read"]}],"summary":"Get a ticket","tags":["tickets"]},"patch":{"description":"Subject (every email of the ticket carries it, as it is), note (deprecated, as is its alias `type`: the apps no longer show it), classifications (the organization’s own types, one option per list: `{list_id: option_id}`, null clears; `priority` is deprecated, accepted and ignored), tags (all of them, by name), company and the AI switch; the classifications and tags come from `GET /v1/ticket-classifications` and `GET /v1/ticket-tags`. Send the `version` you edited: a teammate’s change since answers `TKT-6104` instead of being overwritten.","operationId":"updateTicket","parameters":[{"name":"ticketId","required":true,"in":"path","description":"The ticket id.","schema":{"type":"string","format":"uuid","description":"The ticket id."}},{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}},{"name":"Idempotency-Key","in":"header","description":"A unique key for this operation (e.g. a UUID, 1 to 255 visible characters), kept 24 hours: repeating the request with the same key returns the first answer (`Idempotent-Replayed: true`) instead of doing it again. Errors: `API-8109` (400) a key that is not valid, `API-8108` (409, retryable) the first request with this key is still running, `API-8107` (422) the key was used for a different request; `API-8118` (409) the first request created something whose secret is shown only once, so its answer is not repeated. An answer with `shown_once` repeats its secret within 10 minutes, then `API-8118`.","required":false,"schema":{"type":"string","minLength":1,"maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateTicket"}}}},"responses":{"200":{"description":"The ticket.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Ticket"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `AUTH-1003`: your seat was deactivated (view only). `AUTH-1004`: all seats are inactive because the seat charge was not paid (view only). `AUTH-1002`: your role lacks the `tickets.reply` permission. `API-8102`: the API key or app lacks the `tickets:write` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"`TKT-6101`: no such ticket, or it is in a space you cannot access (the same answer, so nothing is revealed). `CRM-6002`: no such company. `TKT-6232`: no such live classification list. `TKT-6233`: the list has no such option.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"409":{"description":"`TKT-6104`: someone else changed the ticket since your version. `TKT-6102`: the ticket is closed (reopen it with status `open`).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"description":"`API-8001`: some fields are missing or not valid. `details.fields` lists each invalid field with its own code (e.g. `API-8002` required, `API-8012` wrong format). `TKT-6225`: the subject of a ticket with email (sent or received) no longer changes. `TKT-6226`: an email ticket without a subject. `TKT-6234`: an archived option. `TKT-6239`: a tag name empty or longer than 50 characters. `TKT-6240`: more than 20 tags. `TKT-6241`: the organization has 10,000 tags.","headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["tickets:write"]},{"oauth2":["tickets:write"]}],"summary":"Edit a ticket","tags":["tickets"]}},"/v1/tickets/{ticketId}/ai/resume":{"post":{"description":"After the AI agent handed the conversation off, failed (`ai.error`) or was switched off, it replies to the customer again: to their next messages, and to the last one if it is unanswered. Turns `ai_enabled` on. Doing it while it replies changes nothing.","operationId":"resumeTicketAi","parameters":[{"name":"ticketId","required":true,"in":"path","description":"The ticket id.","schema":{"type":"string","format":"uuid","description":"The ticket id."}},{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}},{"name":"Idempotency-Key","in":"header","description":"A unique key for this operation (e.g. a UUID, 1 to 255 visible characters), kept 24 hours: repeating the request with the same key returns the first answer (`Idempotent-Replayed: true`) instead of doing it again. Errors: `API-8109` (400) a key that is not valid, `API-8108` (409, retryable) the first request with this key is still running, `API-8107` (422) the key was used for a different request; `API-8118` (409) the first request created something whose secret is shown only once, so its answer is not repeated. An answer with `shown_once` repeats its secret within 10 minutes, then `API-8118`.","required":false,"schema":{"type":"string","minLength":1,"maxLength":255}}],"responses":{"200":{"description":"The ticket.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Ticket"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `AUTH-1003`: your seat was deactivated (view only). `AUTH-1004`: all seats are inactive because the seat charge was not paid (view only). `AUTH-1002`: your role lacks the `tickets.reply` permission. `API-8102`: the API key or app lacks the `tickets:write` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"`TKT-6101`: no such ticket, or it is in a space you cannot access (the same answer, so nothing is revealed).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"409":{"description":"`AI-5042`: the ticket is closed, or on a channel the AI agent does not reply on (calls, SMS). `AI-5044`: an admin stopped the AI agent everywhere.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["tickets:write"]},{"oauth2":["tickets:write"]}],"summary":"Turn the AI agent on again in a ticket","tags":["tickets"]}},"/v1/tickets/{ticketId}/status":{"post":{"description":"open → in progress (an unassigned ticket becomes yours), in progress → open (returned; its assignee kept), open or in progress → closed, closed → open (reopen, docs/13; publishes `ticket.reopened`).","operationId":"changeTicketStatus","parameters":[{"name":"ticketId","required":true,"in":"path","description":"The ticket id.","schema":{"type":"string","format":"uuid","description":"The ticket id."}},{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}},{"name":"Idempotency-Key","in":"header","description":"A unique key for this operation (e.g. a UUID, 1 to 255 visible characters), kept 24 hours: repeating the request with the same key returns the first answer (`Idempotent-Replayed: true`) instead of doing it again. Errors: `API-8109` (400) a key that is not valid, `API-8108` (409, retryable) the first request with this key is still running, `API-8107` (422) the key was used for a different request; `API-8118` (409) the first request created something whose secret is shown only once, so its answer is not repeated. An answer with `shown_once` repeats its secret within 10 minutes, then `API-8118`.","required":false,"schema":{"type":"string","minLength":1,"maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChangeTicketStatus"}}}},"responses":{"200":{"description":"The ticket.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Ticket"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `AUTH-1003`: your seat was deactivated (view only). `AUTH-1004`: all seats are inactive because the seat charge was not paid (view only). `AUTH-1002`: your role lacks the `tickets.reply` permission. `API-8102`: the API key or app lacks the `tickets:write` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"`TKT-6101`: no such ticket, or it is in a space you cannot access (the same answer, so nothing is revealed).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"409":{"description":"`TKT-6102`: the ticket is closed (reopen it with status `open`). `TKT-6103`: the state machine does not allow this change.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["tickets:write"]},{"oauth2":["tickets:write"]}],"summary":"Pick up, close or reopen a ticket","tags":["tickets"]}},"/v1/tickets/{ticketId}/take":{"post":{"description":"A ticket without an assignee, e.g. waiting in a queue, becomes yours; an open one is in progress. Taking your own ticket again changes nothing.","operationId":"takeTicket","parameters":[{"name":"ticketId","required":true,"in":"path","description":"The ticket id.","schema":{"type":"string","format":"uuid","description":"The ticket id."}},{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}},{"name":"Idempotency-Key","in":"header","description":"A unique key for this operation (e.g. a UUID, 1 to 255 visible characters), kept 24 hours: repeating the request with the same key returns the first answer (`Idempotent-Replayed: true`) instead of doing it again. Errors: `API-8109` (400) a key that is not valid, `API-8108` (409, retryable) the first request with this key is still running, `API-8107` (422) the key was used for a different request; `API-8118` (409) the first request created something whose secret is shown only once, so its answer is not repeated. An answer with `shown_once` repeats its secret within 10 minutes, then `API-8118`.","required":false,"schema":{"type":"string","minLength":1,"maxLength":255}}],"responses":{"200":{"description":"The ticket.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Ticket"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `AUTH-1003`: your seat was deactivated (view only). `AUTH-1004`: all seats are inactive because the seat charge was not paid (view only). `AUTH-1002`: your role lacks the `tickets.reply` permission. `API-8102`: the API key or app lacks the `tickets:write` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"`TKT-6101`: no such ticket, or it is in a space you cannot access (the same answer, so nothing is revealed).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"409":{"description":"`TKT-6102`: the ticket is closed (reopen it with status `open`). `TKT-6123`: another member took the ticket first (it has another assignee).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["tickets:write"]},{"oauth2":["tickets:write"]}],"summary":"Take a ticket nobody holds","tags":["tickets"]}},"/v1/tickets/{ticketId}/private-conversation":{"post":{"description":"Opens the private conversation with the author of a public ticket’s comment, mention or reply on the same account, where its channel offers one (`private_conversation` of the channel’s capabilities): the author’s open private ticket, or a new one assigned to you. A timeline note in each ticket links the two. Facebook and Instagram: the private ticket’s first reply goes as the one private reply to the comment, within its limits; X: only when X lets the account send the author a direct message (a paid user read).","operationId":"openPrivateConversation","parameters":[{"name":"ticketId","required":true,"in":"path","description":"The ticket id.","schema":{"type":"string","format":"uuid","description":"The ticket id."}},{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}},{"name":"Idempotency-Key","in":"header","description":"A unique key for this operation (e.g. a UUID, 1 to 255 visible characters), kept 24 hours: repeating the request with the same key returns the first answer (`Idempotent-Replayed: true`) instead of doing it again. Errors: `API-8109` (400) a key that is not valid, `API-8108` (409, retryable) the first request with this key is still running, `API-8107` (422) the key was used for a different request; `API-8118` (409) the first request created something whose secret is shown only once, so its answer is not repeated. An answer with `shown_once` repeats its secret within 10 minutes, then `API-8118`.","required":false,"schema":{"type":"string","minLength":1,"maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PrivateConversationRequest"}}}},"responses":{"200":{"description":"The private ticket.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PrivateConversation"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `AUTH-1003`: your seat was deactivated (view only). `AUTH-1004`: all seats are inactive because the seat charge was not paid (view only). `AUTH-1002`: your role lacks the `tickets.reply` permission. `API-8102`: the API key or app lacks the `tickets:write` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"`TKT-6101`: no such ticket, or it is in a space you cannot access (the same answer, so nothing is revealed).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"description":"`API-8001`: some fields are missing or not valid. `details.fields` lists each invalid field with its own code (e.g. `API-8002` required, `API-8012` wrong format). `TKT-6223`: not a public ticket, or its channel offers no private conversation. `TKT-6217`: the author’s open private ticket on that account is a teammate’s that you cannot see. `FB-2017`/`IG-2017`: the comment already had its private reply. `FB-2018`/`IG-2018`: the comment is older than 7 days. `X-3049`: X does not let the account message the author.","headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["tickets:write"]},{"oauth2":["tickets:write"]}],"summary":"Move a public ticket to a private message","tags":["tickets"]}},"/v1/tickets/{ticketId}/assign":{"post":{"operationId":"assignTicket","parameters":[{"name":"ticketId","required":true,"in":"path","description":"The ticket id.","schema":{"type":"string","format":"uuid","description":"The ticket id."}},{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}},{"name":"Idempotency-Key","in":"header","description":"A unique key for this operation (e.g. a UUID, 1 to 255 visible characters), kept 24 hours: repeating the request with the same key returns the first answer (`Idempotent-Replayed: true`) instead of doing it again. Errors: `API-8109` (400) a key that is not valid, `API-8108` (409, retryable) the first request with this key is still running, `API-8107` (422) the key was used for a different request; `API-8118` (409) the first request created something whose secret is shown only once, so its answer is not repeated. An answer with `shown_once` repeats its secret within 10 minutes, then `API-8118`.","required":false,"schema":{"type":"string","minLength":1,"maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AssignTicket"}}}},"responses":{"200":{"description":"The ticket.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Ticket"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `AUTH-1003`: your seat was deactivated (view only). `AUTH-1004`: all seats are inactive because the seat charge was not paid (view only). `AUTH-1002`: your role lacks the `tickets.assign` permission. `API-8102`: the API key or app lacks the `tickets:write` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"`TKT-6101`: no such ticket, or it is in a space you cannot access (the same answer, so nothing is revealed).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"409":{"description":"`TKT-6102`: the ticket is closed (reopen it with status `open`).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"description":"`API-8001`: some fields are missing or not valid. `details.fields` lists each invalid field with its own code (e.g. `API-8002` required, `API-8012` wrong format). `TKT-6107`: the member is not in this organization. `TKT-6122`: their seat is inactive.","headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["tickets:write"]},{"oauth2":["tickets:write"]}],"summary":"Assign or reassign a ticket","tags":["tickets"]}},"/v1/tickets/{ticketId}/move":{"post":{"description":"To a department space (All is never a destination: `space_id` null is refused with `SPC-6222`). The ticket is handed over: its assignee is cleared and it waits in the space’s queue for the automatic distribution (docs/17).","operationId":"moveTicket","parameters":[{"name":"ticketId","required":true,"in":"path","description":"The ticket id.","schema":{"type":"string","format":"uuid","description":"The ticket id."}},{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}},{"name":"Idempotency-Key","in":"header","description":"A unique key for this operation (e.g. a UUID, 1 to 255 visible characters), kept 24 hours: repeating the request with the same key returns the first answer (`Idempotent-Replayed: true`) instead of doing it again. Errors: `API-8109` (400) a key that is not valid, `API-8108` (409, retryable) the first request with this key is still running, `API-8107` (422) the key was used for a different request; `API-8118` (409) the first request created something whose secret is shown only once, so its answer is not repeated. An answer with `shown_once` repeats its secret within 10 minutes, then `API-8118`.","required":false,"schema":{"type":"string","minLength":1,"maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MoveTicket"}}}},"responses":{"200":{"description":"The ticket.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Ticket"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `AUTH-1003`: your seat was deactivated (view only). `AUTH-1004`: all seats are inactive because the seat charge was not paid (view only). `AUTH-1002`: your role lacks the `tickets.reply` permission. `API-8102`: the API key or app lacks the `tickets:write` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"`TKT-6101`: no such ticket, or it is in a space you cannot access (the same answer, so nothing is revealed). `SPC-6201`: no such space, or it is archived.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"409":{"description":"`TKT-6102`: the ticket is closed (reopen it with status `open`).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"description":"`API-8001`: some fields are missing or not valid. `details.fields` lists each invalid field with its own code (e.g. `API-8002` required, `API-8012` wrong format). `SPC-6222`: `space_id` null (All is never a destination).","headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["tickets:write"]},{"oauth2":["tickets:write"]}],"summary":"Move a ticket to another space","tags":["tickets"]}},"/v1/tickets/{ticketId}/not-spam":{"post":{"description":"The ticket joins the normal flow as a new arrival (routed and distributed), and the sender’s own Spam list entries (their email addresses, numbers and handles; never a domain) are removed. Needs `tickets.view_all`.","operationId":"markTicketNotSpam","parameters":[{"name":"ticketId","required":true,"in":"path","description":"The ticket id.","schema":{"type":"string","format":"uuid","description":"The ticket id."}},{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}},{"name":"Idempotency-Key","in":"header","description":"A unique key for this operation (e.g. a UUID, 1 to 255 visible characters), kept 24 hours: repeating the request with the same key returns the first answer (`Idempotent-Replayed: true`) instead of doing it again. Errors: `API-8109` (400) a key that is not valid, `API-8108` (409, retryable) the first request with this key is still running, `API-8107` (422) the key was used for a different request; `API-8118` (409) the first request created something whose secret is shown only once, so its answer is not repeated. An answer with `shown_once` repeats its secret within 10 minutes, then `API-8118`.","required":false,"schema":{"type":"string","minLength":1,"maxLength":255}}],"responses":{"200":{"description":"The ticket.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Ticket"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `AUTH-1003`: your seat was deactivated (view only). `AUTH-1004`: all seats are inactive because the seat charge was not paid (view only). `API-8102`: the API key or app lacks the `tickets:write` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"`TKT-6101`: no such ticket, or it is in a space you cannot access (the same answer, so nothing is revealed).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"409":{"description":"`TKT-6213`: the ticket is not in Spam.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["tickets:write"]},{"oauth2":["tickets:write"]}],"summary":"Take a ticket out of Spam","tags":["tickets"]}},"/v1/tickets/{ticketId}/merge":{"post":{"description":"Two open or in-progress email tickets of the same contact (each ticket’s own channel is email): the other ticket’s messages move here and it is closed, pointing here.","operationId":"mergeTickets","parameters":[{"name":"ticketId","required":true,"in":"path","description":"The ticket id.","schema":{"type":"string","format":"uuid","description":"The ticket id."}},{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}},{"name":"Idempotency-Key","in":"header","description":"A unique key for this operation (e.g. a UUID, 1 to 255 visible characters), kept 24 hours: repeating the request with the same key returns the first answer (`Idempotent-Replayed: true`) instead of doing it again. Errors: `API-8109` (400) a key that is not valid, `API-8108` (409, retryable) the first request with this key is still running, `API-8107` (422) the key was used for a different request; `API-8118` (409) the first request created something whose secret is shown only once, so its answer is not repeated. An answer with `shown_once` repeats its secret within 10 minutes, then `API-8118`.","required":false,"schema":{"type":"string","minLength":1,"maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MergeTickets"}}}},"responses":{"200":{"description":"This ticket.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Ticket"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `AUTH-1003`: your seat was deactivated (view only). `AUTH-1004`: all seats are inactive because the seat charge was not paid (view only). `AUTH-1002`: your role lacks the `tickets.reply` permission. `API-8102`: the API key or app lacks the `tickets:write` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"`TKT-6101`: no such ticket, or it is in a space you cannot access (the same answer, so nothing is revealed).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"409":{"description":"`TKT-6108`: not two live tickets of the same contact. `TKT-6260`: one of them is not an email ticket.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["tickets:write"]},{"oauth2":["tickets:write"]}],"summary":"Merge another ticket into this one","tags":["tickets"]}},"/v1/tickets/{ticketId}/read":{"post":{"description":"Your own read state (the unread marker and the \"New messages\" divider): through one item of the timeline, or through the newest. It only moves forward (`POST /v1/tickets/{ticketId}/unread` moves it back); replying, noting, changing the status, assigning and taking also read the ticket.","operationId":"markTicketRead","parameters":[{"name":"ticketId","required":true,"in":"path","description":"The ticket id.","schema":{"type":"string","format":"uuid","description":"The ticket id."}},{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}},{"name":"Idempotency-Key","in":"header","description":"A unique key for this operation (e.g. a UUID, 1 to 255 visible characters), kept 24 hours: repeating the request with the same key returns the first answer (`Idempotent-Replayed: true`) instead of doing it again. Errors: `API-8109` (400) a key that is not valid, `API-8108` (409, retryable) the first request with this key is still running, `API-8107` (422) the key was used for a different request; `API-8118` (409) the first request created something whose secret is shown only once, so its answer is not repeated. An answer with `shown_once` repeats its secret within 10 minutes, then `API-8118`.","required":false,"schema":{"type":"string","minLength":1,"maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MarkTicketRead"}}}},"responses":{"200":{"description":"The ticket.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Ticket"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `API-8102`: the API key or app lacks the `tickets:write` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"`TKT-6101`: no such ticket, or it is in a space you cannot access (the same answer, so nothing is revealed). `TKT-6105`: no such item in this ticket's timeline.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["tickets:write"]},{"oauth2":["tickets:write"]}],"summary":"Mark a ticket read","tags":["tickets"]}},"/v1/tickets/{ticketId}/unread":{"post":{"description":"Your own read state: the ticket’s newest customer message becomes unread again, until you open the ticket or act on it (reply, note, status, assignment, taking).","operationId":"markTicketUnread","parameters":[{"name":"ticketId","required":true,"in":"path","description":"The ticket id.","schema":{"type":"string","format":"uuid","description":"The ticket id."}},{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}},{"name":"Idempotency-Key","in":"header","description":"A unique key for this operation (e.g. a UUID, 1 to 255 visible characters), kept 24 hours: repeating the request with the same key returns the first answer (`Idempotent-Replayed: true`) instead of doing it again. Errors: `API-8109` (400) a key that is not valid, `API-8108` (409, retryable) the first request with this key is still running, `API-8107` (422) the key was used for a different request; `API-8118` (409) the first request created something whose secret is shown only once, so its answer is not repeated. An answer with `shown_once` repeats its secret within 10 minutes, then `API-8118`.","required":false,"schema":{"type":"string","minLength":1,"maxLength":255}}],"responses":{"200":{"description":"The ticket.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Ticket"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `API-8102`: the API key or app lacks the `tickets:write` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"`TKT-6101`: no such ticket, or it is in a space you cannot access (the same answer, so nothing is revealed).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"409":{"description":"`TKT-6314`: the ticket is closed or has no customer message.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["tickets:write"]},{"oauth2":["tickets:write"]}],"summary":"Mark a ticket unread","tags":["tickets"]}},"/v1/tickets/{ticketId}/context":{"get":{"description":"The post or video at the top of the thread and the replies leading to the customer’s item, read once from the channel when the ticket was created and kept with it (never read again).","operationId":"getTicketContext","parameters":[{"name":"ticketId","required":true,"in":"path","description":"The ticket id.","schema":{"type":"string","format":"uuid","description":"The ticket id."}},{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"The thread, as kept.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TicketContext"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `API-8102`: the API key or app lacks the `tickets:read` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"`TKT-6101`: no such ticket, or it is in a space you cannot access (the same answer, so nothing is revealed).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["tickets:read"]},{"oauth2":["tickets:read"]}],"summary":"The thread a public ticket answers","tags":["tickets"]}},"/v1/tickets/{ticketId}/group-participants":{"get":{"description":"The senders who have written in a group chat ticket (channels whose capabilities say `group_chats`): their number, the name they last wrote under, their contact, their last message and how many they wrote. Empty on any other ticket.","operationId":"listTicketGroupParticipants","parameters":[{"name":"ticketId","required":true,"in":"path","description":"The ticket id.","schema":{"type":"string","format":"uuid","description":"The ticket id."}},{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"The participants, the most recently active first.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TicketGroupParticipants"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `API-8102`: the API key or app lacks the `tickets:read` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"`TKT-6101`: no such ticket, or it is in a space you cannot access (the same answer, so nothing is revealed).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["tickets:read"]},{"oauth2":["tickets:read"]}],"summary":"The participants of a group chat ticket","tags":["tickets"]}},"/v1/tickets/{ticketId}/draft":{"get":{"description":"The reply or note you left unsent on the ticket, with an email’s edited recipients, as every device of yours shows it.","operationId":"getTicketDraft","parameters":[{"name":"ticketId","required":true,"in":"path","description":"The ticket id.","schema":{"type":"string","format":"uuid","description":"The ticket id."}},{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"The draft, or null.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DraftResult"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `API-8102`: the API key or app lacks the `tickets:read` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"`TKT-6101`: no such ticket, or it is in a space you cannot access (the same answer, so nothing is revealed).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["tickets:read"]},{"oauth2":["tickets:read"]}],"summary":"Your draft on a ticket","tags":["tickets"]},"put":{"description":"Kept on the server: it survives reloads, crashes and switching devices, and shows in your reply composer (written by you, an API key or an app acting as you). It is never sent until you send it.","operationId":"saveTicketDraft","parameters":[{"name":"ticketId","required":true,"in":"path","description":"The ticket id.","schema":{"type":"string","format":"uuid","description":"The ticket id."}},{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}},{"name":"Idempotency-Key","in":"header","description":"A unique key for this operation (e.g. a UUID, 1 to 255 visible characters), kept 24 hours: repeating the request with the same key returns the first answer (`Idempotent-Replayed: true`) instead of doing it again. Errors: `API-8109` (400) a key that is not valid, `API-8108` (409, retryable) the first request with this key is still running, `API-8107` (422) the key was used for a different request; `API-8118` (409) the first request created something whose secret is shown only once, so its answer is not repeated. An answer with `shown_once` repeats its secret within 10 minutes, then `API-8118`.","required":false,"schema":{"type":"string","minLength":1,"maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DraftInput"}}}},"responses":{"200":{"description":"The draft.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DraftResult"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `AUTH-1003`: your seat was deactivated (view only). `AUTH-1004`: all seats are inactive because the seat charge was not paid (view only). `AUTH-1002`: your role lacks the `tickets.reply` permission. `API-8102`: the API key or app lacks the `tickets:write` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"`TKT-6101`: no such ticket, or it is in a space you cannot access (the same answer, so nothing is revealed).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["tickets:write"]},{"oauth2":["tickets:write"]}],"summary":"Save your draft on a ticket","tags":["tickets"]},"delete":{"operationId":"clearTicketDraft","parameters":[{"name":"ticketId","required":true,"in":"path","description":"The ticket id.","schema":{"type":"string","format":"uuid","description":"The ticket id."}},{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}}],"responses":{"204":{"description":"Cleared.","headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `AUTH-1003`: your seat was deactivated (view only). `AUTH-1004`: all seats are inactive because the seat charge was not paid (view only). `AUTH-1002`: your role lacks the `tickets.reply` permission. `API-8102`: the API key or app lacks the `tickets:write` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"`TKT-6101`: no such ticket, or it is in a space you cannot access (the same answer, so nothing is revealed).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["tickets:write"]},{"oauth2":["tickets:write"]}],"summary":"Clear your draft on a ticket","tags":["tickets"]}},"/v1/tickets/{ticketId}/messages":{"get":{"description":"Messages in both directions, internal notes, system events (the ticket’s log) and calls, newest first (load older pages with `cursor`). `kinds=message,note,call` is the conversation alone; `kinds=system` the ticket’s events (who, when, what changed, in `metadata`). `body_format=text` answers plain text only (an email without its HTML).","operationId":"listTicketMessages","parameters":[{"name":"ticketId","required":true,"in":"path","description":"The ticket id.","schema":{"type":"string","format":"uuid","description":"The ticket id."}},{"name":"cursor","required":false,"in":"query","description":"The `next_cursor` of the previous page.","schema":{"description":"The `next_cursor` of the previous page.","type":"string","maxLength":200,"pattern":"^[A-Za-z0-9_-]+$"}},{"name":"limit","required":false,"in":"query","description":"Items per page (1 to 500, default 25).","schema":{"default":25,"description":"Items per page (1 to 500, default 25).","type":"integer","minimum":1,"maximum":500}},{"name":"kinds","required":false,"in":"query","description":"Only these kinds of item, comma-separated: `message`, `note`, `call` (the correspondence) and `system` (the ticket’s events: assignments, status, priority, tags, subject, note, moves, merges); left out: all.","schema":{"description":"Only these kinds of item, comma-separated: `message`, `note`, `call` (the correspondence) and `system` (the ticket’s events: assignments, status, priority, tags, subject, note, moves, merges); left out: all.","type":"string","maxLength":40,"pattern":"^(message|note|system|call)(,(message|note|system|call))*$"}},{"name":"body_format","required":false,"in":"query","description":"`original` (default): each message as stored, an email with its HTML in `metadata.email.html`. `text`: plain text only: an email’s HTML left out of `metadata`, a body written in HTML read as text, inline-image markers (`[cid:…]`) removed. Signatures, disclaimers and quoted earlier mail stay, as the sender wrote them.","schema":{"description":"`original` (default): each message as stored, an email with its HTML in `metadata.email.html`. `text`: plain text only: an email’s HTML left out of `metadata`, a body written in HTML read as text, inline-image markers (`[cid:…]`) removed. Signatures, disclaimers and quoted earlier mail stay, as the sender wrote them.","type":"string","enum":["original","text"]}},{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"A page of the timeline.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MessagePage"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `API-8102`: the API key or app lacks the `tickets:read` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"`TKT-6101`: no such ticket, or one you cannot access.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["tickets:read"]},{"oauth2":["tickets:read"]}],"summary":"A ticket’s timeline","tags":["tickets"]},"post":{"description":"A reply is queued and sent on the ticket channel, or on another of its `channels` named by `channel_id` (a phone thread: e.g. the WhatsApp number of a ticket that started with a call; a call ticket: an email channel, from `email.from_address_id` to `email.to`; an email reply from `email.from_address_id`, one of its channel’s `from_addresses`, an address of another mailbox sending through it), with that channel’s rules (its status follows: queued → sending → sent → delivered → read, or failed with the reason). A reply the channel forbids is refused at once, with nothing queued: after its reply window (`reply_window`), or on a channel that needs reconnecting (`TKT-6270`). A reply that fails later (`failed`, with `message.status_changed`) marks the ticket (`failed_reply_at`) and tells the member who wrote it. Send a `client_key` so a retried request creates one message (an organization key has no member, so its `client_key` is not kept: send an `Idempotency-Key` header instead), and `base_message_id` to learn what arrived since you started writing.","operationId":"sendTicketMessage","parameters":[{"name":"ticketId","required":true,"in":"path","description":"The ticket id.","schema":{"type":"string","format":"uuid","description":"The ticket id."}},{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}},{"name":"Idempotency-Key","in":"header","description":"A unique key for this operation (e.g. a UUID, 1 to 255 visible characters), kept 24 hours: repeating the request with the same key returns the first answer (`Idempotent-Replayed: true`) instead of doing it again. Errors: `API-8109` (400) a key that is not valid, `API-8108` (409, retryable) the first request with this key is still running, `API-8107` (422) the key was used for a different request; `API-8118` (409) the first request created something whose secret is shown only once, so its answer is not repeated. An answer with `shown_once` repeats its secret within 10 minutes, then `API-8118`.","required":false,"schema":{"type":"string","minLength":1,"maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SendMessage"}}}},"responses":{"201":{"description":"The message and the send-time warning.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SendResult"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `AUTH-1003`: your seat was deactivated (view only). `AUTH-1004`: all seats are inactive because the seat charge was not paid (view only). `AUTH-1002`: your role lacks the `tickets.reply` permission. `API-8102`: the API key or app lacks the `tickets:write` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"`TKT-6101`: no such ticket, or one you cannot access. `TKT-6111`: no such attachment.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"409":{"description":"`TKT-6102`: the ticket is closed (notes are still possible). `TKT-6119`: no replies on the voice channel. `TKT-6112`: a file is not scanned yet. `TKT-6113`: a file is blocked (malware). `TKT-6173`: a file is still being prepared for the channel (retry once `attachment.processed` says it is ready).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"description":"`API-8001`: some fields are missing or not valid. `details.fields` lists each invalid field with its own code (e.g. `API-8002` required, `API-8012` wrong format). `TKT-6107`: a mentioned member is not in the organization. `TKT-6207`: `channel_id` is not one of the ticket’s channels. `TKT-6208`: `email.from_address_id` is not one of the `from_addresses` offered to you (another member’s address, an address of a space you are not in, removed), or the reply’s channel is not email. `TKT-6227`: no address is offered to you (the ticket’s address is another member’s and you have none of your own). `TKT-6225`: a deprecated `email.subject` other than the ticket’s (every email carries the ticket’s subject). `TKT-6196`: a private reply on a channel that offers none. `TKT-6116`: a file of another ticket or already sent, or a reply to a message of another ticket. A file that cannot fit the channel: `TKT-6170` (type not taken), `TKT-6171` (clip too long), `TKT-6172` (too large even compressed), `TKT-6175` (content unreadable), `TKT-6178` (frame too large to process).","headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"429":{"$ref":"#/components/responses/RateLimited"},"503":{"description":"`TKT-6174`: a file could not be prepared for the channel (try its media processing again).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["tickets:write"]},{"oauth2":["tickets:write"]}],"summary":"Reply to the customer or add an internal note","tags":["tickets"]}},"/v1/tickets/{ticketId}/activity":{"get":{"operationId":"getTicketActivitySince","parameters":[{"name":"ticketId","required":true,"in":"path","description":"The ticket id.","schema":{"type":"string","format":"uuid","description":"The ticket id."}},{"name":"since","required":false,"in":"query","description":"Your compose base: the newest item you had seen (left out: since the start).","schema":{"description":"Your compose base: the newest item you had seen (left out: since the start).","type":"string","format":"uuid"}},{"name":"wait_seconds","required":false,"in":"query","description":"Seconds (0 to 20) to wait for a customer message after `since`; the answer comes at the first one or when they are over.","schema":{"default":0,"description":"Seconds (0 to 20) to wait for a customer message after `since`; the answer comes at the first one or when they are over.","type":"integer","minimum":0,"maximum":20}},{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"The counts.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SendWarnings"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `API-8102`: the API key or app lacks the `tickets:read` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"`TKT-6101`: no such ticket, or one you cannot access.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"description":"`API-8001`: some fields are missing or not valid. `details.fields` lists each invalid field with its own code (e.g. `API-8002` required, `API-8012` wrong format). `TKT-6116`: the base is not a message of this ticket.","headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["tickets:read"]},{"oauth2":["tickets:read"]}],"summary":"What arrived since your compose base (the send-time warning)","tags":["tickets"]}},"/v1/messages/{messageId}":{"get":{"description":"With the number of its current ticket (after a merge too).","operationId":"getMessage","parameters":[{"name":"messageId","required":true,"in":"path","description":"The message id.","schema":{"type":"string","format":"uuid","description":"The message id."}},{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"The message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MessageLookup"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `API-8102`: the API key or app lacks the `tickets:read` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"`TKT-6105`: no such message, or one in a ticket you cannot access.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["tickets:read"]},{"oauth2":["tickets:read"]}],"summary":"Get a message (a copied link)","tags":["tickets"]},"delete":{"description":"Discards a reply that never reached the channel (soft delete: kept for the organization, hidden from the thread; the ticket’s failed mark follows). Audited.","operationId":"deleteFailedMessage","parameters":[{"name":"messageId","required":true,"in":"path","description":"The message id.","schema":{"type":"string","format":"uuid","description":"The message id."}},{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}},{"name":"Idempotency-Key","in":"header","description":"A unique key for this operation (e.g. a UUID, 1 to 255 visible characters), kept 24 hours: repeating the request with the same key returns the first answer (`Idempotent-Replayed: true`) instead of doing it again. Errors: `API-8109` (400) a key that is not valid, `API-8108` (409, retryable) the first request with this key is still running, `API-8107` (422) the key was used for a different request; `API-8118` (409) the first request created something whose secret is shown only once, so its answer is not repeated. An answer with `shown_once` repeats its secret within 10 minutes, then `API-8118`.","required":false,"schema":{"type":"string","minLength":1,"maxLength":255}}],"responses":{"204":{"description":"Deleted.","headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `AUTH-1003`: your seat was deactivated (view only). `AUTH-1004`: all seats are inactive because the seat charge was not paid (view only). `AUTH-1002`: your role lacks the `tickets.reply` permission. `API-8102`: the API key or app lacks the `tickets:write` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"`TKT-6105`: no such message, or one in a ticket you cannot access.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"409":{"description":"`TKT-6106`: only a failed message is deleted.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["tickets:write"]},{"oauth2":["tickets:write"]}],"summary":"Delete a failed message","tags":["tickets"]}},"/v1/messages/{messageId}/edits":{"get":{"description":"What a customer’s message said before each edit they made on the channel, oldest first, with the time each edit replaced it (the message itself carries the current content and `edited_at`). Also sent as the `message.edited` webhook.","operationId":"listMessageEdits","parameters":[{"name":"messageId","required":true,"in":"path","description":"The message id.","schema":{"type":"string","format":"uuid","description":"The message id."}},{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"The earlier versions (none when never edited).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MessageEditList"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `API-8102`: the API key or app lacks the `tickets:read` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"`TKT-6105`: no such message, or one in a ticket you cannot access.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["tickets:read"]},{"oauth2":["tickets:read"]}],"summary":"A message’s earlier versions","tags":["tickets"]}},"/v1/messages/{messageId}/email-html":{"get":{"description":"An inbound email: small HTML is also on the message (`metadata.email.html`); larger HTML is kept in object storage (`metadata.email.htmlKey`) and read here, checked against its SHA-256. An email Rabt sent: the HTML it was sent as (the reply with its signature in its layout, `metadata.email.sentHtmlKey`); one sent before that was kept is rendered again from its stored reply and signature in the layout that applies now. Null for a message without HTML.","operationId":"getMessageEmailHtml","parameters":[{"name":"messageId","required":true,"in":"path","description":"The message id.","schema":{"type":"string","format":"uuid","description":"The message id."}},{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"The HTML, or null.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailHtml"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `API-8102`: the API key or app lacks the `tickets:read` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"`TKT-6105`: no such message, or one in a ticket you cannot access.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"502":{"description":"`SYS-1097`: the stored HTML does not match its checksum (retry).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["tickets:read"]},{"oauth2":["tickets:read"]}],"summary":"The HTML of an email as the customer has it","tags":["tickets"]}},"/v1/messages/{messageId}/link-preview":{"get":{"description":"The title, description, site name and image of the first link in a message: the preview the channel sent, or read by Rabt from the public page (http or https, never a private network, redirects checked, 4-second and size limits, no cookies), the image kept by Rabt. Cached per address for 7 days (an hour when the page could not be read).","operationId":"getMessageLinkPreview","parameters":[{"name":"messageId","required":true,"in":"path","description":"The message id.","schema":{"type":"string","format":"uuid","description":"The message id."}},{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"The preview, or null.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LinkPreviewResult"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `API-8102`: the API key or app lacks the `tickets:read` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"`TKT-6105`: no such message, or one in a ticket you cannot access.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["tickets:read"]},{"oauth2":["tickets:read"]}],"summary":"The preview of a message’s link","tags":["tickets"]}},"/v1/messages/{messageId}/retry":{"post":{"description":"Queued again with the next attempt.","operationId":"retryMessage","parameters":[{"name":"messageId","required":true,"in":"path","description":"The message id.","schema":{"type":"string","format":"uuid","description":"The message id."}},{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}},{"name":"Idempotency-Key","in":"header","description":"A unique key for this operation (e.g. a UUID, 1 to 255 visible characters), kept 24 hours: repeating the request with the same key returns the first answer (`Idempotent-Replayed: true`) instead of doing it again. Errors: `API-8109` (400) a key that is not valid, `API-8108` (409, retryable) the first request with this key is still running, `API-8107` (422) the key was used for a different request; `API-8118` (409) the first request created something whose secret is shown only once, so its answer is not repeated. An answer with `shown_once` repeats its secret within 10 minutes, then `API-8118`.","required":false,"schema":{"type":"string","minLength":1,"maxLength":255}}],"responses":{"200":{"description":"The message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Message"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `AUTH-1003`: your seat was deactivated (view only). `AUTH-1004`: all seats are inactive because the seat charge was not paid (view only). `AUTH-1002`: your role lacks the `tickets.reply` permission. `API-8102`: the API key or app lacks the `tickets:write` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"`TKT-6105`: no such message, or one in a ticket you cannot access.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"409":{"description":"`TKT-6106`: only a failed message is retried. `TKT-6102`: the ticket is closed.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["tickets:write"]},{"oauth2":["tickets:write"]}],"summary":"Send a failed message again","tags":["tickets"]}},"/v1/tickets/{ticketId}/new-messages":{"get":{"description":"The items after `since`, oldest first, each once: it answers as soon as the customer writes (`wake: any`: any item), else after `wait_seconds` with nothing and the same `next_cursor`. Pass `next_cursor` as `since` to wait again; a send answers with its message id to start from.","operationId":"waitForMessage","parameters":[{"name":"ticketId","required":true,"in":"path","description":"The ticket id.","schema":{"type":"string","format":"uuid","description":"The ticket id."}},{"name":"since","required":false,"in":"query","description":"The `next_cursor` of the previous answer (or a message id: the newest you have). Left out: from now on.","schema":{"description":"The `next_cursor` of the previous answer (or a message id: the newest you have). Left out: from now on.","type":"string","format":"uuid"}},{"name":"wait_seconds","required":false,"in":"query","description":"Seconds to wait for something new (0 to 25, default 25): the answer comes as soon as it is there; otherwise an empty answer at the end, with the same cursor to wait again.","schema":{"default":25,"description":"Seconds to wait for something new (0 to 25, default 25): the answer comes as soon as it is there; otherwise an empty answer at the end, with the same cursor to wait again.","type":"integer","minimum":0,"maximum":25}},{"name":"wake","required":false,"in":"query","description":"`customer` (default): answer when the customer writes (or calls), with every item since; `any`: on any new item (a teammate’s reply, a note, an event).","schema":{"default":"customer","description":"`customer` (default): answer when the customer writes (or calls), with every item since; `any`: on any new item (a teammate’s reply, a note, an event).","type":"string","enum":["customer","any"]}},{"name":"body_format","required":false,"in":"query","description":"`original` (default): each message as stored, an email with its HTML in `metadata.email.html`. `text`: plain text only: an email’s HTML left out of `metadata`, a body written in HTML read as text, inline-image markers (`[cid:…]`) removed. Signatures, disclaimers and quoted earlier mail stay, as the sender wrote them.","schema":{"description":"`original` (default): each message as stored, an email with its HTML in `metadata.email.html`. `text`: plain text only: an email’s HTML left out of `metadata`, a body written in HTML read as text, inline-image markers (`[cid:…]`) removed. Signatures, disclaimers and quoted earlier mail stay, as the sender wrote them.","type":"string","enum":["original","text"]}},{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"The new items.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TicketMessagesAfter"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `API-8102`: the API key or app lacks the `tickets:read` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"`TKT-6101`: no such ticket, or one you cannot access.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["tickets:read"]},{"oauth2":["tickets:read"]}],"summary":"Wait for what arrives on a ticket","tags":["tickets"]}},"/v1/messages/{messageId}/status":{"get":{"description":"The message once its status differs from `status` (queued → sending → sent → delivered → read, or failed with `failure`: why, in plain words, and what to do), else after `wait_seconds` with `changed: false`.","operationId":"waitForStatus","parameters":[{"name":"messageId","required":true,"in":"path","description":"The message id.","schema":{"type":"string","format":"uuid","description":"The message id."}},{"name":"status","required":false,"in":"query","description":"The status you have (left out: its status now): the answer comes once it differs (queued → sending → sent → delivered → read, or failed).","schema":{"description":"The status you have (left out: its status now): the answer comes once it differs (queued → sending → sent → delivered → read, or failed).","type":"string","enum":["received","queued","sending","sent","delivered","read","failed"]}},{"name":"wait_seconds","required":false,"in":"query","description":"Seconds to wait for something new (0 to 25, default 25): the answer comes as soon as it is there; otherwise an empty answer at the end, with the same cursor to wait again.","schema":{"default":25,"description":"Seconds to wait for something new (0 to 25, default 25): the answer comes as soon as it is there; otherwise an empty answer at the end, with the same cursor to wait again.","type":"integer","minimum":0,"maximum":25}},{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"The message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MessageStatusWait"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `API-8102`: the API key or app lacks the `tickets:read` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"`TKT-6105`: no such message, or one in a ticket you cannot access.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["tickets:read"]},{"oauth2":["tickets:read"]}],"summary":"Wait for a message’s status to change","tags":["tickets"]}},"/v1/tickets/{ticketId}/conversation":{"get":{"description":"The ticket (status, channel, contact, assignee), its newest items oldest first (messages both ways, notes, calls, events), the last message the business sent with its state (and why it failed), when the customer last wrote, the reply window now and how to send after it, and `next_cursor` to wait for what follows; `mark_read` marks it read for you through the newest item shown (`tickets:write`, else `API-8102`).","operationId":"getTicketConversation","parameters":[{"name":"ticketId","required":true,"in":"path","description":"The ticket id.","schema":{"type":"string","format":"uuid","description":"The ticket id."}},{"name":"limit","required":false,"in":"query","description":"The newest items (1 to 100, default 30).","schema":{"default":30,"description":"The newest items (1 to 100, default 30).","type":"integer","minimum":1,"maximum":100}},{"name":"mark_read","required":false,"in":"query","description":"`true`: mark the ticket read through its newest item (yours only).","schema":{"description":"`true`: mark the ticket read through its newest item (yours only).","anyOf":[{"type":"boolean"},{"type":"string","enum":["true","false"]}]}},{"name":"body_format","required":false,"in":"query","description":"`original` (default): each message as stored, an email with its HTML in `metadata.email.html`. `text`: plain text only: an email’s HTML left out of `metadata`, a body written in HTML read as text, inline-image markers (`[cid:…]`) removed. Signatures, disclaimers and quoted earlier mail stay, as the sender wrote them.","schema":{"description":"`original` (default): each message as stored, an email with its HTML in `metadata.email.html`. `text`: plain text only: an email’s HTML left out of `metadata`, a body written in HTML read as text, inline-image markers (`[cid:…]`) removed. Signatures, disclaimers and quoted earlier mail stay, as the sender wrote them.","type":"string","enum":["original","text"]}},{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"The picture.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TicketConversation"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `API-8102`: the API key or app lacks the `tickets:read` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"`TKT-6101`: no such ticket, or one you cannot access.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["tickets:read"]},{"oauth2":["tickets:read"]}],"summary":"A ticket’s whole picture","tags":["tickets"]}},"/v1/customer-messages":{"get":{"description":"The tickets you may see (by space, assignee, channel, contact) a customer wrote to after `cursor` (or `since`; neither: from now on), each with what they wrote, every message once; it waits up to `wait_seconds` for one. Pass `next_cursor` as `cursor` to wait again.","operationId":"listNewCustomerMessages","parameters":[{"name":"cursor","required":false,"in":"query","description":"The `next_cursor` of the previous answer (at most 2155 characters).","schema":{"description":"The `next_cursor` of the previous answer (at most 2155 characters).","type":"string","maxLength":2155,"pattern":"^[A-Za-z0-9_-]+$"}},{"name":"since","required":false,"in":"query","description":"Without `cursor`: customers’ items from this time on (ISO 8601); both left out: from now on.","schema":{"description":"Without `cursor`: customers’ items from this time on (ISO 8601); both left out: from now on.","type":"string","format":"date-time"}},{"name":"space_id","required":false,"in":"query","description":"A department space, or `none` for tickets in no department space.","schema":{"description":"A department space, or `none` for tickets in no department space.","type":"string","pattern":"^([0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}|none)$"}},{"name":"assignee_membership_id","required":false,"in":"query","description":"A member (membership id), or `none` for unassigned tickets (the queue).","schema":{"description":"A member (membership id), or `none` for unassigned tickets (the queue).","type":"string","pattern":"^([0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}|none)$"}},{"name":"channel_type","required":false,"in":"query","description":"Only this channel.","schema":{"description":"Only this channel.","$ref":"#/components/schemas/ChannelType"}},{"name":"contact_id","required":false,"in":"query","description":"Only this contact's tickets.","schema":{"description":"Only this contact's tickets.","type":"string","format":"uuid"}},{"name":"wait_seconds","required":false,"in":"query","description":"Seconds to wait for something new (0 to 25, default 25): the answer comes as soon as it is there; otherwise an empty answer at the end, with the same cursor to wait again.","schema":{"default":25,"description":"Seconds to wait for something new (0 to 25, default 25): the answer comes as soon as it is there; otherwise an empty answer at the end, with the same cursor to wait again.","type":"integer","minimum":0,"maximum":25}},{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"The tickets.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomerMessagesInbox"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `API-8102`: the API key or app lacks the `tickets:read` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["tickets:read"]},{"oauth2":["tickets:read"]}],"summary":"Tickets a customer wrote to","tags":["tickets"]}},"/v1/tickets/{ticketId}/simulated-customer-messages":{"post":{"description":"With a test key only: a message from the ticket’s customer, as if they wrote it on its channel, so a conversation loop is tried end to end (the waits, the inbox, the reply window see it as a real one).","operationId":"simulateCustomerMessage","parameters":[{"name":"ticketId","required":true,"in":"path","description":"The ticket id.","schema":{"type":"string","format":"uuid","description":"The ticket id."}},{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}},{"name":"Idempotency-Key","in":"header","description":"A unique key for this operation (e.g. a UUID, 1 to 255 visible characters), kept 24 hours: repeating the request with the same key returns the first answer (`Idempotent-Replayed: true`) instead of doing it again. Errors: `API-8109` (400) a key that is not valid, `API-8108` (409, retryable) the first request with this key is still running, `API-8107` (422) the key was used for a different request; `API-8118` (409) the first request created something whose secret is shown only once, so its answer is not repeated. An answer with `shown_once` repeats its secret within 10 minutes, then `API-8118`.","required":false,"schema":{"type":"string","minLength":1,"maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SimulateCustomerMessage"}}}},"responses":{"201":{"description":"The customer’s message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SimulatedCustomerMessage"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`API-8179`: a live key; only a test key simulates a customer.\n\n`AUTH-1040`: you are not a member of the organization named. `AUTH-1003`: your seat was deactivated (view only). `AUTH-1004`: all seats are inactive because the seat charge was not paid (view only). `AUTH-1002`: your role lacks the `tickets.reply` permission. `API-8102`: the API key or app lacks the `tickets:write` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"`TKT-6101`: no such ticket, or one you cannot access.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["tickets:write"]},{"oauth2":["tickets:write"]}],"summary":"Simulate the customer’s reply (test mode)","tags":["tickets"]}},"/v1/ticket-watches":{"get":{"description":"The watches you asked for with `notify_on_reply` (your own only), newest first: the active ones unless `status` says otherwise.","operationId":"listTicketWatches","parameters":[{"name":"status","required":false,"in":"query","schema":{"default":"active","type":"string","enum":["active","fired","cancelled","expired","all"]}},{"name":"ticket_id","required":false,"in":"query","schema":{"type":"string","format":"uuid"}},{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"The watches.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReplyWatchList"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `API-8102`: the API key or app lacks the `tickets:read` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["tickets:read"]},{"oauth2":["tickets:read"]}],"summary":"Your reply watches","tags":["tickets"]}},"/v1/ticket-watches/{watchId}/cancel":{"post":{"description":"Ends your watch: later replies notify nobody and send no callback. Repeating it is the same.","operationId":"cancelTicketWatch","parameters":[{"name":"watchId","required":true,"in":"path","schema":{"type":"string","format":"uuid"}},{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}},{"name":"Idempotency-Key","in":"header","description":"A unique key for this operation (e.g. a UUID, 1 to 255 visible characters), kept 24 hours: repeating the request with the same key returns the first answer (`Idempotent-Replayed: true`) instead of doing it again. Errors: `API-8109` (400) a key that is not valid, `API-8108` (409, retryable) the first request with this key is still running, `API-8107` (422) the key was used for a different request; `API-8118` (409) the first request created something whose secret is shown only once, so its answer is not repeated. An answer with `shown_once` repeats its secret within 10 minutes, then `API-8118`.","required":false,"schema":{"type":"string","minLength":1,"maxLength":255}}],"responses":{"200":{"description":"The watch, ended.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReplyWatch"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `AUTH-1003`: your seat was deactivated (view only). `AUTH-1004`: all seats are inactive because the seat charge was not paid (view only). `API-8102`: the API key or app lacks the `tickets:write` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"`TKT-6304`: no such watch of yours.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["tickets:write"]},{"oauth2":["tickets:write"]}],"summary":"Stop a reply watch","tags":["tickets"]}},"/v1/messages/{messageId}/email-images":{"get":{"description":"An address for each image of the email's HTML: https images through Rabt's image proxy (signed for this message, valid until the end of the next hour), the email's own inline files (`cid:`, valid 5 minutes, once scanned), and none for known open-tracking images. The sender's server sees Rabt only, never the reader.","operationId":"getMessageEmailImages","parameters":[{"name":"messageId","required":true,"in":"path","description":"The message id.","schema":{"type":"string","format":"uuid","description":"The message id."}},{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"The images and their addresses.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailImages"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `API-8102`: the API key or app lacks the `tickets:read` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"`TKT-6105`: no such message, or one in a ticket you cannot access.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["tickets:read"]},{"oauth2":["tickets:read"]}],"summary":"The images of an inbound email","tags":["tickets"]}},"/v1/tickets/{ticketId}/attachments":{"post":{"description":"Returns the signed request that uploads the file straight to storage (valid 15 minutes). Then complete the upload.","operationId":"requestAttachmentUpload","parameters":[{"name":"ticketId","required":true,"in":"path","description":"The ticket id.","schema":{"type":"string","format":"uuid","description":"The ticket id."}},{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}},{"name":"Idempotency-Key","in":"header","description":"A unique key for this operation (e.g. a UUID, 1 to 255 visible characters), kept 24 hours: repeating the request with the same key returns the first answer (`Idempotent-Replayed: true`) instead of doing it again. Errors: `API-8109` (400) a key that is not valid, `API-8108` (409, retryable) the first request with this key is still running, `API-8107` (422) the key was used for a different request; `API-8118` (409) the first request created something whose secret is shown only once, so its answer is not repeated. An answer with `shown_once` repeats its secret within 10 minutes, then `API-8118`.","required":false,"schema":{"type":"string","minLength":1,"maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TicketUploadRequest"}}}},"responses":{"201":{"description":"The file and its upload.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AttachmentUpload"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `AUTH-1003`: your seat was deactivated (view only). `AUTH-1004`: all seats are inactive because the seat charge was not paid (view only). `AUTH-1002`: your role lacks the `tickets.reply` permission. `API-8102`: the API key or app lacks the `tickets:write` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"`TKT-6101`: no such ticket, or one you cannot access.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"description":"`API-8001`: some fields are missing or not valid. `details.fields` lists each invalid field with its own code (e.g. `API-8002` required, `API-8012` wrong format). `TKT-6114`: the file is larger than allowed.","headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["tickets:write"]},{"oauth2":["tickets:write"]}],"summary":"Upload a file to a ticket","tags":["tickets"]}},"/v1/attachments":{"post":{"description":"For a start’s first message (`first_message.attachment_ids`, `message.attachment_ids` of a conversation): the signed request that uploads the file straight to storage (valid 15 minutes), then complete the upload; it is scanned like any file. The file is yours alone until a start sends it.","operationId":"requestStartAttachmentUpload","parameters":[{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}},{"name":"Idempotency-Key","in":"header","description":"A unique key for this operation (e.g. a UUID, 1 to 255 visible characters), kept 24 hours: repeating the request with the same key returns the first answer (`Idempotent-Replayed: true`) instead of doing it again. Errors: `API-8109` (400) a key that is not valid, `API-8108` (409, retryable) the first request with this key is still running, `API-8107` (422) the key was used for a different request; `API-8118` (409) the first request created something whose secret is shown only once, so its answer is not repeated. An answer with `shown_once` repeats its secret within 10 minutes, then `API-8118`.","required":false,"schema":{"type":"string","minLength":1,"maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TicketUploadRequest"}}}},"responses":{"201":{"description":"The file and its upload.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StartAttachmentUpload"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `AUTH-1003`: your seat was deactivated (view only). `AUTH-1004`: all seats are inactive because the seat charge was not paid (view only). `AUTH-1002`: your role lacks the `tickets.reply` permission. `API-8102`: the API key or app lacks the `tickets:write` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"description":"`API-8001`: some fields are missing or not valid. `details.fields` lists each invalid field with its own code (e.g. `API-8002` required, `API-8012` wrong format). `TKT-6114`: the file is larger than allowed.","headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["tickets:write"]},{"oauth2":["tickets:write"]}],"summary":"Upload a file for a ticket not started yet","tags":["tickets"]}},"/v1/attachments/from-url":{"post":{"description":"Rabt fetches the file from a public https address instead of an upload (any type, the upload size limit), stores it and scans it like an uploaded file: for a ticket (`ticket_id`), or for a ticket not started yet (yours until a start’s first message sends it).","operationId":"addAttachmentFromUrl","parameters":[{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}},{"name":"Idempotency-Key","in":"header","description":"A unique key for this operation (e.g. a UUID, 1 to 255 visible characters), kept 24 hours: repeating the request with the same key returns the first answer (`Idempotent-Replayed: true`) instead of doing it again. Errors: `API-8109` (400) a key that is not valid, `API-8108` (409, retryable) the first request with this key is still running, `API-8107` (422) the key was used for a different request; `API-8118` (409) the first request created something whose secret is shown only once, so its answer is not repeated. An answer with `shown_once` repeats its secret within 10 minutes, then `API-8118`.","required":false,"schema":{"type":"string","minLength":1,"maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UrlFileRequest"}}}},"responses":{"201":{"description":"The stored file.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StartAttachment"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `AUTH-1003`: your seat was deactivated (view only). `AUTH-1004`: all seats are inactive because the seat charge was not paid (view only). `AUTH-1002`: your role lacks the `tickets.reply` permission. `API-8102`: the API key or app lacks the `tickets:write` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"`TKT-6101`: no such ticket, or one you cannot access.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"description":"`API-8001`: some fields are missing or not valid. `details.fields` lists each invalid field with its own code (e.g. `API-8002` required, `API-8012` wrong format). `TKT-6301`: the address could not be fetched (not public https, an error answer). `TKT-6114`: the file is larger than allowed. `TKT-6181`: a signed link that expired or was changed (for a Rabt file, send its id instead).","headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"429":{"$ref":"#/components/responses/RateLimited"},"504":{"description":"`TKT-6302`: the address did not answer in time.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["tickets:write"]},{"oauth2":["tickets:write"]}],"summary":"Add a file from its address","tags":["tickets"]}},"/v1/attachments/inline":{"post":{"description":"The file’s bytes in `content_base64` (about 500 KB at most), stored and scanned like an uploaded file: for a ticket (`ticket_id`), or for a ticket not started yet. One call instead of an upload.","operationId":"addAttachmentInline","parameters":[{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}},{"name":"Idempotency-Key","in":"header","description":"A unique key for this operation (e.g. a UUID, 1 to 255 visible characters), kept 24 hours: repeating the request with the same key returns the first answer (`Idempotent-Replayed: true`) instead of doing it again. Errors: `API-8109` (400) a key that is not valid, `API-8108` (409, retryable) the first request with this key is still running, `API-8107` (422) the key was used for a different request; `API-8118` (409) the first request created something whose secret is shown only once, so its answer is not repeated. An answer with `shown_once` repeats its secret within 10 minutes, then `API-8118`.","required":false,"schema":{"type":"string","minLength":1,"maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InlineFileRequest"}}}},"responses":{"201":{"description":"The stored file.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StartAttachment"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `AUTH-1003`: your seat was deactivated (view only). `AUTH-1004`: all seats are inactive because the seat charge was not paid (view only). `AUTH-1002`: your role lacks the `tickets.reply` permission. `API-8102`: the API key or app lacks the `tickets:write` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"`TKT-6101`: no such ticket, or one you cannot access.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"description":"`API-8001`: some fields are missing or not valid. `details.fields` lists each invalid field with its own code (e.g. `API-8002` required, `API-8012` wrong format). `TKT-6114`: the file is larger than allowed.","headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["tickets:write"]},{"oauth2":["tickets:write"]}],"summary":"Add a small file sent in the call","tags":["tickets"]}},"/v1/attachments/uploads/{attachmentId}/complete":{"post":{"description":"Once the file is in storage with its size; it is scanned for malware next.","operationId":"completeStartAttachmentUpload","parameters":[{"name":"attachmentId","required":true,"in":"path","description":"The attachment id.","schema":{"type":"string","format":"uuid","description":"The attachment id."}},{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}},{"name":"Idempotency-Key","in":"header","description":"A unique key for this operation (e.g. a UUID, 1 to 255 visible characters), kept 24 hours: repeating the request with the same key returns the first answer (`Idempotent-Replayed: true`) instead of doing it again. Errors: `API-8109` (400) a key that is not valid, `API-8108` (409, retryable) the first request with this key is still running, `API-8107` (422) the key was used for a different request; `API-8118` (409) the first request created something whose secret is shown only once, so its answer is not repeated. An answer with `shown_once` repeats its secret within 10 minutes, then `API-8118`.","required":false,"schema":{"type":"string","minLength":1,"maxLength":255}}],"responses":{"200":{"description":"The file.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StartAttachment"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `AUTH-1003`: your seat was deactivated (view only). `AUTH-1004`: all seats are inactive because the seat charge was not paid (view only). `AUTH-1002`: your role lacks the `tickets.reply` permission. `API-8102`: the API key or app lacks the `tickets:write` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"`TKT-6111`: no such file of yours for a ticket not started yet.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["tickets:write"]},{"oauth2":["tickets:write"]}],"summary":"Complete the upload of a file for a ticket not started yet","tags":["tickets"]}},"/v1/attachments/uploads/{attachmentId}":{"get":{"operationId":"getStartAttachment","parameters":[{"name":"attachmentId","required":true,"in":"path","description":"The attachment id.","schema":{"type":"string","format":"uuid","description":"The attachment id."}},{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"The file.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StartAttachment"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `API-8102`: the API key or app lacks the `tickets:read` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"`TKT-6111`: no such file of yours for a ticket not started yet.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["tickets:read"]},{"oauth2":["tickets:read"]}],"summary":"Get a file for a ticket not started yet (its scan status)","tags":["tickets"]}},"/v1/attachments/{attachmentId}/complete":{"post":{"description":"Once the file is in storage with its size; it is scanned for malware next.","operationId":"completeAttachmentUpload","parameters":[{"name":"attachmentId","required":true,"in":"path","description":"The attachment id.","schema":{"type":"string","format":"uuid","description":"The attachment id."}},{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}},{"name":"Idempotency-Key","in":"header","description":"A unique key for this operation (e.g. a UUID, 1 to 255 visible characters), kept 24 hours: repeating the request with the same key returns the first answer (`Idempotent-Replayed: true`) instead of doing it again. Errors: `API-8109` (400) a key that is not valid, `API-8108` (409, retryable) the first request with this key is still running, `API-8107` (422) the key was used for a different request; `API-8118` (409) the first request created something whose secret is shown only once, so its answer is not repeated. An answer with `shown_once` repeats its secret within 10 minutes, then `API-8118`.","required":false,"schema":{"type":"string","minLength":1,"maxLength":255}}],"responses":{"200":{"description":"The file.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Attachment"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `AUTH-1003`: your seat was deactivated (view only). `AUTH-1004`: all seats are inactive because the seat charge was not paid (view only). `AUTH-1002`: your role lacks the `tickets.reply` permission. `API-8102`: the API key or app lacks the `tickets:write` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"`TKT-6111`: no such attachment, or one in a ticket you cannot access.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"409":{"description":"`TKT-6115`: the file is not in storage, or has another size.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["tickets:write"]},{"oauth2":["tickets:write"]}],"summary":"Complete an upload","tags":["tickets"]}},"/v1/attachments/{attachmentId}":{"get":{"operationId":"getAttachment","parameters":[{"name":"attachmentId","required":true,"in":"path","description":"The attachment id.","schema":{"type":"string","format":"uuid","description":"The attachment id."}},{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"The file.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Attachment"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `API-8102`: the API key or app lacks the `tickets:read` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"`TKT-6111`: no such attachment, or one in a ticket you cannot access.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["tickets:read"]},{"oauth2":["tickets:read"]}],"summary":"Get a file (its scan status)","tags":["tickets"]}},"/v1/attachments/{attachmentId}/preview":{"get":{"description":"The thumbnail of an image, the poster frame of a video or the first page of a PDF, 480 px on its longer side at most. Audio has no image: its duration and waveform are in the file’s `media.preview`.","operationId":"getAttachmentPreview","parameters":[{"name":"attachmentId","required":true,"in":"path","description":"The attachment id.","schema":{"type":"string","format":"uuid","description":"The attachment id."}},{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"The link.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AttachmentDownload"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `API-8102`: the API key or app lacks the `tickets:read` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"`TKT-6111`: no such attachment, or one in a ticket you cannot access. `TKT-6177`: the file has no preview (yet).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"409":{"description":"`TKT-6112`: not uploaded or scanned yet (or the scan failed). `TKT-6113`: quarantined, it contains malware.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["tickets:read"]},{"oauth2":["tickets:read"]}],"summary":"A link to a file's preview image (valid 5 minutes)","tags":["tickets"]}},"/v1/attachments/{attachmentId}/media/retry":{"post":{"description":"Parts that `failed` (`TKT-6174`, `TKT-6176`, `SYS-1001`) become `pending` and run again; `attachment.processed` says when each is done. Ready and unfit parts stay as they are.","operationId":"retryAttachmentMedia","parameters":[{"name":"attachmentId","required":true,"in":"path","description":"The attachment id.","schema":{"type":"string","format":"uuid","description":"The attachment id."}},{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}},{"name":"Idempotency-Key","in":"header","description":"A unique key for this operation (e.g. a UUID, 1 to 255 visible characters), kept 24 hours: repeating the request with the same key returns the first answer (`Idempotent-Replayed: true`) instead of doing it again. Errors: `API-8109` (400) a key that is not valid, `API-8108` (409, retryable) the first request with this key is still running, `API-8107` (422) the key was used for a different request; `API-8118` (409) the first request created something whose secret is shown only once, so its answer is not repeated. An answer with `shown_once` repeats its secret within 10 minutes, then `API-8118`.","required":false,"schema":{"type":"string","minLength":1,"maxLength":255}}],"responses":{"200":{"description":"The file with its media.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Attachment"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `AUTH-1003`: your seat was deactivated (view only). `AUTH-1004`: all seats are inactive because the seat charge was not paid (view only). `AUTH-1002`: your role lacks the `tickets.reply` permission. `API-8102`: the API key or app lacks the `tickets:write` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"`TKT-6111`: no such attachment, or one in a ticket you cannot access.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["tickets:write"]},{"oauth2":["tickets:write"]}],"summary":"Try a file's failed media processing again","tags":["tickets"]}},"/v1/attachments/{attachmentId}/scan/retry":{"post":{"description":"A file whose scan failed (`scan_failed`, `TKT-6190`) becomes `pending` and is scanned again; `attachment.scanned` says how it ended. An infected file stays quarantined for good. Audited as `file.scan_retried`.","operationId":"retryAttachmentScan","parameters":[{"name":"attachmentId","required":true,"in":"path","description":"The attachment id.","schema":{"type":"string","format":"uuid","description":"The attachment id."}},{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}},{"name":"Idempotency-Key","in":"header","description":"A unique key for this operation (e.g. a UUID, 1 to 255 visible characters), kept 24 hours: repeating the request with the same key returns the first answer (`Idempotent-Replayed: true`) instead of doing it again. Errors: `API-8109` (400) a key that is not valid, `API-8108` (409, retryable) the first request with this key is still running, `API-8107` (422) the key was used for a different request; `API-8118` (409) the first request created something whose secret is shown only once, so its answer is not repeated. An answer with `shown_once` repeats its secret within 10 minutes, then `API-8118`.","required":false,"schema":{"type":"string","minLength":1,"maxLength":255}}],"responses":{"200":{"description":"The file, pending its scan.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Attachment"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `AUTH-1003`: your seat was deactivated (view only). `AUTH-1004`: all seats are inactive because the seat charge was not paid (view only). `AUTH-1002`: your role lacks the `tickets.reply` permission. `API-8102`: the API key or app lacks the `tickets:write` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"`TKT-6111`: no such attachment, or one in a ticket you cannot access.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"409":{"description":"`TKT-6193`: the file is not `scan_failed`.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["tickets:write"]},{"oauth2":["tickets:write"]}],"summary":"Scan a file for malware again after its scan failed","tags":["tickets"]}},"/v1/attachments/{attachmentId}/download":{"get":{"description":"Use `url` exactly as given, before `expires_at`: its signature covers the whole address (`response-content-disposition` with `filename*` too), so an edited or late link is refused by the storage itself with an XML `AccessDenied` or `SignatureDoesNotMatch` answer. Ask for a new link then.","operationId":"downloadAttachment","parameters":[{"name":"attachmentId","required":true,"in":"path","description":"The attachment id.","schema":{"type":"string","format":"uuid","description":"The attachment id."}},{"name":"disposition","required":false,"in":"query","description":"`inline` links a picture (PNG, JPEG, GIF, WebP, AVIF, BMP) to be shown in the browser; every other type, and the default `attachment`, downloads.","schema":{"description":"`inline` links a picture (PNG, JPEG, GIF, WebP, AVIF, BMP) to be shown in the browser; every other type, and the default `attachment`, downloads.","type":"string","enum":["attachment","inline"]}},{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"The link.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AttachmentDownload"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `API-8102`: the API key or app lacks the `tickets:read` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"`TKT-6111`: no such attachment, or one in a ticket you cannot access.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"409":{"description":"`TKT-6112`: not uploaded or scanned yet (or the scan failed). `TKT-6113`: quarantined, it contains malware.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["tickets:read"]},{"oauth2":["tickets:read"]}],"summary":"A download link for a file (valid 5 minutes)","tags":["tickets"]}},"/v1/contacts/{contactId}/history":{"get":{"description":"Tickets and calls across channels, newest first (and campaign messages), following merges.","operationId":"getContactHistory","parameters":[{"name":"contactId","required":true,"in":"path","description":"The contact id.","schema":{"type":"string","format":"uuid","description":"The contact id."}},{"name":"filter","required":false,"in":"query","description":"all, tickets, calls or campaigns (docs/13 side panel); conversations: one entry per ticket (its calls counted in `activity`) and the campaign messages and notification calls, no call entries (the contact page).","schema":{"default":"all","description":"all, tickets, calls or campaigns (docs/13 side panel); conversations: one entry per ticket (its calls counted in `activity`) and the campaign messages and notification calls, no call entries (the contact page).","type":"string","enum":["all","tickets","calls","campaigns","conversations"]}},{"name":"cursor","required":false,"in":"query","description":"The `next_cursor` of the previous page.","schema":{"description":"The `next_cursor` of the previous page.","type":"string","maxLength":200,"pattern":"^[A-Za-z0-9_-]+$"}},{"name":"page","required":false,"in":"query","description":"A numbered page to jump to, from 1, of `limit` rows: its first row must be within the first 10000 rows of the list. Ignored with `cursor`; the next pages follow `next_cursor`.","schema":{"description":"A numbered page to jump to, from 1, of `limit` rows: its first row must be within the first 10000 rows of the list. Ignored with `cursor`; the next pages follow `next_cursor`.","type":"integer","minimum":1,"maximum":10000}},{"name":"limit","required":false,"in":"query","description":"Items per page (1 to 500, default 25).","schema":{"default":25,"description":"Items per page (1 to 500, default 25).","type":"integer","minimum":1,"maximum":500}},{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"A page of the history.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CommunicationHistory"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `API-8102`: the API key or app lacks the `contacts:read` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"`CRM-6001`: no such contact.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["contacts:read"]},{"oauth2":["contacts:read"]}],"summary":"A contact’s communication history","tags":["tickets"]}},"/v1/companies/{companyId}/history":{"get":{"description":"The tickets and calls of every contact linked to the company, newest first; only what the member may see.","operationId":"getCompanyHistory","parameters":[{"name":"companyId","required":true,"in":"path","description":"The company id.","schema":{"type":"string","format":"uuid","description":"The company id."}},{"name":"filter","required":false,"in":"query","description":"all, tickets or calls of every contact linked to the company.","schema":{"default":"all","description":"all, tickets or calls of every contact linked to the company.","type":"string","enum":["all","tickets","calls"]}},{"name":"cursor","required":false,"in":"query","description":"The `next_cursor` of the previous page.","schema":{"description":"The `next_cursor` of the previous page.","type":"string","maxLength":200,"pattern":"^[A-Za-z0-9_-]+$"}},{"name":"page","required":false,"in":"query","description":"A numbered page to jump to, from 1, of `limit` rows: its first row must be within the first 10000 rows of the list. Ignored with `cursor`; the next pages follow `next_cursor`.","schema":{"description":"A numbered page to jump to, from 1, of `limit` rows: its first row must be within the first 10000 rows of the list. Ignored with `cursor`; the next pages follow `next_cursor`.","type":"integer","minimum":1,"maximum":10000}},{"name":"limit","required":false,"in":"query","description":"Items per page (1 to 500, default 25).","schema":{"default":25,"description":"Items per page (1 to 500, default 25).","type":"integer","minimum":1,"maximum":500}},{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"A page of the timeline.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CommunicationHistory"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `API-8102`: the API key or app lacks the `companies:read` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"`CRM-6002`: no such company.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["companies:read"]},{"oauth2":["companies:read"]}],"summary":"A company’s timeline","tags":["tickets"]}},"/v1/contacts/{contactId}/full-context":{"get":{"description":"Every message, call, campaign message and (with `include_notes`) internal note, across channels, tickets and merged identities; newest first, loaded page by page.","operationId":"getContactFullContext","parameters":[{"name":"contactId","required":true,"in":"path","description":"The contact id.","schema":{"type":"string","format":"uuid","description":"The contact id."}},{"name":"include_notes","required":false,"in":"query","description":"Include internal notes (the toggle of the view).","schema":{"description":"Include internal notes (the toggle of the view).","type":"string"}},{"name":"channel_type","required":false,"in":"query","description":"Only this channel.","schema":{"description":"Only this channel.","$ref":"#/components/schemas/ChannelType"}},{"name":"channel_id","required":false,"in":"query","description":"Only this channel account (a connected channel’s id, as in the `channels` of the first page).","schema":{"description":"Only this channel account (a connected channel’s id, as in the `channels` of the first page).","type":"string","format":"uuid"}},{"name":"from","required":false,"in":"query","description":"Only items at or after this time (ISO 8601).","schema":{"description":"Only items at or after this time (ISO 8601).","type":"string","format":"date-time"}},{"name":"to","required":false,"in":"query","description":"Only items at or before this time (ISO 8601).","schema":{"description":"Only items at or before this time (ISO 8601).","type":"string","format":"date-time"}},{"name":"cursor","required":false,"in":"query","description":"The `next_cursor` of the previous page.","schema":{"description":"The `next_cursor` of the previous page.","type":"string","maxLength":200,"pattern":"^[A-Za-z0-9_-]+$"}},{"name":"limit","required":false,"in":"query","description":"Items per page (1 to 100, default 25).","schema":{"default":25,"description":"Items per page (1 to 100, default 25).","type":"integer","minimum":1,"maximum":100}},{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"A page of the view.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FullContext"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `API-8102`: the API key or app lacks the `contacts:read` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"`CRM-6001`: no such contact.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["contacts:read"]},{"oauth2":["contacts:read"]}],"summary":"The full context of a contact (read-only)","tags":["tickets"]}},"/v1/ticket-classifications":{"get":{"description":"The organization’s classification lists with their options (docs/13 \"Settings\"): the ticket fields every member picks from. Archived lists only with `include_archived=true`; an archived option is listed with its list, after the live ones.","operationId":"listTicketClassifications","parameters":[{"name":"include_archived","required":false,"in":"query","description":"`true`: archived lists too (the settings page).","schema":{"description":"`true`: archived lists too (the settings page).","type":"string","enum":["true","false"]}},{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"The lists.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TicketClassificationLists"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `API-8102`: the API key or app lacks the `tickets:read` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["tickets:read"]},{"oauth2":["tickets:read"]}],"summary":"List the classification lists","tags":["tickets"]},"post":{"description":"A named dropdown list with its first options (none or more): up to 20 live lists of 100 options each; a ticket takes one option per list at most. Audited.","operationId":"createTicketClassification","parameters":[{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}},{"name":"Idempotency-Key","in":"header","description":"A unique key for this operation (e.g. a UUID, 1 to 255 visible characters), kept 24 hours: repeating the request with the same key returns the first answer (`Idempotent-Replayed: true`) instead of doing it again. Errors: `API-8109` (400) a key that is not valid, `API-8108` (409, retryable) the first request with this key is still running, `API-8107` (422) the key was used for a different request; `API-8118` (409) the first request created something whose secret is shown only once, so its answer is not repeated. An answer with `shown_once` repeats its secret within 10 minutes, then `API-8118`.","required":false,"schema":{"type":"string","minLength":1,"maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateTicketClassificationList"}}}},"responses":{"201":{"description":"The list.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TicketClassificationList"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `AUTH-1003`: your seat was deactivated (view only). `AUTH-1004`: all seats are inactive because the seat charge was not paid (view only). `AUTH-1002`: your role lacks the `settings.manage` permission. `API-8102`: the API key or app lacks the `organization:write` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"409":{"description":"`TKT-6235`: a list with this name exists (ignoring case and Arabic spelling). `TKT-6236`: an option name given twice.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"description":"`API-8001`: some fields are missing or not valid. `details.fields` lists each invalid field with its own code (e.g. `API-8002` required, `API-8012` wrong format). `TKT-6237`: the organization has 20 live lists. `TKT-6238`: more than 100 options. `TKT-6239`: the name is empty or longer than 50 characters.","headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["organization:write"]},{"oauth2":["organization:write"]}],"summary":"Create a classification list","tags":["tickets"]}},"/v1/ticket-classifications/{listId}":{"get":{"description":"One list with all its options, archived ones too (an archived list as well).","operationId":"getTicketClassification","parameters":[{"name":"listId","required":true,"in":"path","description":"The classification list id.","schema":{"type":"string","format":"uuid","description":"The classification list id."}},{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"The list.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TicketClassificationList"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `API-8102`: the API key or app lacks the `tickets:read` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"`TKT-6232`: no such classification list.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["tickets:read"]},{"oauth2":["tickets:read"]}],"summary":"Get a classification list","tags":["tickets"]},"patch":{"description":"Nothing is deleted: an archived list shows nowhere (no ticket field, filter or count) and its tickets keep their options until it is brought back. Audited.","operationId":"updateTicketClassification","parameters":[{"name":"listId","required":true,"in":"path","description":"The classification list id.","schema":{"type":"string","format":"uuid","description":"The classification list id."}},{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}},{"name":"Idempotency-Key","in":"header","description":"A unique key for this operation (e.g. a UUID, 1 to 255 visible characters), kept 24 hours: repeating the request with the same key returns the first answer (`Idempotent-Replayed: true`) instead of doing it again. Errors: `API-8109` (400) a key that is not valid, `API-8108` (409, retryable) the first request with this key is still running, `API-8107` (422) the key was used for a different request; `API-8118` (409) the first request created something whose secret is shown only once, so its answer is not repeated. An answer with `shown_once` repeats its secret within 10 minutes, then `API-8118`.","required":false,"schema":{"type":"string","minLength":1,"maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateTicketClassificationList"}}}},"responses":{"200":{"description":"The list.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TicketClassificationList"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `AUTH-1003`: your seat was deactivated (view only). `AUTH-1004`: all seats are inactive because the seat charge was not paid (view only). `AUTH-1002`: your role lacks the `settings.manage` permission. `API-8102`: the API key or app lacks the `organization:write` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"`TKT-6232`: no such classification list.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"409":{"description":"`TKT-6235`: a list with this name exists.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"description":"`API-8001`: some fields are missing or not valid. `details.fields` lists each invalid field with its own code (e.g. `API-8002` required, `API-8012` wrong format). `TKT-6237`: bringing it back would pass 20 live lists. `TKT-6239`: the name is empty or longer than 50 characters.","headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["organization:write"]},{"oauth2":["organization:write"]}],"summary":"Rename, archive or restore a classification list","tags":["tickets"]}},"/v1/ticket-classifications/{listId}/options":{"post":{"description":"A new option of a live list, after its others. Audited.","operationId":"addTicketClassificationOption","parameters":[{"name":"listId","required":true,"in":"path","description":"The classification list id.","schema":{"type":"string","format":"uuid","description":"The classification list id."}},{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}},{"name":"Idempotency-Key","in":"header","description":"A unique key for this operation (e.g. a UUID, 1 to 255 visible characters), kept 24 hours: repeating the request with the same key returns the first answer (`Idempotent-Replayed: true`) instead of doing it again. Errors: `API-8109` (400) a key that is not valid, `API-8108` (409, retryable) the first request with this key is still running, `API-8107` (422) the key was used for a different request; `API-8118` (409) the first request created something whose secret is shown only once, so its answer is not repeated. An answer with `shown_once` repeats its secret within 10 minutes, then `API-8118`.","required":false,"schema":{"type":"string","minLength":1,"maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AddTicketClassificationOption"}}}},"responses":{"201":{"description":"The option.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TicketClassificationOption"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `AUTH-1003`: your seat was deactivated (view only). `AUTH-1004`: all seats are inactive because the seat charge was not paid (view only). `AUTH-1002`: your role lacks the `settings.manage` permission. `API-8102`: the API key or app lacks the `organization:write` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"`TKT-6232`: no such classification list (or it is archived, for a change of its options).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"409":{"description":"`TKT-6236`: the list has an option with this name.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"description":"`API-8001`: some fields are missing or not valid. `details.fields` lists each invalid field with its own code (e.g. `API-8002` required, `API-8012` wrong format). `TKT-6238`: the list has 100 live options. `TKT-6239`: the name is empty or longer than 50 characters.","headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["organization:write"]},{"oauth2":["organization:write"]}],"summary":"Add an option to a classification list","tags":["tickets"]}},"/v1/ticket-classifications/{listId}/options/{optionId}":{"patch":{"description":"Nothing is deleted: an archived option stays on the tickets that have it and is never picked again (`TKT-6234`) until brought back. Audited.","operationId":"updateTicketClassificationOption","parameters":[{"name":"listId","required":true,"in":"path","description":"The classification list id.","schema":{"type":"string","format":"uuid","description":"The classification list id."}},{"name":"optionId","required":true,"in":"path","description":"The classification option id.","schema":{"type":"string","format":"uuid","description":"The classification option id."}},{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}},{"name":"Idempotency-Key","in":"header","description":"A unique key for this operation (e.g. a UUID, 1 to 255 visible characters), kept 24 hours: repeating the request with the same key returns the first answer (`Idempotent-Replayed: true`) instead of doing it again. Errors: `API-8109` (400) a key that is not valid, `API-8108` (409, retryable) the first request with this key is still running, `API-8107` (422) the key was used for a different request; `API-8118` (409) the first request created something whose secret is shown only once, so its answer is not repeated. An answer with `shown_once` repeats its secret within 10 minutes, then `API-8118`.","required":false,"schema":{"type":"string","minLength":1,"maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateTicketClassificationOption"}}}},"responses":{"200":{"description":"The option.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TicketClassificationOption"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `AUTH-1003`: your seat was deactivated (view only). `AUTH-1004`: all seats are inactive because the seat charge was not paid (view only). `AUTH-1002`: your role lacks the `settings.manage` permission. `API-8102`: the API key or app lacks the `organization:write` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"`TKT-6232`: no such classification list (or it is archived, for a change of its options). `TKT-6233`: the list has no such option.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"409":{"description":"`TKT-6236`: the list has an option with this name.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"description":"`API-8001`: some fields are missing or not valid. `details.fields` lists each invalid field with its own code (e.g. `API-8002` required, `API-8012` wrong format). `TKT-6238`: bringing it back would pass 100 live options. `TKT-6239`: the name is empty or longer than 50 characters.","headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["organization:write"]},{"oauth2":["organization:write"]}],"summary":"Rename, archive or restore a classification option","tags":["tickets"]}},"/v1/ticket-tags":{"get":{"description":"The organization’s live ticket tags (up to 10,000, filled on first use), newest first, with `q` matching part of the name (any case or Arabic spelling): the tag suggestions and the settings page. A page after `cursor`, with the `total` matching.","operationId":"listTicketTags","parameters":[{"name":"q","required":false,"in":"query","description":"Part of the name (any case or Arabic spelling).","schema":{"description":"Part of the name (any case or Arabic spelling).","type":"string","maxLength":50}},{"name":"cursor","required":false,"in":"query","description":"The `next_cursor` of the previous page.","schema":{"description":"The `next_cursor` of the previous page.","type":"string","maxLength":200,"pattern":"^[A-Za-z0-9_-]+$"}},{"name":"limit","required":false,"in":"query","description":"Tags per page (1 to 100; the organization has up to 10000).","schema":{"default":25,"description":"Tags per page (1 to 100; the organization has up to 10000).","type":"integer","minimum":1,"maximum":100}},{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"A page of tags.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TicketTagPage"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `API-8102`: the API key or app lacks the `tickets:read` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["tickets:read"]},{"oauth2":["tickets:read"]}],"summary":"List the ticket tags","tags":["tickets"]},"post":{"description":"A tag made from settings, with the same rules as one typed on a ticket: up to 50 characters, trimmed, unique ignoring case and Arabic spelling, up to 10,000 live tags. Send an `Idempotency-Key` to retry safely: a repeat answers the first result. Audited.","operationId":"createTicketTag","parameters":[{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}},{"name":"Idempotency-Key","in":"header","description":"A unique key for this operation (e.g. a UUID, 1 to 255 visible characters), kept 24 hours: repeating the request with the same key returns the first answer (`Idempotent-Replayed: true`) instead of doing it again. Errors: `API-8109` (400) a key that is not valid, `API-8108` (409, retryable) the first request with this key is still running, `API-8107` (422) the key was used for a different request; `API-8118` (409) the first request created something whose secret is shown only once, so its answer is not repeated. An answer with `shown_once` repeats its secret within 10 minutes, then `API-8118`.","required":false,"schema":{"type":"string","minLength":1,"maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateTicketTag"}}}},"responses":{"201":{"description":"The tag.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrganizationTicketTag"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `AUTH-1003`: your seat was deactivated (view only). `AUTH-1004`: all seats are inactive because the seat charge was not paid (view only). `AUTH-1002`: your role lacks the `settings.manage` permission. `API-8102`: the API key or app lacks the `organization:write` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"409":{"description":"`TKT-6243`: a tag has this name (or a merged tag with it leads to another).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"description":"`API-8001`: some fields are missing or not valid. `details.fields` lists each invalid field with its own code (e.g. `API-8002` required, `API-8012` wrong format). `TKT-6241`: the organization has 10,000 live tags. `TKT-6239`: the name is empty or longer than 50 characters.","headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["organization:write"]},{"oauth2":["organization:write"]}],"summary":"Create a ticket tag","tags":["tickets"]}},"/v1/ticket-tags/{tagId}":{"get":{"description":"One live tag of the organization by its id (a filter’s chosen tag shown by its name). A merged tag answers `TKT-6242`.","operationId":"getTicketTag","parameters":[{"name":"tagId","required":true,"in":"path","description":"The tag id.","schema":{"type":"string","format":"uuid","description":"The tag id."}},{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"The tag.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrganizationTicketTag"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `API-8102`: the API key or app lacks the `tickets:read` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"`TKT-6242`: no such live tag (a merged tag is archived).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["tickets:read"]},{"oauth2":["tickets:read"]}],"summary":"Get a ticket tag","tags":["tickets"]},"patch":{"description":"Its tickets show the new name; no ticket event is recorded (docs/13). To join two tags, merge one into the other. Audited.","operationId":"renameTicketTag","parameters":[{"name":"tagId","required":true,"in":"path","description":"The tag id.","schema":{"type":"string","format":"uuid","description":"The tag id."}},{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}},{"name":"Idempotency-Key","in":"header","description":"A unique key for this operation (e.g. a UUID, 1 to 255 visible characters), kept 24 hours: repeating the request with the same key returns the first answer (`Idempotent-Replayed: true`) instead of doing it again. Errors: `API-8109` (400) a key that is not valid, `API-8108` (409, retryable) the first request with this key is still running, `API-8107` (422) the key was used for a different request; `API-8118` (409) the first request created something whose secret is shown only once, so its answer is not repeated. An answer with `shown_once` repeats its secret within 10 minutes, then `API-8118`.","required":false,"schema":{"type":"string","minLength":1,"maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RenameTicketTag"}}}},"responses":{"200":{"description":"The tag.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrganizationTicketTag"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `AUTH-1003`: your seat was deactivated (view only). `AUTH-1004`: all seats are inactive because the seat charge was not paid (view only). `AUTH-1002`: your role lacks the `settings.manage` permission. `API-8102`: the API key or app lacks the `organization:write` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"`TKT-6242`: no such live tag (a merged tag is archived).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"409":{"description":"`TKT-6243`: another tag has this name (merge it instead).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"description":"`API-8001`: some fields are missing or not valid. `details.fields` lists each invalid field with its own code (e.g. `API-8002` required, `API-8012` wrong format). `TKT-6239`: the name is empty or longer than 50 characters.","headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["organization:write"]},{"oauth2":["organization:write"]}],"summary":"Rename a ticket tag","tags":["tickets"]}},"/v1/ticket-tags/{tagId}/merge":{"post":{"description":"Every ticket with the tag gets `into_tag_id` instead (once), and the tag is archived: typing its name then adds the other; a merge is not undone. Send an `Idempotency-Key` to retry safely: a repeat answers the first result. No ticket event is recorded (docs/13). Audited.","operationId":"mergeTicketTag","parameters":[{"name":"tagId","required":true,"in":"path","description":"The tag id.","schema":{"type":"string","format":"uuid","description":"The tag id."}},{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}},{"name":"Idempotency-Key","in":"header","description":"A unique key for this operation (e.g. a UUID, 1 to 255 visible characters), kept 24 hours: repeating the request with the same key returns the first answer (`Idempotent-Replayed: true`) instead of doing it again. Errors: `API-8109` (400) a key that is not valid, `API-8108` (409, retryable) the first request with this key is still running, `API-8107` (422) the key was used for a different request; `API-8118` (409) the first request created something whose secret is shown only once, so its answer is not repeated. An answer with `shown_once` repeats its secret within 10 minutes, then `API-8118`.","required":false,"schema":{"type":"string","minLength":1,"maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MergeTicketTag"}}}},"responses":{"200":{"description":"The result.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TicketTagMergeResult"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `AUTH-1003`: your seat was deactivated (view only). `AUTH-1004`: all seats are inactive because the seat charge was not paid (view only). `AUTH-1002`: your role lacks the `settings.manage` permission. `API-8102`: the API key or app lacks the `organization:write` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"`TKT-6242`: no such live tag (a merged tag is archived). The same for `into_tag_id`.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"description":"`API-8001`: some fields are missing or not valid. `details.fields` lists each invalid field with its own code (e.g. `API-8002` required, `API-8012` wrong format). `TKT-6244`: a tag is not merged into itself.","headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["organization:write"]},{"oauth2":["organization:write"]}],"summary":"Merge a ticket tag into another","tags":["tickets"]}},"/v1/tickets/counts/classifications":{"get":{"description":"The tickets you may see (not in Spam) by option of one live classification list, and those with none; with the same space, assignee, status, `unread` and tag filters as the ticket log.","operationId":"countTicketsByClassification","parameters":[{"name":"list_id","required":true,"in":"query","description":"The classification list id.","schema":{"type":"string","format":"uuid","description":"The classification list id."}},{"name":"space_id","required":false,"in":"query","description":"A department space, or `none` for tickets in no department space.","schema":{"description":"A department space, or `none` for tickets in no department space.","type":"string","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}|none)$"}},{"name":"assignee_membership_id","required":false,"in":"query","description":"A member (membership id), or `none` for unassigned tickets (the queue).","schema":{"description":"A member (membership id), or `none` for unassigned tickets (the queue).","type":"string","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}|none)$"}},{"name":"status","required":false,"in":"query","description":"Statuses, comma-separated (e.g. `open,in_progress`).","schema":{"description":"Statuses, comma-separated (e.g. `open,in_progress`).","type":"string","maxLength":40,"pattern":"^(open|in_progress|closed)(,(open|in_progress|closed))*$"}},{"name":"tag_id","required":false,"in":"query","description":"Only tickets with this tag (`GET /v1/ticket-tags`).","schema":{"description":"Only tickets with this tag (`GET /v1/ticket-tags`).","type":"string","format":"uuid"}},{"name":"unread","required":false,"in":"query","description":"`true`: only the tickets you have not read (a customer message you have not seen; never closed ones).","schema":{"description":"`true`: only the tickets you have not read (a customer message you have not seen; never closed ones).","type":"string","enum":["true","false"]}},{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"The counts.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TicketClassificationCounts"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `API-8102`: the API key or app lacks the `tickets:read` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"`TKT-6232`: no such live classification list.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["tickets:read"]},{"oauth2":["tickets:read"]}],"summary":"Count tickets by classification option","tags":["tickets"]}},"/v1/tickets/counts/tags":{"get":{"description":"The tickets you may see (not in Spam) by tag, the most used 100 tags first; with the same space, assignee, status, `unread` and classification option filters as the ticket log.","operationId":"countTicketsByTag","parameters":[{"name":"space_id","required":false,"in":"query","description":"A department space, or `none` for tickets in no department space.","schema":{"description":"A department space, or `none` for tickets in no department space.","type":"string","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}|none)$"}},{"name":"assignee_membership_id","required":false,"in":"query","description":"A member (membership id), or `none` for unassigned tickets (the queue).","schema":{"description":"A member (membership id), or `none` for unassigned tickets (the queue).","type":"string","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}|none)$"}},{"name":"status","required":false,"in":"query","description":"Statuses, comma-separated (e.g. `open,in_progress`).","schema":{"description":"Statuses, comma-separated (e.g. `open,in_progress`).","type":"string","maxLength":40,"pattern":"^(open|in_progress|closed)(,(open|in_progress|closed))*$"}},{"name":"classification_option_id","required":false,"in":"query","description":"Only tickets with this option of a classification list (`GET /v1/ticket-classifications`).","schema":{"description":"Only tickets with this option of a classification list (`GET /v1/ticket-classifications`).","type":"string","format":"uuid"}},{"name":"unread","required":false,"in":"query","description":"`true`: only the tickets you have not read (a customer message you have not seen; never closed ones).","schema":{"description":"`true`: only the tickets you have not read (a customer message you have not seen; never closed ones).","type":"string","enum":["true","false"]}},{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"The counts.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TicketTagCounts"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `API-8102`: the API key or app lacks the `tickets:read` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["tickets:read"]},{"oauth2":["tickets:read"]}],"summary":"Count tickets by tag","tags":["tickets"]}},"/v1/canned-replies":{"get":{"description":"The replies you may use, by title: the organization’s, your spaces’ (every space’s with `settings.manage`) and your own. With `ticket_id` (the \"/\" picker): the organization’s, the ticket’s space’s and your own.","operationId":"listCannedReplies","parameters":[{"name":"scope","required":false,"in":"query","description":"Only replies of this scope.","schema":{"description":"Only replies of this scope.","$ref":"#/components/schemas/CannedReplyScope"}},{"name":"space_id","required":false,"in":"query","description":"Only the replies of this department space.","schema":{"description":"Only the replies of this department space.","type":"string","format":"uuid"}},{"name":"ticket_id","required":false,"in":"query","description":"The ticket being answered (the \"/\" picker): the organization’s replies, the replies of the ticket’s space and your own.","schema":{"description":"The ticket being answered (the \"/\" picker): the organization’s replies, the replies of the ticket’s space and your own.","type":"string","format":"uuid"}},{"name":"q","required":false,"in":"query","description":"Words of the title (Arabic-aware) or of the text.","schema":{"description":"Words of the title (Arabic-aware) or of the text.","type":"string","maxLength":200}},{"name":"cursor","required":false,"in":"query","description":"The `next_cursor` of the previous page.","schema":{"description":"The `next_cursor` of the previous page.","type":"string","maxLength":400,"pattern":"^[A-Za-z0-9_-]+$"}},{"name":"page","required":false,"in":"query","description":"A numbered page to jump to, from 1, of `limit` rows: its first row must be within the first 10000 rows of the list. Ignored with `cursor`; the next pages follow `next_cursor`.","schema":{"description":"A numbered page to jump to, from 1, of `limit` rows: its first row must be within the first 10000 rows of the list. Ignored with `cursor`; the next pages follow `next_cursor`.","type":"integer","minimum":1,"maximum":10000}},{"name":"limit","required":false,"in":"query","description":"Items per page (1 to 100, default 25).","schema":{"default":25,"description":"Items per page (1 to 100, default 25).","type":"integer","minimum":1,"maximum":100}},{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"A page of replies.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CannedReplyPage"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `API-8102`: the API key or app lacks the `replies:read` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"`TKT-6101`: no such ticket, or one you cannot access.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["replies:read"]},{"oauth2":["replies:read"]}],"summary":"List canned replies","tags":["replies"]},"post":{"description":"The organization’s (`settings.manage`), a department space’s (`space_id`; `space_replies.manage` in a space you belong to, or `settings.manage`) or your own (any member). `AUTH-1002`: the scope needs `settings.manage` (organization) or `space_replies.manage` (space). `TKT-6131`: you are not a member of the space.","operationId":"createCannedReply","parameters":[{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}},{"name":"Idempotency-Key","in":"header","description":"A unique key for this operation (e.g. a UUID, 1 to 255 visible characters), kept 24 hours: repeating the request with the same key returns the first answer (`Idempotent-Replayed: true`) instead of doing it again. Errors: `API-8109` (400) a key that is not valid, `API-8108` (409, retryable) the first request with this key is still running, `API-8107` (422) the key was used for a different request; `API-8118` (409) the first request created something whose secret is shown only once, so its answer is not repeated. An answer with `shown_once` repeats its secret within 10 minutes, then `API-8118`.","required":false,"schema":{"type":"string","minLength":1,"maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateCannedReply"}}}},"responses":{"201":{"description":"The reply.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CannedReply"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `AUTH-1003`: your seat was deactivated (view only). `AUTH-1004`: all seats are inactive because the seat charge was not paid (view only). `API-8102`: the API key or app lacks the `replies:write` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"`SPC-6201`: no such space, or it is archived.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["replies:write"]},{"oauth2":["replies:write"]}],"summary":"Save a canned reply","tags":["replies"]}},"/v1/canned-replies/{replyId}":{"get":{"operationId":"getCannedReply","parameters":[{"name":"replyId","required":true,"in":"path","description":"The canned reply id.","schema":{"type":"string","format":"uuid","description":"The canned reply id."}},{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"The reply.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CannedReply"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `API-8102`: the API key or app lacks the `replies:read` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"`TKT-6130`: no such canned reply, or one you may not see (another member’s personal reply, a space you are not in).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["replies:read"]},{"oauth2":["replies:read"]}],"summary":"Get a canned reply","tags":["replies"]},"patch":{"description":"`AUTH-1002`: the scope needs `settings.manage` (organization) or `space_replies.manage` (space). `TKT-6131`: you are not a member of the space.","operationId":"updateCannedReply","parameters":[{"name":"replyId","required":true,"in":"path","description":"The canned reply id.","schema":{"type":"string","format":"uuid","description":"The canned reply id."}},{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}},{"name":"Idempotency-Key","in":"header","description":"A unique key for this operation (e.g. a UUID, 1 to 255 visible characters), kept 24 hours: repeating the request with the same key returns the first answer (`Idempotent-Replayed: true`) instead of doing it again. Errors: `API-8109` (400) a key that is not valid, `API-8108` (409, retryable) the first request with this key is still running, `API-8107` (422) the key was used for a different request; `API-8118` (409) the first request created something whose secret is shown only once, so its answer is not repeated. An answer with `shown_once` repeats its secret within 10 minutes, then `API-8118`.","required":false,"schema":{"type":"string","minLength":1,"maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateCannedReply"}}}},"responses":{"200":{"description":"The reply.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CannedReply"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `AUTH-1003`: your seat was deactivated (view only). `AUTH-1004`: all seats are inactive because the seat charge was not paid (view only). `API-8102`: the API key or app lacks the `replies:write` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"`TKT-6130`: no such canned reply, or one you may not see (another member’s personal reply, a space you are not in).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["replies:write"]},{"oauth2":["replies:write"]}],"summary":"Change a canned reply","tags":["replies"]},"delete":{"description":"It is no longer offered (kept with its history: Rabt never deletes). `AUTH-1002`: the scope needs `settings.manage` (organization) or `space_replies.manage` (space). `TKT-6131`: you are not a member of the space.","operationId":"deleteCannedReply","parameters":[{"name":"replyId","required":true,"in":"path","description":"The canned reply id.","schema":{"type":"string","format":"uuid","description":"The canned reply id."}},{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}}],"responses":{"204":{"description":"Deleted.","headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `AUTH-1003`: your seat was deactivated (view only). `AUTH-1004`: all seats are inactive because the seat charge was not paid (view only). `API-8102`: the API key or app lacks the `replies:write` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"`TKT-6130`: no such canned reply, or one you may not see (another member’s personal reply, a space you are not in).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["replies:write"]},{"oauth2":["replies:write"]}],"summary":"Delete a canned reply","tags":["replies"]}},"/v1/tickets/{ticketId}/conversation-exports":{"post":{"description":"Before printing a ticket's whole conversation (or saving it as PDF): the export of customer data is recorded in the organization's sensitive-access log (`ticket_conversation.exported`, OP09) and sent as the `security.sensitive_access_recorded` webhook. Every member who may see the ticket may print it.","operationId":"recordConversationExport","parameters":[{"name":"ticketId","required":true,"in":"path","description":"The ticket id.","schema":{"type":"string","format":"uuid","description":"The ticket id."}},{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}},{"name":"Idempotency-Key","in":"header","description":"A unique key for this operation (e.g. a UUID, 1 to 255 visible characters), kept 24 hours: repeating the request with the same key returns the first answer (`Idempotent-Replayed: true`) instead of doing it again. Errors: `API-8109` (400) a key that is not valid, `API-8108` (409, retryable) the first request with this key is still running, `API-8107` (422) the key was used for a different request; `API-8118` (409) the first request created something whose secret is shown only once, so its answer is not repeated. An answer with `shown_once` repeats its secret within 10 minutes, then `API-8118`.","required":false,"schema":{"type":"string","minLength":1,"maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConversationExportInput"}}}},"responses":{"201":{"description":"Recorded.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConversationExport"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `API-8102`: the API key or app lacks the `tickets:read` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"`TKT-6101`: no such ticket, or it is in a space you cannot access (the same answer, so nothing is revealed).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["tickets:read"]},{"oauth2":["tickets:read"]}],"summary":"Record a ticket's conversation printed or saved as PDF","tags":["tickets"]}},"/v1/organization":{"get":{"description":"The organization named by `Rabt-Organization`, and what you may do in it.","operationId":"getActiveOrganization","parameters":[{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"The organization and your membership in it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MembershipContext"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `API-8102`: the API key or app lacks the `organization:read` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["organization:read"]},{"oauth2":["organization:read"]}],"summary":"Get the active organization","tags":["organizations"]},"patch":{"description":"The name, default language, time zone and default country of phone numbers.","operationId":"updateOrganization","parameters":[{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}},{"name":"Idempotency-Key","in":"header","description":"A unique key for this operation (e.g. a UUID, 1 to 255 visible characters), kept 24 hours: repeating the request with the same key returns the first answer (`Idempotent-Replayed: true`) instead of doing it again. Errors: `API-8109` (400) a key that is not valid, `API-8108` (409, retryable) the first request with this key is still running, `API-8107` (422) the key was used for a different request; `API-8118` (409) the first request created something whose secret is shown only once, so its answer is not repeated. An answer with `shown_once` repeats its secret within 10 minutes, then `API-8118`.","required":false,"schema":{"type":"string","minLength":1,"maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateOrganization"}}}},"responses":{"200":{"description":"The organization.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Organization"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `AUTH-1003`: your seat was deactivated (view only). `AUTH-1004`: all seats are inactive because the seat charge was not paid (view only). `AUTH-1002`: your role lacks the `settings.manage` permission. `API-8102`: the API key or app lacks the `organization:write` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["organization:write"]},{"oauth2":["organization:write"]}],"summary":"Update the organization settings","tags":["organizations"]}},"/v1/organization/ownership-transfer":{"post":{"description":"Owner only (or asked through Help, where the Rabt team does it), a sensitive action. In the owner's session (a code entered within the last 10 minutes) it runs at once: the member becomes the owner (the Owner role) and you become an Admin; there is always exactly one owner. With the owner's own personal key or app it waits (202): `approval_view.url` opens it in Rabt's app, where the owner approves it with a code within 10 minutes; only then it runs.","operationId":"transferOwnership","parameters":[{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}},{"name":"Idempotency-Key","in":"header","description":"A unique key for this operation (e.g. a UUID, 1 to 255 visible characters), kept 24 hours: repeating the request with the same key returns the first answer (`Idempotent-Replayed: true`) instead of doing it again. Errors: `API-8109` (400) a key that is not valid, `API-8108` (409, retryable) the first request with this key is still running, `API-8107` (422) the key was used for a different request; `API-8118` (409) the first request created something whose secret is shown only once, so its answer is not repeated. An answer with `shown_once` repeats its secret within 10 minutes, then `API-8118`.","required":false,"schema":{"type":"string","minLength":1,"maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TransferOwnership"}}}},"responses":{"200":{"description":"The organization and your membership in it (now an Admin).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MembershipContext"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"202":{"description":"Asked with the owner's key or app: it waits for the owner's approval in the app.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PendingApproval"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `AUTH-1003`: your seat was deactivated (view only). `AUTH-1004`: all seats are inactive because the seat charge was not paid (view only). `AUTH-1042`: only the owner can do this. `AUTH-1013`: a sensitive action; no code was entered in this session within the last 10 minutes. Re-authenticate (`POST /v1/auth/reauthentication`), then repeat the request. `API-8102`: the API key or app lacks the `members:write` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in. `API-8148`: not available to test keys (API test mode). `API-8169`: a connection made by the organization's trusted issuer.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"`AUTH-1046`: no such member.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"409":{"description":"`AUTH-1057`: the member is you, or their seat is inactive (ownership goes to another active member).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["members:write"]},{"oauth2":["members:write"]}],"summary":"Transfer the ownership","tags":["organizations"]}},"/v1/members":{"get":{"description":"The members of the active organization (not removed), in the order they joined.","operationId":"listMembers","parameters":[{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"The members.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MemberList"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `API-8102`: the API key or app lacks the `members:read` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["members:read"]},{"oauth2":["members:read"]}],"summary":"List the members","tags":["members"]}},"/v1/members/{membershipId}":{"get":{"operationId":"getMember","parameters":[{"name":"membershipId","required":true,"in":"path","description":"The membership id.","schema":{"type":"string","format":"uuid","description":"The membership id."}},{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"The member.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Member"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `API-8102`: the API key or app lacks the `members:read` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"`AUTH-1046`: no such member (or the member was removed).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["members:read"]},{"oauth2":["members:read"]}],"summary":"Get a member","tags":["members"]},"delete":{"description":"The member leaves the organization; their past work stays, shown with their name. A new invitation brings them back. Their open tickets move in the same request to `tickets_to` (another space or a member; `all` is refused with `SPC-6222`); none chosen: `SPC-6224` with their count.","operationId":"removeMember","parameters":[{"name":"membershipId","required":true,"in":"path","description":"The membership id.","schema":{"type":"string","format":"uuid","description":"The membership id."}},{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SettleTickets"}}}},"responses":{"204":{"description":"Removed.","headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `AUTH-1003`: your seat was deactivated (view only). `AUTH-1004`: all seats are inactive because the seat charge was not paid (view only). `AUTH-1002`: your role lacks the `members.manage` permission. `API-8102`: the API key or app lacks the `members:write` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in. `API-8148`: not available to test keys (API test mode).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"`AUTH-1046`: no such member (or the member was removed).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"409":{"description":"`SPC-6224`: open tickets and no `tickets_to`; `SPC-6225`: not exactly one valid destination; `SPC-6222`: `all`.\n\n`AUTH-1043`: the owner's membership cannot be changed this way (transfer the ownership first).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["members:write"]},{"oauth2":["members:write"]}],"summary":"Remove a member","tags":["members"]},"patch":{"description":"The member's name and job title in this organization, shown wherever they appear in it and in email signatures, and whether incoming calls ring them (`rings_calls`). Your own, or a member whose role is within your permissions; not the owner's unless you are the owner. The account's own name is the person's.","operationId":"updateMember","parameters":[{"name":"membershipId","required":true,"in":"path","description":"The membership id.","schema":{"type":"string","format":"uuid","description":"The membership id."}},{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}},{"name":"Idempotency-Key","in":"header","description":"A unique key for this operation (e.g. a UUID, 1 to 255 visible characters), kept 24 hours: repeating the request with the same key returns the first answer (`Idempotent-Replayed: true`) instead of doing it again. Errors: `API-8109` (400) a key that is not valid, `API-8108` (409, retryable) the first request with this key is still running, `API-8107` (422) the key was used for a different request; `API-8118` (409) the first request created something whose secret is shown only once, so its answer is not repeated. An answer with `shown_once` repeats its secret within 10 minutes, then `API-8118`.","required":false,"schema":{"type":"string","minLength":1,"maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MemberUpdate"}}}},"responses":{"200":{"description":"The member.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Member"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `AUTH-1003`: your seat was deactivated (view only). `AUTH-1004`: all seats are inactive because the seat charge was not paid (view only). `AUTH-1002`: your role lacks the `members.manage` permission. `API-8102`: the API key or app lacks the `members:write` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in. `API-8148`: not available to test keys (API test mode).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"`AUTH-1046`: no such member (or the member was removed).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"409":{"description":"`AUTH-1043`: the owner's membership cannot be changed this way (transfer the ownership first).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["members:write"]},{"oauth2":["members:write"]}],"summary":"Change a member's name, job title or call ringing","tags":["members"]}},"/v1/members/{membershipId}/role":{"put":{"description":"Not the owner's, and not to the Owner role. You can only give, or take away, permissions your own role has.","operationId":"changeMemberRole","parameters":[{"name":"membershipId","required":true,"in":"path","description":"The membership id.","schema":{"type":"string","format":"uuid","description":"The membership id."}},{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}},{"name":"Idempotency-Key","in":"header","description":"A unique key for this operation (e.g. a UUID, 1 to 255 visible characters), kept 24 hours: repeating the request with the same key returns the first answer (`Idempotent-Replayed: true`) instead of doing it again. Errors: `API-8109` (400) a key that is not valid, `API-8108` (409, retryable) the first request with this key is still running, `API-8107` (422) the key was used for a different request; `API-8118` (409) the first request created something whose secret is shown only once, so its answer is not repeated. An answer with `shown_once` repeats its secret within 10 minutes, then `API-8118`.","required":false,"schema":{"type":"string","minLength":1,"maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MemberRoleChange"}}}},"responses":{"200":{"description":"The member.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Member"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `AUTH-1003`: your seat was deactivated (view only). `AUTH-1004`: all seats are inactive because the seat charge was not paid (view only). `AUTH-1002`: your role lacks the `members.manage` permission. `API-8102`: the API key or app lacks the `members:write` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in. `API-8148`: not available to test keys (API test mode).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"`AUTH-1046`: no such member (or the member was removed). `AUTH-1047`: no such role.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"409":{"description":"`AUTH-1043`: the owner's membership cannot be changed this way (transfer the ownership first). `AUTH-1044`: the Owner role cannot be given.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["members:write"]},{"oauth2":["members:write"]}],"summary":"Change a member's role","tags":["members"]}},"/v1/members/{membershipId}/seat":{"put":{"description":"An inactive member can sign in and view but not change anything; the seat is not billed from the next period. Reactivating bills it again (docs/10).","operationId":"setMemberSeat","parameters":[{"name":"membershipId","required":true,"in":"path","description":"The membership id.","schema":{"type":"string","format":"uuid","description":"The membership id."}},{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}},{"name":"Idempotency-Key","in":"header","description":"A unique key for this operation (e.g. a UUID, 1 to 255 visible characters), kept 24 hours: repeating the request with the same key returns the first answer (`Idempotent-Replayed: true`) instead of doing it again. Errors: `API-8109` (400) a key that is not valid, `API-8108` (409, retryable) the first request with this key is still running, `API-8107` (422) the key was used for a different request; `API-8118` (409) the first request created something whose secret is shown only once, so its answer is not repeated. An answer with `shown_once` repeats its secret within 10 minutes, then `API-8118`.","required":false,"schema":{"type":"string","minLength":1,"maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MemberSeatChange"}}}},"responses":{"200":{"description":"The member.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Member"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `AUTH-1003`: your seat was deactivated (view only). `AUTH-1004`: all seats are inactive because the seat charge was not paid (view only). `AUTH-1002`: your role lacks the `members.manage` permission. `API-8102`: the API key or app lacks the `members:write` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in. `API-8148`: not available to test keys (API test mode).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"`AUTH-1046`: no such member (or the member was removed).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"409":{"description":"`SPC-6224`: open tickets and no `tickets_to`; `SPC-6225`: not exactly one valid destination; `SPC-6222`: `all`.\n\n`AUTH-1043`: the owner's membership cannot be changed this way (transfer the ownership first).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["members:write"]},{"oauth2":["members:write"]}],"summary":"Deactivate or reactivate a member's seat","tags":["members"]}},"/v1/roles":{"get":{"operationId":"listRoles","parameters":[{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"The roles.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RoleList"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `API-8102`: the API key or app lacks the `members:read` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["members:read"]},{"oauth2":["members:read"]}],"summary":"List the roles","tags":["roles"]}},"/v1/invitations":{"get":{"description":"Invitations not answered and not withdrawn (pending or expired), newest first.","operationId":"listInvitations","parameters":[{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"The invitations.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvitationList"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `AUTH-1002`: your role lacks the `members.manage` permission. `API-8102`: the API key or app lacks the `members:read` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["members:read"]},{"oauth2":["members:read"]}],"summary":"List the open invitations","tags":["invitations"]},"post":{"description":"By email or by phone (Rabt sends one email or SMS saying who invited them, with the address of Rabt's site; signing in there with that email or phone shows the invitation; for SMS at most one a minute and five an hour to a number, else `AUTH-1099`, and 20 a day per organization, else `AUTH-1102`), given as `identifier` (read like the sign-in field) or as `email` or `phone`, with their job title and a role other than Owner that is within your own permissions. Valid for 7 days.","operationId":"createInvitation","parameters":[{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}},{"name":"Idempotency-Key","in":"header","description":"A unique key for this operation (e.g. a UUID, 1 to 255 visible characters), kept 24 hours: repeating the request with the same key returns the first answer (`Idempotent-Replayed: true`) instead of doing it again. Errors: `API-8109` (400) a key that is not valid, `API-8108` (409, retryable) the first request with this key is still running, `API-8107` (422) the key was used for a different request; `API-8118` (409) the first request created something whose secret is shown only once, so its answer is not repeated. An answer with `shown_once` repeats its secret within 10 minutes, then `API-8118`.","required":false,"schema":{"type":"string","minLength":1,"maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateInvitation"}}}},"responses":{"201":{"description":"The invitation and its link.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IssuedInvitation"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `AUTH-1003`: your seat was deactivated (view only). `AUTH-1004`: all seats are inactive because the seat charge was not paid (view only). `AUTH-1002`: your role lacks the `members.manage` permission. `API-8102`: the API key or app lacks the `members:write` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in. `API-8148`: not available to test keys (API test mode).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"`AUTH-1047`: no such role.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"409":{"description":"`AUTH-1054`: the person is a member already. `AUTH-1055`: they have an open invitation (send it again instead). `AUTH-1044`: the Owner role cannot be offered.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"description":"`API-8001`: some fields are missing or not valid. `details.fields` lists each invalid field with its own code (e.g. `API-8002` required, `API-8012` wrong format). `AUTH-1030`: the email provider refused the address; the SMS provider's own codes when it refused the number. `AUTH-1098`: Rabt does not text invitations to that number's country (invite by email).","headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"429":{"$ref":"#/components/responses/RateLimited"},"502":{"description":"`AUTH-1999`, `SYS-1007`: the email or SMS provider failed or could not be reached; nothing was created or changed.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"503":{"description":"`SYS-1001`: Rabt's email (for an email) or SMS (for a phone) is not configured. `AUTH-1094`: Rabt's text messages for today are used up. `SYS-1003`: it is switched off for now. `SYS-1005`: the provider is failing. `AUTH-1031`, `AUTH-1100`, `AUTH-1032` and the SMS provider's own codes: the provider refused Rabt's settings, key or the message, or is unavailable.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"504":{"description":"`SYS-1006`: the email or SMS provider did not answer in time.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["members:write"]},{"oauth2":["members:write"]}],"summary":"Invite a person","tags":["invitations"]}},"/v1/invitations/{invitationId}/resend":{"post":{"description":"A new link valid for 7 more days (the previous link stops working), sent again: by email, or by SMS for an invitation by phone (at most one a minute and five an hour to a number, else `AUTH-1099`; 20 a day per organization, else `AUTH-1102`). Also for an expired invitation.","operationId":"resendInvitation","parameters":[{"name":"invitationId","required":true,"in":"path","description":"The invitation id.","schema":{"type":"string","format":"uuid","description":"The invitation id."}},{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}},{"name":"Idempotency-Key","in":"header","description":"A unique key for this operation (e.g. a UUID, 1 to 255 visible characters), kept 24 hours: repeating the request with the same key returns the first answer (`Idempotent-Replayed: true`) instead of doing it again. Errors: `API-8109` (400) a key that is not valid, `API-8108` (409, retryable) the first request with this key is still running, `API-8107` (422) the key was used for a different request; `API-8118` (409) the first request created something whose secret is shown only once, so its answer is not repeated. An answer with `shown_once` repeats its secret within 10 minutes, then `API-8118`.","required":false,"schema":{"type":"string","minLength":1,"maxLength":255}}],"responses":{"200":{"description":"The invitation and its new link.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IssuedInvitation"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `AUTH-1003`: your seat was deactivated (view only). `AUTH-1004`: all seats are inactive because the seat charge was not paid (view only). `AUTH-1002`: your role lacks the `members.manage` permission. `API-8102`: the API key or app lacks the `members:write` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in. `API-8148`: not available to test keys (API test mode).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"`AUTH-1050`: no such invitation (a wrong link, withdrawn, or replaced by a newer link).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"409":{"description":"`AUTH-1052`: the invitation was already accepted or declined.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"description":"`API-8001`: some fields are missing or not valid. `details.fields` lists each invalid field with its own code (e.g. `API-8002` required, `API-8012` wrong format). `AUTH-1098`: Rabt does not text invitations to that number's country. The SMS provider's own codes when it refused the number.","headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"429":{"$ref":"#/components/responses/RateLimited"},"502":{"description":"`AUTH-1999`, `SYS-1007`: the email or SMS provider failed or could not be reached; nothing was created or changed.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"503":{"description":"`SYS-1001`: Rabt's email (for an email) or SMS (for a phone) is not configured. `AUTH-1094`: Rabt's text messages for today are used up. `SYS-1003`: it is switched off for now. `SYS-1005`: the provider is failing. `AUTH-1031`, `AUTH-1100`, `AUTH-1032` and the SMS provider's own codes: the provider refused Rabt's settings, key or the message, or is unavailable.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"504":{"description":"`SYS-1006`: the email or SMS provider did not answer in time.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["members:write"]},{"oauth2":["members:write"]}],"summary":"Send an invitation again","tags":["invitations"]}},"/v1/invitations/{invitationId}":{"delete":{"description":"Its link stops working. Recorded in the audit log.","operationId":"revokeInvitation","parameters":[{"name":"invitationId","required":true,"in":"path","description":"The invitation id.","schema":{"type":"string","format":"uuid","description":"The invitation id."}},{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}}],"responses":{"204":{"description":"Withdrawn.","headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `AUTH-1003`: your seat was deactivated (view only). `AUTH-1004`: all seats are inactive because the seat charge was not paid (view only). `AUTH-1002`: your role lacks the `members.manage` permission. `API-8102`: the API key or app lacks the `members:write` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in. `API-8148`: not available to test keys (API test mode).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"`AUTH-1050`: no such invitation (a wrong link, withdrawn, or replaced by a newer link).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"409":{"description":"`AUTH-1052`: the invitation was already accepted or declined.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["members:write"]},{"oauth2":["members:write"]}],"summary":"Withdraw an invitation","tags":["invitations"]}},"/v1/audit-log":{"get":{"description":"Every change to the organization, its members, roles and invitations (and other sensitive actions), newest first. Filter by `target_type`, `target_id` and `action` for the history of one item, or by `channel_id` for a channel with its addresses and numbers.","operationId":"listAuditLog","parameters":[{"name":"cursor","required":false,"in":"query","description":"The `next_cursor` of the previous page.","schema":{"description":"The `next_cursor` of the previous page.","type":"string","format":"uuid"}},{"name":"page","required":false,"in":"query","description":"A numbered page to jump to, from 1, of `limit` rows: its first row must be within the first 10000 rows of the list. Ignored with `cursor`; the next pages follow `next_cursor`.","schema":{"description":"A numbered page to jump to, from 1, of `limit` rows: its first row must be within the first 10000 rows of the list. Ignored with `cursor`; the next pages follow `next_cursor`.","type":"integer","minimum":1,"maximum":10000}},{"name":"limit","required":false,"in":"query","description":"Entries per page (1 to 500, default 50).","schema":{"default":50,"description":"Entries per page (1 to 500, default 50).","type":"integer","minimum":1,"maximum":500}},{"name":"target_type","required":false,"in":"query","description":"Only entries about these target types, comma-separated (up to 10, e.g. `membership,invitation`).","schema":{"description":"Only entries about these target types, comma-separated (up to 10, e.g. `membership,invitation`).","type":"string","maxLength":1100,"pattern":"^[a-z][a-z0-9_]{0,99}(,[a-z][a-z0-9_]{0,99}){0,9}$"}},{"name":"target_id","required":false,"in":"query","description":"Only entries about this item (its id, as recorded in `target_id`).","schema":{"description":"Only entries about this item (its id, as recorded in `target_id`).","type":"string","minLength":1,"maxLength":200}},{"name":"channel_id","required":false,"in":"query","description":"Only entries about this channel or web chat widget and the addresses and phone numbers it carries (their destination changes included).","schema":{"description":"Only entries about this channel or web chat widget and the addresses and phone numbers it carries (their destination changes included).","type":"string","format":"uuid"}},{"name":"action","required":false,"in":"query","description":"Only these actions, comma-separated (up to 10, e.g. `organization.limits_set`).","schema":{"description":"Only these actions, comma-separated (up to 10, e.g. `organization.limits_set`).","type":"string","maxLength":1100,"pattern":"^[a-z][a-z0-9_]*(\\.[a-z0-9_]+)+(,[a-z][a-z0-9_]*(\\.[a-z0-9_]+)+){0,9}$"}},{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"A page of entries.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AuditLogPage"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `AUTH-1002`: your role lacks the `audit.view` permission. `API-8102`: the API key or app lacks the `audit:read` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["audit:read"]},{"oauth2":["audit:read"]}],"summary":"Read the audit log","tags":["audit"]}},"/v1/error-log":{"get":{"description":"Every error recorded for the organization (its members' actions and background work), newest first, with the texts in the request language. Filter by `code` or `reference` to find the error a member reported.","operationId":"listErrorLog","parameters":[{"name":"code","required":false,"in":"query","description":"Only errors with this error code.","schema":{"description":"Only errors with this error code.","type":"string","pattern":"^([A-Z]{1,5})-(\\d{4})$","example":"WA-2047"}},{"name":"reference","required":false,"in":"query","description":"Only errors with this reference (as shown with the error).","schema":{"description":"Only errors with this reference (as shown with the error).","type":"string","pattern":"^ref_[A-Za-z0-9]{1,64}$","example":"ref_4bf92f3577b34da6a3ce929d0e0e4736"}},{"name":"cursor","required":false,"in":"query","description":"The `next_cursor` of the previous page.","schema":{"description":"The `next_cursor` of the previous page.","type":"string","minLength":1,"maxLength":200}},{"name":"page","required":false,"in":"query","description":"A numbered page to jump to, from 1, of `limit` rows: its first row must be within the first 10000 rows of the list. Ignored with `cursor`; the next pages follow `next_cursor`.","schema":{"description":"A numbered page to jump to, from 1, of `limit` rows: its first row must be within the first 10000 rows of the list. Ignored with `cursor`; the next pages follow `next_cursor`.","type":"integer","minimum":1,"maximum":10000}},{"name":"limit","required":false,"in":"query","description":"Entries per page (1 to 100, default 50).","schema":{"default":50,"description":"Entries per page (1 to 100, default 50).","type":"integer","minimum":1,"maximum":100}},{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"A page of entries.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorLogPage"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `AUTH-1002`: your role lacks the `audit.view` permission. `API-8102`: the API key or app lacks the `error_log:read` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["error_log:read"]},{"oauth2":["error_log:read"]}],"summary":"Read the error log","tags":["errors"]}},"/v1/error-log/escalations":{"post":{"description":"Asks the Rabt team to look at an error a member saw (the \"Escalate\" button of the error notice), by its reference. Any member, for an error recorded in their organization. Once per member and reference: pressing again changes nothing. Written to the audit log; the problem is marked escalated in the Rabt team's Problems view. Nobody is emailed or paged.","operationId":"escalateError","parameters":[{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}},{"name":"Idempotency-Key","in":"header","description":"A unique key for this operation (e.g. a UUID, 1 to 255 visible characters), kept 24 hours: repeating the request with the same key returns the first answer (`Idempotent-Replayed: true`) instead of doing it again. Errors: `API-8109` (400) a key that is not valid, `API-8108` (409, retryable) the first request with this key is still running, `API-8107` (422) the key was used for a different request; `API-8118` (409) the first request created something whose secret is shown only once, so its answer is not repeated. An answer with `shown_once` repeats its secret within 10 minutes, then `API-8118`.","required":false,"schema":{"type":"string","minLength":1,"maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEscalation"}}}},"responses":{"200":{"description":"Escalated.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEscalationResult"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `AUTH-1003`: your seat was deactivated (view only). `AUTH-1004`: all seats are inactive because the seat charge was not paid (view only). `API-8102`: the API key or app lacks the `error_log:write` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"`AUTH-1060`: the error log has no error with this reference.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["error_log:write"]},{"oauth2":["error_log:write"]}],"summary":"Escalate an error to the Rabt team","tags":["errors"]}},"/v1/error-log/{entryId}":{"get":{"description":"One recorded error with its full details, in the request language.","operationId":"getErrorLogEntry","parameters":[{"name":"entryId","required":true,"in":"path","description":"The error log entry id.","schema":{"type":"string","format":"uuid","description":"The error log entry id."}},{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"The error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorLogEntry"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `AUTH-1002`: your role lacks the `audit.view` permission. `API-8102`: the API key or app lacks the `error_log:read` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"`AUTH-1060`: the error log has no such entry.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["error_log:read"]},{"oauth2":["error_log:read"]}],"summary":"Get an error of the error log","tags":["errors"]}},"/v1/request-log":{"get":{"description":"The failed requests made with API keys and apps, newest first: each with its HTTP status, error code, texts (title, what to do), reference, the operation (`place`), the key or app (`credential`) and the invalid fields (paths and codes, never values). Yours (your personal keys and apps) and, with `api.manage`, the organization keys. Filter by `credential_id`, `code` or `reference`. Works the same on the test space with a test key.","operationId":"listRequestLog","parameters":[{"name":"credential_id","required":false,"in":"query","description":"One key's or app's requests only (`credential.id` of an entry).","schema":{"description":"One key's or app's requests only (`credential.id` of an entry).","type":"string","format":"uuid"}},{"name":"code","required":false,"in":"query","description":"Only errors with this error code.","schema":{"description":"Only errors with this error code.","type":"string","pattern":"^([A-Z]{1,5})-(\\d{4})$","example":"WA-2047"}},{"name":"reference","required":false,"in":"query","description":"Only errors with this reference (as shown with the error).","schema":{"description":"Only errors with this reference (as shown with the error).","type":"string","pattern":"^ref_[A-Za-z0-9]{1,64}$","example":"ref_4bf92f3577b34da6a3ce929d0e0e4736"}},{"name":"cursor","required":false,"in":"query","description":"The `next_cursor` of the previous page.","schema":{"description":"The `next_cursor` of the previous page.","type":"string","minLength":1,"maxLength":200}},{"name":"page","required":false,"in":"query","description":"A numbered page to jump to, from 1, of `limit` rows: its first row must be within the first 10000 rows of the list. Ignored with `cursor`; the next pages follow `next_cursor`.","schema":{"description":"A numbered page to jump to, from 1, of `limit` rows: its first row must be within the first 10000 rows of the list. Ignored with `cursor`; the next pages follow `next_cursor`.","type":"integer","minimum":1,"maximum":10000}},{"name":"limit","required":false,"in":"query","description":"Entries per page (1 to 100, default 50).","schema":{"default":50,"description":"Entries per page (1 to 100, default 50).","type":"integer","minimum":1,"maximum":100}},{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"A page of entries.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorLogPage"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `API-8102`: the API key or app lacks the `error_log:read` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["error_log:read"]},{"oauth2":["error_log:read"]}],"summary":"Read the request log","tags":["errors"]}},"/v1/organization/security-policy":{"get":{"description":"What the organization requires of its members (OP15): sign-in with the device’s code in the desktop app (`require_passkeys`: members are asked to turn on the device’s unlock, never required to sign in, and the app asks for the device’s code after sign-in and after 15 minutes idle), and a profile photo for every member (`require_profile_photo`). The session length, idle time and app-unlock minutes are fixed for every organization (30 days, 14 days unused, 15 minutes) and returned only as deprecated read-only fields. Every member can read it.","operationId":"getSecurityPolicy","parameters":[{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"The policy.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SecurityPolicy"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `API-8102`: the API key or app lacks the `organization:read` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["organization:read"]},{"oauth2":["organization:read"]}],"summary":"Get the security policy","tags":["organizations"]},"put":{"description":"Sets the switches given (an omitted one is unchanged). Audit log `security_policy.updated`, event `organization.security_policy.updated`.","operationId":"setSecurityPolicy","parameters":[{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}},{"name":"Idempotency-Key","in":"header","description":"A unique key for this operation (e.g. a UUID, 1 to 255 visible characters), kept 24 hours: repeating the request with the same key returns the first answer (`Idempotent-Replayed: true`) instead of doing it again. Errors: `API-8109` (400) a key that is not valid, `API-8108` (409, retryable) the first request with this key is still running, `API-8107` (422) the key was used for a different request; `API-8118` (409) the first request created something whose secret is shown only once, so its answer is not repeated. An answer with `shown_once` repeats its secret within 10 minutes, then `API-8118`.","required":false,"schema":{"type":"string","minLength":1,"maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SetSecurityPolicy"}}}},"responses":{"200":{"description":"The policy.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SecurityPolicy"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `AUTH-1003`: your seat was deactivated (view only). `AUTH-1004`: all seats are inactive because the seat charge was not paid (view only). `AUTH-1002`: your role lacks the `settings.manage` permission. `API-8102`: the API key or app lacks the `organization:write` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["organization:write"]},{"oauth2":["organization:write"]}],"summary":"Set the security policy","tags":["organizations"]}},"/v1/organization/sso":{"get":{"description":"The organization’s OpenID Connect provider (issuer, client id, on/off, whether other sign-in methods still open the organization; the client secret is never returned), its email domains with the TXT record that proves each, and the redirect URI to register at the provider. `settings.manage`.","operationId":"getSsoSettings","parameters":[{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"The settings.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SsoSettings"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `AUTH-1002`: your role lacks the `settings.manage` permission. `API-8102`: the API key or app lacks the `organization:read` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["organization:read"]},{"oauth2":["organization:read"]}],"summary":"Get single sign-on","tags":["organizations"]}},"/v1/organization/sso/connection":{"put":{"description":"Sets the OpenID Connect provider: the issuer must answer `/.well-known/openid-configuration` naming exactly itself; the client secret is needed the first time and kept in the vault (omitted: the saved one stays). New: off, other methods allowed. Members are never created by single sign-on. Audit log `sso_connection.set`.","operationId":"setSsoConnection","parameters":[{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}},{"name":"Idempotency-Key","in":"header","description":"A unique key for this operation (e.g. a UUID, 1 to 255 visible characters), kept 24 hours: repeating the request with the same key returns the first answer (`Idempotent-Replayed: true`) instead of doing it again. Errors: `API-8109` (400) a key that is not valid, `API-8108` (409, retryable) the first request with this key is still running, `API-8107` (422) the key was used for a different request; `API-8118` (409) the first request created something whose secret is shown only once, so its answer is not repeated. An answer with `shown_once` repeats its secret within 10 minutes, then `API-8118`.","required":false,"schema":{"type":"string","minLength":1,"maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SetSsoConnection"}}}},"responses":{"200":{"description":"The settings.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SsoSettings"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `AUTH-1003`: your seat was deactivated (view only). `AUTH-1004`: all seats are inactive because the seat charge was not paid (view only). `AUTH-1002`: your role lacks the `settings.manage` permission. `API-8102`: the API key or app lacks the `organization:write` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"description":"`API-8001`: some fields are missing or not valid. `details.fields` lists each invalid field with its own code (e.g. `API-8002` required, `API-8012` wrong format). `AUTH-1120`: the issuer’s discovery document was not accepted.","headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["organization:write"]},{"oauth2":["organization:write"]}],"summary":"Set the single sign-on provider","tags":["organizations"]},"delete":{"description":"Sign-in through it stops and its client secret is destroyed; members sign in with a code again. Domains and the members’ stored identities stay. Audit log `sso_connection.removed`.","operationId":"removeSsoConnection","parameters":[{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"The settings.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SsoSettings"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `AUTH-1003`: your seat was deactivated (view only). `AUTH-1004`: all seats are inactive because the seat charge was not paid (view only). `AUTH-1002`: your role lacks the `settings.manage` permission. `API-8102`: the API key or app lacks the `organization:write` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["organization:write"]},{"oauth2":["organization:write"]}],"summary":"Remove the single sign-on provider","tags":["organizations"]}},"/v1/organization/sso/domains":{"post":{"description":"Claims a domain, unproven until `verifySsoDomain` finds its TXT record (`txt_name`, `txt_value`). The same domain again answers the claim. Audit log `sso_domain.claimed`.","operationId":"claimSsoDomain","parameters":[{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}},{"name":"Idempotency-Key","in":"header","description":"A unique key for this operation (e.g. a UUID, 1 to 255 visible characters), kept 24 hours: repeating the request with the same key returns the first answer (`Idempotent-Replayed: true`) instead of doing it again. Errors: `API-8109` (400) a key that is not valid, `API-8108` (409, retryable) the first request with this key is still running, `API-8107` (422) the key was used for a different request; `API-8118` (409) the first request created something whose secret is shown only once, so its answer is not repeated. An answer with `shown_once` repeats its secret within 10 minutes, then `API-8118`.","required":false,"schema":{"type":"string","minLength":1,"maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClaimSsoDomain"}}}},"responses":{"201":{"description":"The domain.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SsoDomain"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `AUTH-1003`: your seat was deactivated (view only). `AUTH-1004`: all seats are inactive because the seat charge was not paid (view only). `AUTH-1002`: your role lacks the `settings.manage` permission. `API-8102`: the API key or app lacks the `organization:write` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"409":{"description":"`AUTH-1117`: another organization proved this domain.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["organization:write"]},{"oauth2":["organization:write"]}],"summary":"Claim an email domain for single sign-on","tags":["organizations"]}},"/v1/organization/sso/domains/{domainId}/verify":{"post":{"description":"Looks up the TXT record `_rabt-verification.<domain>` and proves the domain when it holds `txt_value`. Audit log `sso_domain.verified`.","operationId":"verifySsoDomain","parameters":[{"name":"domainId","required":true,"in":"path","description":"The domain id.","schema":{"type":"string","format":"uuid","description":"The domain id."}},{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"The domain.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SsoDomain"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `AUTH-1003`: your seat was deactivated (view only). `AUTH-1004`: all seats are inactive because the seat charge was not paid (view only). `AUTH-1002`: your role lacks the `settings.manage` permission. `API-8102`: the API key or app lacks the `organization:write` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"`API-8003`: no such domain.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"409":{"description":"`AUTH-1117`: another organization proved this domain first.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"description":"`API-8001`: some fields are missing or not valid. `details.fields` lists each invalid field with its own code (e.g. `API-8002` required, `API-8012` wrong format). `AUTH-1118`: the TXT record was not found.","headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["organization:write"]},{"oauth2":["organization:write"]}],"summary":"Verify an email domain","tags":["organizations"]}},"/v1/organization/sso/domains/{domainId}":{"delete":{"description":"Sign-in through the provider stops finding the organization by this domain. Audit log `sso_domain.removed`.","operationId":"removeSsoDomain","parameters":[{"name":"domainId","required":true,"in":"path","description":"The domain id.","schema":{"type":"string","format":"uuid","description":"The domain id."}},{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"The removed domain.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SsoDomain"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `AUTH-1003`: your seat was deactivated (view only). `AUTH-1004`: all seats are inactive because the seat charge was not paid (view only). `AUTH-1002`: your role lacks the `settings.manage` permission. `API-8102`: the API key or app lacks the `organization:write` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"`API-8003`: no such domain.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["organization:write"]},{"oauth2":["organization:write"]}],"summary":"Remove an email domain","tags":["organizations"]}},"/v1/billing/subscription":{"get":{"description":"The billing state (trial, active, seats inactive), the seat price, the trial, the time paid for, the seats and the next seat charge (docs/10).","operationId":"getSubscription","parameters":[{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"The subscription.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Subscription"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `AUTH-1002`: your role lacks the `billing.manage` permission. `API-8102`: the API key or app lacks the `billing:read` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["billing:read"]},{"oauth2":["billing:read"]}],"summary":"Read the seats and their billing","tags":["billing"]}},"/v1/billing/seat-quote":{"get":{"description":"What adding a member or reactivating a seat takes from the wallet now: the seat price prorated to the month's remaining days (today included), nothing during the trial or while seats are inactive, nothing for a seat already paid this month (docs/10 \"Proration\").","operationId":"quoteSeat","parameters":[{"name":"membership_id","required":false,"in":"query","description":"A member whose seat would be reactivated: free when it is already paid for this month. Left out: a new member's seat.","schema":{"description":"A member whose seat would be reactivated: free when it is already paid for this month. Left out: a new member's seat.","type":"string","format":"uuid"}},{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"The price.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SeatQuote"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `AUTH-1002`: your role lacks the `members.manage` permission. `API-8102`: the API key or app lacks the `billing:read` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"409":{"description":"`WAL-1401`: the trial's member limit is reached, so a new member would be refused (without `membership_id`).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"503":{"description":"`WAL-1402`: no seat price is published yet (the Rabt team is alerted).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["billing:read"]},{"oauth2":["billing:read"]}],"summary":"Price one more seat","tags":["billing"]}},"/v1/billing/seat-events":{"get":{"description":"Every seat added, deactivated, reactivated or removed, with the prorated charge it caused, newest first (docs/10 \"Seats\").","operationId":"listSeatEvents","parameters":[{"name":"cursor","required":false,"in":"query","description":"The `next_cursor` of the previous page.","schema":{"description":"The `next_cursor` of the previous page.","type":"string","format":"uuid"}},{"name":"page","required":false,"in":"query","description":"A numbered page to jump to, from 1, of `limit` rows: its first row must be within the first 10000 rows of the list. Ignored with `cursor`; the next pages follow `next_cursor`.","schema":{"description":"A numbered page to jump to, from 1, of `limit` rows: its first row must be within the first 10000 rows of the list. Ignored with `cursor`; the next pages follow `next_cursor`.","type":"integer","minimum":1,"maximum":10000}},{"name":"limit","required":false,"in":"query","description":"Entries per page (1 to 100, default 50).","schema":{"default":50,"description":"Entries per page (1 to 100, default 50).","type":"integer","minimum":1,"maximum":100}},{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"A page of the log.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SeatEventPage"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `AUTH-1002`: your role lacks the `billing.manage` permission. `API-8102`: the API key or app lacks the `billing:read` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["billing:read"]},{"oauth2":["billing:read"]}],"summary":"Read the seat log","tags":["billing"]}},"/v1/billing/pricing-model":{"get":{"description":"The seat pricing model (per member, or all employees at a lower seat price), both seat prices (VAT included), whether the organization may still choose (before its first seat payment), the \"all employees\" commitment with its version, the commitment accepted and every change (docs/10 \"Pricing models\").","operationId":"getPricingModel","parameters":[{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"The pricing model.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PricingModel"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `AUTH-1002`: your role lacks the `billing.manage` permission. `API-8102`: the API key or app lacks the `billing:read` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["billing:read"]},{"oauth2":["billing:read"]}],"summary":"Read the seat pricing model","tags":["billing"]},"put":{"description":"Before the first seat payment only: per member, or all employees with the commitment accepted (`commitment_accepted` and the `commitment_version` read from `GET /v1/billing/pricing-model`); the acceptance is recorded with who, when and the exact wording. Seat charges from then on use the chosen model's price. After the first seat payment only the Rabt team switches the model. Audited, and published as `organization.pricing_model_changed`.","operationId":"choosePricingModel","parameters":[{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}},{"name":"Idempotency-Key","in":"header","description":"A unique key for this operation (e.g. a UUID, 1 to 255 visible characters), kept 24 hours: repeating the request with the same key returns the first answer (`Idempotent-Replayed: true`) instead of doing it again. Errors: `API-8109` (400) a key that is not valid, `API-8108` (409, retryable) the first request with this key is still running, `API-8107` (422) the key was used for a different request; `API-8118` (409) the first request created something whose secret is shown only once, so its answer is not repeated. An answer with `shown_once` repeats its secret within 10 minutes, then `API-8118`.","required":false,"schema":{"type":"string","minLength":1,"maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChoosePricingModel"}}}},"responses":{"200":{"description":"The pricing model.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PricingModel"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `AUTH-1003`: your seat was deactivated. `AUTH-1004`: all seats are inactive because the seat charge was not paid (this action stays open to members with `billing.manage`, to pay it). `AUTH-1002`: your role lacks the `billing.manage` permission. `API-8102`: the API key or app lacks the `billing:write` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"409":{"description":"`WAL-1406`: the organization's seats have been paid for, so only the Rabt team can change the pricing model; `WAL-1408`: the organization is on this model already.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"description":"`API-8001`: some fields are missing or not valid. `details.fields` lists each invalid field with its own code (e.g. `API-8002` required, `API-8012` wrong format). `WAL-1407`: `all_employees` without `commitment_accepted: true` and the current `commitment_version`. `WAL-1409`: `all_employees` with fewer than two active members (one member pays the standard seat).","headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"429":{"$ref":"#/components/responses/RateLimited"},"503":{"description":"`WAL-1402`: no seat price is published yet (the Rabt team is alerted).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["billing:write"]},{"oauth2":["billing:write"]}],"summary":"Choose the seat pricing model","tags":["billing"]}},"/v1/billing/profile":{"get":{"description":"The legal name, VAT number, commercial registration number, national address and billing email copied onto each invoice when it is finalized (docs/10), or null until first saved.","operationId":"getBillingProfile","parameters":[{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"The billing profile.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BillingProfileResponse"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `AUTH-1002`: your role lacks the `billing.manage` permission. `API-8102`: the API key or app lacks the `billing:read` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["billing:read"]},{"oauth2":["billing:read"]}],"summary":"Read the billing profile","tags":["billing"]},"put":{"description":"Creates or replaces the whole billing profile. Invoices finalized from now on carry it; invoices already finalized and receipt vouchers already issued keep the profile they were issued with. Audited, and published as `billing.profile_updated`.","operationId":"saveBillingProfile","parameters":[{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}},{"name":"Idempotency-Key","in":"header","description":"A unique key for this operation (e.g. a UUID, 1 to 255 visible characters), kept 24 hours: repeating the request with the same key returns the first answer (`Idempotent-Replayed: true`) instead of doing it again. Errors: `API-8109` (400) a key that is not valid, `API-8108` (409, retryable) the first request with this key is still running, `API-8107` (422) the key was used for a different request; `API-8118` (409) the first request created something whose secret is shown only once, so its answer is not repeated. An answer with `shown_once` repeats its secret within 10 minutes, then `API-8118`.","required":false,"schema":{"type":"string","minLength":1,"maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BillingProfileInput"}}}},"responses":{"200":{"description":"The saved profile.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BillingProfileResponse"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `AUTH-1003`: your seat was deactivated. `AUTH-1004`: all seats are inactive because the seat charge was not paid (this action stays open to members with `billing.manage`, to pay it). `AUTH-1002`: your role lacks the `billing.manage` permission. `API-8102`: the API key or app lacks the `billing:write` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"description":"`API-8001`: some fields are missing or not valid. `details.fields` lists each invalid field with its own code (e.g. `API-8002` required, `API-8012` wrong format). `WAL-1506`: a field of the billing profile is not valid.","headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["billing:write"]},{"oauth2":["billing:write"]}],"summary":"Save the billing profile","tags":["billing"]}},"/v1/billing/invoices":{"get":{"description":"The invoices of months that ended, newest first: finalized (on the 2nd of the next month at 03:00, Asia/Riyadh), empty (nothing billed) or still a draft (a mismatch with the ledger being investigated). The running month is `GET /v1/billing/invoices/current`.","operationId":"listInvoices","parameters":[{"name":"cursor","required":false,"in":"query","description":"The `next_cursor` of the previous page.","schema":{"description":"The `next_cursor` of the previous page.","type":"string","pattern":"^\\d{4}-(?:0[1-9]|1[0-2])-01$"}},{"name":"page","required":false,"in":"query","description":"A numbered page to jump to, from 1, of `limit` rows: its first row must be within the first 10000 rows of the list. Ignored with `cursor`; the next pages follow `next_cursor`.","schema":{"description":"A numbered page to jump to, from 1, of `limit` rows: its first row must be within the first 10000 rows of the list. Ignored with `cursor`; the next pages follow `next_cursor`.","type":"integer","minimum":1,"maximum":10000}},{"name":"limit","required":false,"in":"query","description":"Invoices per page (1 to 100, default 24).","schema":{"default":24,"description":"Invoices per page (1 to 100, default 24).","type":"integer","minimum":1,"maximum":100}},{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"A page of invoices.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvoiceList"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `AUTH-1002`: your role lacks the `billing.manage` permission. `API-8102`: the API key or app lacks the `billing:read` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["billing:read"]},{"oauth2":["billing:read"]}],"summary":"List invoices","tags":["billing"]}},"/v1/billing/invoices/current":{"get":{"description":"A draft of the running month's invoice at any time (docs/10 \"Current month so far\"): the same grouping per resource and unit price as the monthly invoice, with the totals so far.","operationId":"getCurrentInvoice","parameters":[{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"The month so far.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Invoice"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `AUTH-1002`: your role lacks the `billing.manage` permission. `API-8102`: the API key or app lacks the `billing:read` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["billing:read"]},{"oauth2":["billing:read"]}],"summary":"Read this month so far","tags":["billing"]}},"/v1/billing/invoices/{invoiceId}":{"get":{"description":"Its sections (seats, each WhatsApp number, X account, phone number, SMS sender name, AI) with their lines and subtotals, the totals with VAT, and the seller and buyer once finalized.","operationId":"getInvoice","parameters":[{"name":"invoiceId","required":true,"in":"path","description":"The invoice id.","schema":{"type":"string","format":"uuid","description":"The invoice id."}},{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"The invoice.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Invoice"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `AUTH-1002`: your role lacks the `billing.manage` permission. `API-8102`: the API key or app lacks the `billing:read` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"`WAL-1501`: no such invoice.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["billing:read"]},{"oauth2":["billing:read"]}],"summary":"Read an invoice","tags":["billing"]}},"/v1/billing/invoices/{invoiceId}/csv":{"get":{"description":"Every line of the finalized invoice, one row each, in the member's language (UTF-8; amounts in SAR with two decimals).","operationId":"getInvoiceCsv","parameters":[{"name":"invoiceId","required":true,"in":"path","description":"The invoice id.","schema":{"type":"string","format":"uuid","description":"The invoice id."}},{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"The CSV.","content":{"text/csv":{"schema":{"type":"string"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `AUTH-1002`: your role lacks the `billing.manage` permission. `API-8102`: the API key or app lacks the `billing:read` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"`WAL-1501`: no such invoice.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"409":{"description":"`WAL-1502`: the invoice is not finalized yet (a draft has no PDF or CSV).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["billing:read"]},{"oauth2":["billing:read"]}],"summary":"Export an invoice (CSV)","tags":["billing"]}},"/v1/billing/invoices/{invoiceId}/document":{"get":{"description":"The tax invoice as issued in the e-invoicing system (Wafeq, owner decision ORCH #36): fetched from Wafeq on every request and never stored. Until Wafeq accepted the invoice the answer is `WAL-1512` (being issued); the invoice's `einvoice.document_available` tells when it is ready, and `invoice.einvoice_accepted` is sent then.","operationId":"getInvoiceDocument","parameters":[{"name":"invoiceId","required":true,"in":"path","description":"The invoice id.","schema":{"type":"string","format":"uuid","description":"The invoice id."}},{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"The PDF.","content":{"application/pdf":{"schema":{"type":"string","format":"binary"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `AUTH-1002`: your role lacks the `billing.manage` permission. `API-8102`: the API key or app lacks the `billing:read` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"`WAL-1501`: no such invoice.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"409":{"description":"`WAL-1502`: the invoice is not finalized yet (a draft has no PDF or CSV). `WAL-1512`: the invoice is still being issued in Wafeq; try again shortly.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"502":{"description":"`WAL-1514`, `WAL-1515`, `WAL-1516`, `WAL-1520`, `SYS-1006`, `SYS-1007`: Wafeq refused or could not answer (its message is in the problem).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["billing:read"]},{"oauth2":["billing:read"]}],"summary":"Download the official invoice (Wafeq PDF)","tags":["billing"]}},"/v1/embed":{"get":{"description":"Whether Rabt opens inside the organization’s own system, the host pages that may frame it, whether an embed secret was issued and the page to frame (never the secret).","operationId":"getEmbedSettings","parameters":[{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"The settings.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmbedSettings"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `AUTH-1002`: your role lacks the `api.manage` permission. `API-8102`: the API key or app lacks the `credentials:read` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in. `API-8160`: an organization key does not manage credentials.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["credentials:read"]},{"oauth2":["credentials:read"]}],"summary":"Get the settings of Rabt inside your own system","tags":["embed"]},"patch":{"description":"Turns it on or off and replaces the host pages that may frame it. Off, or a page removed, closes the frames it covered at their next request.","operationId":"updateEmbedSettings","parameters":[{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}},{"name":"Idempotency-Key","in":"header","description":"A unique key for this operation (e.g. a UUID, 1 to 255 visible characters), kept 24 hours: repeating the request with the same key returns the first answer (`Idempotent-Replayed: true`) instead of doing it again. Errors: `API-8109` (400) a key that is not valid, `API-8108` (409, retryable) the first request with this key is still running, `API-8107` (422) the key was used for a different request; `API-8118` (409) the first request created something whose secret is shown only once, so its answer is not repeated. An answer with `shown_once` repeats its secret within 10 minutes, then `API-8118`.","required":false,"schema":{"type":"string","minLength":1,"maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateEmbedSettings"}}}},"responses":{"200":{"description":"The settings.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmbedSettings"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `AUTH-1003`: your seat was deactivated (view only). `AUTH-1004`: all seats are inactive because the seat charge was not paid (view only). `AUTH-1002`: your role lacks the `api.manage` permission. `API-8102`: the API key or app lacks the `credentials:write` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in. `API-8148`: not available to test keys (API test mode). `API-8160`: an organization key does not manage credentials.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"description":"`API-8001`: some fields are missing or not valid. `details.fields` lists each invalid field with its own code (e.g. `API-8002` required, `API-8012` wrong format). `AUTH-1107`: an allowed page that is not an exact web origin.","headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["credentials:write"]},{"oauth2":["credentials:write"]}],"summary":"Change the settings of Rabt inside your own system","tags":["embed"]}},"/v1/embed/secret":{"post":{"description":"Owner only. A new embed secret, shown once; it replaces the previous one at once (launch tokens signed with it are refused from then on, `AUTH-1104`).\n\nFor each staff member who opens Rabt in your system, your server signs a launch token with it: a JWT (HS256) with `sub` (the member’s email, or mobile number in E.164), `org` (your organization’s id), `iat`, `exp` (at most 5 minutes after `iat`) and a unique `jti`. Your page passes it to `embed.js`:\n\n```html\n<div id=\"rabt\"></div>\n<script src=\"https://app.rabt.systems/embed.js\"></script>\n<script>\n  RabtEmbed.mount({ container: '#rabt', organization: '<organization id>', getLaunchToken: () => fetch('/rabt-token').then((r) => r.text()) });\n</script>\n```\n\nWithout `getLaunchToken`, the member signs in with a Rabt code in a small window. Only a member of the organization opens it, with their own permissions; nobody is added. A launch token never opens the owner (`AUTH-1109`): the owner signs in with a Rabt code. With `aud` (the host page’s origin), the token opens only on that page.","operationId":"rotateEmbedSecret","parameters":[{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}},{"name":"Idempotency-Key","in":"header","description":"A unique key for this operation (e.g. a UUID, 1 to 255 visible characters), kept 24 hours: repeating the request with the same key returns the first answer (`Idempotent-Replayed: true`) instead of doing it again. Errors: `API-8109` (400) a key that is not valid, `API-8108` (409, retryable) the first request with this key is still running, `API-8107` (422) the key was used for a different request; `API-8118` (409) the first request created something whose secret is shown only once, so its answer is not repeated. An answer with `shown_once` repeats its secret within 10 minutes, then `API-8118`.","required":false,"schema":{"type":"string","minLength":1,"maxLength":255}}],"responses":{"201":{"description":"The settings and the new secret.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmbedSettingsWithSecret"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `AUTH-1003`: your seat was deactivated (view only). `AUTH-1004`: all seats are inactive because the seat charge was not paid (view only). `AUTH-1042`: only the owner can do this. `AUTH-1002`: your role lacks the `api.manage` permission. `API-8102`: the API key or app lacks the `credentials:write` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in. `API-8148`: not available to test keys (API test mode). `API-8160`: an organization key does not manage credentials. `API-8169`: a connection made by the organization's trusted issuer.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["credentials:write"]},{"oauth2":["credentials:write"]}],"summary":"Issue a new embed secret","tags":["embed"]}},"/v1/embed/check":{"post":{"description":"Whether a page of `host_origin` would open Rabt now and, with a `launch_token` your server signed, for whom: the first problem, with the code that says how to fix it. Opens nothing; the token is not used up.","operationId":"checkEmbed","parameters":[{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CheckEmbed"}}}},"responses":{"200":{"description":"The check.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmbedCheck"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `AUTH-1002`: your role lacks the `api.manage` permission. `API-8102`: the API key or app lacks the `credentials:read` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in. `API-8160`: an organization key does not manage credentials.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["credentials:read"]},{"oauth2":["credentials:read"]}],"summary":"Check Rabt inside your own system","tags":["embed"]}},"/v1/security/access-log":{"get":{"description":"Every view or download of a call recording or voicemail, every export (the full organization export, CSV exports, a contact’s data export, a ticket’s conversation printed, a page of exported tickets) and every bulk read of contacts (100, 1,000, 10,000… contacts read by one member or key within an hour): who (member, and the API key or app), what, when and from where (address and country). Newest first. The owner only.","operationId":"listSensitiveAccess","parameters":[{"name":"action","required":false,"in":"query","description":"Only this kind of access.","schema":{"description":"Only this kind of access.","type":"string","enum":["call_recording.accessed","organization_export.requested","organization_export.downloaded","crm_export.requested","crm_export.downloaded","contact_export.downloaded","wallet_export.downloaded","invoice_export.downloaded","contacts.bulk_read","ticket_conversation.exported","ticket_export.downloaded","data_export.downloaded"]}},{"name":"cursor","required":false,"in":"query","description":"The `next_cursor` of the previous page.","schema":{"description":"The `next_cursor` of the previous page.","type":"string","pattern":"^[A-Za-z0-9_-]{1,200}$"}},{"name":"page","required":false,"in":"query","description":"A numbered page to jump to, from 1, of `limit` rows: its first row must be within the first 10000 rows of the list. Ignored with `cursor`; the next pages follow `next_cursor`.","schema":{"description":"A numbered page to jump to, from 1, of `limit` rows: its first row must be within the first 10000 rows of the list. Ignored with `cursor`; the next pages follow `next_cursor`.","type":"integer","minimum":1,"maximum":10000}},{"name":"limit","required":false,"in":"query","description":"Records per page (1 to 100, default 25).","schema":{"default":25,"description":"Records per page (1 to 100, default 25).","type":"integer","minimum":1,"maximum":100}},{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"A page.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SensitiveAccessPage"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `AUTH-1042`: only the owner can do this. `API-8102`: the API key or app lacks the `security:read` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in. `API-8169`: a connection made by the organization's trusted issuer.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"description":"`API-8001`: some fields are missing or not valid. `details.fields` lists each invalid field with its own code (e.g. `API-8002` required, `API-8012` wrong format). `API-8001`: the cursor is not one this API gave.","headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["security:read"]},{"oauth2":["security:read"]}],"summary":"List the sensitive-access log","tags":["security"]}},"/v1/security/alerts":{"get":{"description":"The alerts of the rule-based checks (no AI): a sign-in from a new country, 5 failed sign-ins within 15 minutes, an unusually large export (1,000 rows or more, or a full export), a bulk read of 1,000 contacts or more within an hour, an API key or app used from a new network, a break in the audit log’s chain. The owner is notified of each; the Rabt team sees them too. Newest first. The owner only.","operationId":"listSecurityAlerts","parameters":[{"name":"rule","required":false,"in":"query","description":"Only alerts of this rule.","schema":{"description":"Only alerts of this rule.","type":"string","enum":["sign_in_new_country","sign_in_failures","large_export","bulk_read","api_key_new_network","audit_chain_broken"]}},{"name":"cursor","required":false,"in":"query","description":"The `next_cursor` of the previous page.","schema":{"description":"The `next_cursor` of the previous page.","type":"string","pattern":"^[A-Za-z0-9_-]{1,200}$"}},{"name":"page","required":false,"in":"query","description":"A numbered page to jump to, from 1, of `limit` rows: its first row must be within the first 10000 rows of the list. Ignored with `cursor`; the next pages follow `next_cursor`.","schema":{"description":"A numbered page to jump to, from 1, of `limit` rows: its first row must be within the first 10000 rows of the list. Ignored with `cursor`; the next pages follow `next_cursor`.","type":"integer","minimum":1,"maximum":10000}},{"name":"limit","required":false,"in":"query","description":"Records per page (1 to 100, default 25).","schema":{"default":25,"description":"Records per page (1 to 100, default 25).","type":"integer","minimum":1,"maximum":100}},{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"A page.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SecurityAlertPage"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `AUTH-1042`: only the owner can do this. `API-8102`: the API key or app lacks the `security:read` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in. `API-8169`: a connection made by the organization's trusted issuer.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"description":"`API-8001`: some fields are missing or not valid. `details.fields` lists each invalid field with its own code (e.g. `API-8002` required, `API-8012` wrong format). `API-8001`: the cursor is not one this API gave.","headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["security:read"]},{"oauth2":["security:read"]}],"summary":"List the security alerts","tags":["security"]}},"/v1/security/audit-integrity":{"get":{"description":"Every audit entry is sealed into a chain within the hour (an HMAC over the previous link, keyed by a key that never leaves the vault) and the whole chain is verified daily: `intact`, or `broken` with the first break found (a changed, missing or unsealed entry or link, a re-seal not made by a running erasure, or a chain whose history was removed and started again, which stays broken). A break also raises an `audit_chain_broken` alert. The owner only.","operationId":"getAuditIntegrity","parameters":[{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"The state.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AuditIntegrity"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `AUTH-1042`: only the owner can do this. `API-8102`: the API key or app lacks the `security:read` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in. `API-8169`: a connection made by the organization's trusted issuer.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["security:read"]},{"oauth2":["security:read"]}],"summary":"Get the audit log's integrity","tags":["security"]}},"/v1/organization/logo":{"put":{"description":"Shown in the organization switcher, the side menu and members’ views. PNG, JPEG or WebP, at most 2 MB, sent as base64; scanned for malware, cut to a square, its metadata removed.","operationId":"setOrganizationLogo","parameters":[{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}},{"name":"Idempotency-Key","in":"header","description":"A unique key for this operation (e.g. a UUID, 1 to 255 visible characters), kept 24 hours: repeating the request with the same key returns the first answer (`Idempotent-Replayed: true`) instead of doing it again. Errors: `API-8109` (400) a key that is not valid, `API-8108` (409, retryable) the first request with this key is still running, `API-8107` (422) the key was used for a different request; `API-8118` (409) the first request created something whose secret is shown only once, so its answer is not repeated. An answer with `shown_once` repeats its secret within 10 minutes, then `API-8118`.","required":false,"schema":{"type":"string","minLength":1,"maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProfileImageUpload"}}}},"responses":{"200":{"description":"The organization.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Organization"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `AUTH-1003`: your seat was deactivated (view only). `AUTH-1004`: all seats are inactive because the seat charge was not paid (view only). `AUTH-1002`: your role lacks the `settings.manage` permission. `API-8102`: the API key or app lacks the `organization:write` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"description":"`API-8001`: some fields are missing or not valid. `details.fields` lists each invalid field with its own code (e.g. `API-8002` required, `API-8012` wrong format). `AUTH-1085`: not a PNG, JPEG or WebP image of at most 2 MB, or it cannot be read as an image. `TKT-6194`: the malware scan found malware in it (refused, not kept).","headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"429":{"$ref":"#/components/responses/RateLimited"},"503":{"description":"`TKT-6195`: the malware scanner did not answer (upload it again later). `SYS-1001`: in production the malware scanner (ClamAV) is not configured.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["organization:write"]},{"oauth2":["organization:write"]}],"summary":"Replace the organization’s logo","tags":["photos"]},"delete":{"deprecated":true,"description":"Deprecated: the apps only replace the logo (`PUT /v1/organization/logo`). Still works until the next API version: the organization’s initials are shown instead.","operationId":"removeOrganizationLogo","parameters":[{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"The organization.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Organization"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `AUTH-1003`: your seat was deactivated (view only). `AUTH-1004`: all seats are inactive because the seat charge was not paid (view only). `AUTH-1002`: your role lacks the `settings.manage` permission. `API-8102`: the API key or app lacks the `organization:write` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["organization:write"]},{"oauth2":["organization:write"]}],"summary":"Remove the organization’s logo (deprecated)","tags":["photos"]}},"/v1/chat/rooms/{roomId}/avatar":{"put":{"description":"Shown wherever the room appears (the rooms list, its header, Ask the team). A private group: its creator or `spaces.manage`; a space’s group and the All room: `spaces.manage`; never a direct message. PNG, JPEG or WebP, at most 2 MB, sent as base64; scanned for malware, cut to a square, its metadata removed.","operationId":"setChatRoomAvatar","parameters":[{"name":"roomId","required":true,"in":"path","description":"The chat room id.","schema":{"type":"string","format":"uuid","description":"The chat room id."}},{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}},{"name":"Idempotency-Key","in":"header","description":"A unique key for this operation (e.g. a UUID, 1 to 255 visible characters), kept 24 hours: repeating the request with the same key returns the first answer (`Idempotent-Replayed: true`) instead of doing it again. Errors: `API-8109` (400) a key that is not valid, `API-8108` (409, retryable) the first request with this key is still running, `API-8107` (422) the key was used for a different request; `API-8118` (409) the first request created something whose secret is shown only once, so its answer is not repeated. An answer with `shown_once` repeats its secret within 10 minutes, then `API-8118`.","required":false,"schema":{"type":"string","minLength":1,"maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProfileImageUpload"}}}},"responses":{"200":{"description":"The room.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChatRoom"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`CHT-6406`: only a private group’s creator or `spaces.manage` change its picture; a space’s group and the All room need `spaces.manage`; a direct message has none.\n\n`AUTH-1040`: you are not a member of the organization named. `AUTH-1003`: your seat was deactivated (view only). `AUTH-1004`: all seats are inactive because the seat charge was not paid (view only). `API-8102`: the API key or app lacks the `chat:write` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"`CHT-6401`: no such room, or you are not a member of it (the same answer).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"409":{"description":"`CHT-6403`: the room is archived (read-only).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"description":"`API-8001`: some fields are missing or not valid. `details.fields` lists each invalid field with its own code (e.g. `API-8002` required, `API-8012` wrong format). `AUTH-1085`: not a PNG, JPEG or WebP image of at most 2 MB, or it cannot be read as an image. `TKT-6194`: the malware scan found malware in it (refused, not kept).","headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"429":{"$ref":"#/components/responses/RateLimited"},"503":{"description":"`TKT-6195`: the malware scanner did not answer (upload it again later). `SYS-1001`: in production the malware scanner (ClamAV) is not configured.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["chat:write"]},{"oauth2":["chat:write"]}],"summary":"Replace a chat room’s picture","tags":["photos"]},"delete":{"description":"The room’s initial is shown instead. The same members as setting it.","operationId":"removeChatRoomAvatar","parameters":[{"name":"roomId","required":true,"in":"path","description":"The chat room id.","schema":{"type":"string","format":"uuid","description":"The chat room id."}},{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"The room.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChatRoom"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`CHT-6406`: only a private group’s creator or `spaces.manage` change its picture; a space’s group and the All room need `spaces.manage`; a direct message has none.\n\n`AUTH-1040`: you are not a member of the organization named. `AUTH-1003`: your seat was deactivated (view only). `AUTH-1004`: all seats are inactive because the seat charge was not paid (view only). `API-8102`: the API key or app lacks the `chat:write` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"`CHT-6401`: no such room, or you are not a member of it (the same answer).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"409":{"description":"`CHT-6403`: the room is archived (read-only).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["chat:write"]},{"oauth2":["chat:write"]}],"summary":"Remove a chat room’s picture","tags":["photos"]}},"/v1/chat/rooms":{"get":{"description":"Your space groups, the All room, your private groups and direct messages, most recently active first, with unread counters.","operationId":"listChatRooms","parameters":[{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"The rooms.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChatRoomList"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `API-8102`: the API key or app lacks the `chat:read` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["chat:read"]},{"oauth2":["chat:read"]}],"summary":"List your chat rooms","tags":["chat"]}},"/v1/chat/rooms/{roomId}":{"get":{"operationId":"getChatRoom","parameters":[{"name":"roomId","required":true,"in":"path","description":"The chat room id.","schema":{"type":"string","format":"uuid","description":"The chat room id."}},{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"The room.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChatRoom"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `API-8102`: the API key or app lacks the `chat:read` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"`CHT-6401`: no such room, or you are not a member of it (the same answer).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["chat:read"]},{"oauth2":["chat:read"]}],"summary":"A chat room","tags":["chat"]},"patch":{"operationId":"renameChatGroup","parameters":[{"name":"roomId","required":true,"in":"path","description":"The chat room id.","schema":{"type":"string","format":"uuid","description":"The chat room id."}},{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}},{"name":"Idempotency-Key","in":"header","description":"A unique key for this operation (e.g. a UUID, 1 to 255 visible characters), kept 24 hours: repeating the request with the same key returns the first answer (`Idempotent-Replayed: true`) instead of doing it again. Errors: `API-8109` (400) a key that is not valid, `API-8108` (409, retryable) the first request with this key is still running, `API-8107` (422) the key was used for a different request; `API-8118` (409) the first request created something whose secret is shown only once, so its answer is not repeated. An answer with `shown_once` repeats its secret within 10 minutes, then `API-8118`.","required":false,"schema":{"type":"string","minLength":1,"maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RenameChatGroup"}}}},"responses":{"200":{"description":"The group.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChatRoom"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`CHT-6406`: only its creator or `spaces.manage` manage a group.\n\n`AUTH-1040`: you are not a member of the organization named. `AUTH-1003`: your seat was deactivated (view only). `AUTH-1004`: all seats are inactive because the seat charge was not paid (view only). `API-8102`: the API key or app lacks the `chat:write` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"`CHT-6401`: no such room, or you are not a member of it (the same answer).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"409":{"description":"`CHT-6403`: the room is archived (read-only).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["chat:write"]},{"oauth2":["chat:write"]}],"summary":"Rename a private group","tags":["chat"]}},"/v1/chat/groups":{"post":{"description":"You and the members you invite; you manage it.","operationId":"createChatGroup","parameters":[{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}},{"name":"Idempotency-Key","in":"header","description":"A unique key for this operation (e.g. a UUID, 1 to 255 visible characters), kept 24 hours: repeating the request with the same key returns the first answer (`Idempotent-Replayed: true`) instead of doing it again. Errors: `API-8109` (400) a key that is not valid, `API-8108` (409, retryable) the first request with this key is still running, `API-8107` (422) the key was used for a different request; `API-8118` (409) the first request created something whose secret is shown only once, so its answer is not repeated. An answer with `shown_once` repeats its secret within 10 minutes, then `API-8118`.","required":false,"schema":{"type":"string","minLength":1,"maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateChatGroup"}}}},"responses":{"201":{"description":"The group.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChatRoom"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `AUTH-1003`: your seat was deactivated (view only). `AUTH-1004`: all seats are inactive because the seat charge was not paid (view only). `API-8102`: the API key or app lacks the `chat:write` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"description":"`API-8001`: some fields are missing or not valid. `details.fields` lists each invalid field with its own code (e.g. `API-8002` required, `API-8012` wrong format). `CHT-6408`: a member is not in the organization.","headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["chat:write"]},{"oauth2":["chat:write"]}],"summary":"Create a private group","tags":["chat"]}},"/v1/chat/direct":{"post":{"description":"The direct message with a colleague, started when it does not exist yet.","operationId":"openDirectMessage","parameters":[{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}},{"name":"Idempotency-Key","in":"header","description":"A unique key for this operation (e.g. a UUID, 1 to 255 visible characters), kept 24 hours: repeating the request with the same key returns the first answer (`Idempotent-Replayed: true`) instead of doing it again. Errors: `API-8109` (400) a key that is not valid, `API-8108` (409, retryable) the first request with this key is still running, `API-8107` (422) the key was used for a different request; `API-8118` (409) the first request created something whose secret is shown only once, so its answer is not repeated. An answer with `shown_once` repeats its secret within 10 minutes, then `API-8118`.","required":false,"schema":{"type":"string","minLength":1,"maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OpenDirectMessage"}}}},"responses":{"200":{"description":"The room.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChatRoom"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `AUTH-1003`: your seat was deactivated (view only). `AUTH-1004`: all seats are inactive because the seat charge was not paid (view only). `API-8102`: the API key or app lacks the `chat:write` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"description":"`API-8001`: some fields are missing or not valid. `details.fields` lists each invalid field with its own code (e.g. `API-8002` required, `API-8012` wrong format). `CHT-6408`: the colleague is not in the organization. `CHT-6409`: yourself.","headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["chat:write"]},{"oauth2":["chat:write"]}],"summary":"Open a direct message","tags":["chat"]}},"/v1/chat/rooms/{roomId}/members":{"get":{"operationId":"listChatRoomMembers","parameters":[{"name":"roomId","required":true,"in":"path","description":"The chat room id.","schema":{"type":"string","format":"uuid","description":"The chat room id."}},{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"The members.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChatRoomMemberList"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `API-8102`: the API key or app lacks the `chat:read` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"`CHT-6401`: no such room, or you are not a member of it (the same answer).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["chat:read"]},{"oauth2":["chat:read"]}],"summary":"A room's members","tags":["chat"]},"post":{"operationId":"addChatGroupMembers","parameters":[{"name":"roomId","required":true,"in":"path","description":"The chat room id.","schema":{"type":"string","format":"uuid","description":"The chat room id."}},{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}},{"name":"Idempotency-Key","in":"header","description":"A unique key for this operation (e.g. a UUID, 1 to 255 visible characters), kept 24 hours: repeating the request with the same key returns the first answer (`Idempotent-Replayed: true`) instead of doing it again. Errors: `API-8109` (400) a key that is not valid, `API-8108` (409, retryable) the first request with this key is still running, `API-8107` (422) the key was used for a different request; `API-8118` (409) the first request created something whose secret is shown only once, so its answer is not repeated. An answer with `shown_once` repeats its secret within 10 minutes, then `API-8118`.","required":false,"schema":{"type":"string","minLength":1,"maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AddChatGroupMembers"}}}},"responses":{"200":{"description":"The group.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChatRoom"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`CHT-6406`: only its creator or `spaces.manage` manage a group.\n\n`AUTH-1040`: you are not a member of the organization named. `AUTH-1003`: your seat was deactivated (view only). `AUTH-1004`: all seats are inactive because the seat charge was not paid (view only). `API-8102`: the API key or app lacks the `chat:write` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"`CHT-6401`: no such room, or you are not a member of it (the same answer).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"description":"`API-8001`: some fields are missing or not valid. `details.fields` lists each invalid field with its own code (e.g. `API-8002` required, `API-8012` wrong format). `CHT-6408`: a member is not in the organization.","headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["chat:write"]},{"oauth2":["chat:write"]}],"summary":"Add members to a private group","tags":["chat"]}},"/v1/chat/rooms/{roomId}/members/{membershipId}":{"delete":{"operationId":"removeChatGroupMember","parameters":[{"name":"roomId","required":true,"in":"path","description":"The chat room id.","schema":{"type":"string","format":"uuid","description":"The chat room id."}},{"name":"membershipId","required":true,"in":"path","description":"The member (membership id).","schema":{"type":"string","format":"uuid","description":"The member (membership id)."}},{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}}],"responses":{"204":{"description":"Removed (their messages stay).","headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`CHT-6406`: only its creator or `spaces.manage` manage a group.\n\n`AUTH-1040`: you are not a member of the organization named. `AUTH-1003`: your seat was deactivated (view only). `AUTH-1004`: all seats are inactive because the seat charge was not paid (view only). `API-8102`: the API key or app lacks the `chat:write` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"`CHT-6401`: no such room, or you are not a member of it (the same answer).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["chat:write"]},{"oauth2":["chat:write"]}],"summary":"Remove a member from a private group","tags":["chat"]}},"/v1/chat/rooms/{roomId}/leave":{"post":{"operationId":"leaveChatRoom","parameters":[{"name":"roomId","required":true,"in":"path","description":"The chat room id.","schema":{"type":"string","format":"uuid","description":"The chat room id."}},{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}},{"name":"Idempotency-Key","in":"header","description":"A unique key for this operation (e.g. a UUID, 1 to 255 visible characters), kept 24 hours: repeating the request with the same key returns the first answer (`Idempotent-Replayed: true`) instead of doing it again. Errors: `API-8109` (400) a key that is not valid, `API-8108` (409, retryable) the first request with this key is still running, `API-8107` (422) the key was used for a different request; `API-8118` (409) the first request created something whose secret is shown only once, so its answer is not repeated. An answer with `shown_once` repeats its secret within 10 minutes, then `API-8118`.","required":false,"schema":{"type":"string","minLength":1,"maxLength":255}}],"responses":{"204":{"description":"Left.","headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `AUTH-1003`: your seat was deactivated (view only). `AUTH-1004`: all seats are inactive because the seat charge was not paid (view only). `API-8102`: the API key or app lacks the `chat:write` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"`CHT-6401`: no such room, or you are not a member of it (the same answer).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"409":{"description":"`CHT-6413`: only private groups can be left.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["chat:write"]},{"oauth2":["chat:write"]}],"summary":"Leave a private group","tags":["chat"]}},"/v1/chat/rooms/{roomId}/notify":{"put":{"description":"All messages, mentions only, or mute (docs/20 \"Notifications\").","operationId":"setChatNotify","parameters":[{"name":"roomId","required":true,"in":"path","description":"The chat room id.","schema":{"type":"string","format":"uuid","description":"The chat room id."}},{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}},{"name":"Idempotency-Key","in":"header","description":"A unique key for this operation (e.g. a UUID, 1 to 255 visible characters), kept 24 hours: repeating the request with the same key returns the first answer (`Idempotent-Replayed: true`) instead of doing it again. Errors: `API-8109` (400) a key that is not valid, `API-8108` (409, retryable) the first request with this key is still running, `API-8107` (422) the key was used for a different request; `API-8118` (409) the first request created something whose secret is shown only once, so its answer is not repeated. An answer with `shown_once` repeats its secret within 10 minutes, then `API-8118`.","required":false,"schema":{"type":"string","minLength":1,"maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SetChatNotify"}}}},"responses":{"200":{"description":"The room.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChatRoom"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `AUTH-1003`: your seat was deactivated (view only). `AUTH-1004`: all seats are inactive because the seat charge was not paid (view only). `API-8102`: the API key or app lacks the `chat:write` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"`CHT-6401`: no such room, or you are not a member of it (the same answer).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["chat:write"]},{"oauth2":["chat:write"]}],"summary":"Set a room's notifications","tags":["chat"]}},"/v1/chat/rooms/{roomId}/typing":{"post":{"description":"The room's members see who is typing (a signal that lasts 8 seconds; repeat it every few seconds while typing, and send `active: false` when done).","operationId":"setChatTyping","parameters":[{"name":"roomId","required":true,"in":"path","description":"The chat room id.","schema":{"type":"string","format":"uuid","description":"The chat room id."}},{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChatTyping"}}}},"responses":{"204":{"description":"Told to the room.","headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `AUTH-1003`: your seat was deactivated (view only). `AUTH-1004`: all seats are inactive because the seat charge was not paid (view only). `API-8102`: the API key or app lacks the `chat:write` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"`CHT-6401`: no such room, or you are not a member of it (the same answer).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"409":{"description":"`CHT-6403`: the room is archived (read-only).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"503":{"description":"`SYS-1001`: live updates are not running on this server.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["chat:write"]},{"oauth2":["chat:write"]}],"summary":"Say you are typing in a room","tags":["chat"]}},"/v1/chat/rooms/{roomId}/read":{"post":{"description":"Moves your last-read position forward (to a message number, or the last).","operationId":"markChatRead","parameters":[{"name":"roomId","required":true,"in":"path","description":"The chat room id.","schema":{"type":"string","format":"uuid","description":"The chat room id."}},{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}},{"name":"Idempotency-Key","in":"header","description":"A unique key for this operation (e.g. a UUID, 1 to 255 visible characters), kept 24 hours: repeating the request with the same key returns the first answer (`Idempotent-Replayed: true`) instead of doing it again. Errors: `API-8109` (400) a key that is not valid, `API-8108` (409, retryable) the first request with this key is still running, `API-8107` (422) the key was used for a different request; `API-8118` (409) the first request created something whose secret is shown only once, so its answer is not repeated. An answer with `shown_once` repeats its secret within 10 minutes, then `API-8118`.","required":false,"schema":{"type":"string","minLength":1,"maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MarkChatRead"}}}},"responses":{"200":{"description":"The room.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChatRoom"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `API-8102`: the API key or app lacks the `chat:write` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"`CHT-6401`: no such room, or you are not a member of it (the same answer).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["chat:write"]},{"oauth2":["chat:write"]}],"summary":"Mark a room as read","tags":["chat"]}},"/v1/chat/rooms/{roomId}/messages":{"get":{"description":"A page, oldest first: the latest by default, or before, after or around a message number. With `after` and `wait_seconds` it answers at the first newer message (empty after the seconds).","operationId":"listChatMessages","parameters":[{"name":"roomId","required":true,"in":"path","description":"The chat room id.","schema":{"type":"string","format":"uuid","description":"The chat room id."}},{"name":"before","required":false,"in":"query","description":"Messages before this number (older). The latest page when absent.","schema":{"description":"Messages before this number (older). The latest page when absent.","type":"integer","minimum":0,"maximum":9007199254740991}},{"name":"after","required":false,"in":"query","description":"Messages after this number (newer), e.g. after reconnecting.","schema":{"description":"Messages after this number (newer), e.g. after reconnecting.","type":"integer","minimum":0,"maximum":9007199254740991}},{"name":"around","required":false,"in":"query","description":"Messages around this number (a search result, the first unread).","schema":{"description":"Messages around this number (a search result, the first unread).","type":"integer","minimum":0,"maximum":9007199254740991}},{"name":"limit","required":false,"in":"query","description":"Messages per page (1 to 100, default 50).","schema":{"default":50,"description":"Messages per page (1 to 100, default 50).","type":"integer","minimum":1,"maximum":100}},{"name":"wait_seconds","required":false,"in":"query","description":"With `after`: seconds (0 to 20) to wait for a message after that number; the answer comes at the first one, or empty when they are over.","schema":{"default":0,"description":"With `after`: seconds (0 to 20) to wait for a message after that number; the answer comes at the first one, or empty when they are over.","type":"integer","minimum":0,"maximum":20}},{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"The page.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChatMessagePage"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `API-8102`: the API key or app lacks the `chat:read` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"`CHT-6401`: no such room, or you are not a member of it (the same answer).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["chat:read"]},{"oauth2":["chat:read"]}],"summary":"A room's messages","tags":["chat"]},"post":{"description":"Markdown text with mentions (`<@membership-id>`, `@all`), ticket cards (`#1291` or `ticket_ids`), a quote and files. A retry with the same `client_message_id` returns the first message.","operationId":"postChatMessage","parameters":[{"name":"roomId","required":true,"in":"path","description":"The chat room id.","schema":{"type":"string","format":"uuid","description":"The chat room id."}},{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}},{"name":"Idempotency-Key","in":"header","description":"A unique key for this operation (e.g. a UUID, 1 to 255 visible characters), kept 24 hours: repeating the request with the same key returns the first answer (`Idempotent-Replayed: true`) instead of doing it again. Errors: `API-8109` (400) a key that is not valid, `API-8108` (409, retryable) the first request with this key is still running, `API-8107` (422) the key was used for a different request; `API-8118` (409) the first request created something whose secret is shown only once, so its answer is not repeated. An answer with `shown_once` repeats its secret within 10 minutes, then `API-8118`.","required":false,"schema":{"type":"string","minLength":1,"maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PostChatMessage"}}}},"responses":{"201":{"description":"The message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChatMessage"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`CHT-6407`: `@all` in the All room needs `members.manage`.\n\n`AUTH-1040`: you are not a member of the organization named. `AUTH-1003`: your seat was deactivated (view only). `AUTH-1004`: all seats are inactive because the seat charge was not paid (view only). `API-8102`: the API key or app lacks the `chat:write` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"`CHT-6401`: no such room, or you are not a member of it (the same answer). `TKT-6101`: a ticket you cannot see.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"409":{"description":"`CHT-6403`: the room is archived (read-only). `CHT-6411`: a file not sendable here. `TKT-6112`: a file still uploading. `TKT-6113`: a blocked file.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"description":"`API-8001`: some fields are missing or not valid. `details.fields` lists each invalid field with its own code (e.g. `API-8002` required, `API-8012` wrong format). `CHT-6410`: an empty message. `CHT-6412`: a quote from another room. `CHT-6415`: too many tickets.","headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["chat:write"]},{"oauth2":["chat:write"]}],"summary":"Post a message","tags":["chat"]}},"/v1/chat/ask-the-team":{"post":{"description":"Posts a question with the ticket attached as a card, in one of your rooms (a space group) or in the direct message with a colleague (docs/20 \"Ask the team\").","operationId":"askTheTeam","parameters":[{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}},{"name":"Idempotency-Key","in":"header","description":"A unique key for this operation (e.g. a UUID, 1 to 255 visible characters), kept 24 hours: repeating the request with the same key returns the first answer (`Idempotent-Replayed: true`) instead of doing it again. Errors: `API-8109` (400) a key that is not valid, `API-8108` (409, retryable) the first request with this key is still running, `API-8107` (422) the key was used for a different request; `API-8118` (409) the first request created something whose secret is shown only once, so its answer is not repeated. An answer with `shown_once` repeats its secret within 10 minutes, then `API-8118`.","required":false,"schema":{"type":"string","minLength":1,"maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AskTheTeam"}}}},"responses":{"201":{"description":"The room and the message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AskTheTeamResult"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `AUTH-1003`: your seat was deactivated (view only). `AUTH-1004`: all seats are inactive because the seat charge was not paid (view only). `API-8102`: the API key or app lacks the `chat:write` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"`CHT-6401`: no such room, or you are not a member of it (the same answer). `TKT-6101`: a ticket you cannot see.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"409":{"description":"`CHT-6403`: the room is archived (read-only).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"description":"`API-8001`: some fields are missing or not valid. `details.fields` lists each invalid field with its own code (e.g. `API-8002` required, `API-8012` wrong format). `CHT-6408`: the colleague is not in the organization.","headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["chat:write"]},{"oauth2":["chat:write"]}],"summary":"Ask the team about a ticket","tags":["chat"]}},"/v1/chat/rooms/{roomId}/pins":{"get":{"description":"Most recently pinned first (shown at the top of the room).","operationId":"listPinnedChatMessages","parameters":[{"name":"roomId","required":true,"in":"path","description":"The chat room id.","schema":{"type":"string","format":"uuid","description":"The chat room id."}},{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"The messages.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChatMessageList"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `API-8102`: the API key or app lacks the `chat:read` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"`CHT-6401`: no such room, or you are not a member of it (the same answer).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["chat:read"]},{"oauth2":["chat:read"]}],"summary":"A room's pinned messages","tags":["chat"]}},"/v1/chat/messages/{messageId}":{"get":{"operationId":"getChatMessage","parameters":[{"name":"messageId","required":true,"in":"path","description":"The chat message id.","schema":{"type":"string","format":"uuid","description":"The chat message id."}},{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"The message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChatMessage"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `API-8102`: the API key or app lacks the `chat:read` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"`CHT-6402`: no such message in a room you belong to.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["chat:read"]},{"oauth2":["chat:read"]}],"summary":"A chat message","tags":["chat"]},"patch":{"description":"The previous text is kept in its edit history.","operationId":"editChatMessage","parameters":[{"name":"messageId","required":true,"in":"path","description":"The chat message id.","schema":{"type":"string","format":"uuid","description":"The chat message id."}},{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}},{"name":"Idempotency-Key","in":"header","description":"A unique key for this operation (e.g. a UUID, 1 to 255 visible characters), kept 24 hours: repeating the request with the same key returns the first answer (`Idempotent-Replayed: true`) instead of doing it again. Errors: `API-8109` (400) a key that is not valid, `API-8108` (409, retryable) the first request with this key is still running, `API-8107` (422) the key was used for a different request; `API-8118` (409) the first request created something whose secret is shown only once, so its answer is not repeated. An answer with `shown_once` repeats its secret within 10 minutes, then `API-8118`.","required":false,"schema":{"type":"string","minLength":1,"maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EditChatMessage"}}}},"responses":{"200":{"description":"The message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChatMessage"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`CHT-6404`: only its author edits a message.\n\n`AUTH-1040`: you are not a member of the organization named. `AUTH-1003`: your seat was deactivated (view only). `AUTH-1004`: all seats are inactive because the seat charge was not paid (view only). `API-8102`: the API key or app lacks the `chat:write` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"`CHT-6402`: no such message in a room you belong to.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"409":{"description":"`CHT-6403`: the room is archived (read-only). `CHT-6405`: the message was deleted.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"description":"`API-8001`: some fields are missing or not valid. `details.fields` lists each invalid field with its own code (e.g. `API-8002` required, `API-8012` wrong format). `CHT-6410`: an empty message.","headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["chat:write"]},{"oauth2":["chat:write"]}],"summary":"Edit your message","tags":["chat"]},"delete":{"description":"A soft delete: it shows as \"message deleted\".","operationId":"deleteChatMessage","parameters":[{"name":"messageId","required":true,"in":"path","description":"The chat message id.","schema":{"type":"string","format":"uuid","description":"The chat message id."}},{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}}],"responses":{"204":{"description":"Deleted.","headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`CHT-6404`: only its author deletes a message.\n\n`AUTH-1040`: you are not a member of the organization named. `AUTH-1003`: your seat was deactivated (view only). `AUTH-1004`: all seats are inactive because the seat charge was not paid (view only). `API-8102`: the API key or app lacks the `chat:write` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"`CHT-6402`: no such message in a room you belong to.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"409":{"description":"`CHT-6403`: the room is archived (read-only).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["chat:write"]},{"oauth2":["chat:write"]}],"summary":"Delete your message","tags":["chat"]}},"/v1/chat/messages/{messageId}/edits":{"get":{"operationId":"listChatMessageEdits","parameters":[{"name":"messageId","required":true,"in":"path","description":"The chat message id.","schema":{"type":"string","format":"uuid","description":"The chat message id."}},{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"The earlier texts.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChatMessageEditList"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `API-8102`: the API key or app lacks the `chat:read` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"`CHT-6402`: no such message in a room you belong to.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["chat:read"]},{"oauth2":["chat:read"]}],"summary":"A message's edit history","tags":["chat"]}},"/v1/chat/messages/{messageId}/unread":{"post":{"description":"Your read position moves back to just before it.","operationId":"markChatMessageUnread","parameters":[{"name":"messageId","required":true,"in":"path","description":"The chat message id.","schema":{"type":"string","format":"uuid","description":"The chat message id."}},{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}},{"name":"Idempotency-Key","in":"header","description":"A unique key for this operation (e.g. a UUID, 1 to 255 visible characters), kept 24 hours: repeating the request with the same key returns the first answer (`Idempotent-Replayed: true`) instead of doing it again. Errors: `API-8109` (400) a key that is not valid, `API-8108` (409, retryable) the first request with this key is still running, `API-8107` (422) the key was used for a different request; `API-8118` (409) the first request created something whose secret is shown only once, so its answer is not repeated. An answer with `shown_once` repeats its secret within 10 minutes, then `API-8118`.","required":false,"schema":{"type":"string","minLength":1,"maxLength":255}}],"responses":{"200":{"description":"The room.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChatRoom"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `API-8102`: the API key or app lacks the `chat:write` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"`CHT-6402`: no such message in a room you belong to.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"409":{"description":"`CHT-6405`: the message was deleted.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["chat:write"]},{"oauth2":["chat:write"]}],"summary":"Mark a message as unread","tags":["chat"]}},"/v1/chat/messages/{messageId}/reactions":{"post":{"operationId":"addChatReaction","parameters":[{"name":"messageId","required":true,"in":"path","description":"The chat message id.","schema":{"type":"string","format":"uuid","description":"The chat message id."}},{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}},{"name":"Idempotency-Key","in":"header","description":"A unique key for this operation (e.g. a UUID, 1 to 255 visible characters), kept 24 hours: repeating the request with the same key returns the first answer (`Idempotent-Replayed: true`) instead of doing it again. Errors: `API-8109` (400) a key that is not valid, `API-8108` (409, retryable) the first request with this key is still running, `API-8107` (422) the key was used for a different request; `API-8118` (409) the first request created something whose secret is shown only once, so its answer is not repeated. An answer with `shown_once` repeats its secret within 10 minutes, then `API-8118`.","required":false,"schema":{"type":"string","minLength":1,"maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChatReactionInput"}}}},"responses":{"200":{"description":"The message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChatMessage"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `AUTH-1003`: your seat was deactivated (view only). `AUTH-1004`: all seats are inactive because the seat charge was not paid (view only). `API-8102`: the API key or app lacks the `chat:write` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"`CHT-6402`: no such message in a room you belong to.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"409":{"description":"`CHT-6403`: the room is archived (read-only). `CHT-6405`: the message was deleted.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["chat:write"]},{"oauth2":["chat:write"]}],"summary":"React to a message","tags":["chat"]}},"/v1/chat/messages/{messageId}/reactions/{emoji}":{"delete":{"operationId":"removeChatReaction","parameters":[{"name":"messageId","required":true,"in":"path","description":"The chat message id.","schema":{"type":"string","format":"uuid","description":"The chat message id."}},{"name":"emoji","required":true,"in":"path","description":"The emoji (URL-encoded).","schema":{"type":"string","minLength":1,"maxLength":32,"description":"The emoji (URL-encoded)."}},{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"The message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChatMessage"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `AUTH-1003`: your seat was deactivated (view only). `AUTH-1004`: all seats are inactive because the seat charge was not paid (view only). `API-8102`: the API key or app lacks the `chat:write` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"`CHT-6402`: no such message in a room you belong to.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"409":{"description":"`CHT-6403`: the room is archived (read-only).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["chat:write"]},{"oauth2":["chat:write"]}],"summary":"Remove your reaction","tags":["chat"]}},"/v1/chat/messages/{messageId}/pin":{"put":{"operationId":"pinChatMessage","parameters":[{"name":"messageId","required":true,"in":"path","description":"The chat message id.","schema":{"type":"string","format":"uuid","description":"The chat message id."}},{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}},{"name":"Idempotency-Key","in":"header","description":"A unique key for this operation (e.g. a UUID, 1 to 255 visible characters), kept 24 hours: repeating the request with the same key returns the first answer (`Idempotent-Replayed: true`) instead of doing it again. Errors: `API-8109` (400) a key that is not valid, `API-8108` (409, retryable) the first request with this key is still running, `API-8107` (422) the key was used for a different request; `API-8118` (409) the first request created something whose secret is shown only once, so its answer is not repeated. An answer with `shown_once` repeats its secret within 10 minutes, then `API-8118`.","required":false,"schema":{"type":"string","minLength":1,"maxLength":255}}],"responses":{"200":{"description":"The message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChatMessage"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `AUTH-1003`: your seat was deactivated (view only). `AUTH-1004`: all seats are inactive because the seat charge was not paid (view only). `API-8102`: the API key or app lacks the `chat:write` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"`CHT-6402`: no such message in a room you belong to.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"409":{"description":"`CHT-6403`: the room is archived (read-only). `CHT-6405`: the message was deleted.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["chat:write"]},{"oauth2":["chat:write"]}],"summary":"Pin a message at the top of its room","tags":["chat"]},"delete":{"operationId":"unpinChatMessage","parameters":[{"name":"messageId","required":true,"in":"path","description":"The chat message id.","schema":{"type":"string","format":"uuid","description":"The chat message id."}},{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"The message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChatMessage"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `AUTH-1003`: your seat was deactivated (view only). `AUTH-1004`: all seats are inactive because the seat charge was not paid (view only). `API-8102`: the API key or app lacks the `chat:write` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"`CHT-6402`: no such message in a room you belong to.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"409":{"description":"`CHT-6403`: the room is archived (read-only). `CHT-6405`: the message was deleted.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["chat:write"]},{"oauth2":["chat:write"]}],"summary":"Unpin a message","tags":["chat"]}},"/v1/chat/search":{"get":{"description":"In the rooms you belong to, newest first (PostgreSQL full-text search).","operationId":"searchChat","parameters":[{"name":"q","required":true,"in":"query","description":"Words to find (prefixes match; Arabic-aware).","schema":{"type":"string","minLength":1,"maxLength":200,"description":"Words to find (prefixes match; Arabic-aware)."}},{"name":"room_id","required":false,"in":"query","description":"Only this room.","schema":{"description":"Only this room.","type":"string","format":"uuid"}},{"name":"cursor","required":false,"in":"query","description":"The `next_cursor` of the previous page.","schema":{"description":"The `next_cursor` of the previous page.","type":"string","format":"uuid"}},{"name":"limit","required":false,"in":"query","description":"Results per page (1 to 50, default 20).","schema":{"default":20,"description":"Results per page (1 to 50, default 20).","type":"integer","minimum":1,"maximum":50}},{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"The results.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChatSearchPage"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `API-8102`: the API key or app lacks the `chat:read` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"`CHT-6401`: no such room, or you are not a member of it (the same answer).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["chat:read"]},{"oauth2":["chat:read"]}],"summary":"Search your chat messages","tags":["chat"]}},"/v1/chat/rooms/{roomId}/attachments":{"post":{"description":"Returns the signed request that uploads the file straight to storage (valid 15 minutes). Then complete the upload and send it with a message.","operationId":"requestChatAttachmentUpload","parameters":[{"name":"roomId","required":true,"in":"path","description":"The chat room id.","schema":{"type":"string","format":"uuid","description":"The chat room id."}},{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}},{"name":"Idempotency-Key","in":"header","description":"A unique key for this operation (e.g. a UUID, 1 to 255 visible characters), kept 24 hours: repeating the request with the same key returns the first answer (`Idempotent-Replayed: true`) instead of doing it again. Errors: `API-8109` (400) a key that is not valid, `API-8108` (409, retryable) the first request with this key is still running, `API-8107` (422) the key was used for a different request; `API-8118` (409) the first request created something whose secret is shown only once, so its answer is not repeated. An answer with `shown_once` repeats its secret within 10 minutes, then `API-8118`.","required":false,"schema":{"type":"string","minLength":1,"maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UploadRequest"}}}},"responses":{"201":{"description":"The file and its upload.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChatAttachmentUpload"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `AUTH-1003`: your seat was deactivated (view only). `AUTH-1004`: all seats are inactive because the seat charge was not paid (view only). `API-8102`: the API key or app lacks the `chat:write` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"`CHT-6401`: no such room, or you are not a member of it (the same answer).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"409":{"description":"`CHT-6403`: the room is archived (read-only).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"description":"`API-8001`: some fields are missing or not valid. `details.fields` lists each invalid field with its own code (e.g. `API-8002` required, `API-8012` wrong format). `TKT-6114`: the file is larger than allowed.","headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["chat:write"]},{"oauth2":["chat:write"]}],"summary":"Upload a file to a chat room","tags":["chat"]}},"/v1/chat/attachments/{attachmentId}/complete":{"post":{"description":"Once the file is in storage with its size; it is scanned for malware next.","operationId":"completeChatAttachmentUpload","parameters":[{"name":"attachmentId","required":true,"in":"path","description":"The chat file id.","schema":{"type":"string","format":"uuid","description":"The chat file id."}},{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}},{"name":"Idempotency-Key","in":"header","description":"A unique key for this operation (e.g. a UUID, 1 to 255 visible characters), kept 24 hours: repeating the request with the same key returns the first answer (`Idempotent-Replayed: true`) instead of doing it again. Errors: `API-8109` (400) a key that is not valid, `API-8108` (409, retryable) the first request with this key is still running, `API-8107` (422) the key was used for a different request; `API-8118` (409) the first request created something whose secret is shown only once, so its answer is not repeated. An answer with `shown_once` repeats its secret within 10 minutes, then `API-8118`.","required":false,"schema":{"type":"string","minLength":1,"maxLength":255}}],"responses":{"200":{"description":"The file.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChatAttachment"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `AUTH-1003`: your seat was deactivated (view only). `AUTH-1004`: all seats are inactive because the seat charge was not paid (view only). `API-8102`: the API key or app lacks the `chat:write` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"`TKT-6111`: no such file in a room you belong to.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"409":{"description":"`TKT-6115`: the file is not in storage, or has another size. `CHT-6411`: not your pending upload.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["chat:write"]},{"oauth2":["chat:write"]}],"summary":"Complete a chat file upload","tags":["chat"]}},"/v1/chat/attachments/{attachmentId}/renew":{"post":{"description":"A new signed request for a file whose upload did not complete (lost connection, expired link): upload it again; the message keeps it.","operationId":"renewChatAttachmentUpload","parameters":[{"name":"attachmentId","required":true,"in":"path","description":"The chat file id.","schema":{"type":"string","format":"uuid","description":"The chat file id."}},{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}},{"name":"Idempotency-Key","in":"header","description":"A unique key for this operation (e.g. a UUID, 1 to 255 visible characters), kept 24 hours: repeating the request with the same key returns the first answer (`Idempotent-Replayed: true`) instead of doing it again. Errors: `API-8109` (400) a key that is not valid, `API-8108` (409, retryable) the first request with this key is still running, `API-8107` (422) the key was used for a different request; `API-8118` (409) the first request created something whose secret is shown only once, so its answer is not repeated. An answer with `shown_once` repeats its secret within 10 minutes, then `API-8118`.","required":false,"schema":{"type":"string","minLength":1,"maxLength":255}}],"responses":{"200":{"description":"The file and its upload.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChatAttachmentUpload"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `AUTH-1003`: your seat was deactivated (view only). `AUTH-1004`: all seats are inactive because the seat charge was not paid (view only). `API-8102`: the API key or app lacks the `chat:write` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"`TKT-6111`: no such file in a room you belong to.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"409":{"description":"`CHT-6411`: not your pending upload (or already stored).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["chat:write"]},{"oauth2":["chat:write"]}],"summary":"Renew a chat file upload","tags":["chat"]}},"/v1/chat/attachments/{attachmentId}":{"get":{"operationId":"getChatAttachment","parameters":[{"name":"attachmentId","required":true,"in":"path","description":"The chat file id.","schema":{"type":"string","format":"uuid","description":"The chat file id."}},{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"The file.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChatAttachment"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `API-8102`: the API key or app lacks the `chat:read` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"`TKT-6111`: no such file in a room you belong to.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["chat:read"]},{"oauth2":["chat:read"]}],"summary":"Get a chat file (its scan status)","tags":["chat"]}},"/v1/chat/attachments/{attachmentId}/scan/retry":{"post":{"description":"A file whose scan failed (`scan_failed`, `TKT-6190`) becomes `pending` and is scanned again; `chat.attachment.scanned` says how it ended. An infected file stays quarantined for good. Audited as `file.scan_retried`.","operationId":"retryChatAttachmentScan","parameters":[{"name":"attachmentId","required":true,"in":"path","description":"The chat file id.","schema":{"type":"string","format":"uuid","description":"The chat file id."}},{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}},{"name":"Idempotency-Key","in":"header","description":"A unique key for this operation (e.g. a UUID, 1 to 255 visible characters), kept 24 hours: repeating the request with the same key returns the first answer (`Idempotent-Replayed: true`) instead of doing it again. Errors: `API-8109` (400) a key that is not valid, `API-8108` (409, retryable) the first request with this key is still running, `API-8107` (422) the key was used for a different request; `API-8118` (409) the first request created something whose secret is shown only once, so its answer is not repeated. An answer with `shown_once` repeats its secret within 10 minutes, then `API-8118`.","required":false,"schema":{"type":"string","minLength":1,"maxLength":255}}],"responses":{"200":{"description":"The file, pending its scan.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChatAttachment"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `AUTH-1003`: your seat was deactivated (view only). `AUTH-1004`: all seats are inactive because the seat charge was not paid (view only). `API-8102`: the API key or app lacks the `chat:write` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"`TKT-6111`: no such file in a room you belong to.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"409":{"description":"`TKT-6193`: the file is not `scan_failed`.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["chat:write"]},{"oauth2":["chat:write"]}],"summary":"Scan a chat file for malware again after its scan failed","tags":["chat"]}},"/v1/chat/attachments/{attachmentId}/download":{"get":{"operationId":"downloadChatAttachment","parameters":[{"name":"attachmentId","required":true,"in":"path","description":"The chat file id.","schema":{"type":"string","format":"uuid","description":"The chat file id."}},{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"The link.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChatAttachmentDownload"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `API-8102`: the API key or app lacks the `chat:read` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"`TKT-6111`: no such file in a room you belong to.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"409":{"description":"`TKT-6112`: not uploaded or scanned yet (or the scan failed). `TKT-6113`: quarantined, it contains malware.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["chat:read"]},{"oauth2":["chat:read"]}],"summary":"A download link for a chat file (valid 5 minutes)","tags":["chat"]}},"/v1/chat/imports":{"post":{"description":"Up to 200 messages of one room (`room_id`, or the direct message of two members), with their original times and authors, each answered as created, unchanged (sent before), valid (`validate_only`) or invalid with its code and field. Free; nobody is notified. Owner and admins (`contacts.import_export`, `members.manage`). Playbook: rabt://guide/chat-migration.","operationId":"importChatMessages","parameters":[{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}},{"name":"Idempotency-Key","in":"header","description":"A unique key for this operation (e.g. a UUID, 1 to 255 visible characters), kept 24 hours: repeating the request with the same key returns the first answer (`Idempotent-Replayed: true`) instead of doing it again. Errors: `API-8109` (400) a key that is not valid, `API-8108` (409, retryable) the first request with this key is still running, `API-8107` (422) the key was used for a different request; `API-8118` (409) the first request created something whose secret is shown only once, so its answer is not repeated. An answer with `shown_once` repeats its secret within 10 minutes, then `API-8118`.","required":false,"schema":{"type":"string","minLength":1,"maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChatImportInput"}}}},"responses":{"200":{"description":"Each message’s result.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChatImportAnswer"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `AUTH-1003`: your seat was deactivated (view only). `AUTH-1004`: all seats are inactive because the seat charge was not paid (view only). `AUTH-1002`: your role lacks the `contacts.import_export` permission. `API-8102`: the API key or app lacks the `chat:write` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"`CHT-6401`: no such room in the organization.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"409":{"description":"`CHT-6403`: the room is archived.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"description":"`API-8001`: some fields are missing or not valid. `details.fields` lists each invalid field with its own code (e.g. `API-8002` required, `API-8012` wrong format). `CHT-6408`: a direct message’s member is not in the organization. `CHT-6409`: the same member twice. `CHT-6422`: a source id repeated in the call.","headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["chat:write"]},{"oauth2":["chat:write"]}],"summary":"Import chat messages from another app","tags":["chat"]}},"/v1/chat/rooms/{roomId}/incoming-webhooks":{"get":{"description":"The room's live incoming webhooks, oldest first, without their URLs (each shows its last characters).","operationId":"listChatIncomingWebhooks","parameters":[{"name":"roomId","required":true,"in":"path","description":"The chat room id.","schema":{"type":"string","format":"uuid","description":"The chat room id."}},{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"The incoming webhooks.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChatIncomingWebhookList"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`CHT-6406`: only a private group's creator, or `spaces.manage` for any group and All, manage its incoming webhooks.\n\n`AUTH-1040`: you are not a member of the organization named. `API-8102`: the API key or app lacks the `chat:read` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"`CHT-6401`: no such room, or you are not a member of it (the same answer).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"description":"`API-8001`: some fields are missing or not valid. `details.fields` lists each invalid field with its own code (e.g. `API-8002` required, `API-8012` wrong format). `CHT-6418`: a direct message has no incoming webhooks.","headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["chat:read"]},{"oauth2":["chat:read"]}],"summary":"List a room's incoming webhooks","tags":["chat"]},"post":{"description":"Another system posts in the room by POSTing `{ \"text\": \"…\" }` to the URL returned here once (`POST /v1/public/chat-webhooks/{token}`); its messages show the hook's name and icon as a service, never a member.","operationId":"createChatIncomingWebhook","parameters":[{"name":"roomId","required":true,"in":"path","description":"The chat room id.","schema":{"type":"string","format":"uuid","description":"The chat room id."}},{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}},{"name":"Idempotency-Key","in":"header","description":"A unique key for this operation (e.g. a UUID, 1 to 255 visible characters), kept 24 hours: repeating the request with the same key returns the first answer (`Idempotent-Replayed: true`) instead of doing it again. Errors: `API-8109` (400) a key that is not valid, `API-8108` (409, retryable) the first request with this key is still running, `API-8107` (422) the key was used for a different request; `API-8118` (409) the first request created something whose secret is shown only once, so its answer is not repeated. An answer with `shown_once` repeats its secret within 10 minutes, then `API-8118`.","required":false,"schema":{"type":"string","minLength":1,"maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateChatIncomingWebhook"}}}},"responses":{"201":{"description":"The incoming webhook and its secret URL.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChatIncomingWebhookWithUrl"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`CHT-6406`: only a private group's creator, or `spaces.manage` for any group and All, manage its incoming webhooks.\n\n`AUTH-1040`: you are not a member of the organization named. `AUTH-1003`: your seat was deactivated (view only). `AUTH-1004`: all seats are inactive because the seat charge was not paid (view only). `API-8102`: the API key or app lacks the `chat:write` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"`CHT-6401`: no such room, or you are not a member of it (the same answer).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"409":{"description":"`CHT-6403`: the room is archived (read-only). `CHT-6419`: the room has its maximum of incoming webhooks.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"description":"`API-8001`: some fields are missing or not valid. `details.fields` lists each invalid field with its own code (e.g. `API-8002` required, `API-8012` wrong format). `CHT-6418`: a direct message has no incoming webhooks.","headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["chat:write"]},{"oauth2":["chat:write"]}],"summary":"Create an incoming webhook","tags":["chat"]}},"/v1/chat/incoming-webhooks/{id}/url":{"post":{"description":"The old URL stops posting at once; the new one is returned here once. Its name, icon and messages stay.","operationId":"regenerateChatIncomingWebhookUrl","parameters":[{"name":"id","required":true,"in":"path","description":"The incoming webhook id.","schema":{"type":"string","format":"uuid","description":"The incoming webhook id."}},{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}},{"name":"Idempotency-Key","in":"header","description":"A unique key for this operation (e.g. a UUID, 1 to 255 visible characters), kept 24 hours: repeating the request with the same key returns the first answer (`Idempotent-Replayed: true`) instead of doing it again. Errors: `API-8109` (400) a key that is not valid, `API-8108` (409, retryable) the first request with this key is still running, `API-8107` (422) the key was used for a different request; `API-8118` (409) the first request created something whose secret is shown only once, so its answer is not repeated. An answer with `shown_once` repeats its secret within 10 minutes, then `API-8118`.","required":false,"schema":{"type":"string","minLength":1,"maxLength":255}}],"responses":{"201":{"description":"The incoming webhook and its new secret URL.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChatIncomingWebhookWithUrl"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`CHT-6406`: only a private group's creator, or `spaces.manage` for any group and All, manage its incoming webhooks.\n\n`AUTH-1040`: you are not a member of the organization named. `AUTH-1003`: your seat was deactivated (view only). `AUTH-1004`: all seats are inactive because the seat charge was not paid (view only). `API-8102`: the API key or app lacks the `chat:write` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"`CHT-6416`: no such live incoming webhook in a room you manage.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"409":{"description":"`CHT-6403`: the room is archived (read-only).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["chat:write"]},{"oauth2":["chat:write"]}],"summary":"Make a new URL for an incoming webhook","tags":["chat"]}},"/v1/chat/incoming-webhooks/{id}":{"delete":{"description":"Its URL stops posting at once (404 from then on); its messages stay.","operationId":"revokeChatIncomingWebhook","parameters":[{"name":"id","required":true,"in":"path","description":"The incoming webhook id.","schema":{"type":"string","format":"uuid","description":"The incoming webhook id."}},{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}}],"responses":{"204":{"description":"Revoked.","headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`CHT-6406`: only a private group's creator, or `spaces.manage` for any group and All, manage its incoming webhooks.\n\n`AUTH-1040`: you are not a member of the organization named. `AUTH-1003`: your seat was deactivated (view only). `AUTH-1004`: all seats are inactive because the seat charge was not paid (view only). `API-8102`: the API key or app lacks the `chat:write` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"`CHT-6416`: no such live incoming webhook in a room you manage.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"409":{"description":"`CHT-6403`: the room is archived (read-only).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["chat:write"]},{"oauth2":["chat:write"]}],"summary":"Revoke an incoming webhook","tags":["chat"]}},"/v1/email-layouts":{"get":{"description":"The named layouts with their sending addresses, the default, and every sending email address with the layout it is sent in. A reply is sent in the layout of the address it leaves from; an address without one is sent in the default.","operationId":"listEmailLayouts","parameters":[{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"The layouts.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailLayoutList"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `API-8102`: the API key or app lacks the `organization:read` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["organization:read"]},{"oauth2":["organization:read"]}],"summary":"The email layouts","tags":["organizations"]},"post":{"description":"A named layout, sent from the addresses given (each leaves the layout it was in).","operationId":"createEmailLayout","parameters":[{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}},{"name":"Idempotency-Key","in":"header","description":"A unique key for this operation (e.g. a UUID, 1 to 255 visible characters), kept 24 hours: repeating the request with the same key returns the first answer (`Idempotent-Replayed: true`) instead of doing it again. Errors: `API-8109` (400) a key that is not valid, `API-8108` (409, retryable) the first request with this key is still running, `API-8107` (422) the key was used for a different request; `API-8118` (409) the first request created something whose secret is shown only once, so its answer is not repeated. An answer with `shown_once` repeats its secret within 10 minutes, then `API-8118`.","required":false,"schema":{"type":"string","minLength":1,"maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailLayoutCreate"}}}},"responses":{"201":{"description":"The layout.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailLayout"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1002`: `channels.manage` is needed.\n\n`AUTH-1040`: you are not a member of the organization named. `AUTH-1003`: your seat was deactivated (view only). `AUTH-1004`: all seats are inactive because the seat charge was not paid (view only). `API-8102`: the API key or app lacks the `organization:write` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"`SPC-6208`: no such sending email address.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"description":"`API-8001`: some fields are missing or not valid. `details.fields` lists each invalid field with its own code (e.g. `API-8002` required, `API-8012` wrong format). `EM-3727`: the layout breaks the rules; each issue is a field (`html:<line>`) with its own code (EM-3728 to EM-3749 and EM-3752, EM-3744 for an image that could not be copied).","headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["organization:write"]},{"oauth2":["organization:write"]}],"summary":"Create an email layout","tags":["organizations"]}},"/v1/email-layouts/spec":{"get":{"description":"What a layout may contain (the same rules the frame’s preview and saving enforce), with the rules as plain English sentences.","operationId":"getEmailLayoutSpec","parameters":[{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"The rules.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailLayoutSpec"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `API-8102`: the API key or app lacks the `organization:read` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["organization:read"]},{"oauth2":["organization:read"]}],"summary":"The rules of an email layout","tags":["organizations"]}},"/v1/email-layouts/frame":{"post":{"description":"The layout and signature your email replies from the address on a ticket of the space are sent in (the address’s layout, else the default), filled in with your name and job title; or those being written, for a preview. Images show as they are sent, from Rabt’s copies (`/v1/email-assets/...`). A draft’s are copied only when you could save it (`organization:write`, an active seat, and the right to change that layout); otherwise they are not fetched and one issue gives the refusal’s code (`API-8102`, `AUTH-1003`, `AUTH-1004` or `AUTH-1002`). An image that cannot be copied keeps its address and is an issue on its line: `EM-3744`, or the error’s own code (`TKT-6195` while the malware scanner does not answer, `TKT-6205` while Rabt is copying many images).","operationId":"getEmailFrame","parameters":[{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailFrameRequest"}}}},"responses":{"200":{"description":"The frame.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailFrame"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `API-8102`: the API key or app lacks the `organization:read` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["organization:read"]},{"oauth2":["organization:read"]}],"summary":"The frame of your email replies","tags":["organizations"]}},"/v1/email-layouts/organization":{"put":{"description":"The HTML of the default, the layout of every address without one.","operationId":"setOrganizationEmailLayout","parameters":[{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}},{"name":"Idempotency-Key","in":"header","description":"A unique key for this operation (e.g. a UUID, 1 to 255 visible characters), kept 24 hours: repeating the request with the same key returns the first answer (`Idempotent-Replayed: true`) instead of doing it again. Errors: `API-8109` (400) a key that is not valid, `API-8108` (409, retryable) the first request with this key is still running, `API-8107` (422) the key was used for a different request; `API-8118` (409) the first request created something whose secret is shown only once, so its answer is not repeated. An answer with `shown_once` repeats its secret within 10 minutes, then `API-8118`.","required":false,"schema":{"type":"string","minLength":1,"maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailLayoutInput"}}}},"responses":{"200":{"description":"The layout.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailLayout"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1002`: `channels.manage` is needed.\n\n`AUTH-1040`: you are not a member of the organization named. `AUTH-1003`: your seat was deactivated (view only). `AUTH-1004`: all seats are inactive because the seat charge was not paid (view only). `API-8102`: the API key or app lacks the `organization:write` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"description":"`API-8001`: some fields are missing or not valid. `details.fields` lists each invalid field with its own code (e.g. `API-8002` required, `API-8012` wrong format). `EM-3727`: the layout breaks the rules; each issue is a field (`html:<line>`) with its own code (EM-3728 to EM-3749 and EM-3752, EM-3744 for an image that could not be copied).","headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["organization:write"]},{"oauth2":["organization:write"]}],"summary":"Set the default layout","tags":["organizations"]},"delete":{"deprecated":true,"description":"Deprecated: changes nothing, as the default is never removed; answers the layouts. Change the default with `PUT /v1/email-layouts/organization`.","operationId":"removeOrganizationEmailLayout","parameters":[{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"The layouts.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailLayoutList"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1002`: `channels.manage` is needed.\n\n`AUTH-1040`: you are not a member of the organization named. `AUTH-1003`: your seat was deactivated (view only). `AUTH-1004`: all seats are inactive because the seat charge was not paid (view only). `API-8102`: the API key or app lacks the `organization:write` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["organization:write"]},{"oauth2":["organization:write"]}],"summary":"Remove the default layout (deprecated)","tags":["organizations"]}},"/v1/email-layouts/spaces/{spaceId}":{"put":{"deprecated":true,"description":"Deprecated: a space is sent in the layout of the address its mail leaves from. The layout is stored and never applied.","operationId":"setSpaceEmailLayout","parameters":[{"name":"spaceId","required":true,"in":"path","description":"The space id.","schema":{"type":"string","format":"uuid","description":"The space id."}},{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}},{"name":"Idempotency-Key","in":"header","description":"A unique key for this operation (e.g. a UUID, 1 to 255 visible characters), kept 24 hours: repeating the request with the same key returns the first answer (`Idempotent-Replayed: true`) instead of doing it again. Errors: `API-8109` (400) a key that is not valid, `API-8108` (409, retryable) the first request with this key is still running, `API-8107` (422) the key was used for a different request; `API-8118` (409) the first request created something whose secret is shown only once, so its answer is not repeated. An answer with `shown_once` repeats its secret within 10 minutes, then `API-8118`.","required":false,"schema":{"type":"string","minLength":1,"maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailLayoutInput"}}}},"responses":{"200":{"description":"The layout.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailLayout"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1002`: `channels.manage` is needed.\n\n`AUTH-1040`: you are not a member of the organization named. `AUTH-1003`: your seat was deactivated (view only). `AUTH-1004`: all seats are inactive because the seat charge was not paid (view only). `API-8102`: the API key or app lacks the `organization:write` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"`SPC-6201`: no such space.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"description":"`API-8001`: some fields are missing or not valid. `details.fields` lists each invalid field with its own code (e.g. `API-8002` required, `API-8012` wrong format). `EM-3727`: the layout breaks the rules; each issue is a field (`html:<line>`) with its own code (EM-3728 to EM-3749 and EM-3752, EM-3744 for an image that could not be copied).","headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["organization:write"]},{"oauth2":["organization:write"]}],"summary":"Set a space’s layout (deprecated)","tags":["organizations"]},"delete":{"deprecated":true,"description":"Deprecated: a space’s layout is never applied.","operationId":"removeSpaceEmailLayout","parameters":[{"name":"spaceId","required":true,"in":"path","description":"The space id.","schema":{"type":"string","format":"uuid","description":"The space id."}},{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"The layouts.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailLayoutList"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1002`: `channels.manage` is needed.\n\n`AUTH-1040`: you are not a member of the organization named. `AUTH-1003`: your seat was deactivated (view only). `AUTH-1004`: all seats are inactive because the seat charge was not paid (view only). `API-8102`: the API key or app lacks the `organization:write` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["organization:write"]},{"oauth2":["organization:write"]}],"summary":"Remove a space’s layout (deprecated)","tags":["organizations"]}},"/v1/email-layouts/addresses/{addressId}":{"put":{"deprecated":true,"description":"Deprecated: use `PATCH /v1/email-layouts/{layoutId}` or `POST /v1/email-layouts`. Sets the HTML of the layout the address is sent in; an address in the default gets a new layout named after it.","operationId":"setAddressEmailLayout","parameters":[{"name":"addressId","required":true,"in":"path","description":"The sending email address’s id.","schema":{"type":"string","format":"uuid","description":"The sending email address’s id."}},{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}},{"name":"Idempotency-Key","in":"header","description":"A unique key for this operation (e.g. a UUID, 1 to 255 visible characters), kept 24 hours: repeating the request with the same key returns the first answer (`Idempotent-Replayed: true`) instead of doing it again. Errors: `API-8109` (400) a key that is not valid, `API-8108` (409, retryable) the first request with this key is still running, `API-8107` (422) the key was used for a different request; `API-8118` (409) the first request created something whose secret is shown only once, so its answer is not repeated. An answer with `shown_once` repeats its secret within 10 minutes, then `API-8118`.","required":false,"schema":{"type":"string","minLength":1,"maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailLayoutInput"}}}},"responses":{"200":{"description":"The layout.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailLayout"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1002`: `channels.manage` is needed.\n\n`AUTH-1040`: you are not a member of the organization named. `AUTH-1003`: your seat was deactivated (view only). `AUTH-1004`: all seats are inactive because the seat charge was not paid (view only). `API-8102`: the API key or app lacks the `organization:write` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"`SPC-6208`: no such email address.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"description":"`API-8001`: some fields are missing or not valid. `details.fields` lists each invalid field with its own code (e.g. `API-8002` required, `API-8012` wrong format). `EM-3727`: the layout breaks the rules; each issue is a field (`html:<line>`) with its own code (EM-3728 to EM-3749 and EM-3752, EM-3744 for an image that could not be copied).","headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["organization:write"]},{"oauth2":["organization:write"]}],"summary":"Set an email address’s layout (deprecated)","tags":["organizations"]},"delete":{"deprecated":true,"description":"Deprecated: use `PUT /v1/email-layouts/assignments/{addressId}` with `layout_id: null`. The address is sent in the default again.","operationId":"removeAddressEmailLayout","parameters":[{"name":"addressId","required":true,"in":"path","description":"The sending email address’s id.","schema":{"type":"string","format":"uuid","description":"The sending email address’s id."}},{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"The layouts.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailLayoutList"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1002`: `channels.manage` is needed.\n\n`AUTH-1040`: you are not a member of the organization named. `AUTH-1003`: your seat was deactivated (view only). `AUTH-1004`: all seats are inactive because the seat charge was not paid (view only). `API-8102`: the API key or app lacks the `organization:write` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["organization:write"]},{"oauth2":["organization:write"]}],"summary":"Remove an email address’s layout (deprecated)","tags":["organizations"]}},"/v1/email-layouts/{layoutId}":{"patch":{"description":"Its name, HTML or addresses (`address_ids` replaces them: one left out is sent in the default). The default’s HTML only.","operationId":"updateEmailLayout","parameters":[{"name":"layoutId","required":true,"in":"path","description":"The email layout’s id.","schema":{"type":"string","format":"uuid","description":"The email layout’s id."}},{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}},{"name":"Idempotency-Key","in":"header","description":"A unique key for this operation (e.g. a UUID, 1 to 255 visible characters), kept 24 hours: repeating the request with the same key returns the first answer (`Idempotent-Replayed: true`) instead of doing it again. Errors: `API-8109` (400) a key that is not valid, `API-8108` (409, retryable) the first request with this key is still running, `API-8107` (422) the key was used for a different request; `API-8118` (409) the first request created something whose secret is shown only once, so its answer is not repeated. An answer with `shown_once` repeats its secret within 10 minutes, then `API-8118`.","required":false,"schema":{"type":"string","minLength":1,"maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailLayoutUpdate"}}}},"responses":{"200":{"description":"The layout.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailLayout"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1002`: `channels.manage` is needed.\n\n`AUTH-1040`: you are not a member of the organization named. `AUTH-1003`: your seat was deactivated (view only). `AUTH-1004`: all seats are inactive because the seat charge was not paid (view only). `API-8102`: the API key or app lacks the `organization:write` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"`EM-3754`: no such layout. `SPC-6208`: no such sending email address.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"409":{"description":"`EM-3755`: the default is never deleted or renamed and is not given addresses.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"description":"`API-8001`: some fields are missing or not valid. `details.fields` lists each invalid field with its own code (e.g. `API-8002` required, `API-8012` wrong format). `EM-3727`: the layout breaks the rules; each issue is a field (`html:<line>`) with its own code (EM-3728 to EM-3749 and EM-3752, EM-3744 for an image that could not be copied).","headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["organization:write"]},{"oauth2":["organization:write"]}],"summary":"Change an email layout","tags":["organizations"]},"delete":{"description":"Its addresses are sent in the default again. The default is never deleted.","operationId":"deleteEmailLayout","parameters":[{"name":"layoutId","required":true,"in":"path","description":"The email layout’s id.","schema":{"type":"string","format":"uuid","description":"The email layout’s id."}},{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"The layouts.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailLayoutList"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1002`: `channels.manage` is needed.\n\n`AUTH-1040`: you are not a member of the organization named. `AUTH-1003`: your seat was deactivated (view only). `AUTH-1004`: all seats are inactive because the seat charge was not paid (view only). `API-8102`: the API key or app lacks the `organization:write` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"`EM-3754`: no such layout.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"409":{"description":"`EM-3755`: the default is never deleted or renamed and is not given addresses.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["organization:write"]},{"oauth2":["organization:write"]}],"summary":"Delete an email layout","tags":["organizations"]}},"/v1/email-layouts/assignments/{addressId}":{"put":{"description":"The address is sent in the layout (it leaves the one it was in); `layout_id: null`: the default.","operationId":"assignEmailLayout","parameters":[{"name":"addressId","required":true,"in":"path","description":"The sending email address’s id.","schema":{"type":"string","format":"uuid","description":"The sending email address’s id."}},{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}},{"name":"Idempotency-Key","in":"header","description":"A unique key for this operation (e.g. a UUID, 1 to 255 visible characters), kept 24 hours: repeating the request with the same key returns the first answer (`Idempotent-Replayed: true`) instead of doing it again. Errors: `API-8109` (400) a key that is not valid, `API-8108` (409, retryable) the first request with this key is still running, `API-8107` (422) the key was used for a different request; `API-8118` (409) the first request created something whose secret is shown only once, so its answer is not repeated. An answer with `shown_once` repeats its secret within 10 minutes, then `API-8118`.","required":false,"schema":{"type":"string","minLength":1,"maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailLayoutAssign"}}}},"responses":{"200":{"description":"The layouts.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailLayoutList"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1002`: `channels.manage` is needed.\n\n`AUTH-1040`: you are not a member of the organization named. `AUTH-1003`: your seat was deactivated (view only). `AUTH-1004`: all seats are inactive because the seat charge was not paid (view only). `API-8102`: the API key or app lacks the `organization:write` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"`EM-3754`: no such layout. `SPC-6208`: no such sending email address.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["organization:write"]},{"oauth2":["organization:write"]}],"summary":"Choose the layout of a sending address","tags":["organizations"]}},"/v1/email-assets":{"post":{"description":"GIF, PNG, JPEG, at most 2 MB, sent as base64; scanned for malware, its metadata removed. Its address is public, for emails.","operationId":"uploadEmailAsset","parameters":[{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}},{"name":"Idempotency-Key","in":"header","description":"A unique key for this operation (e.g. a UUID, 1 to 255 visible characters), kept 24 hours: repeating the request with the same key returns the first answer (`Idempotent-Replayed: true`) instead of doing it again. Errors: `API-8109` (400) a key that is not valid, `API-8108` (409, retryable) the first request with this key is still running, `API-8107` (422) the key was used for a different request; `API-8118` (409) the first request created something whose secret is shown only once, so its answer is not repeated. An answer with `shown_once` repeats its secret within 10 minutes, then `API-8118`.","required":false,"schema":{"type":"string","minLength":1,"maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailAssetUpload"}}}},"responses":{"201":{"description":"The image.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailAsset"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `AUTH-1003`: your seat was deactivated (view only). `AUTH-1004`: all seats are inactive because the seat charge was not paid (view only). `API-8102`: the API key or app lacks the `organization:write` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"description":"`API-8001`: some fields are missing or not valid. `details.fields` lists each invalid field with its own code (e.g. `API-8002` required, `API-8012` wrong format). `EM-3746`: not a GIF, PNG, JPEG image of at most 2 MB, or it cannot be read as an image. `TKT-6194`: the malware scan found malware in it (refused, not kept).","headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"429":{"$ref":"#/components/responses/RateLimited"},"503":{"description":"`TKT-6195`: the malware scanner did not answer (try again later). `SYS-1001`: in production the malware scanner (ClamAV) is not configured.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["organization:write"]},{"oauth2":["organization:write"]}],"summary":"Upload an image for a signature or layout","tags":["organizations"]}},"/v1/wallet/top-ups":{"post":{"description":"Charges the card of Tap's card form (the first top-up saves it) or a saved card (`card_id`, the default card without one), with 3-D Secure: when `status` is `requires_action`, send the member to `action_url`; Tap brings them back to the app. The wallet is credited only after Tap confirms the charge (a verified webhook re-checked through Tap's API); poll `GET /v1/wallet/top-ups/{topUpId}`. The same `Idempotency-Key` returns the same top-up and never charges twice. API keys and apps top up with a saved card only (`WAL-1229` for `card_token`): a new card is typed into the card form in Rabt's apps.","operationId":"createTopUp","parameters":[{"name":"Idempotency-Key","in":"header","description":"A key of your choice for this top-up (letters, digits and `. _ : - /`, at most 200 characters). Retrying with the same key returns the same top-up and never charges twice.","required":true,"schema":{"type":"string","pattern":"^[A-Za-z0-9][A-Za-z0-9._:/-]{0,199}$"}},{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateTopUp"}}}},"responses":{"201":{"description":"The top-up.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TopUp"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"402":{"description":"`WAL-1203` to `WAL-1208`, `WAL-1999`: Tap refused the card (its own code and message are in `provider`).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`WAL-1229`: a `card_token` sent with an API key or app.\n\n`AUTH-1040`: you are not a member of the organization named. `AUTH-1003`: your seat was deactivated. `AUTH-1004`: all seats are inactive because the seat charge was not paid (this action stays open to members with `billing.manage`, to pay it). `AUTH-1002`: your role lacks the `billing.manage` permission. `API-8102`: the API key or app lacks the `wallet:write` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in. `API-8148`: not available to test keys (API test mode).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"`WAL-1223`: no such saved card.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"409":{"description":"`WAL-1202`: no saved card. `WAL-1214`: the idempotency key belongs to another top-up.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"description":"`API-8001`: some fields are missing or not valid. `details.fields` lists each invalid field with its own code (e.g. `API-8002` required, `API-8012` wrong format). `WAL-1201`: the amount is below the minimum of SAR 50. `WAL-1210`: saving the card needs a verified mobile number. `WAL-1218`: the card form token expired.","headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"429":{"$ref":"#/components/responses/RateLimited"},"502":{"description":"`WAL-1209`: a setting of Rabt's Tap account refused the payment.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"503":{"description":"`SYS-1001`: card payments (Tap) are not set up on this Rabt server. `SYS-1005`, `SYS-1006`, `SYS-1007`: Tap could not be reached; retry with the same Idempotency-Key.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["wallet:write"]},{"oauth2":["wallet:write"]}],"summary":"Top up the wallet by card","tags":["wallet"]},"get":{"description":"Manual and automatic top-ups, newest first.","operationId":"listTopUps","parameters":[{"name":"cursor","required":false,"in":"query","description":"The `next_cursor` of the previous page.","schema":{"description":"The `next_cursor` of the previous page.","type":"string","minLength":1,"maxLength":200}},{"name":"limit","required":false,"in":"query","description":"Items per page (1 to 500, default 50).","schema":{"default":50,"description":"Items per page (1 to 500, default 50).","type":"integer","minimum":1,"maximum":500}},{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"A page of top-ups.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TopUpList"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `AUTH-1002`: your role lacks the `billing.manage` permission. `API-8102`: the API key or app lacks the `wallet:read` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["wallet:read"]},{"oauth2":["wallet:read"]}],"summary":"List top-ups","tags":["wallet"]}},"/v1/wallet/top-ups/{topUpId}":{"get":{"description":"Its status, and why it failed.","operationId":"getTopUp","parameters":[{"name":"topUpId","required":true,"in":"path","description":"The top-up id.","schema":{"type":"string","format":"uuid","description":"The top-up id."}},{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"The top-up.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TopUp"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `AUTH-1002`: your role lacks the `billing.manage` permission. `API-8102`: the API key or app lacks the `wallet:read` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"`WAL-1213`: no such top-up.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["wallet:read"]},{"oauth2":["wallet:read"]}],"summary":"Get a top-up","tags":["wallet"]}},"/v1/wallet/saved-card":{"get":{"description":"The default saved card, which auto top-up and quick top-ups use (brand, last 4 digits, expiry), or null.","operationId":"getSavedCard","parameters":[{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"The saved card.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SavedCardResponse"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `AUTH-1002`: your role lacks the `billing.manage` permission. `API-8102`: the API key or app lacks the `wallet:read` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["wallet:read"]},{"oauth2":["wallet:read"]}],"summary":"Get the default card","tags":["wallet"]}},"/v1/wallet/cards":{"get":{"description":"The cards saved at Tap (brand, last 4 digits, expiry), the default first: auto top-up and quick top-ups use the default.","operationId":"listSavedCards","parameters":[{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"The saved cards.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SavedCardList"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `AUTH-1002`: your role lacks the `billing.manage` permission. `API-8102`: the API key or app lacks the `wallet:read` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["wallet:read"]},{"oauth2":["wallet:read"]}],"summary":"List the saved cards","tags":["wallet"]}},"/v1/wallet/cards/setups/{setupId}":{"get":{"description":"One Add card: its status, the card it saved, and why it failed (`WAL-1222`: Tap did not save the card; `WAL-1226`: not completed in time).","operationId":"getCardSetup","parameters":[{"name":"setupId","required":true,"in":"path","description":"The card setup id.","schema":{"type":"string","format":"uuid","description":"The card setup id."}},{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"The card setup.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CardSetup"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `AUTH-1002`: your role lacks the `billing.manage` permission. `API-8102`: the API key or app lacks the `wallet:read` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"`WAL-1225`: no such card setup.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["wallet:read"]},{"oauth2":["wallet:read"]}],"summary":"Get a card setup","tags":["wallet"]}},"/v1/wallet/cards/{cardId}/default":{"post":{"description":"Auto top-up and quick top-ups use the default card from now on; it also turns auto top-up back on after it was turned off for repeated failures.","operationId":"setDefaultCard","parameters":[{"name":"cardId","required":true,"in":"path","description":"The saved card id.","schema":{"type":"string","format":"uuid","description":"The saved card id."}},{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}},{"name":"Idempotency-Key","in":"header","description":"A unique key for this operation (e.g. a UUID, 1 to 255 visible characters), kept 24 hours: repeating the request with the same key returns the first answer (`Idempotent-Replayed: true`) instead of doing it again. Errors: `API-8109` (400) a key that is not valid, `API-8108` (409, retryable) the first request with this key is still running, `API-8107` (422) the key was used for a different request; `API-8118` (409) the first request created something whose secret is shown only once, so its answer is not repeated. An answer with `shown_once` repeats its secret within 10 minutes, then `API-8118`.","required":false,"schema":{"type":"string","minLength":1,"maxLength":255}}],"responses":{"200":{"description":"The saved card.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SavedCard"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `AUTH-1003`: your seat was deactivated (view only). `AUTH-1004`: all seats are inactive because the seat charge was not paid (view only). `AUTH-1002`: your role lacks the `billing.manage` permission. `API-8102`: the API key or app lacks the `wallet:write` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in. `API-8148`: not available to test keys (API test mode).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"`WAL-1223`: no such saved card.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["wallet:write"]},{"oauth2":["wallet:write"]}],"summary":"Make a saved card the default","tags":["wallet"]}},"/v1/wallet/cards/{cardId}":{"delete":{"description":"Deletes the card at Tap; Rabt keeps it as deleted in its history. Deleting the default card turns auto top-up off.","operationId":"deleteSavedCard","parameters":[{"name":"cardId","required":true,"in":"path","description":"The saved card id.","schema":{"type":"string","format":"uuid","description":"The saved card id."}},{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}}],"responses":{"204":{"description":"The card was deleted.","headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `AUTH-1003`: your seat was deactivated (view only). `AUTH-1004`: all seats are inactive because the seat charge was not paid (view only). `AUTH-1002`: your role lacks the `billing.manage` permission. `API-8102`: the API key or app lacks the `wallet:write` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in. `API-8148`: not available to test keys (API test mode).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"`WAL-1223`: no such saved card.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"502":{"description":"`WAL-1228`: Tap did not delete the card; it stays saved.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"503":{"description":"`SYS-1001`: card payments (Tap) are not set up on this Rabt server.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["wallet:write"]},{"oauth2":["wallet:write"]}],"summary":"Delete a saved card","tags":["wallet"]}},"/v1/wallet/auto-top-up":{"get":{"operationId":"getAutoTopUp","parameters":[{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"The settings and state.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AutoTopUp"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `AUTH-1002`: your role lacks the `billing.manage` permission. `API-8102`: the API key or app lacks the `wallet:read` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["wallet:read"]},{"oauth2":["wallet:read"]}],"summary":"Get the auto top-up settings","tags":["wallet"]},"put":{"description":"When the total balance falls below the threshold, the default saved card is charged the amount (a merchant-initiated charge), which must be at or above the threshold. Optional caps per day and month.","operationId":"updateAutoTopUp","parameters":[{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}},{"name":"Idempotency-Key","in":"header","description":"A unique key for this operation (e.g. a UUID, 1 to 255 visible characters), kept 24 hours: repeating the request with the same key returns the first answer (`Idempotent-Replayed: true`) instead of doing it again. Errors: `API-8109` (400) a key that is not valid, `API-8108` (409, retryable) the first request with this key is still running, `API-8107` (422) the key was used for a different request; `API-8118` (409) the first request created something whose secret is shown only once, so its answer is not repeated. An answer with `shown_once` repeats its secret within 10 minutes, then `API-8118`.","required":false,"schema":{"type":"string","minLength":1,"maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AutoTopUpUpdate"}}}},"responses":{"200":{"description":"The settings and state.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AutoTopUp"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `AUTH-1003`: your seat was deactivated (view only). `AUTH-1004`: all seats are inactive because the seat charge was not paid (view only). `AUTH-1002`: your role lacks the `billing.manage` permission. `API-8102`: the API key or app lacks the `wallet:write` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in. `API-8148`: not available to test keys (API test mode).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"409":{"description":"`WAL-1202`: turning it on needs a saved card.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"description":"`API-8001`: some fields are missing or not valid. `details.fields` lists each invalid field with its own code (e.g. `API-8002` required, `API-8012` wrong format). `WAL-1219`: the amount is below the threshold. `WAL-1201`: the amount is below the minimum of SAR 50.","headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["wallet:write"]},{"oauth2":["wallet:write"]}],"summary":"Change the auto top-up settings","tags":["wallet"]}},"/v1/wallet/receipt-vouchers":{"get":{"description":"One per confirmed top-up, newest first.","operationId":"listReceiptVouchers","parameters":[{"name":"cursor","required":false,"in":"query","description":"The `next_cursor` of the previous page.","schema":{"description":"The `next_cursor` of the previous page.","type":"string","minLength":1,"maxLength":200}},{"name":"page","required":false,"in":"query","description":"A numbered page to jump to, from 1, of `limit` rows: its first row must be within the first 10000 rows of the list. Ignored with `cursor`; the next pages follow `next_cursor`.","schema":{"description":"A numbered page to jump to, from 1, of `limit` rows: its first row must be within the first 10000 rows of the list. Ignored with `cursor`; the next pages follow `next_cursor`.","type":"integer","minimum":1,"maximum":10000}},{"name":"limit","required":false,"in":"query","description":"Items per page (1 to 100, default 50).","schema":{"default":50,"description":"Items per page (1 to 100, default 50).","type":"integer","minimum":1,"maximum":100}},{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"A page of vouchers.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReceiptVoucherList"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `AUTH-1002`: your role lacks the `billing.manage` permission. `API-8102`: the API key or app lacks the `wallet:read` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["wallet:read"]},{"oauth2":["wallet:read"]}],"summary":"List receipt vouchers","tags":["wallet"]}},"/v1/wallet/receipt-vouchers/{voucherId}":{"get":{"operationId":"getReceiptVoucher","parameters":[{"name":"voucherId","required":true,"in":"path","description":"The receipt voucher id.","schema":{"type":"string","format":"uuid","description":"The receipt voucher id."}},{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"The voucher.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReceiptVoucher"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `AUTH-1002`: your role lacks the `billing.manage` permission. `API-8102`: the API key or app lacks the `wallet:read` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"`WAL-1216`: no such receipt voucher.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["wallet:read"]},{"oauth2":["wallet:read"]}],"summary":"Get a receipt voucher","tags":["wallet"]}},"/v1/wallet/receipt-vouchers/{voucherId}/pdf":{"get":{"description":"The voucher as a PDF in Arabic and English on Rabt's document template (header and footer in the member's language). A failure to draw it is `SYS-1322`, never a partial file.","operationId":"getReceiptVoucherPdf","parameters":[{"name":"voucherId","required":true,"in":"path","description":"The receipt voucher id.","schema":{"type":"string","format":"uuid","description":"The receipt voucher id."}},{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"The PDF.","content":{"application/pdf":{"schema":{"type":"string","format":"binary"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `AUTH-1002`: your role lacks the `billing.manage` permission. `API-8102`: the API key or app lacks the `wallet:read` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"`WAL-1216`: no such receipt voucher.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"description":"`SYS-1322`: the PDF could not be drawn; no file was made.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["wallet:read"]},{"oauth2":["wallet:read"]}],"summary":"Download a receipt voucher (PDF)","tags":["wallet"]}},"/v1/wallet":{"get":{"description":"The prepaid balance in halalas: available now, held, and their total (docs/10).","operationId":"getWallet","parameters":[{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"The balance.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WalletBalance"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `AUTH-1002`: your role lacks the `billing.manage` permission. `API-8102`: the API key or app lacks the `wallet:read` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["wallet:read"]},{"oauth2":["wallet:read"]}],"summary":"Get the wallet balance","tags":["wallet"]}},"/v1/wallet/transactions":{"get":{"description":"The wallet's movements, newest first: top-ups, usage, seats and manual entries of the Rabt team (`adjustment`, with `manual_entry`), each with a readable `description` and its app `link`. `balance_after_minor` is the wallet's total money right after the movement (available plus anything still set aside), so each row's balance is the one before plus its amount. Money set aside for an action in progress is not a movement: only what it cost shows, as usage. `service` keeps only the usage of one paid service (X, AI, calls, or WhatsApp's past usage: Meta now bills the customer directly). Rabt has no refunds.","operationId":"listWalletTransactions","parameters":[{"name":"cursor","required":false,"in":"query","description":"The `next_cursor` of the previous page.","schema":{"description":"The `next_cursor` of the previous page.","type":"string","minLength":1,"maxLength":200}},{"name":"page","required":false,"in":"query","description":"A numbered page to jump to, from 1, of `limit` rows: its first row must be within the first 10000 rows of the list. Ignored with `cursor`; the next pages follow `next_cursor`.","schema":{"description":"A numbered page to jump to, from 1, of `limit` rows: its first row must be within the first 10000 rows of the list. Ignored with `cursor`; the next pages follow `next_cursor`.","type":"integer","minimum":1,"maximum":10000}},{"name":"limit","required":false,"in":"query","description":"Transactions per page (1 to 500, default 50).","schema":{"default":50,"description":"Transactions per page (1 to 500, default 50).","type":"integer","minimum":1,"maximum":500}},{"name":"type","required":false,"in":"query","description":"Only movements of this type: `top_up`, `usage_debit`, `seat_charge` or `adjustment`. `hold` and `hold_release` are refused (`WAL-1018`): holds are not shown to the organization.","schema":{"description":"Only movements of this type: `top_up`, `usage_debit`, `seat_charge` or `adjustment`. `hold` and `hold_release` are refused (`WAL-1018`): holds are not shown to the organization.","type":"string","enum":["top_up","usage_debit","seat_charge","adjustment","hold","hold_release"]}},{"name":"service","required":false,"in":"query","description":"Only the usage debits of one paid service: `x`, `ai`, `voice` (calls) or `whatsapp` (past debits: Meta now bills the customer directly). With `type`, both apply.","schema":{"description":"Only the usage debits of one paid service: `x`, `ai`, `voice` (calls) or `whatsapp` (past debits: Meta now bills the customer directly). With `type`, both apply.","type":"string","enum":["whatsapp","x","ai","voice"]}},{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"A page of transactions.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WalletTransactionPage"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`WAL-1006`: the cursor is not one this list returned.\n\n`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `AUTH-1002`: your role lacks the `billing.manage` permission. `API-8102`: the API key or app lacks the `wallet:read` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"description":"`API-8001`: some fields are missing or not valid. `details.fields` lists each invalid field with its own code (e.g. `API-8002` required, `API-8012` wrong format). `WAL-1018`: holds are not shown to the organization (`type`).","headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["wallet:read"]},{"oauth2":["wallet:read"]}],"summary":"List the wallet's transactions","tags":["wallet"]}},"/v1/wallet/transactions/export":{"get":{"description":"The wallet's movements of a period (default: all of it), newest first, in the member's language (UTF-8): date (UTC), type, manual entry number, description (what each row is for), reference, amount and balance after (the wallet's total money right after the movement), in SAR with two decimals: the same rows as the list, with the same `type` and `service` filters. A hold type is refused (`WAL-1018`). At most 100,000 rows: choose a shorter period beyond that.","operationId":"exportWalletTransactions","parameters":[{"name":"from","required":false,"in":"query","description":"Transactions whose event time is at or after this (ISO 8601).","schema":{"description":"Transactions whose event time is at or after this (ISO 8601).","type":"string","format":"date-time"}},{"name":"to","required":false,"in":"query","description":"Transactions whose event time is before this (ISO 8601).","schema":{"description":"Transactions whose event time is before this (ISO 8601).","type":"string","format":"date-time"}},{"name":"type","required":false,"in":"query","description":"Only movements of this type: `top_up`, `usage_debit`, `seat_charge` or `adjustment`. `hold` and `hold_release` are refused (`WAL-1018`): holds are not shown to the organization.","schema":{"description":"Only movements of this type: `top_up`, `usage_debit`, `seat_charge` or `adjustment`. `hold` and `hold_release` are refused (`WAL-1018`): holds are not shown to the organization.","type":"string","enum":["top_up","usage_debit","seat_charge","adjustment","hold","hold_release"]}},{"name":"service","required":false,"in":"query","description":"Only the usage debits of one paid service: `x`, `ai`, `voice` (calls) or `whatsapp` (past debits: Meta now bills the customer directly). With `type`, both apply.","schema":{"description":"Only the usage debits of one paid service: `x`, `ai`, `voice` (calls) or `whatsapp` (past debits: Meta now bills the customer directly). With `type`, both apply.","type":"string","enum":["whatsapp","x","ai","voice"]}},{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"The CSV.","content":{"text/csv":{"schema":{"type":"string"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `AUTH-1002`: your role lacks the `billing.manage` permission. `API-8102`: the API key or app lacks the `wallet:read` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"description":"`API-8001`: some fields are missing or not valid. `details.fields` lists each invalid field with its own code (e.g. `API-8002` required, `API-8012` wrong format). `WAL-1006`: `from` is not before `to`. `WAL-1017`: more rows than one file holds. `WAL-1018`: holds are not shown to the organization (`type`).","headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["wallet:read"]},{"oauth2":["wallet:read"]}],"summary":"Export the wallet's transactions (CSV)","tags":["wallet"]}},"/v1/pricing/quotes":{"post":{"description":"What usage costs at the current prices (or at a future time, as an estimate), line by line, in halalas; AI units (`ai_unit`) at their approximate averages. Nothing is charged.","operationId":"quotePrices","parameters":[{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/QuoteRequest"}}}},"responses":{"200":{"description":"The quote.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PriceQuote"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `API-8102`: the API key or app lacks the `pricing:read` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"`WAL-1101`: an item has no price. `WAL-1102`: no rate card is in effect.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"description":"`API-8001`: some fields are missing or not valid. `details.fields` lists each invalid field with its own code (e.g. `API-8002` required, `API-8012` wrong format). `WAL-1118`: a WhatsApp item: Meta bills the customer directly and Rabt charges nothing.","headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["pricing:read"]},{"oauth2":["pricing:read"]}],"summary":"Get a price quote","tags":["wallet"]}},"/v1/pricing/price-list":{"get":{"description":"The seat price per month and the free trial of new organizations, every usage price of the published rate card in effect (X, SMS, voice; WhatsApp has none: Meta bills the customer directly), and the approximate price of each AI unit (`ai_units`: AI is charged by actual usage), in halalas, VAT included (owner decision PRICE01), the same prices every organization pays. Public: no sign-in needed.","operationId":"getPriceList","parameters":[],"responses":{"200":{"description":"The price list.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PriceList"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"summary":"Get the price list","tags":["wallet"]}},"/v1/reports/messages":{"get":{"description":"Customer and member messages of the tickets you may see (no Spam or imported history): count and failed, by direction, channel, space, member (sender) or sender_type. `from` (inclusive) to `to` (exclusive), at most 366 days, counted on the server in one call. Rows: without `interval` one row per group (the 100 largest, the rest in one `other: true` row); with `interval` (`day`, `week` from Monday, `month`; UTC; `bucket` is its first date) every bucket, zeros included, or with `group_by` the 10 largest groups' rows of each bucket plus one `other: true` row summing the rest. Every metric adds up across rows.","operationId":"aggregateMessages","parameters":[{"name":"from","required":true,"in":"query","description":"The period’s start, ISO 8601 UTC (inclusive).","schema":{"type":"string","format":"date-time","description":"The period’s start, ISO 8601 UTC (inclusive)."}},{"name":"to","required":true,"in":"query","description":"The period’s end, ISO 8601 UTC (exclusive): after `from`, at most 366 days later (EXP-6509).","schema":{"type":"string","format":"date-time","description":"The period’s end, ISO 8601 UTC (exclusive): after `from`, at most 366 days later (EXP-6509)."}},{"name":"interval","required":false,"in":"query","description":"Buckets of time: `none` (default), `day`, `week` or `month`.","schema":{"default":"none","description":"Buckets of time: `none` (default), `day`, `week` or `month`.","type":"string","enum":["none","day","week","month"]}},{"name":"group_by","required":false,"in":"query","description":"How to group (default `none`): none, direction, channel, space, member, sender_type.","schema":{"default":"none","description":"How to group (default `none`): none, direction, channel, space, member, sender_type.","type":"string","enum":["none","direction","channel","space","member","sender_type"]}},{"name":"direction","required":false,"in":"query","description":"Only this direction.","schema":{"description":"Only this direction.","type":"string","enum":["inbound","outbound"]}},{"name":"channel_type","required":false,"in":"query","description":"Only this channel.","schema":{"description":"Only this channel.","$ref":"#/components/schemas/ChannelType"}},{"name":"space_id","required":false,"in":"query","description":"A department space, or `none` for tickets in no department space.","schema":{"description":"A department space, or `none` for tickets in no department space.","type":"string","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}|none)$"}},{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"The aggregate.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MessageReport"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`API-8001` with `EXP-6509` on `to`: an empty period or one over a year.\n\n`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `API-8102`: the API key or app lacks the `tickets:read` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["tickets:read"]},{"oauth2":["tickets:read"]}],"summary":"Message counts of a period","tags":["tickets"]}},"/v1/reports/calls":{"get":{"description":"The calls you may see, at their start: count, answered, duration seconds, billed minutes and charged halalas, by direction, status, end_reason, member or space. `from` (inclusive) to `to` (exclusive), at most 366 days, counted on the server in one call. Rows: without `interval` one row per group (the 100 largest, the rest in one `other: true` row); with `interval` (`day`, `week` from Monday, `month`; UTC; `bucket` is its first date) every bucket, zeros included, or with `group_by` the 10 largest groups' rows of each bucket plus one `other: true` row summing the rest. Every metric adds up across rows.","operationId":"aggregateCalls","parameters":[{"name":"from","required":true,"in":"query","description":"The period’s start, ISO 8601 UTC (inclusive).","schema":{"type":"string","format":"date-time","description":"The period’s start, ISO 8601 UTC (inclusive)."}},{"name":"to","required":true,"in":"query","description":"The period’s end, ISO 8601 UTC (exclusive): after `from`, at most 366 days later (EXP-6509).","schema":{"type":"string","format":"date-time","description":"The period’s end, ISO 8601 UTC (exclusive): after `from`, at most 366 days later (EXP-6509)."}},{"name":"interval","required":false,"in":"query","description":"Buckets of time: `none` (default), `day`, `week` or `month`.","schema":{"default":"none","description":"Buckets of time: `none` (default), `day`, `week` or `month`.","type":"string","enum":["none","day","week","month"]}},{"name":"group_by","required":false,"in":"query","description":"How to group (default `none`): none, direction, status, end_reason, member, space.","schema":{"default":"none","description":"How to group (default `none`): none, direction, status, end_reason, member, space.","type":"string","enum":["none","direction","status","end_reason","member","space"]}},{"name":"direction","required":false,"in":"query","description":"Only this direction.","schema":{"description":"Only this direction.","type":"string","enum":["inbound","outbound"]}},{"name":"phone_number_id","required":false,"in":"query","description":"Only calls of this number of the organization.","schema":{"description":"Only calls of this number of the organization.","type":"string","format":"uuid"}},{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"The aggregate.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CallReport"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`API-8001` with `EXP-6509` on `to`: an empty period or one over a year.\n\n`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `API-8102`: the API key or app lacks the `voice:read` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["voice:read"]},{"oauth2":["voice:read"]}],"summary":"Call counts of a period","tags":["voice"]}},"/v1/reports/campaigns":{"get":{"description":"Campaign recipients sent, delivered, read, failed, replied and opted out (each at its own time) and the cost in halalas, by campaign or channel. `from` (inclusive) to `to` (exclusive), at most 366 days, counted on the server in one call. Rows: without `interval` one row per group (the 100 largest, the rest in one `other: true` row); with `interval` (`day`, `week` from Monday, `month`; UTC; `bucket` is its first date) every bucket, zeros included, or with `group_by` the 10 largest groups' rows of each bucket plus one `other: true` row summing the rest. Every metric adds up across rows.","operationId":"aggregateCampaigns","parameters":[{"name":"from","required":true,"in":"query","description":"The period’s start, ISO 8601 UTC (inclusive).","schema":{"type":"string","format":"date-time","description":"The period’s start, ISO 8601 UTC (inclusive)."}},{"name":"to","required":true,"in":"query","description":"The period’s end, ISO 8601 UTC (exclusive): after `from`, at most 366 days later (EXP-6509).","schema":{"type":"string","format":"date-time","description":"The period’s end, ISO 8601 UTC (exclusive): after `from`, at most 366 days later (EXP-6509)."}},{"name":"interval","required":false,"in":"query","description":"Buckets of time: `none` (default), `day`, `week` or `month`.","schema":{"default":"none","description":"Buckets of time: `none` (default), `day`, `week` or `month`.","type":"string","enum":["none","day","week","month"]}},{"name":"group_by","required":false,"in":"query","description":"How to group (default `none`): none, campaign, channel.","schema":{"default":"none","description":"How to group (default `none`): none, campaign, channel.","type":"string","enum":["none","campaign","channel"]}},{"name":"campaign_id","required":false,"in":"query","description":"Only this campaign.","schema":{"description":"Only this campaign.","type":"string","format":"uuid"}},{"name":"channel_type","required":false,"in":"query","description":"Only campaigns on this channel.","schema":{"description":"Only campaigns on this channel.","type":"string","enum":["whatsapp","sms","voice","email","whatsapp_web"]}},{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"The aggregate.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CampaignReport"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`API-8001` with `EXP-6509` on `to`: an empty period or one over a year.\n\n`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `AUTH-1002`: your role lacks the `campaigns.manage` permission. `API-8102`: the API key or app lacks the `campaigns:read` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["campaigns:read"]},{"oauth2":["campaigns:read"]}],"summary":"Campaign results of a period","tags":["campaigns"]}},"/v1/reports/wallet":{"get":{"description":"The wallet’s transactions (holds left out unless `type` names them): count and signed amount, net and VAT in halalas, by type or paid_path. `from` (inclusive) to `to` (exclusive), at most 366 days, counted on the server in one call. Rows: without `interval` one row per group (the 100 largest, the rest in one `other: true` row); with `interval` (`day`, `week` from Monday, `month`; UTC; `bucket` is its first date) every bucket, zeros included, or with `group_by` the 10 largest groups' rows of each bucket plus one `other: true` row summing the rest. Every metric adds up across rows.","operationId":"aggregateWallet","parameters":[{"name":"from","required":true,"in":"query","description":"The period’s start, ISO 8601 UTC (inclusive).","schema":{"type":"string","format":"date-time","description":"The period’s start, ISO 8601 UTC (inclusive)."}},{"name":"to","required":true,"in":"query","description":"The period’s end, ISO 8601 UTC (exclusive): after `from`, at most 366 days later (EXP-6509).","schema":{"type":"string","format":"date-time","description":"The period’s end, ISO 8601 UTC (exclusive): after `from`, at most 366 days later (EXP-6509)."}},{"name":"interval","required":false,"in":"query","description":"Buckets of time: `none` (default), `day`, `week` or `month`.","schema":{"default":"none","description":"Buckets of time: `none` (default), `day`, `week` or `month`.","type":"string","enum":["none","day","week","month"]}},{"name":"group_by","required":false,"in":"query","description":"How to group (default `none`): none, type, paid_path.","schema":{"default":"none","description":"How to group (default `none`): none, type, paid_path.","type":"string","enum":["none","type","paid_path"]}},{"name":"type","required":false,"in":"query","description":"Only these transaction types, comma-separated (default: every type but holds).","schema":{"description":"Only these transaction types, comma-separated (default: every type but holds).","type":"string"}},{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"The aggregate.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WalletReport"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`API-8001` with `EXP-6509` on `to`: an empty period or one over a year.\n\n`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `AUTH-1002`: your role lacks the `billing.manage` permission. `API-8102`: the API key or app lacks the `wallet:read` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["wallet:read"]},{"oauth2":["wallet:read"]}],"summary":"Wallet usage of a period","tags":["wallet"]}},"/v1/reports/contacts":{"get":{"description":"Live contacts created (not deleted or merged), by last_channel. `from` (inclusive) to `to` (exclusive), at most 366 days, counted on the server in one call. Rows: without `interval` one row per group (the 100 largest, the rest in one `other: true` row); with `interval` (`day`, `week` from Monday, `month`; UTC; `bucket` is its first date) every bucket, zeros included, or with `group_by` the 10 largest groups' rows of each bucket plus one `other: true` row summing the rest. Every metric adds up across rows.","operationId":"aggregateContacts","parameters":[{"name":"from","required":true,"in":"query","description":"The period’s start, ISO 8601 UTC (inclusive).","schema":{"type":"string","format":"date-time","description":"The period’s start, ISO 8601 UTC (inclusive)."}},{"name":"to","required":true,"in":"query","description":"The period’s end, ISO 8601 UTC (exclusive): after `from`, at most 366 days later (EXP-6509).","schema":{"type":"string","format":"date-time","description":"The period’s end, ISO 8601 UTC (exclusive): after `from`, at most 366 days later (EXP-6509)."}},{"name":"interval","required":false,"in":"query","description":"Buckets of time: `none` (default), `day`, `week` or `month`.","schema":{"default":"none","description":"Buckets of time: `none` (default), `day`, `week` or `month`.","type":"string","enum":["none","day","week","month"]}},{"name":"group_by","required":false,"in":"query","description":"How to group (default `none`): none, last_channel.","schema":{"default":"none","description":"How to group (default `none`): none, last_channel.","type":"string","enum":["none","last_channel"]}},{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"The aggregate.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContactReport"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`API-8001` with `EXP-6509` on `to`: an empty period or one over a year.\n\n`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `API-8102`: the API key or app lacks the `contacts:read` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["contacts:read"]},{"oauth2":["contacts:read"]}],"summary":"Contacts created in a period","tags":["contacts"]}},"/v1/data-exports":{"post":{"description":"Writes every row of a list (tickets, messages, contacts, companies, calls, campaign recipients, wallet transactions or the audit log), optionally of a period, to a CSV or NDJSON file in the background; follow it with `GET /v1/data-exports/{id}`. What is in a file is what the member may see: each kind needs its list's scope (tickets tickets:read, messages tickets:read, contacts contacts:read, companies companies:read, calls voice:read, campaign_recipients campaigns:read, wallet_transactions wallet:read, audit_log audit:read) and permission (contacts and companies `contacts.import_export`, campaign_recipients `campaigns.manage`, wallet_transactions `billing.manage`, audit_log `audit.view`), tickets, messages and calls only those the member may see. At most 2 are written at once per organization; the others wait in order. A completed file is kept 24 hours, for the member who asked only: a download link valid 5 minutes, or its parts (each at most 80,000 characters as JSON, cut between rows, a longer row continued in the next; a CSV's header in part 1). A member has at most 5 waiting or running (EXP-6515); a file holds at most 1,000,000 rows (EXP-6514). Personal keys and apps only (API-8190).","operationId":"exportData","parameters":[{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}},{"name":"Idempotency-Key","in":"header","description":"A unique key for this operation (e.g. a UUID, 1 to 255 visible characters), kept 24 hours: repeating the request with the same key returns the first answer (`Idempotent-Replayed: true`) instead of doing it again. Errors: `API-8109` (400) a key that is not valid, `API-8108` (409, retryable) the first request with this key is still running, `API-8107` (422) the key was used for a different request; `API-8118` (409) the first request created something whose secret is shown only once, so its answer is not repeated. An answer with `shown_once` repeats its secret within 10 minutes, then `API-8118`.","required":false,"schema":{"type":"string","minLength":1,"maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"kind":{"type":"string","enum":["tickets","messages","contacts","companies","calls","campaign_recipients","wallet_transactions","audit_log"],"description":"What to export."},"format":{"default":"csv","description":"`csv` (default, UTF-8 with a byte order mark) or `ndjson` (one JSON object a line).","type":"string","enum":["csv","ndjson"]},"from":{"description":"Only rows from this time (ISO 8601 UTC, inclusive): created, sent, started or recorded.","type":"string","format":"date-time"},"to":{"description":"Only rows before this time (ISO 8601 UTC, exclusive).","type":"string","format":"date-time"},"campaign_id":{"description":"campaign_recipients: only this campaign.","type":"string","format":"uuid"}},"required":["kind"]}}}},"responses":{"202":{"description":"The export, queued.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DataExport"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1002`: the kind’s permission. `API-8102`: the kind’s scope.\n\n`AUTH-1040`: you are not a member of the organization named. `AUTH-1003`: your seat was deactivated (view only). `AUTH-1004`: all seats are inactive because the seat charge was not paid (view only). `API-8102`: the API key or app lacks the `imports_exports:write` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in. `API-8190`: an organization key acts as no member and asks for or reads no export file.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["imports_exports:write"]},{"oauth2":["imports_exports:write"]}],"summary":"Export a whole list to a file","tags":["imports-exports"]},"get":{"description":"Your own export files, newest first.","operationId":"listDataExports","parameters":[{"name":"cursor","required":false,"in":"query","description":"The next_cursor of the previous page.","schema":{"description":"The next_cursor of the previous page.","type":"string","format":"uuid"}},{"name":"limit","required":false,"in":"query","schema":{"default":20,"type":"integer","minimum":1,"maximum":100}},{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"A page of exports.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DataExportPage"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `API-8102`: the API key or app lacks the `imports_exports:read` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in. `API-8190`: an organization key acts as no member and asks for or reads no export file.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["imports_exports:read"]},{"oauth2":["imports_exports:read"]}],"summary":"List your export files","tags":["imports-exports"]}},"/v1/data-exports/{exportId}":{"get":{"description":"Its status, rows, parts and when its file is removed.","operationId":"getDataExport","parameters":[{"name":"exportId","required":true,"in":"path","description":"The export’s id.","schema":{"type":"string","format":"uuid","description":"The export’s id."}},{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"The export.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DataExport"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `API-8102`: the API key or app lacks the `imports_exports:read` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in. `API-8190`: an organization key acts as no member and asks for or reads no export file.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"`EXP-6510`: you have no export with this id in this organization.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["imports_exports:read"]},{"oauth2":["imports_exports:read"]}],"summary":"Get an export file’s state","tags":["imports-exports"]}},"/v1/data-exports/{exportId}/download":{"get":{"description":"A signed link to the whole file of a completed export, for the member who asked. What is in a file is what the member may see: each kind needs its list's scope (tickets tickets:read, messages tickets:read, contacts contacts:read, companies companies:read, calls voice:read, campaign_recipients campaigns:read, wallet_transactions wallet:read, audit_log audit:read) and permission (contacts and companies `contacts.import_export`, campaign_recipients `campaigns.manage`, wallet_transactions `billing.manage`, audit_log `audit.view`), tickets, messages and calls only those the member may see. At most 2 are written at once per organization; the others wait in order. A completed file is kept 24 hours, for the member who asked only: a download link valid 5 minutes, or its parts (each at most 80,000 characters as JSON, cut between rows, a longer row continued in the next; a CSV's header in part 1). A member has at most 5 waiting or running (EXP-6515); a file holds at most 1,000,000 rows (EXP-6514). Personal keys and apps only (API-8190).","operationId":"downloadDataExport","parameters":[{"name":"exportId","required":true,"in":"path","description":"The export’s id.","schema":{"type":"string","format":"uuid","description":"The export’s id."}},{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"The link.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DataExportDownload"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `API-8102`: the API key or app lacks the `imports_exports:read` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in. `API-8190`: an organization key acts as no member and asks for or reads no export file.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"`EXP-6510`: you have no export with this id in this organization.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"409":{"description":"`EXP-6511`: not completed yet (or failed).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"410":{"description":"`EXP-6512`: no longer kept. `EXP-6513`: removed after an erasure of personal data.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["imports_exports:read"]},{"oauth2":["imports_exports:read"]}],"summary":"Get a link to an export file","tags":["imports-exports"]}},"/v1/data-exports/{exportId}/parts/{part}":{"get":{"description":"The rows of a completed export, part by part from 1 until `next_part` is null (a row longer than a part continues in the next).","operationId":"readDataExport","parameters":[{"name":"exportId","required":true,"in":"path","description":"The export’s id.","schema":{"type":"string","format":"uuid","description":"The export’s id."}},{"name":"part","required":true,"in":"path","description":"The part, from 1 (the export says `parts`).","schema":{"type":"integer","minimum":1,"maximum":9007199254740991,"description":"The part, from 1 (the export says `parts`)."}},{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"The part.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DataExportPart"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `API-8102`: the API key or app lacks the `imports_exports:read` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in. `API-8190`: an organization key acts as no member and asks for or reads no export file.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"`EXP-6510`: you have no export with this id in this organization.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"409":{"description":"`EXP-6511`: not completed yet (or failed).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"410":{"description":"`EXP-6512`: no longer kept. `EXP-6513`: removed after an erasure of personal data.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["imports_exports:read"]},{"oauth2":["imports_exports:read"]}],"summary":"Read one part of an export file","tags":["imports-exports"]}},"/v1/contacts":{"get":{"description":"The live contacts (not merged or deleted), each with its `activity` (open and closed tickets you may see, notes) and `last_activity_at`. `q` searches names, phone numbers (any form), email addresses, usernames and companies, Arabic-aware; exact phone or email matches come first. `sort=last_activity` orders by latest activity; `active_within_days` narrows to recent ones.","operationId":"listContacts","parameters":[{"name":"q","required":false,"in":"query","description":"Free text, Arabic-aware (hamza, ta marbuta, diacritics, tatweel and Arabic-Indic digits do not matter).","schema":{"description":"Free text, Arabic-aware (hamza, ta marbuta, diacritics, tatweel and Arabic-Indic digits do not matter).","type":"string","maxLength":200}},{"name":"company_id","required":false,"in":"query","description":"Only contacts of this company.","schema":{"description":"Only contacts of this company.","type":"string","format":"uuid"}},{"name":"channel_type","required":false,"in":"query","description":"Only contacts with an identity on this channel.","schema":{"description":"Only contacts with an identity on this channel.","$ref":"#/components/schemas/ChannelType"}},{"name":"active_within_days","required":false,"in":"query","description":"Only contacts active in the last N days (1 to 3650): on `channel_type` when given, else on any channel.","schema":{"description":"Only contacts active in the last N days (1 to 3650): on `channel_type` when given, else on any channel.","type":"integer","minimum":1,"maximum":3650}},{"name":"updated_since","required":false,"in":"query","description":"Only contacts changed at or after this time (ISO 8601).","schema":{"description":"Only contacts changed at or after this time (ISO 8601).","type":"string","format":"date-time"}},{"name":"sort","required":false,"in":"query","description":"Without `q`: `newest` created first (default) or `last_activity`, the latest activity on any channel first (never active last). With `q`: best match first.","schema":{"description":"Without `q`: `newest` created first (default) or `last_activity`, the latest activity on any channel first (never active last). With `q`: best match first.","type":"string","enum":["newest","last_activity"]}},{"name":"cursor","required":false,"in":"query","description":"The `next_cursor` of the previous page.","schema":{"description":"The `next_cursor` of the previous page.","type":"string","maxLength":200,"pattern":"^[A-Za-z0-9_-]+$"}},{"name":"page","required":false,"in":"query","description":"A numbered page to jump to, from 1, of `limit` rows: its first row must be within the first 10000 rows of the list. Ignored with `cursor`; the next pages follow `next_cursor`.","schema":{"description":"A numbered page to jump to, from 1, of `limit` rows: its first row must be within the first 10000 rows of the list. Ignored with `cursor`; the next pages follow `next_cursor`.","type":"integer","minimum":1,"maximum":10000}},{"name":"limit","required":false,"in":"query","description":"Records per page (1 to 500, default 25).","schema":{"default":25,"description":"Records per page (1 to 500, default 25).","type":"integer","minimum":1,"maximum":500}},{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"A page of contacts.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContactPage"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `API-8102`: the API key or app lacks the `contacts:read` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["contacts:read"]},{"oauth2":["contacts:read"]}],"summary":"List and search contacts","tags":["contacts"]},"post":{"description":"Phone numbers are read with the organization's default country and stored as E.164. A contact with an address at a company's domain is linked to it (when the organization has it on).","operationId":"createContact","parameters":[{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}},{"name":"Idempotency-Key","in":"header","description":"A unique key for this operation (e.g. a UUID, 1 to 255 visible characters), kept 24 hours: repeating the request with the same key returns the first answer (`Idempotent-Replayed: true`) instead of doing it again. Errors: `API-8109` (400) a key that is not valid, `API-8108` (409, retryable) the first request with this key is still running, `API-8107` (422) the key was used for a different request; `API-8118` (409) the first request created something whose secret is shown only once, so its answer is not repeated. An answer with `shown_once` repeats its secret within 10 minutes, then `API-8118`.","required":false,"schema":{"type":"string","minLength":1,"maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateContact"}}}},"responses":{"200":{"description":"With `if_exists: return`: the contact that already has the values, unchanged.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Contact"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"201":{"description":"The contact.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Contact"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `AUTH-1003`: your seat was deactivated (view only). `AUTH-1004`: all seats are inactive because the seat charge was not paid (view only). `AUTH-1002`: your role lacks the `contacts.edit` permission. `API-8102`: the API key or app lacks the `contacts:write` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"409":{"description":"`CRM-6003`: the phone number belongs to another contact. `CRM-6004`: the email address belongs to another contact. Both name it in `existing_contact_id` and `existing_contact_name`.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"description":"`API-8001`: some fields are missing or not valid. `details.fields` lists each invalid field with its own code (e.g. `API-8002` required, `API-8012` wrong format). `CRM-6024`: a name, phone number or email address is needed. `CRM-6005`: the phone number is not valid.","headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["contacts:write"]},{"oauth2":["contacts:write"]}],"summary":"Create a contact","tags":["contacts"]}},"/v1/contacts/{contactId}":{"get":{"description":"The id of a merged contact gives the contact it was merged into.","operationId":"getContact","parameters":[{"name":"contactId","required":true,"in":"path","description":"The contact id.","schema":{"type":"string","format":"uuid","description":"The contact id."}},{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"The contact.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Contact"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `API-8102`: the API key or app lacks the `contacts:read` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"`CRM-6001`: no such contact (or it was deleted).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["contacts:read"]},{"oauth2":["contacts:read"]}],"summary":"Get a contact","tags":["contacts"]},"patch":{"operationId":"updateContact","parameters":[{"name":"contactId","required":true,"in":"path","description":"The contact id.","schema":{"type":"string","format":"uuid","description":"The contact id."}},{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}},{"name":"Idempotency-Key","in":"header","description":"A unique key for this operation (e.g. a UUID, 1 to 255 visible characters), kept 24 hours: repeating the request with the same key returns the first answer (`Idempotent-Replayed: true`) instead of doing it again. Errors: `API-8109` (400) a key that is not valid, `API-8108` (409, retryable) the first request with this key is still running, `API-8107` (422) the key was used for a different request; `API-8118` (409) the first request created something whose secret is shown only once, so its answer is not repeated. An answer with `shown_once` repeats its secret within 10 minutes, then `API-8118`.","required":false,"schema":{"type":"string","minLength":1,"maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateContact"}}}},"responses":{"200":{"description":"The contact.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Contact"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `AUTH-1003`: your seat was deactivated (view only). `AUTH-1004`: all seats are inactive because the seat charge was not paid (view only). `AUTH-1002`: your role lacks the `contacts.edit` permission. `API-8102`: the API key or app lacks the `contacts:write` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"`CRM-6001`: no such contact (or it was deleted).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["contacts:write"]},{"oauth2":["contacts:write"]}],"summary":"Edit a contact","tags":["contacts"]},"delete":{"description":"The contact page's Delete: the same request as `POST /v1/contacts/{id}/erasure` (a reason and `confirm: true`). The contact goes to the trash now; when the organization's restore window ends its personal data is erased for good, while its tickets, their timeline and counts, ledger and audit entries stay. A restore inside the window withdraws it; asking again returns the request under way. Sent as the `contact.erasure_requested` webhook.","operationId":"deleteContact","parameters":[{"name":"contactId","required":true,"in":"path","description":"The contact id.","schema":{"type":"string","format":"uuid","description":"The contact id."}},{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}},{"name":"Idempotency-Key","in":"header","description":"A unique key for this operation (e.g. a UUID, 1 to 255 visible characters), kept 24 hours: repeating the request with the same key returns the first answer (`Idempotent-Replayed: true`) instead of doing it again. Errors: `API-8109` (400) a key that is not valid, `API-8108` (409, retryable) the first request with this key is still running, `API-8107` (422) the key was used for a different request; `API-8118` (409) the first request created something whose secret is shown only once, so its answer is not repeated. An answer with `shown_once` repeats its secret within 10 minutes, then `API-8118`.","required":false,"schema":{"type":"string","minLength":1,"maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RequestContactErasure"}}}},"responses":{"202":{"description":"The erasure request, scheduled for the end of the window.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContactErasure"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `AUTH-1003`: your seat was deactivated (view only). `AUTH-1004`: all seats are inactive because the seat charge was not paid (view only). `AUTH-1002`: your role lacks the `contacts.delete` permission. `API-8102`: the API key or app lacks the `erasure:write` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"`CRM-6001`: no such contact.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"409":{"description":"`CRM-6048`: the contact was already erased.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["erasure:write"]},{"oauth2":["erasure:write"]}],"summary":"Delete a contact","tags":["contacts"]}},"/v1/contacts/{contactId}/phones":{"post":{"operationId":"addContactPhone","parameters":[{"name":"contactId","required":true,"in":"path","description":"The contact id.","schema":{"type":"string","format":"uuid","description":"The contact id."}},{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}},{"name":"Idempotency-Key","in":"header","description":"A unique key for this operation (e.g. a UUID, 1 to 255 visible characters), kept 24 hours: repeating the request with the same key returns the first answer (`Idempotent-Replayed: true`) instead of doing it again. Errors: `API-8109` (400) a key that is not valid, `API-8108` (409, retryable) the first request with this key is still running, `API-8107` (422) the key was used for a different request; `API-8118` (409) the first request created something whose secret is shown only once, so its answer is not repeated. An answer with `shown_once` repeats its secret within 10 minutes, then `API-8118`.","required":false,"schema":{"type":"string","minLength":1,"maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContactPhoneInput"}}}},"responses":{"201":{"description":"The contact.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Contact"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `AUTH-1003`: your seat was deactivated (view only). `AUTH-1004`: all seats are inactive because the seat charge was not paid (view only). `AUTH-1002`: your role lacks the `contacts.edit` permission. `API-8102`: the API key or app lacks the `contacts:write` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"`CRM-6001`: no such contact (or it was deleted).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"409":{"description":"`CRM-6003`: the phone number belongs to another contact. `CRM-6004`: the email address belongs to another contact. Both name it in `existing_contact_id` and `existing_contact_name`.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"description":"`API-8001`: some fields are missing or not valid. `details.fields` lists each invalid field with its own code (e.g. `API-8002` required, `API-8012` wrong format). `CRM-6005`: the phone number is not valid.","headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["contacts:write"]},{"oauth2":["contacts:write"]}],"summary":"Add a phone number to a contact","tags":["contacts"]}},"/v1/contacts/{contactId}/phones/{phoneId}":{"patch":{"operationId":"updateContactPhone","parameters":[{"name":"contactId","required":true,"in":"path","description":"The contact id.","schema":{"type":"string","format":"uuid","description":"The contact id."}},{"name":"phoneId","required":true,"in":"path","description":"The phone number: its id, or the number itself in E.164 (`+9665…`).","schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"string","pattern":"^[+][1-9][0-9]{1,14}$"}],"description":"The phone number: its id, or the number itself in E.164 (`+9665…`)."}},{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}},{"name":"Idempotency-Key","in":"header","description":"A unique key for this operation (e.g. a UUID, 1 to 255 visible characters), kept 24 hours: repeating the request with the same key returns the first answer (`Idempotent-Replayed: true`) instead of doing it again. Errors: `API-8109` (400) a key that is not valid, `API-8108` (409, retryable) the first request with this key is still running, `API-8107` (422) the key was used for a different request; `API-8118` (409) the first request created something whose secret is shown only once, so its answer is not repeated. An answer with `shown_once` repeats its secret within 10 minutes, then `API-8118`.","required":false,"schema":{"type":"string","minLength":1,"maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContactDetailUpdate"}}}},"responses":{"200":{"description":"The contact.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Contact"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `AUTH-1003`: your seat was deactivated (view only). `AUTH-1004`: all seats are inactive because the seat charge was not paid (view only). `AUTH-1002`: your role lacks the `contacts.edit` permission. `API-8102`: the API key or app lacks the `contacts:write` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"`CRM-6001`: no such contact (or it was deleted). `CRM-6022`: the contact has no such phone number or email address.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["contacts:write"]},{"oauth2":["contacts:write"]}],"summary":"Change the label of a phone number, or make it primary","tags":["contacts"]},"delete":{"description":"Messages and calls from the number no longer match the contact by it.","operationId":"removeContactPhone","parameters":[{"name":"contactId","required":true,"in":"path","description":"The contact id.","schema":{"type":"string","format":"uuid","description":"The contact id."}},{"name":"phoneId","required":true,"in":"path","description":"The phone number: its id, or the number itself in E.164 (`+9665…`).","schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"string","pattern":"^[+][1-9][0-9]{1,14}$"}],"description":"The phone number: its id, or the number itself in E.164 (`+9665…`)."}},{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"The contact.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Contact"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `AUTH-1003`: your seat was deactivated (view only). `AUTH-1004`: all seats are inactive because the seat charge was not paid (view only). `AUTH-1002`: your role lacks the `contacts.edit` permission. `API-8102`: the API key or app lacks the `contacts:write` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"`CRM-6001`: no such contact (or it was deleted). `CRM-6022`: the contact has no such phone number or email address.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["contacts:write"]},{"oauth2":["contacts:write"]}],"summary":"Remove a phone number from a contact","tags":["contacts"]}},"/v1/contacts/{contactId}/emails":{"post":{"operationId":"addContactEmail","parameters":[{"name":"contactId","required":true,"in":"path","description":"The contact id.","schema":{"type":"string","format":"uuid","description":"The contact id."}},{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}},{"name":"Idempotency-Key","in":"header","description":"A unique key for this operation (e.g. a UUID, 1 to 255 visible characters), kept 24 hours: repeating the request with the same key returns the first answer (`Idempotent-Replayed: true`) instead of doing it again. Errors: `API-8109` (400) a key that is not valid, `API-8108` (409, retryable) the first request with this key is still running, `API-8107` (422) the key was used for a different request; `API-8118` (409) the first request created something whose secret is shown only once, so its answer is not repeated. An answer with `shown_once` repeats its secret within 10 minutes, then `API-8118`.","required":false,"schema":{"type":"string","minLength":1,"maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContactEmailInput"}}}},"responses":{"201":{"description":"The contact.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Contact"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `AUTH-1003`: your seat was deactivated (view only). `AUTH-1004`: all seats are inactive because the seat charge was not paid (view only). `AUTH-1002`: your role lacks the `contacts.edit` permission. `API-8102`: the API key or app lacks the `contacts:write` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"`CRM-6001`: no such contact (or it was deleted).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"409":{"description":"`CRM-6003`: the phone number belongs to another contact. `CRM-6004`: the email address belongs to another contact. Both name it in `existing_contact_id` and `existing_contact_name`.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["contacts:write"]},{"oauth2":["contacts:write"]}],"summary":"Add an email address to a contact","tags":["contacts"]}},"/v1/contacts/{contactId}/emails/{emailId}":{"patch":{"operationId":"updateContactEmail","parameters":[{"name":"contactId","required":true,"in":"path","description":"The contact id.","schema":{"type":"string","format":"uuid","description":"The contact id."}},{"name":"emailId","required":true,"in":"path","description":"The email address id.","schema":{"type":"string","format":"uuid","description":"The email address id."}},{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}},{"name":"Idempotency-Key","in":"header","description":"A unique key for this operation (e.g. a UUID, 1 to 255 visible characters), kept 24 hours: repeating the request with the same key returns the first answer (`Idempotent-Replayed: true`) instead of doing it again. Errors: `API-8109` (400) a key that is not valid, `API-8108` (409, retryable) the first request with this key is still running, `API-8107` (422) the key was used for a different request; `API-8118` (409) the first request created something whose secret is shown only once, so its answer is not repeated. An answer with `shown_once` repeats its secret within 10 minutes, then `API-8118`.","required":false,"schema":{"type":"string","minLength":1,"maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContactDetailUpdate"}}}},"responses":{"200":{"description":"The contact.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Contact"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `AUTH-1003`: your seat was deactivated (view only). `AUTH-1004`: all seats are inactive because the seat charge was not paid (view only). `AUTH-1002`: your role lacks the `contacts.edit` permission. `API-8102`: the API key or app lacks the `contacts:write` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"`CRM-6001`: no such contact (or it was deleted). `CRM-6022`: the contact has no such phone number or email address.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["contacts:write"]},{"oauth2":["contacts:write"]}],"summary":"Change the label of an email address, or make it primary","tags":["contacts"]},"delete":{"operationId":"removeContactEmail","parameters":[{"name":"contactId","required":true,"in":"path","description":"The contact id.","schema":{"type":"string","format":"uuid","description":"The contact id."}},{"name":"emailId","required":true,"in":"path","description":"The email address id.","schema":{"type":"string","format":"uuid","description":"The email address id."}},{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"The contact.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Contact"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `AUTH-1003`: your seat was deactivated (view only). `AUTH-1004`: all seats are inactive because the seat charge was not paid (view only). `AUTH-1002`: your role lacks the `contacts.edit` permission. `API-8102`: the API key or app lacks the `contacts:write` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"`CRM-6001`: no such contact (or it was deleted). `CRM-6022`: the contact has no such phone number or email address.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["contacts:write"]},{"oauth2":["contacts:write"]}],"summary":"Remove an email address from a contact","tags":["contacts"]}},"/v1/contacts/{contactId}/companies/{companyId}":{"put":{"description":"A contact can work at several companies; one is its primary company.","operationId":"linkContactCompany","parameters":[{"name":"contactId","required":true,"in":"path","description":"The contact id.","schema":{"type":"string","format":"uuid","description":"The contact id."}},{"name":"companyId","required":true,"in":"path","description":"The company id.","schema":{"type":"string","format":"uuid","description":"The company id."}},{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}},{"name":"Idempotency-Key","in":"header","description":"A unique key for this operation (e.g. a UUID, 1 to 255 visible characters), kept 24 hours: repeating the request with the same key returns the first answer (`Idempotent-Replayed: true`) instead of doing it again. Errors: `API-8109` (400) a key that is not valid, `API-8108` (409, retryable) the first request with this key is still running, `API-8107` (422) the key was used for a different request; `API-8118` (409) the first request created something whose secret is shown only once, so its answer is not repeated. An answer with `shown_once` repeats its secret within 10 minutes, then `API-8118`.","required":false,"schema":{"type":"string","minLength":1,"maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContactCompanyLink"}}}},"responses":{"200":{"description":"The contact.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Contact"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `AUTH-1003`: your seat was deactivated (view only). `AUTH-1004`: all seats are inactive because the seat charge was not paid (view only). `AUTH-1002`: your role lacks the `contacts.edit` permission. `API-8102`: the API key or app lacks the `contacts:write` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"`CRM-6001`: no such contact (or it was deleted). `CRM-6002`: no such company.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["contacts:write"]},{"oauth2":["contacts:write"]}],"summary":"Link a contact to a company, or change the link","tags":["contacts"]},"delete":{"operationId":"unlinkContactCompany","parameters":[{"name":"contactId","required":true,"in":"path","description":"The contact id.","schema":{"type":"string","format":"uuid","description":"The contact id."}},{"name":"companyId","required":true,"in":"path","description":"The company id.","schema":{"type":"string","format":"uuid","description":"The company id."}},{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"The contact.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Contact"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `AUTH-1003`: your seat was deactivated (view only). `AUTH-1004`: all seats are inactive because the seat charge was not paid (view only). `AUTH-1002`: your role lacks the `contacts.edit` permission. `API-8102`: the API key or app lacks the `contacts:write` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"`CRM-6001`: no such contact (or it was deleted). `CRM-6023`: the contact is not linked to it.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["contacts:write"]},{"oauth2":["contacts:write"]}],"summary":"Unlink a contact from a company","tags":["contacts"]}},"/v1/contacts/{contactId}/notes":{"get":{"operationId":"listContactNotes","parameters":[{"name":"contactId","required":true,"in":"path","description":"The contact id.","schema":{"type":"string","format":"uuid","description":"The contact id."}},{"name":"cursor","required":false,"in":"query","description":"The `next_cursor` of the previous page.","schema":{"description":"The `next_cursor` of the previous page.","type":"string","format":"uuid"}},{"name":"page","required":false,"in":"query","description":"A numbered page to jump to, from 1, of `limit` rows: its first row must be within the first 10000 rows of the list. Ignored with `cursor`; the next pages follow `next_cursor`.","schema":{"description":"A numbered page to jump to, from 1, of `limit` rows: its first row must be within the first 10000 rows of the list. Ignored with `cursor`; the next pages follow `next_cursor`.","type":"integer","minimum":1,"maximum":10000}},{"name":"limit","required":false,"in":"query","description":"Records per page (1 to 500, default 25).","schema":{"default":25,"description":"Records per page (1 to 500, default 25).","type":"integer","minimum":1,"maximum":500}},{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"A page of notes.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContactNotePage"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `API-8102`: the API key or app lacks the `contacts:read` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"`CRM-6001`: no such contact (or it was deleted).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["contacts:read"]},{"oauth2":["contacts:read"]}],"summary":"List a contact's notes","tags":["contacts"]},"post":{"operationId":"addContactNote","parameters":[{"name":"contactId","required":true,"in":"path","description":"The contact id.","schema":{"type":"string","format":"uuid","description":"The contact id."}},{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}},{"name":"Idempotency-Key","in":"header","description":"A unique key for this operation (e.g. a UUID, 1 to 255 visible characters), kept 24 hours: repeating the request with the same key returns the first answer (`Idempotent-Replayed: true`) instead of doing it again. Errors: `API-8109` (400) a key that is not valid, `API-8108` (409, retryable) the first request with this key is still running, `API-8107` (422) the key was used for a different request; `API-8118` (409) the first request created something whose secret is shown only once, so its answer is not repeated. An answer with `shown_once` repeats its secret within 10 minutes, then `API-8118`.","required":false,"schema":{"type":"string","minLength":1,"maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateNote"}}}},"responses":{"201":{"description":"The note.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContactNote"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `AUTH-1003`: your seat was deactivated (view only). `AUTH-1004`: all seats are inactive because the seat charge was not paid (view only). `AUTH-1002`: your role lacks the `contacts.edit` permission. `API-8102`: the API key or app lacks the `contacts:write` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"`CRM-6001`: no such contact (or it was deleted). `AUTH-1046`: a mentioned member does not exist.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["contacts:write"]},{"oauth2":["contacts:write"]}],"summary":"Add an internal note to a contact","tags":["contacts"]}},"/v1/contacts/{contactId}/notes/{noteId}":{"patch":{"operationId":"updateContactNote","parameters":[{"name":"contactId","required":true,"in":"path","description":"The contact id.","schema":{"type":"string","format":"uuid","description":"The contact id."}},{"name":"noteId","required":true,"in":"path","description":"The note id.","schema":{"type":"string","format":"uuid","description":"The note id."}},{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}},{"name":"Idempotency-Key","in":"header","description":"A unique key for this operation (e.g. a UUID, 1 to 255 visible characters), kept 24 hours: repeating the request with the same key returns the first answer (`Idempotent-Replayed: true`) instead of doing it again. Errors: `API-8109` (400) a key that is not valid, `API-8108` (409, retryable) the first request with this key is still running, `API-8107` (422) the key was used for a different request; `API-8118` (409) the first request created something whose secret is shown only once, so its answer is not repeated. An answer with `shown_once` repeats its secret within 10 minutes, then `API-8118`.","required":false,"schema":{"type":"string","minLength":1,"maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateNote"}}}},"responses":{"200":{"description":"The note.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContactNote"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `AUTH-1003`: your seat was deactivated (view only). `AUTH-1004`: all seats are inactive because the seat charge was not paid (view only). `AUTH-1002`: your role lacks the `contacts.edit` permission. `API-8102`: the API key or app lacks the `contacts:write` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"`CRM-6001`: no such contact (or it was deleted). `CRM-6021`: the contact has no such note. `AUTH-1046`: a mentioned member does not exist.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["contacts:write"]},{"oauth2":["contacts:write"]}],"summary":"Edit a note of a contact","tags":["contacts"]},"delete":{"operationId":"deleteContactNote","parameters":[{"name":"contactId","required":true,"in":"path","description":"The contact id.","schema":{"type":"string","format":"uuid","description":"The contact id."}},{"name":"noteId","required":true,"in":"path","description":"The note id.","schema":{"type":"string","format":"uuid","description":"The note id."}},{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}}],"responses":{"204":{"description":"Deleted.","headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `AUTH-1003`: your seat was deactivated (view only). `AUTH-1004`: all seats are inactive because the seat charge was not paid (view only). `AUTH-1002`: your role lacks the `contacts.edit` permission. `API-8102`: the API key or app lacks the `contacts:write` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"`CRM-6001`: no such contact (or it was deleted). `CRM-6021`: the contact has no such note.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["contacts:write"]},{"oauth2":["contacts:write"]}],"summary":"Delete a note of a contact","tags":["contacts"]}},"/v1/contacts/{contactId}/notes/{noteId}/revisions":{"get":{"operationId":"listContactNoteRevisions","parameters":[{"name":"contactId","required":true,"in":"path","description":"The contact id.","schema":{"type":"string","format":"uuid","description":"The contact id."}},{"name":"noteId","required":true,"in":"path","description":"The note id.","schema":{"type":"string","format":"uuid","description":"The note id."}},{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"The versions, oldest first, and the deletion when the note was deleted.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NoteHistory"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `API-8102`: the API key or app lacks the `contacts:read` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"`CRM-6001`: no such contact (or it was deleted). `CRM-6021`: the contact has no such note.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["contacts:read"]},{"oauth2":["contacts:read"]}],"summary":"List a contact note's versions","tags":["contacts"]}},"/v1/contacts/{contactId}/merge":{"post":{"description":"Asks nothing: this contact keeps its values and gets the secondary's identities, phone numbers, email addresses, notes, companies, file segments and tickets; its empty fields are filled from the secondary, whose name is listed among its `names` (`merged`). The secondary is kept, pointing to this one, and the merge can be undone.","operationId":"mergeContacts","parameters":[{"name":"contactId","required":true,"in":"path","description":"The contact id.","schema":{"type":"string","format":"uuid","description":"The contact id."}},{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}},{"name":"Idempotency-Key","in":"header","description":"A unique key for this operation (e.g. a UUID, 1 to 255 visible characters), kept 24 hours: repeating the request with the same key returns the first answer (`Idempotent-Replayed: true`) instead of doing it again. Errors: `API-8109` (400) a key that is not valid, `API-8108` (409, retryable) the first request with this key is still running, `API-8107` (422) the key was used for a different request; `API-8118` (409) the first request created something whose secret is shown only once, so its answer is not repeated. An answer with `shown_once` repeats its secret within 10 minutes, then `API-8118`.","required":false,"schema":{"type":"string","minLength":1,"maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MergeContacts"}}}},"responses":{"200":{"description":"The merge and the merged contact.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContactMergeResult"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `AUTH-1003`: your seat was deactivated (view only). `AUTH-1004`: all seats are inactive because the seat charge was not paid (view only). `AUTH-1002`: your role lacks the `contacts.merge` permission. `API-8102`: the API key or app lacks the `contacts:write` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"`CRM-6001`: no such contact (or it was deleted).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"409":{"description":"`CRM-6006`: both are the same contact (maybe through an earlier merge).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["contacts:write"]},{"oauth2":["contacts:write"]}],"summary":"Merge another contact into this one","tags":["contacts"]}},"/v1/contacts/{contactId}/merges":{"get":{"description":"The merge history of the contact page, with the merges that can be undone.","operationId":"listContactMerges","parameters":[{"name":"contactId","required":true,"in":"path","description":"The contact id.","schema":{"type":"string","format":"uuid","description":"The contact id."}},{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"The merges.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MergeList"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `API-8102`: the API key or app lacks the `contacts:read` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"`CRM-6001`: no such contact (or it was deleted).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["contacts:read"]},{"oauth2":["contacts:read"]}],"summary":"List the merges into a contact","tags":["contacts"]}},"/v1/contact-merges/{mergeId}/unmerge":{"post":{"description":"The secondary contact is separate again with everything that moved; fields of the primary return to their values before the merge unless changed since.","operationId":"unmergeContacts","parameters":[{"name":"mergeId","required":true,"in":"path","description":"The merge id.","schema":{"type":"string","format":"uuid","description":"The merge id."}},{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}},{"name":"Idempotency-Key","in":"header","description":"A unique key for this operation (e.g. a UUID, 1 to 255 visible characters), kept 24 hours: repeating the request with the same key returns the first answer (`Idempotent-Replayed: true`) instead of doing it again. Errors: `API-8109` (400) a key that is not valid, `API-8108` (409, retryable) the first request with this key is still running, `API-8107` (422) the key was used for a different request; `API-8118` (409) the first request created something whose secret is shown only once, so its answer is not repeated. An answer with `shown_once` repeats its secret within 10 minutes, then `API-8118`.","required":false,"schema":{"type":"string","minLength":1,"maxLength":255}}],"responses":{"200":{"description":"The merge (undone) and the separated contact.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContactMergeResult"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `AUTH-1003`: your seat was deactivated (view only). `AUTH-1004`: all seats are inactive because the seat charge was not paid (view only). `AUTH-1002`: your role lacks the `contacts.merge` permission. `API-8102`: the API key or app lacks the `contacts:write` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"`CRM-6007`: no such merge.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"409":{"description":"`CRM-6008`: the merge was already undone. `CRM-6009`: the primary was merged into another contact since; undo that merge first.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["contacts:write"]},{"oauth2":["contacts:write"]}],"summary":"Undo a contact merge","tags":["contacts"]}},"/v1/contacts/{contactId}/data-export":{"get":{"description":"The data-subject access copy (docs/08, PDPL): the contact’s CRM fields, identities, phone numbers, email addresses, companies and notes, their tickets with every message and its attachments, their calls with recordings and voicemail, their web chat sessions and reactions, in one JSON file (`Content-Disposition: attachment`). Files are listed with the API path that downloads them. The id of a merged contact gives the contact it was merged into; a contact in the trash is exported too. Recorded in the audit log (`contact.data_exported`) and sent as the `contact.data_exported` webhook.","operationId":"exportContactData","parameters":[{"name":"contactId","required":true,"in":"path","description":"The contact id.","schema":{"type":"string","format":"uuid","description":"The contact id."}},{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"The export.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContactDataExport"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `AUTH-1002`: your role lacks the `contacts.import_export` permission. `API-8102`: the API key or app lacks the `contacts:read` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"`CRM-6001`: no such contact.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["contacts:read"]},{"oauth2":["contacts:read"]}],"summary":"Export all data of a contact","tags":["contacts"]}},"/v1/companies":{"get":{"description":"The live companies, each with its `contact_count` and `activity` (open and closed tickets you may see, notes). `q` searches names, domains, websites, phone numbers and industries, Arabic-aware.","operationId":"listCompanies","parameters":[{"name":"q","required":false,"in":"query","description":"Free text, Arabic-aware (hamza, ta marbuta, diacritics, tatweel and Arabic-Indic digits do not matter).","schema":{"description":"Free text, Arabic-aware (hamza, ta marbuta, diacritics, tatweel and Arabic-Indic digits do not matter).","type":"string","maxLength":200}},{"name":"cursor","required":false,"in":"query","description":"The `next_cursor` of the previous page.","schema":{"description":"The `next_cursor` of the previous page.","type":"string","maxLength":200,"pattern":"^[A-Za-z0-9_-]+$"}},{"name":"page","required":false,"in":"query","description":"A numbered page to jump to, from 1, of `limit` rows: its first row must be within the first 10000 rows of the list. Ignored with `cursor`; the next pages follow `next_cursor`.","schema":{"description":"A numbered page to jump to, from 1, of `limit` rows: its first row must be within the first 10000 rows of the list. Ignored with `cursor`; the next pages follow `next_cursor`.","type":"integer","minimum":1,"maximum":10000}},{"name":"limit","required":false,"in":"query","description":"Records per page (1 to 500, default 25).","schema":{"default":25,"description":"Records per page (1 to 500, default 25).","type":"integer","minimum":1,"maximum":500}},{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"A page of companies.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CompanyPage"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `API-8102`: the API key or app lacks the `companies:read` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["companies:read"]},{"oauth2":["companies:read"]}],"summary":"List and search companies","tags":["companies"]},"post":{"operationId":"createCompany","parameters":[{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}},{"name":"Idempotency-Key","in":"header","description":"A unique key for this operation (e.g. a UUID, 1 to 255 visible characters), kept 24 hours: repeating the request with the same key returns the first answer (`Idempotent-Replayed: true`) instead of doing it again. Errors: `API-8109` (400) a key that is not valid, `API-8108` (409, retryable) the first request with this key is still running, `API-8107` (422) the key was used for a different request; `API-8118` (409) the first request created something whose secret is shown only once, so its answer is not repeated. An answer with `shown_once` repeats its secret within 10 minutes, then `API-8118`.","required":false,"schema":{"type":"string","minLength":1,"maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateCompany"}}}},"responses":{"201":{"description":"The company.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Company"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `AUTH-1003`: your seat was deactivated (view only). `AUTH-1004`: all seats are inactive because the seat charge was not paid (view only). `AUTH-1002`: your role lacks the `contacts.edit` permission. `API-8102`: the API key or app lacks the `companies:write` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"`AUTH-1046`: the account owner is not a member.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"409":{"description":"`CRM-6019`: a domain belongs to another company.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"description":"`API-8001`: some fields are missing or not valid. `details.fields` lists each invalid field with its own code (e.g. `API-8002` required, `API-8012` wrong format). `CRM-6005`: the phone number is not valid. `CRM-6018`: a public email provider (gmail.com, outlook.com…) is never a company domain. `CRM-6020`: not a domain.","headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["companies:write"]},{"oauth2":["companies:write"]}],"summary":"Create a company","tags":["companies"]}},"/v1/companies/{companyId}":{"get":{"description":"The id of a merged company gives the company it was merged into.","operationId":"getCompany","parameters":[{"name":"companyId","required":true,"in":"path","description":"The company id.","schema":{"type":"string","format":"uuid","description":"The company id."}},{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"The company.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Company"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `API-8102`: the API key or app lacks the `companies:read` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"`CRM-6002`: no such company (or it was deleted).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["companies:read"]},{"oauth2":["companies:read"]}],"summary":"Get a company","tags":["companies"]},"patch":{"operationId":"updateCompany","parameters":[{"name":"companyId","required":true,"in":"path","description":"The company id.","schema":{"type":"string","format":"uuid","description":"The company id."}},{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}},{"name":"Idempotency-Key","in":"header","description":"A unique key for this operation (e.g. a UUID, 1 to 255 visible characters), kept 24 hours: repeating the request with the same key returns the first answer (`Idempotent-Replayed: true`) instead of doing it again. Errors: `API-8109` (400) a key that is not valid, `API-8108` (409, retryable) the first request with this key is still running, `API-8107` (422) the key was used for a different request; `API-8118` (409) the first request created something whose secret is shown only once, so its answer is not repeated. An answer with `shown_once` repeats its secret within 10 minutes, then `API-8118`.","required":false,"schema":{"type":"string","minLength":1,"maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateCompany"}}}},"responses":{"200":{"description":"The company.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Company"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `AUTH-1003`: your seat was deactivated (view only). `AUTH-1004`: all seats are inactive because the seat charge was not paid (view only). `AUTH-1002`: your role lacks the `contacts.edit` permission. `API-8102`: the API key or app lacks the `companies:write` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"`CRM-6002`: no such company (or it was deleted). `AUTH-1046`: the account owner is not a member.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"description":"`API-8001`: some fields are missing or not valid. `details.fields` lists each invalid field with its own code (e.g. `API-8002` required, `API-8012` wrong format). `CRM-6005`: the phone number is not valid.","headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["companies:write"]},{"oauth2":["companies:write"]}],"summary":"Edit a company","tags":["companies"]},"delete":{"description":"The company leaves lists and search and its domains are released; its data is kept (Rabt never deletes).","operationId":"deleteCompany","parameters":[{"name":"companyId","required":true,"in":"path","description":"The company id.","schema":{"type":"string","format":"uuid","description":"The company id."}},{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}}],"responses":{"204":{"description":"Deleted.","headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `AUTH-1003`: your seat was deactivated (view only). `AUTH-1004`: all seats are inactive because the seat charge was not paid (view only). `AUTH-1002`: your role lacks the `contacts.edit` permission. `API-8102`: the API key or app lacks the `companies:write` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"`CRM-6002`: no such company (or it was deleted).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["companies:write"]},{"oauth2":["companies:write"]}],"summary":"Delete a company","tags":["companies"]}},"/v1/companies/{companyId}/domains":{"post":{"description":"New contacts with an address at the domain are linked to the company (when the organization has it on).","operationId":"addCompanyDomain","parameters":[{"name":"companyId","required":true,"in":"path","description":"The company id.","schema":{"type":"string","format":"uuid","description":"The company id."}},{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}},{"name":"Idempotency-Key","in":"header","description":"A unique key for this operation (e.g. a UUID, 1 to 255 visible characters), kept 24 hours: repeating the request with the same key returns the first answer (`Idempotent-Replayed: true`) instead of doing it again. Errors: `API-8109` (400) a key that is not valid, `API-8108` (409, retryable) the first request with this key is still running, `API-8107` (422) the key was used for a different request; `API-8118` (409) the first request created something whose secret is shown only once, so its answer is not repeated. An answer with `shown_once` repeats its secret within 10 minutes, then `API-8118`.","required":false,"schema":{"type":"string","minLength":1,"maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CompanyDomainInput"}}}},"responses":{"201":{"description":"The company.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Company"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `AUTH-1003`: your seat was deactivated (view only). `AUTH-1004`: all seats are inactive because the seat charge was not paid (view only). `AUTH-1002`: your role lacks the `contacts.edit` permission. `API-8102`: the API key or app lacks the `companies:write` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"`CRM-6002`: no such company (or it was deleted).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"409":{"description":"`CRM-6019`: the domain belongs to another company.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"description":"`API-8001`: some fields are missing or not valid. `details.fields` lists each invalid field with its own code (e.g. `API-8002` required, `API-8012` wrong format). `CRM-6018`: a public email provider (gmail.com, outlook.com…) is never a company domain. `CRM-6020`: not a domain.","headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["companies:write"]},{"oauth2":["companies:write"]}],"summary":"Add an email domain to a company","tags":["companies"]}},"/v1/companies/{companyId}/domains/{domainId}":{"delete":{"operationId":"removeCompanyDomain","parameters":[{"name":"companyId","required":true,"in":"path","description":"The company id.","schema":{"type":"string","format":"uuid","description":"The company id."}},{"name":"domainId","required":true,"in":"path","description":"The domain id.","schema":{"type":"string","format":"uuid","description":"The domain id."}},{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"The company.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Company"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `AUTH-1003`: your seat was deactivated (view only). `AUTH-1004`: all seats are inactive because the seat charge was not paid (view only). `AUTH-1002`: your role lacks the `contacts.edit` permission. `API-8102`: the API key or app lacks the `companies:write` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"`CRM-6002`: no such company (or it was deleted). `CRM-6026`: the company has no such domain.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["companies:write"]},{"oauth2":["companies:write"]}],"summary":"Remove an email domain from a company","tags":["companies"]}},"/v1/companies/{companyId}/notes":{"get":{"operationId":"listCompanyNotes","parameters":[{"name":"companyId","required":true,"in":"path","description":"The company id.","schema":{"type":"string","format":"uuid","description":"The company id."}},{"name":"cursor","required":false,"in":"query","description":"The `next_cursor` of the previous page.","schema":{"description":"The `next_cursor` of the previous page.","type":"string","format":"uuid"}},{"name":"page","required":false,"in":"query","description":"A numbered page to jump to, from 1, of `limit` rows: its first row must be within the first 10000 rows of the list. Ignored with `cursor`; the next pages follow `next_cursor`.","schema":{"description":"A numbered page to jump to, from 1, of `limit` rows: its first row must be within the first 10000 rows of the list. Ignored with `cursor`; the next pages follow `next_cursor`.","type":"integer","minimum":1,"maximum":10000}},{"name":"limit","required":false,"in":"query","description":"Records per page (1 to 500, default 25).","schema":{"default":25,"description":"Records per page (1 to 500, default 25).","type":"integer","minimum":1,"maximum":500}},{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"A page of notes.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotePage"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `API-8102`: the API key or app lacks the `companies:read` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"`CRM-6002`: no such company (or it was deleted).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["companies:read"]},{"oauth2":["companies:read"]}],"summary":"List a company's notes","tags":["companies"]},"post":{"operationId":"addCompanyNote","parameters":[{"name":"companyId","required":true,"in":"path","description":"The company id.","schema":{"type":"string","format":"uuid","description":"The company id."}},{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}},{"name":"Idempotency-Key","in":"header","description":"A unique key for this operation (e.g. a UUID, 1 to 255 visible characters), kept 24 hours: repeating the request with the same key returns the first answer (`Idempotent-Replayed: true`) instead of doing it again. Errors: `API-8109` (400) a key that is not valid, `API-8108` (409, retryable) the first request with this key is still running, `API-8107` (422) the key was used for a different request; `API-8118` (409) the first request created something whose secret is shown only once, so its answer is not repeated. An answer with `shown_once` repeats its secret within 10 minutes, then `API-8118`.","required":false,"schema":{"type":"string","minLength":1,"maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateNote"}}}},"responses":{"201":{"description":"The note.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Note"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `AUTH-1003`: your seat was deactivated (view only). `AUTH-1004`: all seats are inactive because the seat charge was not paid (view only). `AUTH-1002`: your role lacks the `contacts.edit` permission. `API-8102`: the API key or app lacks the `companies:write` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"`CRM-6002`: no such company (or it was deleted). `AUTH-1046`: a mentioned member does not exist.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["companies:write"]},{"oauth2":["companies:write"]}],"summary":"Add an internal note to a company","tags":["companies"]}},"/v1/companies/{companyId}/notes/{noteId}":{"patch":{"operationId":"updateCompanyNote","parameters":[{"name":"companyId","required":true,"in":"path","description":"The company id.","schema":{"type":"string","format":"uuid","description":"The company id."}},{"name":"noteId","required":true,"in":"path","description":"The note id.","schema":{"type":"string","format":"uuid","description":"The note id."}},{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}},{"name":"Idempotency-Key","in":"header","description":"A unique key for this operation (e.g. a UUID, 1 to 255 visible characters), kept 24 hours: repeating the request with the same key returns the first answer (`Idempotent-Replayed: true`) instead of doing it again. Errors: `API-8109` (400) a key that is not valid, `API-8108` (409, retryable) the first request with this key is still running, `API-8107` (422) the key was used for a different request; `API-8118` (409) the first request created something whose secret is shown only once, so its answer is not repeated. An answer with `shown_once` repeats its secret within 10 minutes, then `API-8118`.","required":false,"schema":{"type":"string","minLength":1,"maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateNote"}}}},"responses":{"200":{"description":"The note.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Note"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `AUTH-1003`: your seat was deactivated (view only). `AUTH-1004`: all seats are inactive because the seat charge was not paid (view only). `AUTH-1002`: your role lacks the `contacts.edit` permission. `API-8102`: the API key or app lacks the `companies:write` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"`CRM-6002`: no such company (or it was deleted). `CRM-6021`: the company has no such note. `AUTH-1046`: a mentioned member does not exist.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["companies:write"]},{"oauth2":["companies:write"]}],"summary":"Edit a note of a company","tags":["companies"]},"delete":{"operationId":"deleteCompanyNote","parameters":[{"name":"companyId","required":true,"in":"path","description":"The company id.","schema":{"type":"string","format":"uuid","description":"The company id."}},{"name":"noteId","required":true,"in":"path","description":"The note id.","schema":{"type":"string","format":"uuid","description":"The note id."}},{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}}],"responses":{"204":{"description":"Deleted.","headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `AUTH-1003`: your seat was deactivated (view only). `AUTH-1004`: all seats are inactive because the seat charge was not paid (view only). `AUTH-1002`: your role lacks the `contacts.edit` permission. `API-8102`: the API key or app lacks the `companies:write` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"`CRM-6002`: no such company (or it was deleted). `CRM-6021`: the company has no such note.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["companies:write"]},{"oauth2":["companies:write"]}],"summary":"Delete a note of a company","tags":["companies"]}},"/v1/companies/{companyId}/merge":{"post":{"description":"Asks nothing: this company keeps its values and gets the secondary company's contacts, domains, notes and tickets; its empty fields are filled from the secondary, whose name is listed in `also_known_as`. The secondary is kept, pointing to this one, and the merge can be undone.","operationId":"mergeCompanies","parameters":[{"name":"companyId","required":true,"in":"path","description":"The company id.","schema":{"type":"string","format":"uuid","description":"The company id."}},{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}},{"name":"Idempotency-Key","in":"header","description":"A unique key for this operation (e.g. a UUID, 1 to 255 visible characters), kept 24 hours: repeating the request with the same key returns the first answer (`Idempotent-Replayed: true`) instead of doing it again. Errors: `API-8109` (400) a key that is not valid, `API-8108` (409, retryable) the first request with this key is still running, `API-8107` (422) the key was used for a different request; `API-8118` (409) the first request created something whose secret is shown only once, so its answer is not repeated. An answer with `shown_once` repeats its secret within 10 minutes, then `API-8118`.","required":false,"schema":{"type":"string","minLength":1,"maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MergeCompanies"}}}},"responses":{"200":{"description":"The merge and the merged company.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CompanyMergeResult"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `AUTH-1003`: your seat was deactivated (view only). `AUTH-1004`: all seats are inactive because the seat charge was not paid (view only). `AUTH-1002`: your role lacks the `contacts.merge` permission. `API-8102`: the API key or app lacks the `companies:write` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"`CRM-6002`: no such company (or it was deleted).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"409":{"description":"`CRM-6006`: both are the same company (maybe through an earlier merge).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["companies:write"]},{"oauth2":["companies:write"]}],"summary":"Merge another company into this one","tags":["companies"]}},"/v1/companies/{companyId}/merges":{"get":{"operationId":"listCompanyMerges","parameters":[{"name":"companyId","required":true,"in":"path","description":"The company id.","schema":{"type":"string","format":"uuid","description":"The company id."}},{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"The merges.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MergeList"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `API-8102`: the API key or app lacks the `companies:read` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"`CRM-6002`: no such company (or it was deleted).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["companies:read"]},{"oauth2":["companies:read"]}],"summary":"List the merges into a company","tags":["companies"]}},"/v1/company-merges/{mergeId}/unmerge":{"post":{"description":"The secondary company is separate again with everything that moved; fields of the primary return to their values before the merge unless changed since.","operationId":"unmergeCompanies","parameters":[{"name":"mergeId","required":true,"in":"path","description":"The merge id.","schema":{"type":"string","format":"uuid","description":"The merge id."}},{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}},{"name":"Idempotency-Key","in":"header","description":"A unique key for this operation (e.g. a UUID, 1 to 255 visible characters), kept 24 hours: repeating the request with the same key returns the first answer (`Idempotent-Replayed: true`) instead of doing it again. Errors: `API-8109` (400) a key that is not valid, `API-8108` (409, retryable) the first request with this key is still running, `API-8107` (422) the key was used for a different request; `API-8118` (409) the first request created something whose secret is shown only once, so its answer is not repeated. An answer with `shown_once` repeats its secret within 10 minutes, then `API-8118`.","required":false,"schema":{"type":"string","minLength":1,"maxLength":255}}],"responses":{"200":{"description":"The merge (undone) and the separated company.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CompanyMergeResult"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `AUTH-1003`: your seat was deactivated (view only). `AUTH-1004`: all seats are inactive because the seat charge was not paid (view only). `AUTH-1002`: your role lacks the `contacts.merge` permission. `API-8102`: the API key or app lacks the `companies:write` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"`CRM-6007`: no such merge.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"409":{"description":"`CRM-6008`: the merge was already undone. `CRM-6009`: the primary was merged into another company since; undo that merge first.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["companies:write"]},{"oauth2":["companies:write"]}],"summary":"Undo a company merge","tags":["companies"]}},"/v1/crm/settings":{"get":{"operationId":"getCrmSettings","parameters":[{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"The settings.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CrmSettings"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `API-8102`: the API key or app lacks the `organization:read` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["organization:read"]},{"oauth2":["organization:read"]}],"summary":"Get the CRM settings","tags":["crm-settings"]},"put":{"operationId":"updateCrmSettings","parameters":[{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}},{"name":"Idempotency-Key","in":"header","description":"A unique key for this operation (e.g. a UUID, 1 to 255 visible characters), kept 24 hours: repeating the request with the same key returns the first answer (`Idempotent-Replayed: true`) instead of doing it again. Errors: `API-8109` (400) a key that is not valid, `API-8108` (409, retryable) the first request with this key is still running, `API-8107` (422) the key was used for a different request; `API-8118` (409) the first request created something whose secret is shown only once, so its answer is not repeated. An answer with `shown_once` repeats its secret within 10 minutes, then `API-8118`.","required":false,"schema":{"type":"string","minLength":1,"maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CrmSettingsInput"}}}},"responses":{"200":{"description":"The settings.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CrmSettings"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `AUTH-1003`: your seat was deactivated (view only). `AUTH-1004`: all seats are inactive because the seat charge was not paid (view only). `AUTH-1002`: your role lacks the `settings.manage` permission. `API-8102`: the API key or app lacks the `organization:write` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"description":"`API-8001`: some fields are missing or not valid. `details.fields` lists each invalid field with its own code (e.g. `API-8002` required, `API-8012` wrong format). `CRM-6059`: `auto_link_companies_by_domain` is `false`; linking companies by email domain always runs.","headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["organization:write"]},{"oauth2":["organization:write"]}],"summary":"Change the CRM settings","tags":["crm-settings"]}},"/v1/notifications":{"get":{"description":"Your notifications in the organization, newest first, with your unread count (docs/21). Texts are in the request’s language.","operationId":"listNotifications","parameters":[{"name":"cursor","required":false,"in":"query","description":"The `next_cursor` of the previous page.","schema":{"description":"The `next_cursor` of the previous page.","type":"string","format":"uuid"}},{"name":"page","required":false,"in":"query","description":"A numbered page to jump to, from 1, of `limit` rows: its first row must be within the first 10000 rows of the list. Ignored with `cursor`; the next pages follow `next_cursor`.","schema":{"description":"A numbered page to jump to, from 1, of `limit` rows: its first row must be within the first 10000 rows of the list. Ignored with `cursor`; the next pages follow `next_cursor`.","type":"integer","minimum":1,"maximum":10000}},{"name":"limit","required":false,"in":"query","description":"Notifications per page (1 to 500, default 30).","schema":{"default":30,"description":"Notifications per page (1 to 500, default 30).","type":"integer","minimum":1,"maximum":500}},{"name":"unread","required":false,"in":"query","description":"Only unread notifications.","schema":{"description":"Only unread notifications.","default":"false","type":"string","enum":["true","false"]}},{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"A page.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotificationPage"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `API-8102`: the API key or app lacks the `notifications:read` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["notifications:read"]},{"oauth2":["notifications:read"]}],"summary":"List your notifications","tags":["notifications"]}},"/v1/notifications/unread-count":{"get":{"description":"The number on the bell (docs/21).","operationId":"getUnreadNotificationCount","parameters":[{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"The count.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotificationUnreadCount"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `API-8102`: the API key or app lacks the `notifications:read` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["notifications:read"]},{"oauth2":["notifications:read"]}],"summary":"Count your unread notifications","tags":["notifications"]}},"/v1/notifications/read":{"post":{"description":"Marks every unread notification read, up to `up_to_id` (the newest one you saw) or up to now.","operationId":"markAllNotificationsRead","parameters":[{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}},{"name":"Idempotency-Key","in":"header","description":"A unique key for this operation (e.g. a UUID, 1 to 255 visible characters), kept 24 hours: repeating the request with the same key returns the first answer (`Idempotent-Replayed: true`) instead of doing it again. Errors: `API-8109` (400) a key that is not valid, `API-8108` (409, retryable) the first request with this key is still running, `API-8107` (422) the key was used for a different request; `API-8118` (409) the first request created something whose secret is shown only once, so its answer is not repeated. An answer with `shown_once` repeats its secret within 10 minutes, then `API-8118`.","required":false,"schema":{"type":"string","minLength":1,"maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MarkAllNotificationsRead"}}}},"responses":{"200":{"description":"How many were marked.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotificationsMarkedRead"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `API-8102`: the API key or app lacks the `notifications:write` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["notifications:write"]},{"oauth2":["notifications:write"]}],"summary":"Mark all your notifications as read","tags":["notifications"]}},"/v1/notifications/{notificationId}":{"get":{"operationId":"getNotification","parameters":[{"name":"notificationId","required":true,"in":"path","description":"The notification id.","schema":{"type":"string","format":"uuid","description":"The notification id."}},{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"The notification.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Notification"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `API-8102`: the API key or app lacks the `notifications:read` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"`NTF-8201`: no such notification among yours in this organization.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["notifications:read"]},{"oauth2":["notifications:read"]}],"summary":"Get one of your notifications","tags":["notifications"]}},"/v1/notifications/{notificationId}/read":{"post":{"description":"Marking a read notification again changes nothing.","operationId":"markNotificationRead","parameters":[{"name":"notificationId","required":true,"in":"path","description":"The notification id.","schema":{"type":"string","format":"uuid","description":"The notification id."}},{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}},{"name":"Idempotency-Key","in":"header","description":"A unique key for this operation (e.g. a UUID, 1 to 255 visible characters), kept 24 hours: repeating the request with the same key returns the first answer (`Idempotent-Replayed: true`) instead of doing it again. Errors: `API-8109` (400) a key that is not valid, `API-8108` (409, retryable) the first request with this key is still running, `API-8107` (422) the key was used for a different request; `API-8118` (409) the first request created something whose secret is shown only once, so its answer is not repeated. An answer with `shown_once` repeats its secret within 10 minutes, then `API-8118`.","required":false,"schema":{"type":"string","minLength":1,"maxLength":255}}],"responses":{"200":{"description":"The notification.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Notification"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `API-8102`: the API key or app lacks the `notifications:write` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"`NTF-8201`: no such notification among yours in this organization.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["notifications:write"]},{"oauth2":["notifications:write"]}],"summary":"Mark one of your notifications as read","tags":["notifications"]}},"/v1/segments":{"get":{"description":"By name, each with how many records it lists now.","operationId":"listSegments","parameters":[{"name":"entity","required":false,"in":"query","description":"Only segments of contacts or of companies.","schema":{"description":"Only segments of contacts or of companies.","$ref":"#/components/schemas/CrmListEntity"}},{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"The segments.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SegmentList"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `API-8102`: the API key or app lacks the `segments:read` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["segments:read"]},{"oauth2":["segments:read"]}],"summary":"List the segments","tags":["segments"]},"post":{"operationId":"createSegment","parameters":[{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}},{"name":"Idempotency-Key","in":"header","description":"A unique key for this operation (e.g. a UUID, 1 to 255 visible characters), kept 24 hours: repeating the request with the same key returns the first answer (`Idempotent-Replayed: true`) instead of doing it again. Errors: `API-8109` (400) a key that is not valid, `API-8108` (409, retryable) the first request with this key is still running, `API-8107` (422) the key was used for a different request; `API-8118` (409) the first request created something whose secret is shown only once, so its answer is not repeated. An answer with `shown_once` repeats its secret within 10 minutes, then `API-8118`.","required":false,"schema":{"type":"string","minLength":1,"maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateSegment"}}}},"responses":{"201":{"description":"The segment.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Segment"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `AUTH-1003`: your seat was deactivated (view only). `AUTH-1004`: all seats are inactive because the seat charge was not paid (view only). `AUTH-1002`: your role lacks the `campaigns.manage` permission. `API-8102`: the API key or app lacks the `segments:write` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"409":{"description":"`CRM-6028`: a segment has this name.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"description":"`API-8001`: some fields are missing or not valid. `details.fields` lists each invalid field with its own code (e.g. `API-8002` required, `API-8012` wrong format). `API-8001` with `API-8020`: a companies segment filters only by `q`.","headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["segments:write"]},{"oauth2":["segments:write"]}],"summary":"Save a filter as a segment","tags":["segments"]}},"/v1/segments/{segmentId}":{"get":{"operationId":"getSegment","parameters":[{"name":"segmentId","required":true,"in":"path","description":"The segment id.","schema":{"type":"string","format":"uuid","description":"The segment id."}},{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"The segment.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Segment"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `API-8102`: the API key or app lacks the `segments:read` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"`CRM-6027`: no such segment (or it was deleted).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["segments:read"]},{"oauth2":["segments:read"]}],"summary":"Get a segment","tags":["segments"]},"patch":{"operationId":"updateSegment","parameters":[{"name":"segmentId","required":true,"in":"path","description":"The segment id.","schema":{"type":"string","format":"uuid","description":"The segment id."}},{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}},{"name":"Idempotency-Key","in":"header","description":"A unique key for this operation (e.g. a UUID, 1 to 255 visible characters), kept 24 hours: repeating the request with the same key returns the first answer (`Idempotent-Replayed: true`) instead of doing it again. Errors: `API-8109` (400) a key that is not valid, `API-8108` (409, retryable) the first request with this key is still running, `API-8107` (422) the key was used for a different request; `API-8118` (409) the first request created something whose secret is shown only once, so its answer is not repeated. An answer with `shown_once` repeats its secret within 10 minutes, then `API-8118`.","required":false,"schema":{"type":"string","minLength":1,"maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateSegment"}}}},"responses":{"200":{"description":"The segment.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Segment"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `AUTH-1003`: your seat was deactivated (view only). `AUTH-1004`: all seats are inactive because the seat charge was not paid (view only). `AUTH-1002`: your role lacks the `campaigns.manage` permission. `API-8102`: the API key or app lacks the `segments:write` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"`CRM-6027`: no such segment (or it was deleted).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"409":{"description":"`CRM-6028`: a segment has this name. `CRM-6058`: a segment from a file has no filter to change.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"description":"`API-8001`: some fields are missing or not valid. `details.fields` lists each invalid field with its own code (e.g. `API-8002` required, `API-8012` wrong format). `API-8001` with `API-8020`: a companies segment filters only by `q`.","headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["segments:write"]},{"oauth2":["segments:write"]}],"summary":"Rename a segment or change its filter","tags":["segments"]},"delete":{"description":"It is no longer listed; it is kept (Rabt never deletes).","operationId":"deleteSegment","parameters":[{"name":"segmentId","required":true,"in":"path","description":"The segment id.","schema":{"type":"string","format":"uuid","description":"The segment id."}},{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}}],"responses":{"204":{"description":"Deleted.","headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `AUTH-1003`: your seat was deactivated (view only). `AUTH-1004`: all seats are inactive because the seat charge was not paid (view only). `AUTH-1002`: your role lacks the `campaigns.manage` permission. `API-8102`: the API key or app lacks the `segments:write` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"`CRM-6027`: no such segment (or it was deleted).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["segments:write"]},{"oauth2":["segments:write"]}],"summary":"Delete a segment","tags":["segments"]}},"/v1/segments/{segmentId}/contacts":{"get":{"operationId":"listSegmentContacts","parameters":[{"name":"segmentId","required":true,"in":"path","description":"The segment id.","schema":{"type":"string","format":"uuid","description":"The segment id."}},{"name":"cursor","required":false,"in":"query","description":"The `next_cursor` of the previous page.","schema":{"description":"The `next_cursor` of the previous page.","type":"string","maxLength":200,"pattern":"^[A-Za-z0-9_-]+$"}},{"name":"page","required":false,"in":"query","description":"A numbered page to jump to, from 1, of `limit` rows: its first row must be within the first 10000 rows of the list. Ignored with `cursor`; the next pages follow `next_cursor`.","schema":{"description":"A numbered page to jump to, from 1, of `limit` rows: its first row must be within the first 10000 rows of the list. Ignored with `cursor`; the next pages follow `next_cursor`.","type":"integer","minimum":1,"maximum":10000}},{"name":"limit","required":false,"in":"query","description":"Records per page (1 to 500, default 25).","schema":{"default":25,"description":"Records per page (1 to 500, default 25).","type":"integer","minimum":1,"maximum":500}},{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"A page of contacts.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContactPage"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `API-8102`: the API key or app lacks the `segments:read` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"`CRM-6027`: no such segment (or it was deleted).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"description":"`API-8001`: some fields are missing or not valid. `details.fields` lists each invalid field with its own code (e.g. `API-8002` required, `API-8012` wrong format). `CRM-6041`: the segment lists companies.","headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["segments:read"]},{"oauth2":["segments:read"]}],"summary":"List the contacts a segment lists now","tags":["segments"]}},"/v1/segments/{segmentId}/companies":{"get":{"operationId":"listSegmentCompanies","parameters":[{"name":"segmentId","required":true,"in":"path","description":"The segment id.","schema":{"type":"string","format":"uuid","description":"The segment id."}},{"name":"cursor","required":false,"in":"query","description":"The `next_cursor` of the previous page.","schema":{"description":"The `next_cursor` of the previous page.","type":"string","maxLength":200,"pattern":"^[A-Za-z0-9_-]+$"}},{"name":"page","required":false,"in":"query","description":"A numbered page to jump to, from 1, of `limit` rows: its first row must be within the first 10000 rows of the list. Ignored with `cursor`; the next pages follow `next_cursor`.","schema":{"description":"A numbered page to jump to, from 1, of `limit` rows: its first row must be within the first 10000 rows of the list. Ignored with `cursor`; the next pages follow `next_cursor`.","type":"integer","minimum":1,"maximum":10000}},{"name":"limit","required":false,"in":"query","description":"Records per page (1 to 500, default 25).","schema":{"default":25,"description":"Records per page (1 to 500, default 25).","type":"integer","minimum":1,"maximum":500}},{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"A page of companies.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CompanyPage"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `API-8102`: the API key or app lacks the `segments:read` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"`CRM-6027`: no such segment (or it was deleted).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"description":"`API-8001`: some fields are missing or not valid. `details.fields` lists each invalid field with its own code (e.g. `API-8002` required, `API-8012` wrong format). `CRM-6041`: the segment lists contacts.","headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["segments:read"]},{"oauth2":["segments:read"]}],"summary":"List the companies a segment lists now","tags":["segments"]}},"/v1/crm-transfers":{"get":{"operationId":"listCrmTransfers","parameters":[{"name":"cursor","required":false,"in":"query","description":"The `next_cursor` of the previous page.","schema":{"description":"The `next_cursor` of the previous page.","type":"string","format":"uuid"}},{"name":"page","required":false,"in":"query","description":"A numbered page to jump to, from 1, of `limit` rows: its first row must be within the first 10000 rows of the list. Ignored with `cursor`; the next pages follow `next_cursor`.","schema":{"description":"A numbered page to jump to, from 1, of `limit` rows: its first row must be within the first 10000 rows of the list. Ignored with `cursor`; the next pages follow `next_cursor`.","type":"integer","minimum":1,"maximum":10000}},{"name":"limit","required":false,"in":"query","description":"Records per page (1 to 500, default 25).","schema":{"default":25,"description":"Records per page (1 to 500, default 25).","type":"integer","minimum":1,"maximum":500}},{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"A page, newest first.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CrmTransferPage"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `AUTH-1002`: your role lacks the `contacts.import_export` permission. `API-8102`: the API key or app lacks the `imports_exports:read` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["imports_exports:read"]},{"oauth2":["imports_exports:read"]}],"summary":"List the imports and exports","tags":["imports-exports"]}},"/v1/crm-transfers/{transferId}":{"get":{"description":"Its status and progress; read it again while it runs.","operationId":"getCrmTransfer","parameters":[{"name":"transferId","required":true,"in":"path","description":"The import or export id.","schema":{"type":"string","format":"uuid","description":"The import or export id."}},{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"The import or export.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CrmTransfer"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `AUTH-1002`: your role lacks the `contacts.import_export` permission. `API-8102`: the API key or app lacks the `imports_exports:read` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"`CRM-6029`: no such import or export.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["imports_exports:read"]},{"oauth2":["imports_exports:read"]}],"summary":"Get an import or export","tags":["imports-exports"]}},"/v1/crm-imports":{"post":{"description":"A CSV (`content`) or an Excel workbook (`content_base64`, its first sheet). The file is scanned for malware first (refused with `TKT-6194` when infected), then read now (its size, CSV and columns); then every row is checked in the background, writing nothing (`validating` → `validated`, with what it would create and update and the errors of every row; `GET /v1/crm-transfers/{id}/error-preview` shows them). Start the import with `POST /v1/crm-transfers/{id}/start`, importing the valid rows when the file has errors. Rows match existing contacts by phone number or email address, as messages do: a match is completed (empty fields filled, numbers and addresses added), never overwritten.","operationId":"createCrmImport","parameters":[{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}},{"name":"Idempotency-Key","in":"header","description":"A unique key for this operation (e.g. a UUID, 1 to 255 visible characters), kept 24 hours: repeating the request with the same key returns the first answer (`Idempotent-Replayed: true`) instead of doing it again. Errors: `API-8109` (400) a key that is not valid, `API-8108` (409, retryable) the first request with this key is still running, `API-8107` (422) the key was used for a different request; `API-8118` (409) the first request created something whose secret is shown only once, so its answer is not repeated. An answer with `shown_once` repeats its secret within 10 minutes, then `API-8118`.","required":false,"schema":{"type":"string","minLength":1,"maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateImport"}}}},"responses":{"202":{"description":"The import, being checked.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CrmTransfer"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `AUTH-1003`: your seat was deactivated (view only). `AUTH-1004`: all seats are inactive because the seat charge was not paid (view only). `AUTH-1002`: your role lacks the `contacts.import_export` permission. `API-8102`: the API key or app lacks the `imports_exports:write` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"description":"`API-8001`: some fields are missing or not valid. `details.fields` lists each invalid field with its own code (e.g. `API-8002` required, `API-8012` wrong format). `TKT-6194`: the malware scan found malware in the file (refused, not kept). `CRM-6030`: more than 10 MB or 50,000 rows. `CRM-6031`: not a readable CSV. `CRM-6032`: an unknown column. `CRM-6033`: no name, phone or email column. `CRM-6034`: a column twice. `CRM-6043`: a CSV not saved as UTF-8. `CRM-6057`: not a readable Excel workbook.","headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"429":{"$ref":"#/components/responses/RateLimited"},"503":{"description":"`TKT-6195`: the malware scanner did not answer (upload the file again later). `SYS-1001` (ClamAV): production without a malware scanner.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["imports_exports:write"]},{"oauth2":["imports_exports:write"]}],"summary":"Upload a file of contacts","tags":["imports-exports"]}},"/v1/segment-imports":{"post":{"description":"Needs `campaigns.manage` too. The file (a CSV or an Excel workbook) is scanned and read as an import's, the segment is created (`source: file`) and its import runs at once in the background: every contact a row creates or matches (by phone number or email address, as imports do) joins the segment once; rows with errors are left out and listed by `GET /v1/crm-transfers/{id}/errors`. Campaigns take it as their audience.","operationId":"createSegmentImport","parameters":[{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}},{"name":"Idempotency-Key","in":"header","description":"A unique key for this operation (e.g. a UUID, 1 to 255 visible characters), kept 24 hours: repeating the request with the same key returns the first answer (`Idempotent-Replayed: true`) instead of doing it again. Errors: `API-8109` (400) a key that is not valid, `API-8108` (409, retryable) the first request with this key is still running, `API-8107` (422) the key was used for a different request; `API-8118` (409) the first request created something whose secret is shown only once, so its answer is not repeated. An answer with `shown_once` repeats its secret within 10 minutes, then `API-8118`.","required":false,"schema":{"type":"string","minLength":1,"maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateSegmentImport"}}}},"responses":{"202":{"description":"The segment and its running import.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SegmentImport"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `AUTH-1003`: your seat was deactivated (view only). `AUTH-1004`: all seats are inactive because the seat charge was not paid (view only). `AUTH-1002`: your role lacks the `contacts.import_export` permission. `API-8102`: the API key or app lacks the `imports_exports:write` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"409":{"description":"`CRM-6028`: a segment has this name.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"description":"`API-8001`: some fields are missing or not valid. `details.fields` lists each invalid field with its own code (e.g. `API-8002` required, `API-8012` wrong format). `TKT-6194`: the malware scan found malware in the file (refused, not kept). `CRM-6030`: more than 10 MB or 50,000 rows. `CRM-6031`: not a readable CSV. `CRM-6032`: an unknown column. `CRM-6033`: no name, phone or email column. `CRM-6034`: a column twice. `CRM-6043`: a CSV not saved as UTF-8. `CRM-6057`: not a readable Excel workbook.","headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"429":{"$ref":"#/components/responses/RateLimited"},"503":{"description":"`TKT-6195`: the malware scanner did not answer (upload the file again later). `SYS-1001` (ClamAV): production without a malware scanner.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["imports_exports:write"]},{"oauth2":["imports_exports:write"]}],"summary":"Make a segment from a file of contacts","tags":["imports-exports"]}},"/v1/crm-imports/template":{"get":{"description":"The header row with every column an import reads, as CSV or an Excel workbook.","operationId":"getCrmImportTemplate","parameters":[{"name":"format","required":false,"in":"query","description":"`csv` (the default) or `xlsx` (an Excel workbook).","schema":{"default":"csv","description":"`csv` (the default) or `xlsx` (an Excel workbook).","type":"string","enum":["csv","xlsx"]}},{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"The file.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ImportTemplateFile"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `AUTH-1002`: your role lacks the `contacts.import_export` permission. `API-8102`: the API key or app lacks the `imports_exports:read` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["imports_exports:read"]},{"oauth2":["imports_exports:read"]}],"summary":"An empty import file","tags":["imports-exports"]}},"/v1/crm-transfers/{transferId}/start":{"post":{"description":"Only once; it runs in the background. With errors in the file, send `import_valid_rows: true` to import the valid rows and set the rows with errors aside (download them, with a reason column, from `GET /v1/crm-transfers/{id}/errors`); without it the import starts only when the check found no errors. `segment_name` also makes a segment of the contacts the valid rows create or match (needs `campaigns.manage`).","operationId":"startCrmImport","parameters":[{"name":"transferId","required":true,"in":"path","description":"The import or export id.","schema":{"type":"string","format":"uuid","description":"The import or export id."}},{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}},{"name":"Idempotency-Key","in":"header","description":"A unique key for this operation (e.g. a UUID, 1 to 255 visible characters), kept 24 hours: repeating the request with the same key returns the first answer (`Idempotent-Replayed: true`) instead of doing it again. Errors: `API-8109` (400) a key that is not valid, `API-8108` (409, retryable) the first request with this key is still running, `API-8107` (422) the key was used for a different request; `API-8118` (409) the first request created something whose secret is shown only once, so its answer is not repeated. An answer with `shown_once` repeats its secret within 10 minutes, then `API-8118`.","required":false,"schema":{"type":"string","minLength":1,"maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StartImport"}}}},"responses":{"202":{"description":"The import, running.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CrmTransfer"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `AUTH-1003`: your seat was deactivated (view only). `AUTH-1004`: all seats are inactive because the seat charge was not paid (view only). `AUTH-1002`: your role lacks the `contacts.import_export` permission. `API-8102`: the API key or app lacks the `imports_exports:write` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"`CRM-6029`: no such import or export.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"409":{"description":"`CRM-6035`: still being checked, already started, no valid row, or the file has errors and `import_valid_rows` is not set. `CRM-6028`: a segment has the `segment_name`.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["imports_exports:write"]},{"oauth2":["imports_exports:write"]}],"summary":"Start a checked import","tags":["imports-exports"]}},"/v1/crm-exports":{"post":{"description":"What a segment or a filter lists (at most 100,000 records), written in the background; download it with `GET /v1/crm-transfers/{id}/file` when it is `completed`.","operationId":"createCrmExport","parameters":[{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}},{"name":"Idempotency-Key","in":"header","description":"A unique key for this operation (e.g. a UUID, 1 to 255 visible characters), kept 24 hours: repeating the request with the same key returns the first answer (`Idempotent-Replayed: true`) instead of doing it again. Errors: `API-8109` (400) a key that is not valid, `API-8108` (409, retryable) the first request with this key is still running, `API-8107` (422) the key was used for a different request; `API-8118` (409) the first request created something whose secret is shown only once, so its answer is not repeated. An answer with `shown_once` repeats its secret within 10 minutes, then `API-8118`.","required":false,"schema":{"type":"string","minLength":1,"maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateExport"}}}},"responses":{"202":{"description":"The export, running.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CrmTransfer"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `AUTH-1003`: your seat was deactivated (view only). `AUTH-1004`: all seats are inactive because the seat charge was not paid (view only). `AUTH-1002`: your role lacks the `contacts.import_export` permission. `API-8102`: the API key or app lacks the `imports_exports:write` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"`CRM-6027`: no such segment.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"description":"`API-8001`: some fields are missing or not valid. `details.fields` lists each invalid field with its own code (e.g. `API-8002` required, `API-8012` wrong format). `CRM-6039`: more than 100,000 records. `CRM-6041`: the segment lists the other entity.","headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["imports_exports:write"]},{"oauth2":["imports_exports:write"]}],"summary":"Export contacts or companies to a CSV file","tags":["imports-exports"]}},"/v1/crm-transfers/{transferId}/file":{"get":{"description":"Recorded in the audit log.","operationId":"downloadCrmExport","parameters":[{"name":"transferId","required":true,"in":"path","description":"The import or export id.","schema":{"type":"string","format":"uuid","description":"The import or export id."}},{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"The file.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CsvFile"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `AUTH-1002`: your role lacks the `contacts.import_export` permission. `API-8102`: the API key or app lacks the `imports_exports:read` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"`CRM-6029`: no such import or export.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"409":{"description":"`CRM-6040`: the export has not completed (or it is an import).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["imports_exports:read"]},{"oauth2":["imports_exports:read"]}],"summary":"Download an exported file","tags":["imports-exports"]}},"/v1/crm-transfers/{transferId}/errors":{"get":{"description":"A CSV of the rows with errors (or set aside by the import): their original columns, then an `error` column with the reasons in the language of the request. Fix the rows and upload the file again (the `error` column is ignored).","operationId":"downloadCrmTransferErrors","parameters":[{"name":"transferId","required":true,"in":"path","description":"The import or export id.","schema":{"type":"string","format":"uuid","description":"The import or export id."}},{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"The file.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CsvFile"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `AUTH-1002`: your role lacks the `contacts.import_export` permission. `API-8102`: the API key or app lacks the `imports_exports:read` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"`CRM-6029`: no such import or export.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["imports_exports:read"]},{"oauth2":["imports_exports:read"]}],"summary":"Download an import's row errors","tags":["imports-exports"]}},"/v1/crm-transfers/{transferId}/error-preview":{"get":{"description":"The rows with errors: how many, grouped by reason, and the first `limit` rows (20 by default) as they are in the file with their row number and every error’s column and reason, in the language of the request.","operationId":"getCrmImportErrorPreview","parameters":[{"name":"transferId","required":true,"in":"path","description":"The import or export id.","schema":{"type":"string","format":"uuid","description":"The import or export id."}},{"name":"limit","required":false,"in":"query","description":"Rows with errors to list (1 to 100, 20 by default).","schema":{"default":20,"description":"Rows with errors to list (1 to 100, 20 by default).","type":"integer","minimum":1,"maximum":100}},{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"The preview.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CrmImportErrorPreview"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `AUTH-1002`: your role lacks the `contacts.import_export` permission. `API-8102`: the API key or app lacks the `imports_exports:read` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"`CRM-6029`: no such import or export.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["imports_exports:read"]},{"oauth2":["imports_exports:read"]}],"summary":"Preview an import's row errors","tags":["imports-exports"]}},"/v1/organization/membership/list-views/{view}":{"get":{"description":"How you last left a list (customers: its tab, filters and open segment; tickets: its assignee and status filters), on any device; `state` is null until you change it. A tag or segment deleted since is left out, a space archived since becomes `all`.","operationId":"getListView","parameters":[{"name":"view","required":true,"in":"path","schema":{"$ref":"#/components/schemas/MemberListView"}},{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Your view.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MemberListViewDocument"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `API-8102`: the API key or app lacks the `members:read` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["members:read"]},{"oauth2":["members:read"]}],"summary":"Get your view of a list","tags":["members"]},"put":{"description":"Replaces how the list opens for you on every device. Allowed on an inactive seat: it changes nothing of the organization.","operationId":"saveListView","parameters":[{"name":"view","required":true,"in":"path","schema":{"$ref":"#/components/schemas/MemberListView"}},{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}},{"name":"Idempotency-Key","in":"header","description":"A unique key for this operation (e.g. a UUID, 1 to 255 visible characters), kept 24 hours: repeating the request with the same key returns the first answer (`Idempotent-Replayed: true`) instead of doing it again. Errors: `API-8109` (400) a key that is not valid, `API-8108` (409, retryable) the first request with this key is still running, `API-8107` (422) the key was used for a different request; `API-8118` (409) the first request created something whose secret is shown only once, so its answer is not repeated. An answer with `shown_once` repeats its secret within 10 minutes, then `API-8118`.","required":false,"schema":{"type":"string","minLength":1,"maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SaveListViewRequest"}}}},"responses":{"200":{"description":"Your view.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MemberListViewDocument"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `API-8102`: the API key or app lacks the `members:write` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in. `API-8148`: not available to test keys (API test mode).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["members:write"]},{"oauth2":["members:write"]}],"summary":"Save your view of a list","tags":["members"]}},"/v1/ticket-exports":{"get":{"description":"Whole tickets, oldest change first, each in the import's own shape (`rabt.ticket_export` version 1): its fields, number, status and priority, classifications, tags, space, assignee, channel, contact and company (names, emails, phones in `related`), every item (messages with an email's HTML, notes, calls with transcript and a recording link, edits, reactions), system events, attachments with download links valid an hour, and the source ids it was imported by. A page's `data` is sent as is to another organization's `POST /v1/ticket-imports/{importId}/tickets` with `source: rabt` (its structure first). Start with `updated_since` (or nothing, for everything), then pass `next_cursor` until `end_of_stream`; later, the last `next_cursor` gives what changed since (a ticket comes again when its fields change or it gets an item, none is skipped, the last minute's changes wait; deleted tickets are left out). Up to 50 tickets a page, within one import call (1 MiB, 2,000 items): a larger ticket comes alone and is imported in parts, its items split. Owner and admins (`contacts.import_export` and `tickets.view_all`); a key or app needs `tickets:read` and `contacts:read`. Each page is in the sensitive-access log, and 1,000 tickets within an hour raise the large-export alert.","operationId":"exportTickets","parameters":[{"name":"updated_since","required":false,"in":"query","description":"The first page: only tickets changed at or after this time (ISO 8601). Later pages carry on from `cursor`.","schema":{"description":"The first page: only tickets changed at or after this time (ISO 8601). Later pages carry on from `cursor`.","type":"string","format":"date-time"}},{"name":"channel_id","required":false,"in":"query","description":"Only the tickets of this connected channel (one number or mailbox).","schema":{"description":"Only the tickets of this connected channel (one number or mailbox).","type":"string","format":"uuid"}},{"name":"cursor","required":false,"in":"query","description":"The `next_cursor` of the previous page (or of the last run, for later changes).","schema":{"description":"The `next_cursor` of the previous page (or of the last run, for later changes).","type":"string","maxLength":200,"pattern":"^[A-Za-z0-9_-]+$"}},{"name":"limit","required":false,"in":"query","description":"Tickets per page (1 to 50, default 50).","schema":{"default":50,"description":"Tickets per page (1 to 50, default 50).","type":"integer","minimum":1,"maximum":50}},{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"A page of tickets.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TicketExportPage"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `AUTH-1002`: your role lacks the `contacts.import_export` permission. `API-8102`: the API key or app lacks the `tickets:read` or `contacts:read` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["tickets:read","contacts:read"]},{"oauth2":["tickets:read","contacts:read"]}],"summary":"Export whole tickets","tags":["ticket-exports"]}},"/v1/ticket-imports/options":{"get":{"description":"Everything a source's values are mapped to, in one read: the organization, its spaces, members (the inactive imported ones too, with their email and role), roles, connected channels (id, type, name, address, status), tags, classification lists with their options, the ticket statuses and priorities, the import's limits and the order the structure is sent in (spaces → members → channels → contacts and companies → canned replies and AI knowledge → tickets). Map each source value to one of these with the person's approval; an import never creates a space, channel, tag or option.","operationId":"getTicketImportOptions","parameters":[{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"The target structure.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TicketImportOptions"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `AUTH-1002`: your role lacks the `contacts.import_export` permission. `API-8102`: the API key or app lacks the `tickets:read` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["tickets:read"]},{"oauth2":["tickets:read"]}],"summary":"The structure tickets are imported into","tags":["ticket-imports"]}},"/v1/ticket-imports":{"get":{"operationId":"listTicketImports","parameters":[{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"The newest 50 batches, newest first.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TicketImportList"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `AUTH-1002`: your role lacks the `contacts.import_export` permission. `API-8102`: the API key or app lacks the `tickets:read` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["tickets:read"]},{"oauth2":["tickets:read"]}],"summary":"List the ticket import batches","tags":["ticket-imports"]},"post":{"description":"A batch of one source system and account: a `sample` first (about 20 tickets, to review the mapping, withdrawable), then the `full` import (never withdrawn; a later full batch sends the delta after the cut-over). Free, and nothing is sent to customers. Send the structure first (`POST /v1/ticket-imports/members`, `/contacts`, `/refs`), then the tickets.","operationId":"startTicketImport","parameters":[{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}},{"name":"Idempotency-Key","in":"header","description":"A unique key for this operation (e.g. a UUID, 1 to 255 visible characters), kept 24 hours: repeating the request with the same key returns the first answer (`Idempotent-Replayed: true`) instead of doing it again. Errors: `API-8109` (400) a key that is not valid, `API-8108` (409, retryable) the first request with this key is still running, `API-8107` (422) the key was used for a different request; `API-8118` (409) the first request created something whose secret is shown only once, so its answer is not repeated. An answer with `shown_once` repeats its secret within 10 minutes, then `API-8118`.","required":false,"schema":{"type":"string","minLength":1,"maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StartTicketImport"}}}},"responses":{"201":{"description":"The batch, open.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TicketImport"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `AUTH-1003`: your seat was deactivated (view only). `AUTH-1004`: all seats are inactive because the seat charge was not paid (view only). `AUTH-1002`: your role lacks the `contacts.import_export` permission. `API-8102`: the API key or app lacks the `tickets:write` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["tickets:write"]},{"oauth2":["tickets:write"]}],"summary":"Start a ticket import batch","tags":["ticket-imports"]}},"/v1/ticket-imports/members":{"post":{"description":"Each agent is the member with that email, else a new inactive imported member: no seat fee, no invitation and no sign-in, so their replies and notes keep their author. Inviting that email later makes them a paid seat. Idempotent by source id. Not in test mode (`API-8148`: members are never changed there).","operationId":"importTicketMembers","parameters":[{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}},{"name":"Idempotency-Key","in":"header","description":"A unique key for this operation (e.g. a UUID, 1 to 255 visible characters), kept 24 hours: repeating the request with the same key returns the first answer (`Idempotent-Replayed: true`) instead of doing it again. Errors: `API-8109` (400) a key that is not valid, `API-8108` (409, retryable) the first request with this key is still running, `API-8107` (422) the key was used for a different request; `API-8118` (409) the first request created something whose secret is shown only once, so its answer is not repeated. An answer with `shown_once` repeats its secret within 10 minutes, then `API-8118`.","required":false,"schema":{"type":"string","minLength":1,"maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ImportTicketMembers"}}}},"responses":{"200":{"description":"Each agent with its member.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TicketImportStructure"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `AUTH-1003`: your seat was deactivated (view only). `AUTH-1004`: all seats are inactive because the seat charge was not paid (view only). `AUTH-1002`: your role lacks the `contacts.import_export` permission. `API-8102`: the API key or app lacks the `members:write` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in. `API-8148`: not available to test keys (API test mode).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["members:write"]},{"oauth2":["members:write"]}],"summary":"Import the source's agents as members","tags":["ticket-imports"]}},"/v1/ticket-imports/contacts":{"post":{"description":"Companies first (matched by email domain), then contacts, matched by phone number or email address, never by name: a matched contact is completed, never overwritten, so one person from two systems is one contact. Invalid or taken phones and emails are skipped and named. Idempotent by source id.","operationId":"importTicketContacts","parameters":[{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}},{"name":"Idempotency-Key","in":"header","description":"A unique key for this operation (e.g. a UUID, 1 to 255 visible characters), kept 24 hours: repeating the request with the same key returns the first answer (`Idempotent-Replayed: true`) instead of doing it again. Errors: `API-8109` (400) a key that is not valid, `API-8108` (409, retryable) the first request with this key is still running, `API-8107` (422) the key was used for a different request; `API-8118` (409) the first request created something whose secret is shown only once, so its answer is not repeated. An answer with `shown_once` repeats its secret within 10 minutes, then `API-8118`.","required":false,"schema":{"type":"string","minLength":1,"maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ImportTicketContacts"}}}},"responses":{"200":{"description":"Each company and contact with its Rabt row.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TicketImportStructure"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `AUTH-1003`: your seat was deactivated (view only). `AUTH-1004`: all seats are inactive because the seat charge was not paid (view only). `AUTH-1002`: your role lacks the `contacts.import_export` permission. `API-8102`: the API key or app lacks the `contacts:write` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["contacts:write"]},{"oauth2":["contacts:write"]}],"summary":"Import the source's contacts and companies","tags":["ticket-imports"]}},"/v1/ticket-imports/refs":{"post":{"description":"Each source id (a group, an agent, a channel or address, a contact, a company) to the existing space, member, connected channel, contact or company the person approved, so tickets name it by its source id. A row that is not this organization’s live one is refused in its result (`TKT-6248`). Mapping again replaces the mapping.","operationId":"mapTicketImportRefs","parameters":[{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}},{"name":"Idempotency-Key","in":"header","description":"A unique key for this operation (e.g. a UUID, 1 to 255 visible characters), kept 24 hours: repeating the request with the same key returns the first answer (`Idempotent-Replayed: true`) instead of doing it again. Errors: `API-8109` (400) a key that is not valid, `API-8108` (409, retryable) the first request with this key is still running, `API-8107` (422) the key was used for a different request; `API-8118` (409) the first request created something whose secret is shown only once, so its answer is not repeated. An answer with `shown_once` repeats its secret within 10 minutes, then `API-8118`.","required":false,"schema":{"type":"string","minLength":1,"maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MapTicketImportRefs"}}}},"responses":{"200":{"description":"Each mapping.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TicketImportStructure"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `AUTH-1003`: your seat was deactivated (view only). `AUTH-1004`: all seats are inactive because the seat charge was not paid (view only). `AUTH-1002`: your role lacks the `contacts.import_export` permission. `API-8102`: the API key or app lacks the `tickets:write` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["tickets:write"]},{"oauth2":["tickets:write"]}],"summary":"Map source ids to existing Rabt rows","tags":["ticket-imports"]}},"/v1/ticket-imports/{importId}":{"get":{"operationId":"getTicketImport","parameters":[{"name":"importId","required":true,"in":"path","description":"The import batch id.","schema":{"type":"string","format":"uuid","description":"The import batch id."}},{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"The batch with its counts, and its failed attachments with their codes.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TicketImport"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `AUTH-1002`: your role lacks the `contacts.import_export` permission. `API-8102`: the API key or app lacks the `tickets:read` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"`TKT-6245`: no such import batch in this organization.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["tickets:read"]},{"oauth2":["tickets:read"]}],"summary":"Get a ticket import batch","tags":["ticket-imports"]}},"/v1/ticket-imports/{importId}/tickets":{"post":{"description":"Up to 50 tickets, 2,000 messages and notes, or 1 MiB per call, each with its messages and notes (original times and authors), status, priority, close date, tags and options the mapping chose, and every other field in «تفاصيل الاستيراد». Each ticket is checked and imported on its own: `created`, `updated` (items appended, fields changed), `unchanged` (sent before) or `invalid` with every issue and its field path; `unmapped` lists the values no Rabt target was found for. `validate_only` checks everything and writes nothing. Imported tickets never route, notify, answer with AI, send or bill. A long ticket goes over several calls with the same `external_id`.","operationId":"importTickets","parameters":[{"name":"importId","required":true,"in":"path","description":"The import batch id.","schema":{"type":"string","format":"uuid","description":"The import batch id."}},{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}},{"name":"Idempotency-Key","in":"header","description":"A unique key for this operation (e.g. a UUID, 1 to 255 visible characters), kept 24 hours: repeating the request with the same key returns the first answer (`Idempotent-Replayed: true`) instead of doing it again. Errors: `API-8109` (400) a key that is not valid, `API-8108` (409, retryable) the first request with this key is still running, `API-8107` (422) the key was used for a different request; `API-8118` (409) the first request created something whose secret is shown only once, so its answer is not repeated. An answer with `shown_once` repeats its secret within 10 minutes, then `API-8118`.","required":false,"schema":{"type":"string","minLength":1,"maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ImportTickets"}}}},"responses":{"200":{"description":"Each ticket’s result.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TicketImportAnswer"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `AUTH-1003`: your seat was deactivated (view only). `AUTH-1004`: all seats are inactive because the seat charge was not paid (view only). `AUTH-1002`: your role lacks the `contacts.import_export` permission. `API-8102`: the API key or app lacks the `tickets:write` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"`TKT-6245`: no such import batch in this organization.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"409":{"description":"`TKT-6246`: the batch is completed or withdrawn. `TKT-6257`: no channel is connected yet (never in the test space).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"413":{"description":"`TKT-6249`: more than 50 tickets. `TKT-6258`: more than 2,000 messages and notes in all. `TKT-6251`: more than 1 MiB of tickets.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"description":"`API-8001`: some fields are missing or not valid. `details.fields` lists each invalid field with its own code (e.g. `API-8002` required, `API-8012` wrong format). `TKT-6254`: a ticket id repeated in the call.","headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["tickets:write"]},{"oauth2":["tickets:write"]}],"summary":"Import tickets with their history","tags":["ticket-imports"]}},"/v1/ticket-imports/{importId}/complete":{"post":{"description":"The batch takes no more tickets; sent as the `ticket_import.completed` webhook with its counts.","operationId":"completeTicketImport","parameters":[{"name":"importId","required":true,"in":"path","description":"The import batch id.","schema":{"type":"string","format":"uuid","description":"The import batch id."}},{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}},{"name":"Idempotency-Key","in":"header","description":"A unique key for this operation (e.g. a UUID, 1 to 255 visible characters), kept 24 hours: repeating the request with the same key returns the first answer (`Idempotent-Replayed: true`) instead of doing it again. Errors: `API-8109` (400) a key that is not valid, `API-8108` (409, retryable) the first request with this key is still running, `API-8107` (422) the key was used for a different request; `API-8118` (409) the first request created something whose secret is shown only once, so its answer is not repeated. An answer with `shown_once` repeats its secret within 10 minutes, then `API-8118`.","required":false,"schema":{"type":"string","minLength":1,"maxLength":255}}],"responses":{"200":{"description":"The batch, done.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TicketImport"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `AUTH-1003`: your seat was deactivated (view only). `AUTH-1004`: all seats are inactive because the seat charge was not paid (view only). `AUTH-1002`: your role lacks the `contacts.import_export` permission. `API-8102`: the API key or app lacks the `tickets:write` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"`TKT-6245`: no such import batch in this organization.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"409":{"description":"`TKT-6246`: the batch is completed or withdrawn.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["tickets:write"]},{"oauth2":["tickets:write"]}],"summary":"Complete a ticket import batch","tags":["ticket-imports"]}},"/v1/ticket-imports/{importId}/retry-attachments":{"post":{"description":"Every failed attachment of the batch is fetched again (an erased contact’s and a withdrawn ticket’s excepted): pending again, then stored or failed with its code. Sending it again while they are pending changes nothing. The batch may be open or completed.","operationId":"retryTicketImportAttachments","parameters":[{"name":"importId","required":true,"in":"path","description":"The import batch id.","schema":{"type":"string","format":"uuid","description":"The import batch id."}},{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}},{"name":"Idempotency-Key","in":"header","description":"A unique key for this operation (e.g. a UUID, 1 to 255 visible characters), kept 24 hours: repeating the request with the same key returns the first answer (`Idempotent-Replayed: true`) instead of doing it again. Errors: `API-8109` (400) a key that is not valid, `API-8108` (409, retryable) the first request with this key is still running, `API-8107` (422) the key was used for a different request; `API-8118` (409) the first request created something whose secret is shown only once, so its answer is not repeated. An answer with `shown_once` repeats its secret within 10 minutes, then `API-8118`.","required":false,"schema":{"type":"string","minLength":1,"maxLength":255}}],"responses":{"200":{"description":"The batch with its attachments by state.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TicketImport"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `AUTH-1003`: your seat was deactivated (view only). `AUTH-1004`: all seats are inactive because the seat charge was not paid (view only). `AUTH-1002`: your role lacks the `contacts.import_export` permission. `API-8102`: the API key or app lacks the `tickets:write` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"`TKT-6245`: no such import batch in this organization.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"409":{"description":"`TKT-6246`: the batch is withdrawn.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["tickets:write"]},{"oauth2":["tickets:write"]}],"summary":"Retry a batch's failed attachments","tags":["ticket-imports"]}},"/v1/ticket-imports/{importId}/withdraw":{"post":{"description":"Its tickets no member worked on since are soft-deleted (audited); the others, and every contact and member, stay. Sending the same tickets again later imports them anew. Only a sample (`TKT-6247` for a full batch).","operationId":"withdrawTicketImport","parameters":[{"name":"importId","required":true,"in":"path","description":"The import batch id.","schema":{"type":"string","format":"uuid","description":"The import batch id."}},{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}},{"name":"Idempotency-Key","in":"header","description":"A unique key for this operation (e.g. a UUID, 1 to 255 visible characters), kept 24 hours: repeating the request with the same key returns the first answer (`Idempotent-Replayed: true`) instead of doing it again. Errors: `API-8109` (400) a key that is not valid, `API-8108` (409, retryable) the first request with this key is still running, `API-8107` (422) the key was used for a different request; `API-8118` (409) the first request created something whose secret is shown only once, so its answer is not repeated. An answer with `shown_once` repeats its secret within 10 minutes, then `API-8118`.","required":false,"schema":{"type":"string","minLength":1,"maxLength":255}}],"responses":{"200":{"description":"The batch, withdrawn, with its counts.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TicketImportWithdrawal"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `AUTH-1003`: your seat was deactivated (view only). `AUTH-1004`: all seats are inactive because the seat charge was not paid (view only). `AUTH-1002`: your role lacks the `contacts.import_export` permission. `API-8102`: the API key or app lacks the `tickets:write` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"`TKT-6245`: no such import batch in this organization.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"409":{"description":"`TKT-6247`: a full batch is never withdrawn. `TKT-6246`: withdrawn already.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["tickets:write"]},{"oauth2":["tickets:write"]}],"summary":"Withdraw a sample batch","tags":["ticket-imports"]}},"/v1/spaces":{"get":{"description":"The department spaces you see: yours, or all with `tickets.view_all` or `spaces.manage`, with how many members are available now.","operationId":"listSpaces","parameters":[{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"The spaces.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SpaceList"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `API-8102`: the API key or app lacks the `spaces:read` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["spaces:read"]},{"oauth2":["spaces:read"]}],"summary":"List spaces","tags":["spaces"]},"post":{"operationId":"createSpace","parameters":[{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}},{"name":"Idempotency-Key","in":"header","description":"A unique key for this operation (e.g. a UUID, 1 to 255 visible characters), kept 24 hours: repeating the request with the same key returns the first answer (`Idempotent-Replayed: true`) instead of doing it again. Errors: `API-8109` (400) a key that is not valid, `API-8108` (409, retryable) the first request with this key is still running, `API-8107` (422) the key was used for a different request; `API-8118` (409) the first request created something whose secret is shown only once, so its answer is not repeated. An answer with `shown_once` repeats its secret within 10 minutes, then `API-8118`.","required":false,"schema":{"type":"string","minLength":1,"maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateSpace"}}}},"responses":{"201":{"description":"The space.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Space"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `AUTH-1003`: your seat was deactivated (view only). `AUTH-1004`: all seats are inactive because the seat charge was not paid (view only). `AUTH-1002`: your role lacks the `spaces.manage` permission. `API-8102`: the API key or app lacks the `spaces:write` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"409":{"description":"`SPC-6202`: a space with this name exists.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["spaces:write"]},{"oauth2":["spaces:write"]}],"summary":"Create a department space","tags":["spaces"]}},"/v1/spaces/{spaceId}":{"get":{"operationId":"getSpace","parameters":[{"name":"spaceId","required":true,"in":"path","description":"The space id.","schema":{"type":"string","format":"uuid","description":"The space id."}},{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"The space.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Space"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `API-8102`: the API key or app lacks the `spaces:read` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"`SPC-6201`: no such space, it is archived, or you are not in it (the same answer).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["spaces:read"]},{"oauth2":["spaces:read"]}],"summary":"A space","tags":["spaces"]},"patch":{"description":"Its name, description, returning-customer window and \"no member available\" message.","operationId":"updateSpace","parameters":[{"name":"spaceId","required":true,"in":"path","description":"The space id.","schema":{"type":"string","format":"uuid","description":"The space id."}},{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}},{"name":"Idempotency-Key","in":"header","description":"A unique key for this operation (e.g. a UUID, 1 to 255 visible characters), kept 24 hours: repeating the request with the same key returns the first answer (`Idempotent-Replayed: true`) instead of doing it again. Errors: `API-8109` (400) a key that is not valid, `API-8108` (409, retryable) the first request with this key is still running, `API-8107` (422) the key was used for a different request; `API-8118` (409) the first request created something whose secret is shown only once, so its answer is not repeated. An answer with `shown_once` repeats its secret within 10 minutes, then `API-8118`.","required":false,"schema":{"type":"string","minLength":1,"maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateSpace"}}}},"responses":{"200":{"description":"The space.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Space"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `AUTH-1003`: your seat was deactivated (view only). `AUTH-1004`: all seats are inactive because the seat charge was not paid (view only). `AUTH-1002`: your role lacks the `spaces.manage` permission. `API-8102`: the API key or app lacks the `spaces:write` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"`SPC-6201`: no such space, it is archived, or you are not in it (the same answer).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"409":{"description":"`SPC-6202`: a space with this name exists.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["spaces:write"]},{"oauth2":["spaces:write"]}],"summary":"Edit a space","tags":["spaces"]}},"/v1/spaces/{spaceId}/archive":{"post":{"description":"Never deleted: its channels are released. Its open tickets (queue and assigned) move in the same request to `tickets_to`: another space or a member (`all` is refused with `SPC-6222`: All is a view, never a destination); none chosen: `SPC-6224` with their count.","operationId":"archiveSpace","parameters":[{"name":"spaceId","required":true,"in":"path","description":"The space id.","schema":{"type":"string","format":"uuid","description":"The space id."}},{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}},{"name":"Idempotency-Key","in":"header","description":"A unique key for this operation (e.g. a UUID, 1 to 255 visible characters), kept 24 hours: repeating the request with the same key returns the first answer (`Idempotent-Replayed: true`) instead of doing it again. Errors: `API-8109` (400) a key that is not valid, `API-8108` (409, retryable) the first request with this key is still running, `API-8107` (422) the key was used for a different request; `API-8118` (409) the first request created something whose secret is shown only once, so its answer is not repeated. An answer with `shown_once` repeats its secret within 10 minutes, then `API-8118`.","required":false,"schema":{"type":"string","minLength":1,"maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SettleTickets"}}}},"responses":{"204":{"description":"Archived.","headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `AUTH-1003`: your seat was deactivated (view only). `AUTH-1004`: all seats are inactive because the seat charge was not paid (view only). `AUTH-1002`: your role lacks the `spaces.manage` permission. `API-8102`: the API key or app lacks the `spaces:write` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"`SPC-6201`: no such space, it is archived, or you are not in it (the same answer).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"409":{"description":"`SPC-6224`: open tickets and no `tickets_to`; `SPC-6225`: not exactly one valid destination; `SPC-6222`: `all`.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["spaces:write"]},{"oauth2":["spaces:write"]}],"summary":"Archive a space","tags":["spaces"]}},"/v1/spaces/{spaceId}/members":{"get":{"operationId":"listSpaceMembers","parameters":[{"name":"spaceId","required":true,"in":"path","description":"The space id.","schema":{"type":"string","format":"uuid","description":"The space id."}},{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"The members.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SpaceMemberList"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `API-8102`: the API key or app lacks the `spaces:read` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"`SPC-6201`: no such space, it is archived, or you are not in it (the same answer).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["spaces:read"]},{"oauth2":["spaces:read"]}],"summary":"The members of a space","tags":["spaces"]}},"/v1/spaces/{spaceId}/members/{membershipId}":{"put":{"description":"A member can be in several spaces; adding them again changes nothing.","operationId":"addSpaceMember","parameters":[{"name":"spaceId","required":true,"in":"path","description":"The space id.","schema":{"type":"string","format":"uuid","description":"The space id."}},{"name":"membershipId","required":true,"in":"path","description":"The member (membership id).","schema":{"type":"string","format":"uuid","description":"The member (membership id)."}},{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}},{"name":"Idempotency-Key","in":"header","description":"A unique key for this operation (e.g. a UUID, 1 to 255 visible characters), kept 24 hours: repeating the request with the same key returns the first answer (`Idempotent-Replayed: true`) instead of doing it again. Errors: `API-8109` (400) a key that is not valid, `API-8108` (409, retryable) the first request with this key is still running, `API-8107` (422) the key was used for a different request; `API-8118` (409) the first request created something whose secret is shown only once, so its answer is not repeated. An answer with `shown_once` repeats its secret within 10 minutes, then `API-8118`.","required":false,"schema":{"type":"string","minLength":1,"maxLength":255}}],"responses":{"200":{"description":"The member.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SpaceMember"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `AUTH-1003`: your seat was deactivated (view only). `AUTH-1004`: all seats are inactive because the seat charge was not paid (view only). `AUTH-1002`: your role lacks the `spaces.manage` permission. `API-8102`: the API key or app lacks the `spaces:write` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"`SPC-6201`: no such space, it is archived, or you are not in it (the same answer).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"description":"`API-8001`: some fields are missing or not valid. `details.fields` lists each invalid field with its own code (e.g. `API-8002` required, `API-8012` wrong format). `SPC-6205`: the member is not in this organization.","headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["spaces:write"]},{"oauth2":["spaces:write"]}],"summary":"Add a member to a space","tags":["spaces"]},"delete":{"description":"Tickets assigned to them stay theirs.","operationId":"removeSpaceMember","parameters":[{"name":"spaceId","required":true,"in":"path","description":"The space id.","schema":{"type":"string","format":"uuid","description":"The space id."}},{"name":"membershipId","required":true,"in":"path","description":"The member (membership id).","schema":{"type":"string","format":"uuid","description":"The member (membership id)."}},{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}}],"responses":{"204":{"description":"Removed.","headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `AUTH-1003`: your seat was deactivated (view only). `AUTH-1004`: all seats are inactive because the seat charge was not paid (view only). `AUTH-1002`: your role lacks the `spaces.manage` permission. `API-8102`: the API key or app lacks the `spaces:write` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"`SPC-6201`: no such space, it is archived, or you are not in it (the same answer).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["spaces:write"]},{"oauth2":["spaces:write"]}],"summary":"Remove a member from a space","tags":["spaces"]}},"/v1/spaces/{spaceId}/channels":{"get":{"operationId":"listSpaceChannels","parameters":[{"name":"spaceId","required":true,"in":"path","description":"The space id.","schema":{"type":"string","format":"uuid","description":"The space id."}},{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"The assignments.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SpaceChannelList"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `API-8102`: the API key or app lacks the `spaces:read` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"`SPC-6201`: no such space, it is archived, or you are not in it (the same answer).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["spaces:read"]},{"oauth2":["spaces:read"]}],"summary":"The channels, email addresses and phone numbers of a space","tags":["spaces"]},"post":{"description":"Its new tickets go to this space (a two-sided account’s on both sides, one assignment per side). Already here: the assignment is returned.","operationId":"assignSpaceChannel","parameters":[{"name":"spaceId","required":true,"in":"path","description":"The space id.","schema":{"type":"string","format":"uuid","description":"The space id."}},{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}},{"name":"Idempotency-Key","in":"header","description":"A unique key for this operation (e.g. a UUID, 1 to 255 visible characters), kept 24 hours: repeating the request with the same key returns the first answer (`Idempotent-Replayed: true`) instead of doing it again. Errors: `API-8109` (400) a key that is not valid, `API-8108` (409, retryable) the first request with this key is still running, `API-8107` (422) the key was used for a different request; `API-8118` (409) the first request created something whose secret is shown only once, so its answer is not repeated. An answer with `shown_once` repeats its secret within 10 minutes, then `API-8118`.","required":false,"schema":{"type":"string","minLength":1,"maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AssignSpaceChannel"}}}},"responses":{"201":{"description":"The assignment.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SpaceChannel"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `AUTH-1003`: your seat was deactivated (view only). `AUTH-1004`: all seats are inactive because the seat charge was not paid (view only). `AUTH-1002`: your role lacks the `spaces.manage` permission. `API-8102`: the API key or app lacks the `spaces:write` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"`SPC-6201`: no such space, it is archived, or you are not in it (the same answer). `SPC-6208`: no connected email address with this `channel_address_id`.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"409":{"description":"`SPC-6203`: it belongs to another space (named).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"description":"`API-8001`: some fields are missing or not valid. `details.fields` lists each invalid field with its own code (e.g. `API-8002` required, `API-8012` wrong format). `SPC-6209`: no channel of the organization has this `channel_id`.","headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["spaces:write"]},{"oauth2":["spaces:write"]}],"summary":"Assign a channel, email address or phone number to a space","tags":["spaces"]}},"/v1/spaces/{spaceId}/channels/{assignmentId}":{"delete":{"description":"Its new tickets go to the member who connected each item, else the owner (docs/17).","operationId":"unassignSpaceChannel","parameters":[{"name":"spaceId","required":true,"in":"path","description":"The space id.","schema":{"type":"string","format":"uuid","description":"The space id."}},{"name":"assignmentId","required":true,"in":"path","description":"The channel assignment id.","schema":{"type":"string","format":"uuid","description":"The channel assignment id."}},{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}}],"responses":{"204":{"description":"Removed.","headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `AUTH-1003`: your seat was deactivated (view only). `AUTH-1004`: all seats are inactive because the seat charge was not paid (view only). `AUTH-1002`: your role lacks the `spaces.manage` permission. `API-8102`: the API key or app lacks the `spaces:write` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"`SPC-6201`: no such space, it is archived, or you are not in it (the same answer). `SPC-6204`: no such assignment in this space.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["spaces:write"]},{"oauth2":["spaces:write"]}],"summary":"Remove a channel from a space","tags":["spaces"]}},"/v1/availability":{"get":{"description":"Every member’s status (Available or Unavailable), open tickets (all, and those in department spaces against the organization’s limit) and spaces (the team board).","operationId":"listTeamAvailability","parameters":[{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"The members.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TeamAvailability"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `API-8102`: the API key or app lacks the `spaces:read` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["spaces:read"]},{"oauth2":["spaces:read"]}],"summary":"Who is available now","tags":["availability"]}},"/v1/availability/me":{"get":{"description":"Your status (Available or Unavailable), open tickets, limit and spaces.","operationId":"getMyAvailability","parameters":[{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"You.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TeamMember"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `API-8102`: the API key or app lacks the `spaces:read` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["spaces:read"]},{"oauth2":["spaces:read"]}],"summary":"Your availability","tags":["availability"]},"put":{"description":"Available or Unavailable. Unavailable only stops the automatic distribution giving you new tickets from department spaces: your open tickets, and items routed to you, stay yours. You also become Unavailable after 5 minutes with Rabt closed or disconnected.","operationId":"setMyAvailability","parameters":[{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}},{"name":"Idempotency-Key","in":"header","description":"A unique key for this operation (e.g. a UUID, 1 to 255 visible characters), kept 24 hours: repeating the request with the same key returns the first answer (`Idempotent-Replayed: true`) instead of doing it again. Errors: `API-8109` (400) a key that is not valid, `API-8108` (409, retryable) the first request with this key is still running, `API-8107` (422) the key was used for a different request; `API-8118` (409) the first request created something whose secret is shown only once, so its answer is not repeated. An answer with `shown_once` repeats its secret within 10 minutes, then `API-8118`.","required":false,"schema":{"type":"string","minLength":1,"maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SetAvailability"}}}},"responses":{"200":{"description":"You.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TeamMember"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `AUTH-1003`: your seat was deactivated (view only). `AUTH-1004`: all seats are inactive because the seat charge was not paid (view only). `API-8102`: the API key or app lacks the `spaces:write` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"description":"`API-8001`: some fields are missing or not valid. `details.fields` lists each invalid field with its own code (e.g. `API-8002` required, `API-8012` wrong format). `SPC-6220`: the away-with-reassign switch was removed (`reassign_while_away: true`).","headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["spaces:write"]},{"oauth2":["spaces:write"]}],"summary":"Set your availability","tags":["availability"]}},"/v1/team-board":{"get":{"description":"Live numbers, not reports: members available now, tickets waiting and the oldest of them, open tickets; each space’s queue; every member’s status and open tickets against their limit; and the waiting tickets you may see, oldest first, to take or assign. Needs `members.view_availability`.","operationId":"getTeamBoard","parameters":[{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"The board.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TeamBoard"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `AUTH-1002`: your role lacks the `members.view_availability` permission. `API-8102`: the API key or app lacks the `spaces:read` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["spaces:read"]},{"oauth2":["spaces:read"]}],"summary":"The live team board","tags":["availability"]}},"/v1/team-board/queue":{"get":{"description":"The tickets waiting in a space’s queue that you may see, oldest first, of one space or all of them, in pages (the board lists only the first 100). Needs `members.view_availability`.","operationId":"listTeamQueue","parameters":[{"name":"space_id","required":false,"in":"query","description":"Only the tickets waiting in this space.","schema":{"description":"Only the tickets waiting in this space.","type":"string","format":"uuid"}},{"name":"cursor","required":false,"in":"query","description":"The `next_cursor` of the previous page.","schema":{"description":"The `next_cursor` of the previous page.","type":"string","maxLength":200,"pattern":"^[A-Za-z0-9_-]+$"}},{"name":"page","required":false,"in":"query","description":"A numbered page to jump to, from 1, of `limit` rows: its first row must be within the first 10000 rows of the list. Ignored with `cursor`; the next pages follow `next_cursor`.","schema":{"description":"A numbered page to jump to, from 1, of `limit` rows: its first row must be within the first 10000 rows of the list. Ignored with `cursor`; the next pages follow `next_cursor`.","type":"integer","minimum":1,"maximum":10000}},{"name":"limit","required":false,"in":"query","description":"Tickets per page (1 to 100, default 20).","schema":{"default":20,"description":"Tickets per page (1 to 100, default 20).","type":"integer","minimum":1,"maximum":100}},{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"A page of the queue.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TeamQueuePage"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `AUTH-1002`: your role lacks the `members.view_availability` permission. `API-8102`: the API key or app lacks the `spaces:read` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["spaces:read"]},{"oauth2":["spaces:read"]}],"summary":"The waiting tickets, paged","tags":["availability"]}},"/v1/availability/totals":{"get":{"description":"The available time of each member on every local date from `from_date` to `to_date` (inclusive), and the total (docs/17: a day, a week, a month). Every member’s with `members.view_availability`, otherwise yours.","operationId":"getAvailabilityTotals","parameters":[{"name":"from_date","required":true,"in":"query","description":"A local date (YYYY-MM-DD) in the time zone; the period is at most 93 days.","schema":{"type":"string","format":"date","description":"A local date (YYYY-MM-DD) in the time zone; the period is at most 93 days."}},{"name":"to_date","required":true,"in":"query","description":"A local date (YYYY-MM-DD) in the time zone; the period is at most 93 days.","schema":{"type":"string","format":"date","description":"A local date (YYYY-MM-DD) in the time zone; the period is at most 93 days."}},{"name":"time_zone","required":false,"in":"query","description":"An IANA time zone for the daily totals (default: the organization’s).","schema":{"description":"An IANA time zone for the daily totals (default: the organization’s).","type":"string","minLength":1,"maxLength":64}},{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"The totals.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AvailabilityTotals"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `API-8102`: the API key or app lacks the `spaces:read` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"description":"`API-8001`: some fields are missing or not valid. `details.fields` lists each invalid field with its own code (e.g. `API-8002` required, `API-8012` wrong format). `SPC-6206`: the period is empty or too long. `SPC-6207`: unknown time zone.","headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["spaces:read"]},{"oauth2":["spaces:read"]}],"summary":"Available hours per member and day","tags":["availability"]}},"/v1/availability/members/{membershipId}":{"put":{"description":"Team now’s «Stop receiving» and «Resume receiving»: `unavailable` stops the member’s new tickets from their spaces’ distribution, `available` resumes them. A stop holds until the member or a manager turns them Available (reconnecting does not end it); the member sees who stopped them (`stopped_by_membership_id`). Recorded in the availability log with the manager and in the audit log. Your own status is your own switch. Needs `tickets.assign`.","operationId":"setMemberAvailability","parameters":[{"name":"membershipId","required":true,"in":"path","description":"The member (membership id).","schema":{"type":"string","format":"uuid","description":"The member (membership id)."}},{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}},{"name":"Idempotency-Key","in":"header","description":"A unique key for this operation (e.g. a UUID, 1 to 255 visible characters), kept 24 hours: repeating the request with the same key returns the first answer (`Idempotent-Replayed: true`) instead of doing it again. Errors: `API-8109` (400) a key that is not valid, `API-8108` (409, retryable) the first request with this key is still running, `API-8107` (422) the key was used for a different request; `API-8118` (409) the first request created something whose secret is shown only once, so its answer is not repeated. An answer with `shown_once` repeats its secret within 10 minutes, then `API-8118`.","required":false,"schema":{"type":"string","minLength":1,"maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SetMemberAvailability"}}}},"responses":{"200":{"description":"The member.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TeamMember"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `AUTH-1003`: your seat was deactivated (view only). `AUTH-1004`: all seats are inactive because the seat charge was not paid (view only). `AUTH-1002`: your role lacks the `tickets.assign` permission. `API-8102`: the API key or app lacks the `spaces:write` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"description":"`API-8001`: some fields are missing or not valid. `details.fields` lists each invalid field with its own code (e.g. `API-8002` required, `API-8012` wrong format). `SPC-6205`: the member is not in this organization.","headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["spaces:write"]},{"oauth2":["spaces:write"]}],"summary":"Stop or resume a member’s tickets","tags":["availability"]}},"/v1/availability/log":{"get":{"description":"The available and unavailable periods of a member, the available time per day and the total for a period (docs/17). Yours, or anyone’s with `members.view_availability`.","operationId":"getAvailabilityLog","parameters":[{"name":"from","required":true,"in":"query","description":"An ISO 8601 time; the period is at most 93 days.","schema":{"type":"string","format":"date-time","description":"An ISO 8601 time; the period is at most 93 days."}},{"name":"to","required":true,"in":"query","description":"An ISO 8601 time; the period is at most 93 days.","schema":{"type":"string","format":"date-time","description":"An ISO 8601 time; the period is at most 93 days."}},{"name":"membership_id","required":false,"in":"query","description":"The member; yours by default. Another member’s needs `members.view_availability`.","schema":{"type":"string","format":"uuid","description":"The member; yours by default. Another member’s needs `members.view_availability`."}},{"name":"time_zone","required":false,"in":"query","description":"An IANA time zone for the daily totals (default: the organization’s).","schema":{"description":"An IANA time zone for the daily totals (default: the organization’s).","type":"string","minLength":1,"maxLength":64}},{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"The log.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AvailabilityLog"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `API-8102`: the API key or app lacks the `spaces:read` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"description":"`API-8001`: some fields are missing or not valid. `details.fields` lists each invalid field with its own code (e.g. `API-8002` required, `API-8012` wrong format). `SPC-6205`: no such member. `SPC-6206`: the period is empty or too long. `SPC-6207`: unknown time zone.","headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["spaces:read"]},{"oauth2":["spaces:read"]}],"summary":"A member’s availability log","tags":["availability"]}},"/v1/routing-settings":{"get":{"operationId":"getRoutingSettings","parameters":[{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"The settings.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RoutingSettings"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `API-8102`: the API key or app lacks the `spaces:read` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["spaces:read"]},{"oauth2":["spaces:read"]}],"summary":"The routing settings","tags":["availability"]},"put":{"description":"`max_open_tickets`: the maximum of open tickets in department spaces per member, the same for every member (10 by default; one of 0, 5, 10, 15, 20, 30, 50, 1000 = no limit; 0 pauses it); members at it are skipped by the automatic distribution. Tickets in no department space (a member’s My space) never count, and items routed to a member directly never wait for it.","operationId":"updateRoutingSettings","parameters":[{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}},{"name":"Idempotency-Key","in":"header","description":"A unique key for this operation (e.g. a UUID, 1 to 255 visible characters), kept 24 hours: repeating the request with the same key returns the first answer (`Idempotent-Replayed: true`) instead of doing it again. Errors: `API-8109` (400) a key that is not valid, `API-8108` (409, retryable) the first request with this key is still running, `API-8107` (422) the key was used for a different request; `API-8118` (409) the first request created something whose secret is shown only once, so its answer is not repeated. An answer with `shown_once` repeats its secret within 10 minutes, then `API-8118`.","required":false,"schema":{"type":"string","minLength":1,"maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RoutingSettings"}}}},"responses":{"200":{"description":"The settings.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RoutingSettings"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `AUTH-1003`: your seat was deactivated (view only). `AUTH-1004`: all seats are inactive because the seat charge was not paid (view only). `AUTH-1002`: your role lacks the `spaces.manage` permission. `API-8102`: the API key or app lacks the `spaces:write` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["spaces:write"]},{"oauth2":["spaces:write"]}],"summary":"Change the routing settings","tags":["availability"]}},"/v1/routing/items":{"get":{"description":"Everything connected, grouped by channel type: email addresses and aliases, WhatsApp numbers, Instagram, X and TikTok accounts, Facebook pages, phone numbers, web chat widgets, apps and Google Maps locations, each with its one destination (a space or a member; All only while it has none yet) and its tickets of the last 24 hours; a two-sided account (Facebook, Instagram, X, TikTok) with each side’s (`sides`: its private messages and its public replies). The destination filter matches either side.","operationId":"listRoutingItems","parameters":[{"name":"channel_type","required":false,"in":"query","description":"Only these channel types (repeat the parameter for several).","schema":{"description":"Only these channel types (repeat the parameter for several).","anyOf":[{"$ref":"#/components/schemas/ChannelType"},{"maxItems":20,"type":"array","items":{"$ref":"#/components/schemas/ChannelType"}}]}},{"name":"destination","required":false,"in":"query","description":"Only items with this destination.","schema":{"description":"Only items with this destination.","type":"string","enum":["all","space","member"]}},{"name":"space_id","required":false,"in":"query","description":"With `destination=space`: only items routed to this space.","schema":{"description":"With `destination=space`: only items routed to this space.","type":"string","format":"uuid"}},{"name":"membership_id","required":false,"in":"query","description":"With `destination=member`: only items routed to this member.","schema":{"description":"With `destination=member`: only items routed to this member.","type":"string","format":"uuid"}},{"name":"q","required":false,"in":"query","description":"Words found in the address, the sender name or the channel’s name (Arabic-aware search).","schema":{"description":"Words found in the address, the sender name or the channel’s name (Arabic-aware search).","type":"string","maxLength":200}},{"name":"cursor","required":false,"in":"query","description":"The `next_cursor` of the previous page.","schema":{"description":"The `next_cursor` of the previous page.","type":"string","maxLength":200,"pattern":"^[A-Za-z0-9_-]+$"}},{"name":"page","required":false,"in":"query","description":"A numbered page to jump to, from 1, of `limit` rows: its first row must be within the first 10000 rows of the list. Ignored with `cursor`; the next pages follow `next_cursor`.","schema":{"description":"A numbered page to jump to, from 1, of `limit` rows: its first row must be within the first 10000 rows of the list. Ignored with `cursor`; the next pages follow `next_cursor`.","type":"integer","minimum":1,"maximum":10000}},{"name":"limit","required":false,"in":"query","description":"Items per page (1 to 500, default 100).","schema":{"default":100,"description":"Items per page (1 to 500, default 100).","type":"integer","minimum":1,"maximum":500}},{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"The items.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RoutingItemPage"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `AUTH-1003`: your seat was deactivated (view only). `AUTH-1004`: all seats are inactive because the seat charge was not paid (view only). `AUTH-1002`: your role lacks the `spaces.manage` permission. `API-8102`: the API key or app lacks the `spaces:read` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["spaces:read"]},{"oauth2":["spaces:read"]}],"summary":"List the routing items","tags":["routing"]}},"/v1/routing/items/{target}/{targetId}":{"get":{"operationId":"getRoutingItem","parameters":[{"name":"target","required":true,"in":"path","schema":{"$ref":"#/components/schemas/RoutingTargetType"}},{"name":"targetId","required":true,"in":"path","description":"The channel address id (`address`), the phone number id (`number`), or the channel or widget id (`channel`).","schema":{"type":"string","format":"uuid","description":"The channel address id (`address`), the phone number id (`number`), or the channel or widget id (`channel`)."}},{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"The item.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RoutingItem"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `AUTH-1003`: your seat was deactivated (view only). `AUTH-1004`: all seats are inactive because the seat charge was not paid (view only). `AUTH-1002`: your role lacks the `spaces.manage` permission. `API-8102`: the API key or app lacks the `spaces:read` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"`SPC-6211`: no connected address, account, phone number, channel or widget with this id (disconnected, released or removed).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["spaces:read"]},{"oauth2":["spaces:read"]}],"summary":"One routing item","tags":["routing"]}},"/v1/routing/items/{target}/{targetId}/destination":{"put":{"description":"Exactly one destination (a space or a member; `all` is refused with `SPC-6222`: a route is changed, never cleared) replaces the previous one, for the whole item or, on a two-sided account, one side (`kind`: `private` or `public`; left out: both sides); it applies to the next new ticket and is written to the audit log with its side.","operationId":"setRoutingDestination","parameters":[{"name":"target","required":true,"in":"path","schema":{"$ref":"#/components/schemas/RoutingTargetType"}},{"name":"targetId","required":true,"in":"path","description":"The channel address id (`address`), the phone number id (`number`), or the channel or widget id (`channel`).","schema":{"type":"string","format":"uuid","description":"The channel address id (`address`), the phone number id (`number`), or the channel or widget id (`channel`)."}},{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}},{"name":"Idempotency-Key","in":"header","description":"A unique key for this operation (e.g. a UUID, 1 to 255 visible characters), kept 24 hours: repeating the request with the same key returns the first answer (`Idempotent-Replayed: true`) instead of doing it again. Errors: `API-8109` (400) a key that is not valid, `API-8108` (409, retryable) the first request with this key is still running, `API-8107` (422) the key was used for a different request; `API-8118` (409) the first request created something whose secret is shown only once, so its answer is not repeated. An answer with `shown_once` repeats its secret within 10 minutes, then `API-8118`.","required":false,"schema":{"type":"string","minLength":1,"maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SetRoutingDestination"}}}},"responses":{"200":{"description":"The item.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RoutingItem"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `AUTH-1003`: your seat was deactivated (view only). `AUTH-1004`: all seats are inactive because the seat charge was not paid (view only). `AUTH-1002`: your role lacks the `spaces.manage` permission. `API-8102`: the API key or app lacks the `spaces:write` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"`SPC-6211`: no connected address, account, phone number, channel or widget with this id (disconnected, released or removed).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"description":"`API-8001`: some fields are missing or not valid. `details.fields` lists each invalid field with its own code (e.g. `API-8002` required, `API-8012` wrong format). `SPC-6222`: `all` (never a destination); `SPC-6212`: the channel carries addresses or numbers (route each); `SPC-6221`: `kind` on an item with one side; `SPC-6201`: no such space; `TKT-6107`/`TKT-6122`: the member cannot receive tickets.","headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["spaces:write"]},{"oauth2":["spaces:write"]}],"summary":"Set the destination of an item","tags":["routing"]}},"/v1/spaces/{spaceId}/customers":{"get":{"description":"The email addresses, mobile numbers and email domains (and contacts and companies) whose new tickets go to this space, oldest first.","operationId":"listSpaceCustomers","parameters":[{"name":"spaceId","required":true,"in":"path","description":"The space id.","schema":{"type":"string","format":"uuid","description":"The space id."}},{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"The customers.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomerRouteList"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `AUTH-1002`: your role lacks the `spaces.manage` permission. `API-8102`: the API key or app lacks the `spaces:read` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"`SPC-6201`: no such space, it is archived, or you are not in it (the same answer).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["spaces:read"]},{"oauth2":["spaces:read"]}],"summary":"The customers routed to a space","tags":["spaces"]},"post":{"description":"An email address, a mobile number or an email domain. Its new tickets go to this space before their channel's destination; a route it had elsewhere moves here. The open and in-progress tickets of its contacts whose finest route this now is move here too, in one background step (`ticket.moved`, then distributed here as usual); closed tickets never move.","operationId":"addSpaceCustomer","parameters":[{"name":"spaceId","required":true,"in":"path","description":"The space id.","schema":{"type":"string","format":"uuid","description":"The space id."}},{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}},{"name":"Idempotency-Key","in":"header","description":"A unique key for this operation (e.g. a UUID, 1 to 255 visible characters), kept 24 hours: repeating the request with the same key returns the first answer (`Idempotent-Replayed: true`) instead of doing it again. Errors: `API-8109` (400) a key that is not valid, `API-8108` (409, retryable) the first request with this key is still running, `API-8107` (422) the key was used for a different request; `API-8118` (409) the first request created something whose secret is shown only once, so its answer is not repeated. An answer with `shown_once` repeats its secret within 10 minutes, then `API-8118`.","required":false,"schema":{"type":"string","minLength":1,"maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AddSpaceCustomer"}}}},"responses":{"201":{"description":"The route, with how many tickets move.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AddedCustomerRoute"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `AUTH-1003`: your seat was deactivated (view only). `AUTH-1004`: all seats are inactive because the seat charge was not paid (view only). `AUTH-1002`: your role lacks the `spaces.manage` permission. `API-8102`: the API key or app lacks the `spaces:write` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"`SPC-6201`: no such space, it is archived, or you are not in it (the same answer).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"description":"`API-8001`: some fields are missing or not valid. `details.fields` lists each invalid field with its own code (e.g. `API-8002` required, `API-8012` wrong format). `SPC-6216`: a public email domain; `SPC-6217`: not an email address, mobile number or domain.","headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["spaces:write"]},{"oauth2":["spaces:write"]}],"summary":"Route a customer to a space","tags":["spaces"]}},"/v1/spaces/{spaceId}/customers/{routeId}":{"delete":{"description":"Their new tickets follow their channel's destination again; their tickets stay where they are.","operationId":"removeSpaceCustomer","parameters":[{"name":"spaceId","required":true,"in":"path","description":"The space id.","schema":{"type":"string","format":"uuid","description":"The space id."}},{"name":"routeId","required":true,"in":"path","description":"The customer route id.","schema":{"type":"string","format":"uuid","description":"The customer route id."}},{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}}],"responses":{"204":{"description":"Removed.","headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `AUTH-1003`: your seat was deactivated (view only). `AUTH-1004`: all seats are inactive because the seat charge was not paid (view only). `AUTH-1002`: your role lacks the `spaces.manage` permission. `API-8102`: the API key or app lacks the `spaces:write` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"`SPC-6218`: this customer is not routed to this space.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["spaces:write"]},{"oauth2":["spaces:write"]}],"summary":"Stop routing a customer to a space","tags":["spaces"]}},"/v1/contacts/{contactId}/destination":{"get":{"description":"Where the contact's new tickets go before their channel's destination.","operationId":"getContactDestination","parameters":[{"name":"contactId","required":true,"in":"path","description":"The contact id.","schema":{"type":"string","format":"uuid","description":"The contact id."}},{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"The destination.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomerDestination"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `API-8102`: the API key or app lacks the `spaces:read` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"`CRM-6001`: no such contact.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["spaces:read"]},{"oauth2":["spaces:read"]}],"summary":"A contact's destination","tags":["spaces"]},"put":{"description":"Exactly one destination (`all`: none of its own, a space or a member) for the contact's new tickets, before their channel's; written to the audit log. Its open and in-progress tickets move there too, in one background step (`ticket.moved`); `all` moves nothing.","operationId":"setContactDestination","parameters":[{"name":"contactId","required":true,"in":"path","description":"The contact id.","schema":{"type":"string","format":"uuid","description":"The contact id."}},{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}},{"name":"Idempotency-Key","in":"header","description":"A unique key for this operation (e.g. a UUID, 1 to 255 visible characters), kept 24 hours: repeating the request with the same key returns the first answer (`Idempotent-Replayed: true`) instead of doing it again. Errors: `API-8109` (400) a key that is not valid, `API-8108` (409, retryable) the first request with this key is still running, `API-8107` (422) the key was used for a different request; `API-8118` (409) the first request created something whose secret is shown only once, so its answer is not repeated. An answer with `shown_once` repeats its secret within 10 minutes, then `API-8118`.","required":false,"schema":{"type":"string","minLength":1,"maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SetCustomerDestination"}}}},"responses":{"200":{"description":"The destination, with how many tickets move.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChangedCustomerDestination"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `AUTH-1003`: your seat was deactivated (view only). `AUTH-1004`: all seats are inactive because the seat charge was not paid (view only). `AUTH-1002`: your role lacks the `spaces.manage` permission. `API-8102`: the API key or app lacks the `spaces:write` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"`CRM-6001`: no such contact.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"description":"`API-8001`: some fields are missing or not valid. `details.fields` lists each invalid field with its own code (e.g. `API-8002` required, `API-8012` wrong format). `SPC-6201`: no such space; `TKT-6107`/`TKT-6122`: the member cannot receive tickets.","headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["spaces:write"]},{"oauth2":["spaces:write"]}],"summary":"Set a contact's destination","tags":["spaces"]}},"/v1/companies/{companyId}/destination":{"get":{"description":"Where the new tickets of the company's contacts and of its CRM email domains go before their channel's destination.","operationId":"getCompanyDestination","parameters":[{"name":"companyId","required":true,"in":"path","description":"The company id.","schema":{"type":"string","format":"uuid","description":"The company id."}},{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"The destination.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomerDestination"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `API-8102`: the API key or app lacks the `spaces:read` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"`CRM-6002`: no such company.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["spaces:read"]},{"oauth2":["spaces:read"]}],"summary":"A company's destination","tags":["spaces"]},"put":{"description":"Exactly one destination (`all`: none of its own, a space or a member) for the new tickets of the company's contacts and CRM email domains, before their channel's; written to the audit log. Their open and in-progress tickets move there too, in one background step (`ticket.moved`); `all` moves nothing.","operationId":"setCompanyDestination","parameters":[{"name":"companyId","required":true,"in":"path","description":"The company id.","schema":{"type":"string","format":"uuid","description":"The company id."}},{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}},{"name":"Idempotency-Key","in":"header","description":"A unique key for this operation (e.g. a UUID, 1 to 255 visible characters), kept 24 hours: repeating the request with the same key returns the first answer (`Idempotent-Replayed: true`) instead of doing it again. Errors: `API-8109` (400) a key that is not valid, `API-8108` (409, retryable) the first request with this key is still running, `API-8107` (422) the key was used for a different request; `API-8118` (409) the first request created something whose secret is shown only once, so its answer is not repeated. An answer with `shown_once` repeats its secret within 10 minutes, then `API-8118`.","required":false,"schema":{"type":"string","minLength":1,"maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SetCustomerDestination"}}}},"responses":{"200":{"description":"The destination, with how many tickets move.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChangedCustomerDestination"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `AUTH-1003`: your seat was deactivated (view only). `AUTH-1004`: all seats are inactive because the seat charge was not paid (view only). `AUTH-1002`: your role lacks the `spaces.manage` permission. `API-8102`: the API key or app lacks the `spaces:write` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"`CRM-6002`: no such company.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"description":"`API-8001`: some fields are missing or not valid. `details.fields` lists each invalid field with its own code (e.g. `API-8002` required, `API-8012` wrong format). `SPC-6201`: no such space; `TKT-6107`/`TKT-6122`: the member cannot receive tickets.","headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["spaces:write"]},{"oauth2":["spaces:write"]}],"summary":"Set a company's destination","tags":["spaces"]}},"/v1/bulk/contacts":{"post":{"description":"Up to 200 items (`name`, `phone`, `email`), as objects or as `columns` + `rows`. A contact with the phone (E.164) or email is matched, never duplicated, merged or changed (`existing`). A failed item (`code`) never blocks the others. `dry_run` writes nothing.","operationId":"bulkCreateContacts","parameters":[{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}},{"name":"Idempotency-Key","in":"header","description":"A unique key for this operation (e.g. a UUID, 1 to 255 visible characters), kept 24 hours: repeating the request with the same key returns the first answer (`Idempotent-Replayed: true`) instead of doing it again. Errors: `API-8109` (400) a key that is not valid, `API-8108` (409, retryable) the first request with this key is still running, `API-8107` (422) the key was used for a different request; `API-8118` (409) the first request created something whose secret is shown only once, so its answer is not repeated. An answer with `shown_once` repeats its secret within 10 minutes, then `API-8118`.","required":false,"schema":{"type":"string","minLength":1,"maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkCreateContacts"}}}},"responses":{"200":{"description":"The summary and each item.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkCreateResult"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `AUTH-1003`: your seat was deactivated (view only). `AUTH-1004`: all seats are inactive because the seat charge was not paid (view only). `AUTH-1002`: your role lacks the `contacts.edit` permission. `API-8102`: the API key or app lacks the `contacts:write` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["contacts:write"]},{"oauth2":["contacts:write"]}],"summary":"Create or match many contacts","tags":["bulk-create"]}},"/v1/bulk/companies":{"post":{"description":"Up to 200 companies (the fields of a company; `domain` or `domains`). A company with the same name, ignoring case and spacing, is matched (`existing`). `dry_run` writes nothing.","operationId":"bulkCreateCompanies","parameters":[{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}},{"name":"Idempotency-Key","in":"header","description":"A unique key for this operation (e.g. a UUID, 1 to 255 visible characters), kept 24 hours: repeating the request with the same key returns the first answer (`Idempotent-Replayed: true`) instead of doing it again. Errors: `API-8109` (400) a key that is not valid, `API-8108` (409, retryable) the first request with this key is still running, `API-8107` (422) the key was used for a different request; `API-8118` (409) the first request created something whose secret is shown only once, so its answer is not repeated. An answer with `shown_once` repeats its secret within 10 minutes, then `API-8118`.","required":false,"schema":{"type":"string","minLength":1,"maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkCreateCompanies"}}}},"responses":{"200":{"description":"The summary and each item.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkCreateResult"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `AUTH-1003`: your seat was deactivated (view only). `AUTH-1004`: all seats are inactive because the seat charge was not paid (view only). `AUTH-1002`: your role lacks the `contacts.edit` permission. `API-8102`: the API key or app lacks the `contacts:write` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["contacts:write"]},{"oauth2":["contacts:write"]}],"summary":"Create or match many companies","tags":["bulk-create"]}},"/v1/bulk/tickets":{"post":{"description":"Up to 200 tickets: the contact by `contact_id`, `phone` or `email`, `channel_type`, `subject`, `first_note` (an internal note: nothing is sent to the customer), `tags`, `assignee_email`, `space` (name). An open conversation of the contact on the channel takes the note (`existing`). `dry_run` writes nothing.","operationId":"bulkCreateTickets","parameters":[{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}},{"name":"Idempotency-Key","in":"header","description":"A unique key for this operation (e.g. a UUID, 1 to 255 visible characters), kept 24 hours: repeating the request with the same key returns the first answer (`Idempotent-Replayed: true`) instead of doing it again. Errors: `API-8109` (400) a key that is not valid, `API-8108` (409, retryable) the first request with this key is still running, `API-8107` (422) the key was used for a different request; `API-8118` (409) the first request created something whose secret is shown only once, so its answer is not repeated. An answer with `shown_once` repeats its secret within 10 minutes, then `API-8118`.","required":false,"schema":{"type":"string","minLength":1,"maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkCreateTickets"}}}},"responses":{"200":{"description":"The summary and each item.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkCreateResult"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `AUTH-1003`: your seat was deactivated (view only). `AUTH-1004`: all seats are inactive because the seat charge was not paid (view only). `AUTH-1002`: your role lacks the `tickets.reply` permission. `API-8102`: the API key or app lacks the `tickets:write` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["tickets:write"]},{"oauth2":["tickets:write"]}],"summary":"Create many tickets","tags":["bulk-create"]}},"/v1/bulk/tags":{"post":{"description":"Up to 200 tags (`name`). A name in use is matched (`existing`). Needs `settings.manage`. `dry_run` writes nothing.","operationId":"bulkCreateTicketTags","parameters":[{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}},{"name":"Idempotency-Key","in":"header","description":"A unique key for this operation (e.g. a UUID, 1 to 255 visible characters), kept 24 hours: repeating the request with the same key returns the first answer (`Idempotent-Replayed: true`) instead of doing it again. Errors: `API-8109` (400) a key that is not valid, `API-8108` (409, retryable) the first request with this key is still running, `API-8107` (422) the key was used for a different request; `API-8118` (409) the first request created something whose secret is shown only once, so its answer is not repeated. An answer with `shown_once` repeats its secret within 10 minutes, then `API-8118`.","required":false,"schema":{"type":"string","minLength":1,"maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkCreateTags"}}}},"responses":{"200":{"description":"The summary and each item.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkCreateResult"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `AUTH-1003`: your seat was deactivated (view only). `AUTH-1004`: all seats are inactive because the seat charge was not paid (view only). `AUTH-1002`: your role lacks the `settings.manage` permission. `API-8102`: the API key or app lacks the `organization:write` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["organization:write"]},{"oauth2":["organization:write"]}],"summary":"Create many ticket tags","tags":["bulk-create"]}},"/v1/bulk/canned-replies":{"post":{"description":"Up to 200 replies (`scope`, `space_id`, `title`, `body`), each needing the permission of the single create. `dry_run` writes nothing.","operationId":"bulkCreateCannedReplies","parameters":[{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}},{"name":"Idempotency-Key","in":"header","description":"A unique key for this operation (e.g. a UUID, 1 to 255 visible characters), kept 24 hours: repeating the request with the same key returns the first answer (`Idempotent-Replayed: true`) instead of doing it again. Errors: `API-8109` (400) a key that is not valid, `API-8108` (409, retryable) the first request with this key is still running, `API-8107` (422) the key was used for a different request; `API-8118` (409) the first request created something whose secret is shown only once, so its answer is not repeated. An answer with `shown_once` repeats its secret within 10 minutes, then `API-8118`.","required":false,"schema":{"type":"string","minLength":1,"maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkCreateCannedReplies"}}}},"responses":{"200":{"description":"The summary and each item.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkCreateResult"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `AUTH-1003`: your seat was deactivated (view only). `AUTH-1004`: all seats are inactive because the seat charge was not paid (view only). `API-8102`: the API key or app lacks the `replies:write` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["replies:write"]},{"oauth2":["replies:write"]}],"summary":"Save many canned replies","tags":["bulk-create"]}},"/v1/bulk/classification-options":{"post":{"description":"Up to 200 options (`list_id`, `name`) of live classification lists (the ticket fields). Needs `settings.manage`; a name in use fails with `TKT-6236`. `dry_run` writes nothing.","operationId":"bulkAddClassificationOptions","parameters":[{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}},{"name":"Idempotency-Key","in":"header","description":"A unique key for this operation (e.g. a UUID, 1 to 255 visible characters), kept 24 hours: repeating the request with the same key returns the first answer (`Idempotent-Replayed: true`) instead of doing it again. Errors: `API-8109` (400) a key that is not valid, `API-8108` (409, retryable) the first request with this key is still running, `API-8107` (422) the key was used for a different request; `API-8118` (409) the first request created something whose secret is shown only once, so its answer is not repeated. An answer with `shown_once` repeats its secret within 10 minutes, then `API-8118`.","required":false,"schema":{"type":"string","minLength":1,"maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkAddClassificationOptions"}}}},"responses":{"200":{"description":"The summary and each item.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkCreateResult"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `AUTH-1003`: your seat was deactivated (view only). `AUTH-1004`: all seats are inactive because the seat charge was not paid (view only). `AUTH-1002`: your role lacks the `settings.manage` permission. `API-8102`: the API key or app lacks the `organization:write` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["organization:write"]},{"oauth2":["organization:write"]}],"summary":"Add many classification options","tags":["bulk-create"]}},"/v1/bulk/space-members":{"post":{"description":"Up to 200 pairs: the space by `space_id` or `space` (name), the member by `membership_id` or `email`. A member already in the space is `existing`. Needs `spaces.manage`. `dry_run` writes nothing.","operationId":"bulkAddSpaceMembers","parameters":[{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}},{"name":"Idempotency-Key","in":"header","description":"A unique key for this operation (e.g. a UUID, 1 to 255 visible characters), kept 24 hours: repeating the request with the same key returns the first answer (`Idempotent-Replayed: true`) instead of doing it again. Errors: `API-8109` (400) a key that is not valid, `API-8108` (409, retryable) the first request with this key is still running, `API-8107` (422) the key was used for a different request; `API-8118` (409) the first request created something whose secret is shown only once, so its answer is not repeated. An answer with `shown_once` repeats its secret within 10 minutes, then `API-8118`.","required":false,"schema":{"type":"string","minLength":1,"maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkAddSpaceMembers"}}}},"responses":{"200":{"description":"The summary and each item.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkCreateResult"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `AUTH-1003`: your seat was deactivated (view only). `AUTH-1004`: all seats are inactive because the seat charge was not paid (view only). `AUTH-1002`: your role lacks the `spaces.manage` permission. `API-8102`: the API key or app lacks the `spaces:write` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["spaces:write"]},{"oauth2":["spaces:write"]}],"summary":"Add many members to spaces","tags":["bulk-create"]}},"/v1/conversations":{"post":{"description":"One call for the whole start: finds the contact by `contact_id`, phone or email (`contacts:read`) or creates it (`contacts:write`; never a duplicate or a merge), takes the start choice the app preselects (or the `channel_id` or `to` given), then starts the ticket with the first reply (paid channels from the wallet; a WhatsApp conversation opens with `message.whatsapp_template`) or note, in one transaction (on WhatsApp, X, Instagram, Messenger, TikTok and web chat the open conversation takes it). With `Idempotency-Key` a retry, also after a failure at any step, makes one contact, one ticket and one message.","operationId":"startConversation","parameters":[{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}},{"name":"Idempotency-Key","in":"header","description":"A unique key for this operation (e.g. a UUID, 1 to 255 visible characters), kept 24 hours: repeating the request with the same key returns the first answer (`Idempotent-Replayed: true`) instead of doing it again. Errors: `API-8109` (400) a key that is not valid, `API-8108` (409, retryable) the first request with this key is still running, `API-8107` (422) the key was used for a different request; `API-8118` (409) the first request created something whose secret is shown only once, so its answer is not repeated. An answer with `shown_once` repeats its secret within 10 minutes, then `API-8118`.","required":false,"schema":{"type":"string","minLength":1,"maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StartConversation"}}}},"responses":{"201":{"description":"The contact, the ticket and its first message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StartedConversation"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `AUTH-1003`: your seat was deactivated (view only). `AUTH-1004`: all seats are inactive because the seat charge was not paid (view only). `AUTH-1002`: your role lacks the `tickets.reply` permission. `API-8102`: the API key or app lacks the `tickets:write` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"description":"`API-8001`: some fields are missing or not valid. `details.fields` lists each invalid field with its own code (e.g. `API-8002` required, `API-8012` wrong format). `TKT-6229`: no start choice reaches the contact (or none matches `channel_id`/`to`). `TKT-6226`: a subject is required to start on email.","headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["tickets:write"]},{"oauth2":["tickets:write"]}],"summary":"Start a conversation with a customer","tags":["tickets"]}},"/v1/channels/email/google":{"get":{"description":"Every Google Workspace / Gmail mailbox connected, with its status, addresses (send-as aliases), push and sync state and sending in the last 24 hours; disconnected ones last. Tokens are never returned.","operationId":"listGmailChannels","parameters":[{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"The channels.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GmailChannelList"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `AUTH-1002`: your role lacks the `channels.manage` permission. `API-8102`: the API key or app lacks the `channels:read` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["channels:read"]},{"oauth2":["channels:read"]}],"summary":"List the Gmail channels","tags":["channels"]}},"/v1/channels/email/google/authorizations":{"post":{"description":"Returns the Google sign-in URL (authorization code with PKCE and `state`, offline access, the `gmail.readonly` and `gmail.send` permissions). The member signs in there; Google sends them back to Rabt’s callback page with `state` and `code`, which finishes with `completeGmailConnection` within ten minutes.","operationId":"startGmailConnection","parameters":[{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}},{"name":"Idempotency-Key","in":"header","description":"A unique key for this operation (e.g. a UUID, 1 to 255 visible characters), kept 24 hours: repeating the request with the same key returns the first answer (`Idempotent-Replayed: true`) instead of doing it again. Errors: `API-8109` (400) a key that is not valid, `API-8108` (409, retryable) the first request with this key is still running, `API-8107` (422) the key was used for a different request; `API-8118` (409) the first request created something whose secret is shown only once, so its answer is not repeated. An answer with `shown_once` repeats its secret within 10 minutes, then `API-8118`.","required":false,"schema":{"type":"string","minLength":1,"maxLength":255}}],"responses":{"201":{"description":"The sign-in.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GmailAuthorization"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `AUTH-1003`: your seat was deactivated (view only). `AUTH-1004`: all seats are inactive because the seat charge was not paid (view only). `AUTH-1002`: your role lacks the `channels.manage` permission. `API-8102`: the API key or app lacks the `channels:write` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in. `API-8148`: not available to test keys (API test mode).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"description":"`API-8001`: some fields are missing or not valid. `details.fields` lists each invalid field with its own code (e.g. `API-8002` required, `API-8012` wrong format). `SPC-6223`: the channel is held back or not set up yet: «coming soon», nothing to connect.","headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"429":{"$ref":"#/components/responses/RateLimited"},"503":{"description":"`SYS-1001`: Google is not set up on this Rabt.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["channels:write"]},{"oauth2":["channels:write"]}],"summary":"Start connecting a Gmail mailbox","tags":["channels"]}},"/v1/channels/email/google/authorizations/complete":{"post":{"description":"With what Google sent back: the code is exchanged, the Gmail permission checked, the mailbox and its send-as addresses read, and the channel stored `active` (or reconnected). Push notifications and sync start from now. Each sign-in is used once, in the organization that started it.","operationId":"completeGmailConnection","parameters":[{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}},{"name":"Idempotency-Key","in":"header","description":"A unique key for this operation (e.g. a UUID, 1 to 255 visible characters), kept 24 hours: repeating the request with the same key returns the first answer (`Idempotent-Replayed: true`) instead of doing it again. Errors: `API-8109` (400) a key that is not valid, `API-8108` (409, retryable) the first request with this key is still running, `API-8107` (422) the key was used for a different request; `API-8118` (409) the first request created something whose secret is shown only once, so its answer is not repeated. An answer with `shown_once` repeats its secret within 10 minutes, then `API-8118`.","required":false,"schema":{"type":"string","minLength":1,"maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CompleteGmailConnection"}}}},"responses":{"200":{"description":"The channel.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GmailChannel"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1097`: the sign-in was started in the desktop app by another member or on another device.\n\n`AUTH-1040`: you are not a member of the organization named. `AUTH-1003`: your seat was deactivated (view only). `AUTH-1004`: all seats are inactive because the seat charge was not paid (view only). `AUTH-1002`: your role lacks the `channels.manage` permission. `API-8102`: the API key or app lacks the `channels:write` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in. `API-8148`: not available to test keys (API test mode).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"409":{"description":"`EM-3614`: the mailbox is already another channel’s. `EM-3715`: a reconnection signed in with another account.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"410":{"description":"`EM-3705`: the sign-in expired, was used, or belongs to another organization.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"description":"`API-8001`: some fields are missing or not valid. `details.fields` lists each invalid field with its own code (e.g. `API-8002` required, `API-8012` wrong format). `EM-3700`: the member declined at Google. `EM-3701`: the Gmail permission was not granted. `EM-3706`: Gmail is not enabled for the account.","headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"429":{"$ref":"#/components/responses/RateLimited"},"503":{"description":"`SYS-1001`: Google is not set up on this Rabt.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["channels:write"]},{"oauth2":["channels:write"]}],"summary":"Finish connecting a Gmail mailbox","tags":["channels"]}},"/v1/channels/email/google/{channelId}":{"get":{"operationId":"getGmailChannel","parameters":[{"name":"channelId","required":true,"in":"path","description":"The Gmail channel id.","schema":{"type":"string","format":"uuid","description":"The Gmail channel id."}},{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"The channel.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GmailChannel"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `AUTH-1002`: your role lacks the `channels.manage` permission. `API-8102`: the API key or app lacks the `channels:read` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"`EM-3615`: no Gmail channel (or address) with this id in your organization.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["channels:read"]},{"oauth2":["channels:read"]}],"summary":"A Gmail channel","tags":["channels"]},"patch":{"description":"Its name, or the address replies leave from when their ticket has none of its own (an address Gmail may send as).","operationId":"updateGmailChannel","parameters":[{"name":"channelId","required":true,"in":"path","description":"The Gmail channel id.","schema":{"type":"string","format":"uuid","description":"The Gmail channel id."}},{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}},{"name":"Idempotency-Key","in":"header","description":"A unique key for this operation (e.g. a UUID, 1 to 255 visible characters), kept 24 hours: repeating the request with the same key returns the first answer (`Idempotent-Replayed: true`) instead of doing it again. Errors: `API-8109` (400) a key that is not valid, `API-8108` (409, retryable) the first request with this key is still running, `API-8107` (422) the key was used for a different request; `API-8118` (409) the first request created something whose secret is shown only once, so its answer is not repeated. An answer with `shown_once` repeats its secret within 10 minutes, then `API-8118`.","required":false,"schema":{"type":"string","minLength":1,"maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateGmailChannel"}}}},"responses":{"200":{"description":"The channel.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GmailChannel"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `AUTH-1003`: your seat was deactivated (view only). `AUTH-1004`: all seats are inactive because the seat charge was not paid (view only). `AUTH-1002`: your role lacks the `channels.manage` permission. `API-8102`: the API key or app lacks the `channels:write` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in. `API-8148`: not available to test keys (API test mode).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"`EM-3615`: no Gmail channel (or address) with this id in your organization.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"409":{"description":"`EM-3716`: the channel is disconnected or waits for a reconnection. `EM-3623`: that address is stopped.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"description":"`API-8001`: some fields are missing or not valid. `details.fields` lists each invalid field with its own code (e.g. `API-8002` required, `API-8012` wrong format). `EM-3713`: Gmail may not send as that address.","headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["channels:write"]},{"oauth2":["channels:write"]}],"summary":"Change a Gmail channel","tags":["channels"]}},"/v1/channels/email/google/{channelId}/addresses/{addressId}":{"patch":{"description":"Its sender name, or whether it is on (`active`: a stopped address takes no mail, which stays in the mailbox, and is never a From; replies on its tickets leave from the mailbox’s default active address).","operationId":"updateGmailAddress","parameters":[{"name":"channelId","required":true,"in":"path","description":"The Gmail channel id.","schema":{"type":"string","format":"uuid","description":"The Gmail channel id."}},{"name":"addressId","required":true,"in":"path","description":"The channel address id.","schema":{"type":"string","format":"uuid","description":"The channel address id."}},{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}},{"name":"Idempotency-Key","in":"header","description":"A unique key for this operation (e.g. a UUID, 1 to 255 visible characters), kept 24 hours: repeating the request with the same key returns the first answer (`Idempotent-Replayed: true`) instead of doing it again. Errors: `API-8109` (400) a key that is not valid, `API-8108` (409, retryable) the first request with this key is still running, `API-8107` (422) the key was used for a different request; `API-8118` (409) the first request created something whose secret is shown only once, so its answer is not repeated. An answer with `shown_once` repeats its secret within 10 minutes, then `API-8118`.","required":false,"schema":{"type":"string","minLength":1,"maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateGmailAddress"}}}},"responses":{"200":{"description":"The channel.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GmailChannel"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `AUTH-1003`: your seat was deactivated (view only). `AUTH-1004`: all seats are inactive because the seat charge was not paid (view only). `AUTH-1002`: your role lacks the `channels.manage` permission. `API-8102`: the API key or app lacks the `channels:write` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in. `API-8148`: not available to test keys (API test mode).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"`EM-3615`: no Gmail channel (or address) with this id in your organization.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"409":{"description":"`EM-3716`: the channel is disconnected or waits for a reconnection. `EM-3622`: the mailbox’s last active address cannot be stopped (disconnect the channel instead).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["channels:write"]},{"oauth2":["channels:write"]}],"summary":"Change an address of the Gmail mailbox","tags":["channels"]}},"/v1/channels/email/google/{channelId}/addresses/refresh":{"post":{"description":"Reads Gmail’s “Send mail as” addresses: new aliases are added, their verification kept current, removed ones removed. Once a minute per channel.","operationId":"refreshGmailAddresses","parameters":[{"name":"channelId","required":true,"in":"path","description":"The Gmail channel id.","schema":{"type":"string","format":"uuid","description":"The Gmail channel id."}},{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}},{"name":"Idempotency-Key","in":"header","description":"A unique key for this operation (e.g. a UUID, 1 to 255 visible characters), kept 24 hours: repeating the request with the same key returns the first answer (`Idempotent-Replayed: true`) instead of doing it again. Errors: `API-8109` (400) a key that is not valid, `API-8108` (409, retryable) the first request with this key is still running, `API-8107` (422) the key was used for a different request; `API-8118` (409) the first request created something whose secret is shown only once, so its answer is not repeated. An answer with `shown_once` repeats its secret within 10 minutes, then `API-8118`.","required":false,"schema":{"type":"string","minLength":1,"maxLength":255}}],"responses":{"200":{"description":"The channel.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GmailChannel"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `AUTH-1003`: your seat was deactivated (view only). `AUTH-1004`: all seats are inactive because the seat charge was not paid (view only). `AUTH-1002`: your role lacks the `channels.manage` permission. `API-8102`: the API key or app lacks the `channels:write` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in. `API-8148`: not available to test keys (API test mode).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"`EM-3615`: no Gmail channel (or address) with this id in your organization.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"409":{"description":"`EM-3716`: the channel is disconnected or waits for a reconnection.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"description":"`API-8004`: a rate limit quota is used up (see `RateLimit`). Try again after `Retry-After` seconds. `EM-3719`: asked less than a minute ago.","headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"},"Retry-After":{"$ref":"#/components/headers/Retry-After"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["channels:write"]},{"oauth2":["channels:write"]}],"summary":"Read the mailbox’s addresses again","tags":["channels"]}},"/v1/channels/email/google/{channelId}/domain-check":{"post":{"description":"Reads SPF, DKIM (Google’s `google` selector) and DMARC of a Workspace mailbox’s domain and keeps the report on the channel. Once a minute per channel.","operationId":"checkGmailSenderDomain","parameters":[{"name":"channelId","required":true,"in":"path","description":"The Gmail channel id.","schema":{"type":"string","format":"uuid","description":"The Gmail channel id."}},{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"The channel.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GmailChannel"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `AUTH-1003`: your seat was deactivated (view only). `AUTH-1004`: all seats are inactive because the seat charge was not paid (view only). `AUTH-1002`: your role lacks the `channels.manage` permission. `API-8102`: the API key or app lacks the `channels:write` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in. `API-8148`: not available to test keys (API test mode).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"`EM-3615`: no Gmail channel (or address) with this id in your organization.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"description":"`API-8004`: a rate limit quota is used up (see `RateLimit`). Try again after `Retry-After` seconds. `EM-3719`: asked less than a minute ago.","headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"},"Retry-After":{"$ref":"#/components/headers/Retry-After"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["channels:write"]},{"oauth2":["channels:write"]}],"summary":"Check the sender domain","tags":["channels"]}},"/v1/channels/email/google/{channelId}/reconnect":{"post":{"description":"Returns a Google sign-in URL for the channel’s own account (`needs_reauth` after Google refused the saved access); finishing it with `completeGmailConnection` makes the channel active again.","operationId":"reconnectGmailChannel","parameters":[{"name":"channelId","required":true,"in":"path","description":"The Gmail channel id.","schema":{"type":"string","format":"uuid","description":"The Gmail channel id."}},{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}},{"name":"Idempotency-Key","in":"header","description":"A unique key for this operation (e.g. a UUID, 1 to 255 visible characters), kept 24 hours: repeating the request with the same key returns the first answer (`Idempotent-Replayed: true`) instead of doing it again. Errors: `API-8109` (400) a key that is not valid, `API-8108` (409, retryable) the first request with this key is still running, `API-8107` (422) the key was used for a different request; `API-8118` (409) the first request created something whose secret is shown only once, so its answer is not repeated. An answer with `shown_once` repeats its secret within 10 minutes, then `API-8118`.","required":false,"schema":{"type":"string","minLength":1,"maxLength":255}}],"responses":{"201":{"description":"The sign-in.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GmailAuthorization"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `AUTH-1003`: your seat was deactivated (view only). `AUTH-1004`: all seats are inactive because the seat charge was not paid (view only). `AUTH-1002`: your role lacks the `channels.manage` permission. `API-8102`: the API key or app lacks the `channels:write` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in. `API-8148`: not available to test keys (API test mode).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"`EM-3615`: no Gmail channel (or address) with this id in your organization.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"409":{"description":"`EM-3716`: the channel is disconnected or waits for a reconnection.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"503":{"description":"`SYS-1001`: Google is not set up on this Rabt.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["channels:write"]},{"oauth2":["channels:write"]}],"summary":"Reconnect a Gmail channel","tags":["channels"]}},"/v1/channels/email/google/{channelId}/disconnect":{"post":{"description":"Stops the push notifications, revokes Rabt’s access at Google and in the token vault, and removes the addresses; the channel and its tickets stay (Rabt never deletes).","operationId":"disconnectGmailChannel","parameters":[{"name":"channelId","required":true,"in":"path","description":"The Gmail channel id.","schema":{"type":"string","format":"uuid","description":"The Gmail channel id."}},{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}},{"name":"Idempotency-Key","in":"header","description":"A unique key for this operation (e.g. a UUID, 1 to 255 visible characters), kept 24 hours: repeating the request with the same key returns the first answer (`Idempotent-Replayed: true`) instead of doing it again. Errors: `API-8109` (400) a key that is not valid, `API-8108` (409, retryable) the first request with this key is still running, `API-8107` (422) the key was used for a different request; `API-8118` (409) the first request created something whose secret is shown only once, so its answer is not repeated. An answer with `shown_once` repeats its secret within 10 minutes, then `API-8118`.","required":false,"schema":{"type":"string","minLength":1,"maxLength":255}}],"responses":{"200":{"description":"The channel.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GmailChannel"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `AUTH-1003`: your seat was deactivated (view only). `AUTH-1004`: all seats are inactive because the seat charge was not paid (view only). `AUTH-1002`: your role lacks the `channels.manage` permission. `API-8102`: the API key or app lacks the `channels:write` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in. `API-8148`: not available to test keys (API test mode).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"`EM-3615`: no Gmail channel (or address) with this id in your organization.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["channels:write"]},{"oauth2":["channels:write"]}],"summary":"Disconnect a Gmail channel","tags":["channels"]}},"/v1/channels/email/zoho":{"get":{"description":"Every Zoho Mail mailbox connected, with its status, data centre, addresses (aliases and send-as addresses) and read state; disconnected ones last. Tokens are never returned.","operationId":"listZohoMailChannels","parameters":[{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"The channels.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ZohoMailChannelList"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `AUTH-1002`: your role lacks the `channels.manage` permission. `API-8102`: the API key or app lacks the `channels:read` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["channels:read"]},{"oauth2":["channels:read"]}],"summary":"List the Zoho Mail channels","tags":["channels"]}},"/v1/channels/email/zoho/authorizations":{"post":{"description":"Returns the Zoho sign-in URL (authorization code with PKCE and `state`, offline access, the Zoho Mail permissions to read the account, folders and messages and to send). The member signs in there; Zoho sends them back to Rabt’s callback page with `state`, `code` and the data centre, which finishes with `completeZohoMailConnection` within ten minutes.","operationId":"startZohoMailConnection","parameters":[{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}},{"name":"Idempotency-Key","in":"header","description":"A unique key for this operation (e.g. a UUID, 1 to 255 visible characters), kept 24 hours: repeating the request with the same key returns the first answer (`Idempotent-Replayed: true`) instead of doing it again. Errors: `API-8109` (400) a key that is not valid, `API-8108` (409, retryable) the first request with this key is still running, `API-8107` (422) the key was used for a different request; `API-8118` (409) the first request created something whose secret is shown only once, so its answer is not repeated. An answer with `shown_once` repeats its secret within 10 minutes, then `API-8118`.","required":false,"schema":{"type":"string","minLength":1,"maxLength":255}}],"responses":{"201":{"description":"The sign-in.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ZohoMailAuthorization"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `AUTH-1003`: your seat was deactivated (view only). `AUTH-1004`: all seats are inactive because the seat charge was not paid (view only). `AUTH-1002`: your role lacks the `channels.manage` permission. `API-8102`: the API key or app lacks the `channels:write` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in. `API-8148`: not available to test keys (API test mode).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"description":"`API-8001`: some fields are missing or not valid. `details.fields` lists each invalid field with its own code (e.g. `API-8002` required, `API-8012` wrong format). `SPC-6223`: the channel is held back or not set up yet: «coming soon», nothing to connect.","headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"429":{"$ref":"#/components/responses/RateLimited"},"503":{"description":"`SYS-1001`: Zoho is not set up on this Rabt.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["channels:write"]},{"oauth2":["channels:write"]}],"summary":"Start connecting a Zoho Mail mailbox","tags":["channels"]}},"/v1/channels/email/zoho/authorizations/complete":{"post":{"description":"With what Zoho sent back: the code is exchanged at the mailbox’s data centre, the Mail permissions checked, the mailbox and its addresses read, and the channel stored `active` (or reconnected). The Inbox is read every minute from now, and the 90 days before are imported. Each sign-in is used once, in the organization that started it.","operationId":"completeZohoMailConnection","parameters":[{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}},{"name":"Idempotency-Key","in":"header","description":"A unique key for this operation (e.g. a UUID, 1 to 255 visible characters), kept 24 hours: repeating the request with the same key returns the first answer (`Idempotent-Replayed: true`) instead of doing it again. Errors: `API-8109` (400) a key that is not valid, `API-8108` (409, retryable) the first request with this key is still running, `API-8107` (422) the key was used for a different request; `API-8118` (409) the first request created something whose secret is shown only once, so its answer is not repeated. An answer with `shown_once` repeats its secret within 10 minutes, then `API-8118`.","required":false,"schema":{"type":"string","minLength":1,"maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CompleteZohoMailConnection"}}}},"responses":{"200":{"description":"The channel.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ZohoMailChannel"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`EM-3801`: a Zoho Mail permission was not granted.\n\n`AUTH-1097`: the sign-in was started in the desktop app by another member or on another device.\n\n`AUTH-1040`: you are not a member of the organization named. `AUTH-1003`: your seat was deactivated (view only). `AUTH-1004`: all seats are inactive because the seat charge was not paid (view only). `AUTH-1002`: your role lacks the `channels.manage` permission. `API-8102`: the API key or app lacks the `channels:write` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in. `API-8148`: not available to test keys (API test mode).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"409":{"description":"`EM-3614`: the mailbox is already another channel’s. `EM-3811`: a reconnection signed in with another mailbox.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"410":{"description":"`EM-3805`: the sign-in expired, was used, or belongs to another organization.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"description":"`API-8001`: some fields are missing or not valid. `details.fields` lists each invalid field with its own code (e.g. `API-8002` required, `API-8012` wrong format). `EM-3800`: the member declined at Zoho. `EM-3802`: the account has no Zoho Mail mailbox.","headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"429":{"$ref":"#/components/responses/RateLimited"},"503":{"description":"`SYS-1001`: Zoho is not set up on this Rabt.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["channels:write"]},{"oauth2":["channels:write"]}],"summary":"Finish connecting a Zoho Mail mailbox","tags":["channels"]}},"/v1/channels/email/zoho/{channelId}":{"get":{"operationId":"getZohoMailChannel","parameters":[{"name":"channelId","required":true,"in":"path","description":"The Zoho Mail channel id.","schema":{"type":"string","format":"uuid","description":"The Zoho Mail channel id."}},{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"The channel.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ZohoMailChannel"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `AUTH-1002`: your role lacks the `channels.manage` permission. `API-8102`: the API key or app lacks the `channels:read` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"`EM-3615`: no Zoho Mail channel (or address) with this id in your organization.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["channels:read"]},{"oauth2":["channels:read"]}],"summary":"A Zoho Mail channel","tags":["channels"]},"patch":{"description":"Its name, or the address replies leave from when their ticket has none of its own (one Zoho Mail sends from).","operationId":"updateZohoMailChannel","parameters":[{"name":"channelId","required":true,"in":"path","description":"The Zoho Mail channel id.","schema":{"type":"string","format":"uuid","description":"The Zoho Mail channel id."}},{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}},{"name":"Idempotency-Key","in":"header","description":"A unique key for this operation (e.g. a UUID, 1 to 255 visible characters), kept 24 hours: repeating the request with the same key returns the first answer (`Idempotent-Replayed: true`) instead of doing it again. Errors: `API-8109` (400) a key that is not valid, `API-8108` (409, retryable) the first request with this key is still running, `API-8107` (422) the key was used for a different request; `API-8118` (409) the first request created something whose secret is shown only once, so its answer is not repeated. An answer with `shown_once` repeats its secret within 10 minutes, then `API-8118`.","required":false,"schema":{"type":"string","minLength":1,"maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateZohoMailChannel"}}}},"responses":{"200":{"description":"The channel.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ZohoMailChannel"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `AUTH-1003`: your seat was deactivated (view only). `AUTH-1004`: all seats are inactive because the seat charge was not paid (view only). `AUTH-1002`: your role lacks the `channels.manage` permission. `API-8102`: the API key or app lacks the `channels:write` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in. `API-8148`: not available to test keys (API test mode).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"`EM-3615`: no Zoho Mail channel (or address) with this id in your organization.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"409":{"description":"`EM-3812`: the channel is disconnected or waits for a reconnection. `EM-3623`: that address is stopped.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"description":"`API-8001`: some fields are missing or not valid. `details.fields` lists each invalid field with its own code (e.g. `API-8002` required, `API-8012` wrong format). `EM-3810`: Zoho Mail does not send from that address.","headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["channels:write"]},{"oauth2":["channels:write"]}],"summary":"Change a Zoho Mail channel","tags":["channels"]}},"/v1/channels/email/zoho/{channelId}/addresses/{addressId}":{"patch":{"description":"Its sender name, or whether it is on (`active`: a stopped address takes no mail, which stays in the mailbox, and is never a From; replies on its tickets leave from the mailbox’s default active address).","operationId":"updateZohoMailAddress","parameters":[{"name":"channelId","required":true,"in":"path","description":"The Zoho Mail channel id.","schema":{"type":"string","format":"uuid","description":"The Zoho Mail channel id."}},{"name":"addressId","required":true,"in":"path","description":"The channel address id.","schema":{"type":"string","format":"uuid","description":"The channel address id."}},{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}},{"name":"Idempotency-Key","in":"header","description":"A unique key for this operation (e.g. a UUID, 1 to 255 visible characters), kept 24 hours: repeating the request with the same key returns the first answer (`Idempotent-Replayed: true`) instead of doing it again. Errors: `API-8109` (400) a key that is not valid, `API-8108` (409, retryable) the first request with this key is still running, `API-8107` (422) the key was used for a different request; `API-8118` (409) the first request created something whose secret is shown only once, so its answer is not repeated. An answer with `shown_once` repeats its secret within 10 minutes, then `API-8118`.","required":false,"schema":{"type":"string","minLength":1,"maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateZohoMailAddress"}}}},"responses":{"200":{"description":"The channel.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ZohoMailChannel"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `AUTH-1003`: your seat was deactivated (view only). `AUTH-1004`: all seats are inactive because the seat charge was not paid (view only). `AUTH-1002`: your role lacks the `channels.manage` permission. `API-8102`: the API key or app lacks the `channels:write` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in. `API-8148`: not available to test keys (API test mode).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"`EM-3615`: no Zoho Mail channel (or address) with this id in your organization.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"409":{"description":"`EM-3812`: the channel is disconnected or waits for a reconnection. `EM-3622`: the mailbox’s last active address cannot be stopped (disconnect the channel instead).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["channels:write"]},{"oauth2":["channels:write"]}],"summary":"Change an address of the Zoho Mail mailbox","tags":["channels"]}},"/v1/channels/email/zoho/{channelId}/addresses/refresh":{"post":{"description":"Reads the mailbox’s aliases and send-as addresses: new ones are added, their verification kept current, removed ones removed. Once a minute per channel.","operationId":"refreshZohoMailAddresses","parameters":[{"name":"channelId","required":true,"in":"path","description":"The Zoho Mail channel id.","schema":{"type":"string","format":"uuid","description":"The Zoho Mail channel id."}},{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}},{"name":"Idempotency-Key","in":"header","description":"A unique key for this operation (e.g. a UUID, 1 to 255 visible characters), kept 24 hours: repeating the request with the same key returns the first answer (`Idempotent-Replayed: true`) instead of doing it again. Errors: `API-8109` (400) a key that is not valid, `API-8108` (409, retryable) the first request with this key is still running, `API-8107` (422) the key was used for a different request; `API-8118` (409) the first request created something whose secret is shown only once, so its answer is not repeated. An answer with `shown_once` repeats its secret within 10 minutes, then `API-8118`.","required":false,"schema":{"type":"string","minLength":1,"maxLength":255}}],"responses":{"200":{"description":"The channel.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ZohoMailChannel"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `AUTH-1003`: your seat was deactivated (view only). `AUTH-1004`: all seats are inactive because the seat charge was not paid (view only). `AUTH-1002`: your role lacks the `channels.manage` permission. `API-8102`: the API key or app lacks the `channels:write` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in. `API-8148`: not available to test keys (API test mode).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"`EM-3615`: no Zoho Mail channel (or address) with this id in your organization.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"409":{"description":"`EM-3812`: the channel is disconnected or waits for a reconnection.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"description":"`API-8004`: a rate limit quota is used up (see `RateLimit`). Try again after `Retry-After` seconds. `EM-3814`: asked less than a minute ago.","headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"},"Retry-After":{"$ref":"#/components/headers/Retry-After"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["channels:write"]},{"oauth2":["channels:write"]}],"summary":"Read the Zoho Mail mailbox’s addresses again","tags":["channels"]}},"/v1/channels/email/zoho/{channelId}/domain-check":{"post":{"description":"Reads SPF, DKIM (the signatures of the mailbox’s own sent mail) and DMARC of the mailbox’s domain and keeps the report on the channel. Once a minute per channel.","operationId":"checkZohoMailSenderDomain","parameters":[{"name":"channelId","required":true,"in":"path","description":"The Zoho Mail channel id.","schema":{"type":"string","format":"uuid","description":"The Zoho Mail channel id."}},{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"The channel.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ZohoMailChannel"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `AUTH-1003`: your seat was deactivated (view only). `AUTH-1004`: all seats are inactive because the seat charge was not paid (view only). `AUTH-1002`: your role lacks the `channels.manage` permission. `API-8102`: the API key or app lacks the `channels:write` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in. `API-8148`: not available to test keys (API test mode).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"`EM-3615`: no Zoho Mail channel (or address) with this id in your organization.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"description":"`API-8004`: a rate limit quota is used up (see `RateLimit`). Try again after `Retry-After` seconds. `EM-3814`: asked less than a minute ago.","headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"},"Retry-After":{"$ref":"#/components/headers/Retry-After"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["channels:write"]},{"oauth2":["channels:write"]}],"summary":"Check the Zoho Mail sender domain","tags":["channels"]}},"/v1/channels/email/zoho/{channelId}/reconnect":{"post":{"description":"Returns a Zoho sign-in URL for the channel’s own mailbox (`needs_reauth` after Zoho refused the saved access); finishing it with `completeZohoMailConnection` makes the channel active again.","operationId":"reconnectZohoMailChannel","parameters":[{"name":"channelId","required":true,"in":"path","description":"The Zoho Mail channel id.","schema":{"type":"string","format":"uuid","description":"The Zoho Mail channel id."}},{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}},{"name":"Idempotency-Key","in":"header","description":"A unique key for this operation (e.g. a UUID, 1 to 255 visible characters), kept 24 hours: repeating the request with the same key returns the first answer (`Idempotent-Replayed: true`) instead of doing it again. Errors: `API-8109` (400) a key that is not valid, `API-8108` (409, retryable) the first request with this key is still running, `API-8107` (422) the key was used for a different request; `API-8118` (409) the first request created something whose secret is shown only once, so its answer is not repeated. An answer with `shown_once` repeats its secret within 10 minutes, then `API-8118`.","required":false,"schema":{"type":"string","minLength":1,"maxLength":255}}],"responses":{"201":{"description":"The sign-in.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ZohoMailAuthorization"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `AUTH-1003`: your seat was deactivated (view only). `AUTH-1004`: all seats are inactive because the seat charge was not paid (view only). `AUTH-1002`: your role lacks the `channels.manage` permission. `API-8102`: the API key or app lacks the `channels:write` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in. `API-8148`: not available to test keys (API test mode).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"`EM-3615`: no Zoho Mail channel (or address) with this id in your organization.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"409":{"description":"`EM-3812`: the channel is disconnected or waits for a reconnection.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"503":{"description":"`SYS-1001`: Zoho is not set up on this Rabt.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["channels:write"]},{"oauth2":["channels:write"]}],"summary":"Reconnect a Zoho Mail channel","tags":["channels"]}},"/v1/channels/email/zoho/{channelId}/disconnect":{"post":{"description":"Revokes Rabt’s access at Zoho and in the token vault, and removes the addresses; the channel and its tickets stay (Rabt never deletes).","operationId":"disconnectZohoMailChannel","parameters":[{"name":"channelId","required":true,"in":"path","description":"The Zoho Mail channel id.","schema":{"type":"string","format":"uuid","description":"The Zoho Mail channel id."}},{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}},{"name":"Idempotency-Key","in":"header","description":"A unique key for this operation (e.g. a UUID, 1 to 255 visible characters), kept 24 hours: repeating the request with the same key returns the first answer (`Idempotent-Replayed: true`) instead of doing it again. Errors: `API-8109` (400) a key that is not valid, `API-8108` (409, retryable) the first request with this key is still running, `API-8107` (422) the key was used for a different request; `API-8118` (409) the first request created something whose secret is shown only once, so its answer is not repeated. An answer with `shown_once` repeats its secret within 10 minutes, then `API-8118`.","required":false,"schema":{"type":"string","minLength":1,"maxLength":255}}],"responses":{"200":{"description":"The channel.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ZohoMailChannel"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `AUTH-1003`: your seat was deactivated (view only). `AUTH-1004`: all seats are inactive because the seat charge was not paid (view only). `AUTH-1002`: your role lacks the `channels.manage` permission. `API-8102`: the API key or app lacks the `channels:write` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in. `API-8148`: not available to test keys (API test mode).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"`EM-3615`: no Zoho Mail channel (or address) with this id in your organization.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["channels:write"]},{"oauth2":["channels:write"]}],"summary":"Disconnect a Zoho Mail channel","tags":["channels"]}},"/v1/channels/email/read":{"post":{"description":"Queues a read of the Inbox of every Zoho Mail and IMAP channel of the organization (mail they hold becomes tickets at once instead of at the next timed read). Rabt reads these mailboxes every minute, and every 10 seconds while a member is active. At most one read is queued per organization every 10 seconds.","operationId":"readEmailNow","parameters":[{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}},{"name":"Idempotency-Key","in":"header","description":"A unique key for this operation (e.g. a UUID, 1 to 255 visible characters), kept 24 hours: repeating the request with the same key returns the first answer (`Idempotent-Replayed: true`) instead of doing it again. Errors: `API-8109` (400) a key that is not valid, `API-8108` (409, retryable) the first request with this key is still running, `API-8107` (422) the key was used for a different request; `API-8118` (409) the first request created something whose secret is shown only once, so its answer is not repeated. An answer with `shown_once` repeats its secret within 10 minutes, then `API-8118`.","required":false,"schema":{"type":"string","minLength":1,"maxLength":255}}],"responses":{"202":{"description":"Whether a read was queued.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailRead"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `AUTH-1002`: your role lacks the `tickets.reply` permission. `API-8102`: the API key or app lacks the `channels:read` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["channels:read"]},{"oauth2":["channels:read"]}],"summary":"Read the Zoho Mail and IMAP mailboxes now","tags":["channels"]}},"/v1/channels/email":{"get":{"description":"Every address connected by forwarding, with its status, inbound address, SMTP server (never its password) and sender domain checks; disconnected ones last.","operationId":"listEmailChannels","parameters":[{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"The channels.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailChannelList"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `AUTH-1002`: your role lacks the `channels.manage` permission. `API-8102`: the API key or app lacks the `channels:read` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["channels:read"]},{"oauth2":["channels:read"]}],"summary":"List the email forwarding channels","tags":["channels"]},"post":{"description":"Rabt signs in over TLS first, to the IMAP server when `imap_host` is given (with `imap_username` and `imap_password`, else the SMTP account) and to the SMTP server; then the channel is stored `active` (IMAP) or `pending` with its inbound address until the forwarding check comes back.","operationId":"connectEmailChannel","parameters":[{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}},{"name":"Idempotency-Key","in":"header","description":"A unique key for this operation (e.g. a UUID, 1 to 255 visible characters), kept 24 hours: repeating the request with the same key returns the first answer (`Idempotent-Replayed: true`) instead of doing it again. Errors: `API-8109` (400) a key that is not valid, `API-8108` (409, retryable) the first request with this key is still running, `API-8107` (422) the key was used for a different request; `API-8118` (409) the first request created something whose secret is shown only once, so its answer is not repeated. An answer with `shown_once` repeats its secret within 10 minutes, then `API-8118`.","required":false,"schema":{"type":"string","minLength":1,"maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConnectEmailChannel"}}}},"responses":{"201":{"description":"The channel.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailChannel"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `AUTH-1003`: your seat was deactivated (view only). `AUTH-1004`: all seats are inactive because the seat charge was not paid (view only). `AUTH-1002`: your role lacks the `channels.manage` permission. `API-8102`: the API key or app lacks the `channels:write` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in. `API-8148`: not available to test keys (API test mode).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"409":{"description":"`EM-3614`: the address is already connected.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"description":"`API-8001`: some fields are missing or not valid. `details.fields` lists each invalid field with its own code (e.g. `API-8002` required, `API-8012` wrong format). `EM-3601`–`EM-3609`, `EM-3722`, `EM-3723`, `EM-3726`, `EM-3758`–`EM-3761`: the incoming (IMAP) or outgoing (SMTP) server refused (credentials, app password required, password sign-in off, TLS, untrusted certificate, address, unreachable, timeout); the server’s own reply is in `provider`.","headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"429":{"$ref":"#/components/responses/RateLimited"},"503":{"description":"`SYS-1001`: inbound email is not set up on this Rabt.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["channels:write"]},{"oauth2":["channels:write"]}],"summary":"Connect an address by forwarding","tags":["channels"]}},"/v1/channels/email/{channelId}":{"get":{"operationId":"getEmailChannel","parameters":[{"name":"channelId","required":true,"in":"path","description":"The email channel id.","schema":{"type":"string","format":"uuid","description":"The email channel id."}},{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"The channel.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailChannel"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `AUTH-1002`: your role lacks the `channels.manage` permission. `API-8102`: the API key or app lacks the `channels:read` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"`EM-3615`: no email channel with this id in your organization.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["channels:read"]},{"oauth2":["channels:read"]}],"summary":"An email forwarding channel","tags":["channels"]},"patch":{"description":"Its name, sender name, SMTP or IMAP server settings, IMAP login or passwords. New SMTP settings need `smtp_password` with them and a new IMAP server its own login or `smtp_password` (a saved password is only sent to the server it was saved for); they are tried first, and a channel waiting for a reconnection works again when they work.","operationId":"updateEmailChannel","parameters":[{"name":"channelId","required":true,"in":"path","description":"The email channel id.","schema":{"type":"string","format":"uuid","description":"The email channel id."}},{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}},{"name":"Idempotency-Key","in":"header","description":"A unique key for this operation (e.g. a UUID, 1 to 255 visible characters), kept 24 hours: repeating the request with the same key returns the first answer (`Idempotent-Replayed: true`) instead of doing it again. Errors: `API-8109` (400) a key that is not valid, `API-8108` (409, retryable) the first request with this key is still running, `API-8107` (422) the key was used for a different request; `API-8118` (409) the first request created something whose secret is shown only once, so its answer is not repeated. An answer with `shown_once` repeats its secret within 10 minutes, then `API-8118`.","required":false,"schema":{"type":"string","minLength":1,"maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateEmailChannel"}}}},"responses":{"200":{"description":"The channel.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailChannel"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `AUTH-1003`: your seat was deactivated (view only). `AUTH-1004`: all seats are inactive because the seat charge was not paid (view only). `AUTH-1002`: your role lacks the `channels.manage` permission. `API-8102`: the API key or app lacks the `channels:write` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in. `API-8148`: not available to test keys (API test mode).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"`EM-3615`: no email channel with this id in your organization.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"description":"`API-8001`: some fields are missing or not valid. `details.fields` lists each invalid field with its own code (e.g. `API-8002` required, `API-8012` wrong format). `EM-3601`–`EM-3609`, `EM-3722`, `EM-3723`, `EM-3726`, `EM-3758`–`EM-3761`: the incoming (IMAP) or outgoing (SMTP) server refused (credentials, app password required, password sign-in off, TLS, untrusted certificate, address, unreachable, timeout); the server’s own reply is in `provider`. `EM-3618`: new server settings without `smtp_password`.","headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["channels:write"]},{"oauth2":["channels:write"]}],"summary":"Change an email channel","tags":["channels"]}},"/v1/channels/email/{channelId}/reconnect":{"post":{"description":"After the SMTP or IMAP server refused the saved password (`needs_reauth`): the new one (`smtp_password`, and the IMAP login) is tried, then kept.","operationId":"reconnectEmailChannel","parameters":[{"name":"channelId","required":true,"in":"path","description":"The email channel id.","schema":{"type":"string","format":"uuid","description":"The email channel id."}},{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}},{"name":"Idempotency-Key","in":"header","description":"A unique key for this operation (e.g. a UUID, 1 to 255 visible characters), kept 24 hours: repeating the request with the same key returns the first answer (`Idempotent-Replayed: true`) instead of doing it again. Errors: `API-8109` (400) a key that is not valid, `API-8108` (409, retryable) the first request with this key is still running, `API-8107` (422) the key was used for a different request; `API-8118` (409) the first request created something whose secret is shown only once, so its answer is not repeated. An answer with `shown_once` repeats its secret within 10 minutes, then `API-8118`.","required":false,"schema":{"type":"string","minLength":1,"maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReconnectEmailChannel"}}}},"responses":{"200":{"description":"The channel.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailChannel"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `AUTH-1003`: your seat was deactivated (view only). `AUTH-1004`: all seats are inactive because the seat charge was not paid (view only). `AUTH-1002`: your role lacks the `channels.manage` permission. `API-8102`: the API key or app lacks the `channels:write` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in. `API-8148`: not available to test keys (API test mode).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"`EM-3615`: no email channel with this id in your organization.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"description":"`API-8001`: some fields are missing or not valid. `details.fields` lists each invalid field with its own code (e.g. `API-8002` required, `API-8012` wrong format). `EM-3601`–`EM-3609`, `EM-3722`, `EM-3723`, `EM-3726`, `EM-3758`–`EM-3761`: the incoming (IMAP) or outgoing (SMTP) server refused (credentials, app password required, password sign-in off, TLS, untrusted certificate, address, unreachable, timeout); the server’s own reply is in `provider`.","headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["channels:write"]},{"oauth2":["channels:write"]}],"summary":"Reconnect with a new password","tags":["channels"]}},"/v1/channels/email/{channelId}/forwarding-check":{"post":{"description":"Rabt sends a message with a one-time token from the address to itself through its SMTP server; when it comes back through the forwarding, the channel becomes `active`. Once a minute per channel.","operationId":"sendEmailForwardingCheck","parameters":[{"name":"channelId","required":true,"in":"path","description":"The email channel id.","schema":{"type":"string","format":"uuid","description":"The email channel id."}},{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}},{"name":"Idempotency-Key","in":"header","description":"A unique key for this operation (e.g. a UUID, 1 to 255 visible characters), kept 24 hours: repeating the request with the same key returns the first answer (`Idempotent-Replayed: true`) instead of doing it again. Errors: `API-8109` (400) a key that is not valid, `API-8108` (409, retryable) the first request with this key is still running, `API-8107` (422) the key was used for a different request; `API-8118` (409) the first request created something whose secret is shown only once, so its answer is not repeated. An answer with `shown_once` repeats its secret within 10 minutes, then `API-8118`.","required":false,"schema":{"type":"string","minLength":1,"maxLength":255}}],"responses":{"200":{"description":"The channel.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailChannel"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `AUTH-1003`: your seat was deactivated (view only). `AUTH-1004`: all seats are inactive because the seat charge was not paid (view only). `AUTH-1002`: your role lacks the `channels.manage` permission. `API-8102`: the API key or app lacks the `channels:write` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in. `API-8148`: not available to test keys (API test mode).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"`EM-3615`: no email channel with this id in your organization.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"409":{"description":"`EM-3610`: the channel is disconnected or needs a reconnection.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"description":"`API-8004`: a rate limit quota is used up (see `RateLimit`). Try again after `Retry-After` seconds. `EM-3617`: a check was sent less than a minute ago.","headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"},"Retry-After":{"$ref":"#/components/headers/Retry-After"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["channels:write"]},{"oauth2":["channels:write"]}],"summary":"Send the forwarding check message","tags":["channels"]}},"/v1/channels/email/{channelId}/domain-check":{"post":{"description":"Reads the DNS of the address’s domain: SPF, DKIM (from the forwarding check message), DMARC and the SMTP server’s reverse DNS, and keeps the report on the channel. Once a minute per channel.","operationId":"checkEmailSenderDomain","parameters":[{"name":"channelId","required":true,"in":"path","description":"The email channel id.","schema":{"type":"string","format":"uuid","description":"The email channel id."}},{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"The channel.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailChannel"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `AUTH-1003`: your seat was deactivated (view only). `AUTH-1004`: all seats are inactive because the seat charge was not paid (view only). `AUTH-1002`: your role lacks the `channels.manage` permission. `API-8102`: the API key or app lacks the `channels:write` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in. `API-8148`: not available to test keys (API test mode).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"`EM-3615`: no email channel with this id in your organization.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"description":"`API-8004`: a rate limit quota is used up (see `RateLimit`). Try again after `Retry-After` seconds. `EM-3619`: the domain was checked less than a minute ago.","headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"},"Retry-After":{"$ref":"#/components/headers/Retry-After"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["channels:write"]},{"oauth2":["channels:write"]}],"summary":"Check the sender domain","tags":["channels"]}},"/v1/channels/email/{channelId}/disconnect":{"post":{"description":"Revokes the saved password and stops sending and receiving for the address; the channel and its tickets stay (Rabt never deletes).","operationId":"disconnectEmailChannel","parameters":[{"name":"channelId","required":true,"in":"path","description":"The email channel id.","schema":{"type":"string","format":"uuid","description":"The email channel id."}},{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}},{"name":"Idempotency-Key","in":"header","description":"A unique key for this operation (e.g. a UUID, 1 to 255 visible characters), kept 24 hours: repeating the request with the same key returns the first answer (`Idempotent-Replayed: true`) instead of doing it again. Errors: `API-8109` (400) a key that is not valid, `API-8108` (409, retryable) the first request with this key is still running, `API-8107` (422) the key was used for a different request; `API-8118` (409) the first request created something whose secret is shown only once, so its answer is not repeated. An answer with `shown_once` repeats its secret within 10 minutes, then `API-8118`.","required":false,"schema":{"type":"string","minLength":1,"maxLength":255}}],"responses":{"200":{"description":"The channel.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailChannel"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `AUTH-1003`: your seat was deactivated (view only). `AUTH-1004`: all seats are inactive because the seat charge was not paid (view only). `AUTH-1002`: your role lacks the `channels.manage` permission. `API-8102`: the API key or app lacks the `channels:write` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in. `API-8148`: not available to test keys (API test mode).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"`EM-3615`: no email channel with this id in your organization.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["channels:write"]},{"oauth2":["channels:write"]}],"summary":"Disconnect an email channel","tags":["channels"]}},"/v1/channels/microsoft/setup":{"get":{"description":"Whether Microsoft 365 is set up on this Rabt, the redirect URI of its Entra app, and the page where a Microsoft 365 administrator approves Rabt for the whole organization.","operationId":"getMicrosoftSetup","parameters":[{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"The setup.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MicrosoftSetup"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `AUTH-1002`: your role lacks the `channels.manage` permission. `API-8102`: the API key or app lacks the `channels:read` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["channels:read"]},{"oauth2":["channels:read"]}],"summary":"Microsoft 365 setup","tags":["channels"]}},"/v1/channels/microsoft":{"get":{"description":"Every connected Microsoft 365 mailbox with its status, addresses, receiving state and daily sending use (never its tokens); disconnected ones last.","operationId":"listMicrosoftChannels","parameters":[{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"The mailboxes.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MicrosoftChannelList"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `AUTH-1002`: your role lacks the `channels.manage` permission. `API-8102`: the API key or app lacks the `channels:read` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["channels:read"]},{"oauth2":["channels:read"]}],"summary":"List the Microsoft 365 mailboxes","tags":["channels"]}},"/v1/channels/microsoft/connect":{"post":{"description":"Returns Microsoft’s sign-in page (OAuth 2.0 with state and PKCE). The person signs in and approves; Microsoft returns to Rabt, which connects the mailbox (or reconnects `channel_id`) and emits `channel.connected`.","operationId":"connectMicrosoftChannel","parameters":[{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}},{"name":"Idempotency-Key","in":"header","description":"A unique key for this operation (e.g. a UUID, 1 to 255 visible characters), kept 24 hours: repeating the request with the same key returns the first answer (`Idempotent-Replayed: true`) instead of doing it again. Errors: `API-8109` (400) a key that is not valid, `API-8108` (409, retryable) the first request with this key is still running, `API-8107` (422) the key was used for a different request; `API-8118` (409) the first request created something whose secret is shown only once, so its answer is not repeated. An answer with `shown_once` repeats its secret within 10 minutes, then `API-8118`.","required":false,"schema":{"type":"string","minLength":1,"maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MicrosoftConnect"}}}},"responses":{"200":{"description":"The sign-in page.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MicrosoftConnectStart"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `AUTH-1003`: your seat was deactivated (view only). `AUTH-1004`: all seats are inactive because the seat charge was not paid (view only). `AUTH-1002`: your role lacks the `channels.manage` permission. `API-8102`: the API key or app lacks the `channels:write` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in. `API-8148`: not available to test keys (API test mode).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"`EM-3615`: no email channel with this id in your organization.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"description":"`API-8001`: some fields are missing or not valid. `details.fields` lists each invalid field with its own code (e.g. `API-8002` required, `API-8012` wrong format). `SPC-6223`: the channel is held back or not set up yet: «coming soon», nothing to connect.","headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"429":{"$ref":"#/components/responses/RateLimited"},"503":{"description":"`SYS-1001`: Microsoft 365 is not set up on this Rabt.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["channels:write"]},{"oauth2":["channels:write"]}],"summary":"Start connecting a Microsoft 365 mailbox","tags":["channels"]}},"/v1/channels/microsoft/{channelId}":{"get":{"operationId":"getMicrosoftChannel","parameters":[{"name":"channelId","required":true,"in":"path","description":"The email channel id.","schema":{"type":"string","format":"uuid","description":"The email channel id."}},{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"The mailbox.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MicrosoftChannel"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `AUTH-1002`: your role lacks the `channels.manage` permission. `API-8102`: the API key or app lacks the `channels:read` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"`EM-3615`: no email channel with this id in your organization.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["channels:read"]},{"oauth2":["channels:read"]}],"summary":"A Microsoft 365 mailbox","tags":["channels"]},"patch":{"description":"Its name, or the address replies without one of their own leave from.","operationId":"updateMicrosoftChannel","parameters":[{"name":"channelId","required":true,"in":"path","description":"The email channel id.","schema":{"type":"string","format":"uuid","description":"The email channel id."}},{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}},{"name":"Idempotency-Key","in":"header","description":"A unique key for this operation (e.g. a UUID, 1 to 255 visible characters), kept 24 hours: repeating the request with the same key returns the first answer (`Idempotent-Replayed: true`) instead of doing it again. Errors: `API-8109` (400) a key that is not valid, `API-8108` (409, retryable) the first request with this key is still running, `API-8107` (422) the key was used for a different request; `API-8118` (409) the first request created something whose secret is shown only once, so its answer is not repeated. An answer with `shown_once` repeats its secret within 10 minutes, then `API-8118`.","required":false,"schema":{"type":"string","minLength":1,"maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateMicrosoftChannel"}}}},"responses":{"200":{"description":"The mailbox.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MicrosoftChannel"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `AUTH-1003`: your seat was deactivated (view only). `AUTH-1004`: all seats are inactive because the seat charge was not paid (view only). `AUTH-1002`: your role lacks the `channels.manage` permission. `API-8102`: the API key or app lacks the `channels:write` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in. `API-8148`: not available to test keys (API test mode).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"`EM-3615`: no email channel with this id in your organization. `EM-3125`: no such address on this channel.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"409":{"description":"`EM-3623`: that address is stopped.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["channels:write"]},{"oauth2":["channels:write"]}],"summary":"Change a Microsoft 365 mailbox","tags":["channels"]}},"/v1/channels/microsoft/{channelId}/addresses/refresh":{"post":{"description":"Reads the mailbox’s addresses (its primary address and aliases) from Microsoft and keeps the channel’s in step; aliases members added stay.","operationId":"refreshMicrosoftAddresses","parameters":[{"name":"channelId","required":true,"in":"path","description":"The email channel id.","schema":{"type":"string","format":"uuid","description":"The email channel id."}},{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}},{"name":"Idempotency-Key","in":"header","description":"A unique key for this operation (e.g. a UUID, 1 to 255 visible characters), kept 24 hours: repeating the request with the same key returns the first answer (`Idempotent-Replayed: true`) instead of doing it again. Errors: `API-8109` (400) a key that is not valid, `API-8108` (409, retryable) the first request with this key is still running, `API-8107` (422) the key was used for a different request; `API-8118` (409) the first request created something whose secret is shown only once, so its answer is not repeated. An answer with `shown_once` repeats its secret within 10 minutes, then `API-8118`.","required":false,"schema":{"type":"string","minLength":1,"maxLength":255}}],"responses":{"200":{"description":"The mailbox.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MicrosoftChannel"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `AUTH-1003`: your seat was deactivated (view only). `AUTH-1004`: all seats are inactive because the seat charge was not paid (view only). `AUTH-1002`: your role lacks the `channels.manage` permission. `API-8102`: the API key or app lacks the `channels:write` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in. `API-8148`: not available to test keys (API test mode).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"`EM-3615`: no email channel with this id in your organization.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"409":{"description":"`EM-3126`: the mailbox needs a reconnection or is disconnected.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["channels:write"]},{"oauth2":["channels:write"]}],"summary":"Discover the mailbox’s addresses again","tags":["channels"]}},"/v1/channels/microsoft/{channelId}/addresses":{"post":{"description":"An alias of the mailbox Microsoft does not list to Rabt (a shared mailbox’s aliases); the send-as check shows whether mail can leave from it.","operationId":"addMicrosoftAddress","parameters":[{"name":"channelId","required":true,"in":"path","description":"The email channel id.","schema":{"type":"string","format":"uuid","description":"The email channel id."}},{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}},{"name":"Idempotency-Key","in":"header","description":"A unique key for this operation (e.g. a UUID, 1 to 255 visible characters), kept 24 hours: repeating the request with the same key returns the first answer (`Idempotent-Replayed: true`) instead of doing it again. Errors: `API-8109` (400) a key that is not valid, `API-8108` (409, retryable) the first request with this key is still running, `API-8107` (422) the key was used for a different request; `API-8118` (409) the first request created something whose secret is shown only once, so its answer is not repeated. An answer with `shown_once` repeats its secret within 10 minutes, then `API-8118`.","required":false,"schema":{"type":"string","minLength":1,"maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AddMicrosoftAddress"}}}},"responses":{"201":{"description":"The mailbox.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MicrosoftChannel"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `AUTH-1003`: your seat was deactivated (view only). `AUTH-1004`: all seats are inactive because the seat charge was not paid (view only). `AUTH-1002`: your role lacks the `channels.manage` permission. `API-8102`: the API key or app lacks the `channels:write` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in. `API-8148`: not available to test keys (API test mode).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"`EM-3615`: no email channel with this id in your organization.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"409":{"description":"`EM-3614`: the address is already connected. `EM-3126`: the mailbox is not working.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"description":"`API-8001`: some fields are missing or not valid. `details.fields` lists each invalid field with its own code (e.g. `API-8002` required, `API-8012` wrong format). `EM-3130`: the mailbox carries the most addresses it can.","headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["channels:write"]},{"oauth2":["channels:write"]}],"summary":"Add an alias by hand","tags":["channels"]}},"/v1/channels/microsoft/{channelId}/addresses/{addressId}":{"patch":{"description":"Its sender name, the member its new tickets are assigned to (docs/02 §4: `ahmed@` → Ahmed), or whether it is on (`active`: a stopped address takes no mail and is never a From). Spaces take an address’s tickets through the spaces API (`POST /v1/spaces/{id}/channels` with `channel_address_id`).","operationId":"updateMicrosoftAddress","parameters":[{"name":"channelId","required":true,"in":"path","description":"The email channel id.","schema":{"type":"string","format":"uuid","description":"The email channel id."}},{"name":"addressId","required":true,"in":"path","description":"The address id (of the channel).","schema":{"type":"string","format":"uuid","description":"The address id (of the channel)."}},{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}},{"name":"Idempotency-Key","in":"header","description":"A unique key for this operation (e.g. a UUID, 1 to 255 visible characters), kept 24 hours: repeating the request with the same key returns the first answer (`Idempotent-Replayed: true`) instead of doing it again. Errors: `API-8109` (400) a key that is not valid, `API-8108` (409, retryable) the first request with this key is still running, `API-8107` (422) the key was used for a different request; `API-8118` (409) the first request created something whose secret is shown only once, so its answer is not repeated. An answer with `shown_once` repeats its secret within 10 minutes, then `API-8118`.","required":false,"schema":{"type":"string","minLength":1,"maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateMicrosoftAddress"}}}},"responses":{"200":{"description":"The mailbox.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MicrosoftChannel"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `AUTH-1003`: your seat was deactivated (view only). `AUTH-1004`: all seats are inactive because the seat charge was not paid (view only). `AUTH-1002`: your role lacks the `channels.manage` permission. `API-8102`: the API key or app lacks the `channels:write` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in. `API-8148`: not available to test keys (API test mode).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"`EM-3615`: no email channel with this id in your organization. `EM-3125`: no such address on this channel. `TKT-6107`: no such member.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"409":{"description":"`TKT-6122`: the member’s seat is inactive. `EM-3622`: the mailbox’s last active address cannot be stopped (disconnect the channel instead).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["channels:write"]},{"oauth2":["channels:write"]}],"summary":"Change an address of the mailbox","tags":["channels"]},"delete":{"description":"Only aliases members added (not the default address). The address row and its tickets stay (Rabt never deletes).","operationId":"removeMicrosoftAddress","parameters":[{"name":"channelId","required":true,"in":"path","description":"The email channel id.","schema":{"type":"string","format":"uuid","description":"The email channel id."}},{"name":"addressId","required":true,"in":"path","description":"The address id (of the channel).","schema":{"type":"string","format":"uuid","description":"The address id (of the channel)."}},{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"The mailbox.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MicrosoftChannel"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `AUTH-1003`: your seat was deactivated (view only). `AUTH-1004`: all seats are inactive because the seat charge was not paid (view only). `AUTH-1002`: your role lacks the `channels.manage` permission. `API-8102`: the API key or app lacks the `channels:write` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in. `API-8148`: not available to test keys (API test mode).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"`EM-3615`: no email channel with this id in your organization. `EM-3125`: no such address on this channel.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["channels:write"]},{"oauth2":["channels:write"]}],"summary":"Remove an alias added by hand","tags":["channels"]}},"/v1/channels/microsoft/{channelId}/addresses/{addressId}/send-as-check":{"post":{"description":"Sends a message from the address to the mailbox itself; when it comes back, the address is `verified` (Microsoft kept it) or `rewritten` (the tenant needs SendFromAliasEnabled); a check Microsoft refuses makes it `refused` (EM-3109) and one that cannot be sent `failed`, with the error on the address. Once a minute per address.","operationId":"checkMicrosoftSendAs","parameters":[{"name":"channelId","required":true,"in":"path","description":"The email channel id.","schema":{"type":"string","format":"uuid","description":"The email channel id."}},{"name":"addressId","required":true,"in":"path","description":"The address id (of the channel).","schema":{"type":"string","format":"uuid","description":"The address id (of the channel)."}},{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}},{"name":"Idempotency-Key","in":"header","description":"A unique key for this operation (e.g. a UUID, 1 to 255 visible characters), kept 24 hours: repeating the request with the same key returns the first answer (`Idempotent-Replayed: true`) instead of doing it again. Errors: `API-8109` (400) a key that is not valid, `API-8108` (409, retryable) the first request with this key is still running, `API-8107` (422) the key was used for a different request; `API-8118` (409) the first request created something whose secret is shown only once, so its answer is not repeated. An answer with `shown_once` repeats its secret within 10 minutes, then `API-8118`.","required":false,"schema":{"type":"string","minLength":1,"maxLength":255}}],"responses":{"200":{"description":"The mailbox.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MicrosoftChannel"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `AUTH-1003`: your seat was deactivated (view only). `AUTH-1004`: all seats are inactive because the seat charge was not paid (view only). `AUTH-1002`: your role lacks the `channels.manage` permission. `API-8102`: the API key or app lacks the `channels:write` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in. `API-8148`: not available to test keys (API test mode).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"`EM-3615`: no email channel with this id in your organization. `EM-3125`: no such address on this channel.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"409":{"description":"`EM-3126`: the mailbox needs a reconnection or is disconnected.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"description":"`API-8004`: a rate limit quota is used up (see `RateLimit`). Try again after `Retry-After` seconds. `EM-3123`: the address was checked less than a minute ago.","headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"},"Retry-After":{"$ref":"#/components/headers/Retry-After"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["channels:write"]},{"oauth2":["channels:write"]}],"summary":"Check sending from an address","tags":["channels"]}},"/v1/channels/microsoft/{channelId}/messages/{messageId}/download-files":{"post":{"description":"For a customer’s message whose files were not all downloaded (`EM-3128` on it, listed in `messages_missing_files`): downloads each missing file again, on its own; stored files are kept. `EM-3128` is cleared when none is missing, or attached again with a new reference. Emits `message.files_downloaded` (and `attachment.stored` per file). A message with no file missing is left as it is.","operationId":"downloadMicrosoftMessageFiles","parameters":[{"name":"channelId","required":true,"in":"path","description":"The email channel id.","schema":{"type":"string","format":"uuid","description":"The email channel id."}},{"name":"messageId","required":true,"in":"path","description":"The message id (of the ticket).","schema":{"type":"string","format":"uuid","description":"The message id (of the ticket)."}},{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}},{"name":"Idempotency-Key","in":"header","description":"A unique key for this operation (e.g. a UUID, 1 to 255 visible characters), kept 24 hours: repeating the request with the same key returns the first answer (`Idempotent-Replayed: true`) instead of doing it again. Errors: `API-8109` (400) a key that is not valid, `API-8108` (409, retryable) the first request with this key is still running, `API-8107` (422) the key was used for a different request; `API-8118` (409) the first request created something whose secret is shown only once, so its answer is not repeated. An answer with `shown_once` repeats its secret within 10 minutes, then `API-8118`.","required":false,"schema":{"type":"string","minLength":1,"maxLength":255}}],"responses":{"200":{"description":"The mailbox.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MicrosoftChannel"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `AUTH-1003`: your seat was deactivated (view only). `AUTH-1004`: all seats are inactive because the seat charge was not paid (view only). `AUTH-1002`: your role lacks the `channels.manage` permission. `API-8102`: the API key or app lacks the `channels:write` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in. `API-8148`: not available to test keys (API test mode).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"`EM-3615`: no email channel with this id in your organization. `TKT-6105`: no customer email with this id on the mailbox.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"409":{"description":"`EM-3126`: the mailbox needs a reconnection or is disconnected.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["channels:write"]},{"oauth2":["channels:write"]}],"summary":"Download a message’s missing files again","tags":["channels"]}},"/v1/channels/microsoft/{channelId}/domain-check":{"post":{"description":"Reads the DNS of the default address’s domain: SPF, DKIM (Microsoft 365’s selector1 and selector2) and DMARC, and keeps the report on the mailbox. It also runs when the mailbox is connected. Once a minute per mailbox.","operationId":"checkMicrosoftSenderDomain","parameters":[{"name":"channelId","required":true,"in":"path","description":"The email channel id.","schema":{"type":"string","format":"uuid","description":"The email channel id."}},{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"The mailbox.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MicrosoftChannel"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `AUTH-1003`: your seat was deactivated (view only). `AUTH-1004`: all seats are inactive because the seat charge was not paid (view only). `AUTH-1002`: your role lacks the `channels.manage` permission. `API-8102`: the API key or app lacks the `channels:write` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in. `API-8148`: not available to test keys (API test mode).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"`EM-3615`: no email channel with this id in your organization.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"description":"`API-8004`: a rate limit quota is used up (see `RateLimit`). Try again after `Retry-After` seconds. `EM-3619`: the domain was checked less than a minute ago.","headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"},"Retry-After":{"$ref":"#/components/headers/Retry-After"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["channels:write"]},{"oauth2":["channels:write"]}],"summary":"Check the sender domain","tags":["channels"]}},"/v1/channels/microsoft/{channelId}/disconnect":{"post":{"description":"Removes the notification subscription at Microsoft, revokes Rabt’s copy of the tokens and stops sending and receiving; the channel and its tickets stay (Rabt never deletes). To remove Rabt from the Microsoft account too, remove it from the account’s apps (myapps.microsoft.com).","operationId":"disconnectMicrosoftChannel","parameters":[{"name":"channelId","required":true,"in":"path","description":"The email channel id.","schema":{"type":"string","format":"uuid","description":"The email channel id."}},{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}},{"name":"Idempotency-Key","in":"header","description":"A unique key for this operation (e.g. a UUID, 1 to 255 visible characters), kept 24 hours: repeating the request with the same key returns the first answer (`Idempotent-Replayed: true`) instead of doing it again. Errors: `API-8109` (400) a key that is not valid, `API-8108` (409, retryable) the first request with this key is still running, `API-8107` (422) the key was used for a different request; `API-8118` (409) the first request created something whose secret is shown only once, so its answer is not repeated. An answer with `shown_once` repeats its secret within 10 minutes, then `API-8118`.","required":false,"schema":{"type":"string","minLength":1,"maxLength":255}}],"responses":{"200":{"description":"The mailbox.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MicrosoftChannel"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `AUTH-1003`: your seat was deactivated (view only). `AUTH-1004`: all seats are inactive because the seat charge was not paid (view only). `AUTH-1002`: your role lacks the `channels.manage` permission. `API-8102`: the API key or app lacks the `channels:write` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in. `API-8148`: not available to test keys (API test mode).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"`EM-3615`: no email channel with this id in your organization.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["channels:write"]},{"oauth2":["channels:write"]}],"summary":"Disconnect a Microsoft 365 mailbox","tags":["channels"]}},"/v1/email-signatures":{"get":{"description":"The named signatures with their sending addresses, and every sending email address with the signature it signs with. A reply carries the signature of the address it leaves from; an address without one sends without a signature.","operationId":"listEmailSignatures","parameters":[{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"The signatures.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailSignatureList"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `API-8102`: the API key or app lacks the `organization:read` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["organization:read"]},{"oauth2":["organization:read"]}],"summary":"The email signatures","tags":["organizations"]},"post":{"description":"A named signature, for the addresses given (each leaves the signature it had).","operationId":"createEmailSignature","parameters":[{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}},{"name":"Idempotency-Key","in":"header","description":"A unique key for this operation (e.g. a UUID, 1 to 255 visible characters), kept 24 hours: repeating the request with the same key returns the first answer (`Idempotent-Replayed: true`) instead of doing it again. Errors: `API-8109` (400) a key that is not valid, `API-8108` (409, retryable) the first request with this key is still running, `API-8107` (422) the key was used for a different request; `API-8118` (409) the first request created something whose secret is shown only once, so its answer is not repeated. An answer with `shown_once` repeats its secret within 10 minutes, then `API-8118`.","required":false,"schema":{"type":"string","minLength":1,"maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailSignatureCreate"}}}},"responses":{"201":{"description":"The signature.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailSignature"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `AUTH-1003`: your seat was deactivated (view only). `AUTH-1004`: all seats are inactive because the seat charge was not paid (view only). `AUTH-1002`: your role lacks the `channels.manage` permission. `API-8102`: the API key or app lacks the `organization:write` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"`SPC-6208`: no such sending email address.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"description":"`API-8001`: some fields are missing or not valid. `details.fields` lists each invalid field with its own code (e.g. `API-8002` required, `API-8012` wrong format). `EM-3750`: a link or image address the signature may not have (links: https: mailto:; images: https:).","headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["organization:write"]},{"oauth2":["organization:write"]}],"summary":"Create an email signature","tags":["organizations"]}},"/v1/email-signatures/preview":{"get":{"description":"The signature your email replies from the address carry: the one assigned to the address, filled in with your name and job title (null: none).","operationId":"previewEmailSignature","parameters":[{"name":"address_id","required":false,"in":"query","description":"The email address the reply leaves from (none: the default From address, else the first sending address).","schema":{"description":"The email address the reply leaves from (none: the default From address, else the first sending address).","type":"string","format":"uuid"}},{"name":"space_id","required":false,"in":"query","description":"The ticket’s space (none: the All space).","schema":{"description":"The ticket’s space (none: the All space).","type":"string","format":"uuid"}},{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"The signature.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailSignaturePreview"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `API-8102`: the API key or app lacks the `organization:read` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["organization:read"]},{"oauth2":["organization:read"]}],"summary":"The signature of your replies","tags":["organizations"]}},"/v1/email-signatures/addresses/{addressId}":{"put":{"deprecated":true,"description":"Deprecated: use `PATCH /v1/email-signatures/{signatureId}` or `POST /v1/email-signatures`. Sets the text of the signature the address signs with; an address without one gets a new signature named after it.","operationId":"setAddressEmailSignature","parameters":[{"name":"addressId","required":true,"in":"path","description":"The address id (of the channel).","schema":{"type":"string","format":"uuid","description":"The address id (of the channel)."}},{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}},{"name":"Idempotency-Key","in":"header","description":"A unique key for this operation (e.g. a UUID, 1 to 255 visible characters), kept 24 hours: repeating the request with the same key returns the first answer (`Idempotent-Replayed: true`) instead of doing it again. Errors: `API-8109` (400) a key that is not valid, `API-8108` (409, retryable) the first request with this key is still running, `API-8107` (422) the key was used for a different request; `API-8118` (409) the first request created something whose secret is shown only once, so its answer is not repeated. An answer with `shown_once` repeats its secret within 10 minutes, then `API-8118`.","required":false,"schema":{"type":"string","minLength":1,"maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailSignatureInput"}}}},"responses":{"200":{"description":"The signature.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailSignature"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `AUTH-1003`: your seat was deactivated (view only). `AUTH-1004`: all seats are inactive because the seat charge was not paid (view only). `AUTH-1002`: your role lacks the `channels.manage` permission. `API-8102`: the API key or app lacks the `organization:write` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"`SPC-6208`: no such email address.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"description":"`API-8001`: some fields are missing or not valid. `details.fields` lists each invalid field with its own code (e.g. `API-8002` required, `API-8012` wrong format). `EM-3750`: a link or image address the signature may not have (links: https: mailto:; images: https:).","headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["organization:write"]},{"oauth2":["organization:write"]}],"summary":"Set an email address’s signature (deprecated)","tags":["organizations"]},"delete":{"deprecated":true,"description":"Deprecated: use `PUT /v1/email-signatures/assignments/{addressId}` with `signature_id: null`. Replies from the address then carry no signature; the signature stays.","operationId":"removeAddressEmailSignature","parameters":[{"name":"addressId","required":true,"in":"path","description":"The address id (of the channel).","schema":{"type":"string","format":"uuid","description":"The address id (of the channel)."}},{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"The signatures.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailSignatureList"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `AUTH-1003`: your seat was deactivated (view only). `AUTH-1004`: all seats are inactive because the seat charge was not paid (view only). `AUTH-1002`: your role lacks the `channels.manage` permission. `API-8102`: the API key or app lacks the `organization:write` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["organization:write"]},{"oauth2":["organization:write"]}],"summary":"Remove an email address’s signature (deprecated)","tags":["organizations"]}},"/v1/email-signatures/{signatureId}":{"patch":{"description":"Its name, text or addresses (`address_ids` replaces them: one left out then signs with none).","operationId":"updateEmailSignature","parameters":[{"name":"signatureId","required":true,"in":"path","description":"The email signature’s id.","schema":{"type":"string","format":"uuid","description":"The email signature’s id."}},{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}},{"name":"Idempotency-Key","in":"header","description":"A unique key for this operation (e.g. a UUID, 1 to 255 visible characters), kept 24 hours: repeating the request with the same key returns the first answer (`Idempotent-Replayed: true`) instead of doing it again. Errors: `API-8109` (400) a key that is not valid, `API-8108` (409, retryable) the first request with this key is still running, `API-8107` (422) the key was used for a different request; `API-8118` (409) the first request created something whose secret is shown only once, so its answer is not repeated. An answer with `shown_once` repeats its secret within 10 minutes, then `API-8118`.","required":false,"schema":{"type":"string","minLength":1,"maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailSignatureUpdate"}}}},"responses":{"200":{"description":"The signature.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailSignature"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `AUTH-1003`: your seat was deactivated (view only). `AUTH-1004`: all seats are inactive because the seat charge was not paid (view only). `AUTH-1002`: your role lacks the `channels.manage` permission. `API-8102`: the API key or app lacks the `organization:write` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"`EM-3756`: no such signature. `SPC-6208`: no such sending email address.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"description":"`API-8001`: some fields are missing or not valid. `details.fields` lists each invalid field with its own code (e.g. `API-8002` required, `API-8012` wrong format). `EM-3750`: a link or image address the signature may not have (links: https: mailto:; images: https:).","headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["organization:write"]},{"oauth2":["organization:write"]}],"summary":"Change an email signature","tags":["organizations"]},"delete":{"description":"Its addresses then send without a signature.","operationId":"deleteEmailSignature","parameters":[{"name":"signatureId","required":true,"in":"path","description":"The email signature’s id.","schema":{"type":"string","format":"uuid","description":"The email signature’s id."}},{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"The signatures.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailSignatureList"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `AUTH-1003`: your seat was deactivated (view only). `AUTH-1004`: all seats are inactive because the seat charge was not paid (view only). `AUTH-1002`: your role lacks the `channels.manage` permission. `API-8102`: the API key or app lacks the `organization:write` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"`EM-3756`: no such signature.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["organization:write"]},{"oauth2":["organization:write"]}],"summary":"Delete an email signature","tags":["organizations"]}},"/v1/email-signatures/assignments/{addressId}":{"put":{"description":"The address signs with the signature (it leaves the one it had); `signature_id: null`: none.","operationId":"assignEmailSignature","parameters":[{"name":"addressId","required":true,"in":"path","description":"The address id (of the channel).","schema":{"type":"string","format":"uuid","description":"The address id (of the channel)."}},{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}},{"name":"Idempotency-Key","in":"header","description":"A unique key for this operation (e.g. a UUID, 1 to 255 visible characters), kept 24 hours: repeating the request with the same key returns the first answer (`Idempotent-Replayed: true`) instead of doing it again. Errors: `API-8109` (400) a key that is not valid, `API-8108` (409, retryable) the first request with this key is still running, `API-8107` (422) the key was used for a different request; `API-8118` (409) the first request created something whose secret is shown only once, so its answer is not repeated. An answer with `shown_once` repeats its secret within 10 minutes, then `API-8118`.","required":false,"schema":{"type":"string","minLength":1,"maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailSignatureAssign"}}}},"responses":{"200":{"description":"The signatures.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailSignatureList"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `AUTH-1003`: your seat was deactivated (view only). `AUTH-1004`: all seats are inactive because the seat charge was not paid (view only). `AUTH-1002`: your role lacks the `channels.manage` permission. `API-8102`: the API key or app lacks the `organization:write` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"`EM-3756`: no such signature. `SPC-6208`: no such sending email address.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["organization:write"]},{"oauth2":["organization:write"]}],"summary":"Choose the signature of a sending address","tags":["organizations"]}},"/v1/channels/whatsapp":{"get":{"description":"Every connected WhatsApp number with its status, quality rating, messaging limit, health status, registration and chat history import; disconnected ones last. Tokens are never returned.","operationId":"listWhatsappChannels","parameters":[{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"The channels.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WhatsappChannelList"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `AUTH-1002`: your role lacks the `channels.manage` permission. `API-8102`: the API key or app lacks the `channels:read` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["channels:read"]},{"oauth2":["channels:read"]}],"summary":"List the WhatsApp Cloud API numbers","tags":["channels"]},"post":{"description":"With Embedded Signup's result: Rabt exchanges the code for the business's token, subscribes to its account's webhooks, registers the number (not for the WhatsApp Business app), then stores the channel `active`. Meta bills the business for WhatsApp directly; Rabt charges nothing for its messages. A number that already has another two-step verification PIN is connected with `registration_error_code` `WA-2071` and `registered_at` null: send its PIN to `registerWhatsappNumber`. A number waiting for a reconnection is reconnected.","operationId":"connectWhatsappChannel","parameters":[{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}},{"name":"Idempotency-Key","in":"header","description":"A unique key for this operation (e.g. a UUID, 1 to 255 visible characters), kept 24 hours: repeating the request with the same key returns the first answer (`Idempotent-Replayed: true`) instead of doing it again. Errors: `API-8109` (400) a key that is not valid, `API-8108` (409, retryable) the first request with this key is still running, `API-8107` (422) the key was used for a different request; `API-8118` (409) the first request created something whose secret is shown only once, so its answer is not repeated. An answer with `shown_once` repeats its secret within 10 minutes, then `API-8118`.","required":false,"schema":{"type":"string","minLength":1,"maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConnectWhatsappChannel"}}}},"responses":{"201":{"description":"The channel.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WhatsappChannel"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1097`: the sign-in was started in the desktop app by another member or on another device.\n\n`AUTH-1040`: you are not a member of the organization named. `AUTH-1003`: your seat was deactivated (view only). `AUTH-1004`: all seats are inactive because the seat charge was not paid (view only). `AUTH-1002`: your role lacks the `channels.manage` permission. `API-8102`: the API key or app lacks the `channels:write` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in. `API-8148`: not available to test keys (API test mode).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"409":{"description":"`CHN-3001`: the number is already connected.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"description":"`API-8001`: some fields are missing or not valid. `details.fields` lists each invalid field with its own code (e.g. `API-8002` required, `API-8012` wrong format). `WA-2100`: the signup result or its state is not valid. `WA-20xx`: Meta refused (its code and message are in `provider`); `WA-2999` for a code Rabt does not know yet.","headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"429":{"$ref":"#/components/responses/RateLimited"},"503":{"description":"`SYS-1001`: WhatsApp is not set up on this Rabt (the platform console's Meta card in Integrations); `service` names the card fields still missing as `<card>.<field>`, e.g. `WhatsApp (meta.whatsapp_config_id)`.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["channels:write"]},{"oauth2":["channels:write"]}],"summary":"Connect a WhatsApp Cloud API number","tags":["channels"]}},"/v1/channels/whatsapp/signup":{"post":{"description":"The configuration the browser runs Meta's Embedded Signup v4 with, and a signed `state` (30 minutes) to send back with its result. `coexistence` onboards a number that stays on the WhatsApp Business app.","operationId":"beginWhatsappSignup","parameters":[{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}},{"name":"Idempotency-Key","in":"header","description":"A unique key for this operation (e.g. a UUID, 1 to 255 visible characters), kept 24 hours: repeating the request with the same key returns the first answer (`Idempotent-Replayed: true`) instead of doing it again. Errors: `API-8109` (400) a key that is not valid, `API-8108` (409, retryable) the first request with this key is still running, `API-8107` (422) the key was used for a different request; `API-8118` (409) the first request created something whose secret is shown only once, so its answer is not repeated. An answer with `shown_once` repeats its secret within 10 minutes, then `API-8118`.","required":false,"schema":{"type":"string","minLength":1,"maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BeginWhatsappSignup"}}}},"responses":{"200":{"description":"The signup configuration.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WhatsappSignup"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `AUTH-1003`: your seat was deactivated (view only). `AUTH-1004`: all seats are inactive because the seat charge was not paid (view only). `AUTH-1002`: your role lacks the `channels.manage` permission. `API-8102`: the API key or app lacks the `channels:write` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in. `API-8148`: not available to test keys (API test mode).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"description":"`API-8001`: some fields are missing or not valid. `details.fields` lists each invalid field with its own code (e.g. `API-8002` required, `API-8012` wrong format). `SPC-6223`: the channel is held back or not set up yet: «coming soon», nothing to connect.","headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"429":{"$ref":"#/components/responses/RateLimited"},"503":{"description":"`SYS-1001`: WhatsApp is not set up on this Rabt (the platform console's Meta card in Integrations); `service` names the card fields still missing as `<card>.<field>`, e.g. `WhatsApp (meta.whatsapp_config_id)`.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["channels:write"]},{"oauth2":["channels:write"]}],"summary":"Begin Embedded Signup","tags":["channels"]}},"/v1/channels/whatsapp/{channelId}":{"get":{"operationId":"getWhatsappChannel","parameters":[{"name":"channelId","required":true,"in":"path","description":"The WhatsApp channel id.","schema":{"type":"string","format":"uuid","description":"The WhatsApp channel id."}},{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"The channel.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WhatsappChannel"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `AUTH-1002`: your role lacks the `channels.manage` permission. `API-8102`: the API key or app lacks the `channels:read` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"`WA-2101`: no WhatsApp channel with this id in your organization.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["channels:read"]},{"oauth2":["channels:read"]}],"summary":"A WhatsApp Cloud API number","tags":["channels"]},"patch":{"operationId":"updateWhatsappChannel","parameters":[{"name":"channelId","required":true,"in":"path","description":"The WhatsApp channel id.","schema":{"type":"string","format":"uuid","description":"The WhatsApp channel id."}},{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}},{"name":"Idempotency-Key","in":"header","description":"A unique key for this operation (e.g. a UUID, 1 to 255 visible characters), kept 24 hours: repeating the request with the same key returns the first answer (`Idempotent-Replayed: true`) instead of doing it again. Errors: `API-8109` (400) a key that is not valid, `API-8108` (409, retryable) the first request with this key is still running, `API-8107` (422) the key was used for a different request; `API-8118` (409) the first request created something whose secret is shown only once, so its answer is not repeated. An answer with `shown_once` repeats its secret within 10 minutes, then `API-8118`.","required":false,"schema":{"type":"string","minLength":1,"maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateWhatsappChannel"}}}},"responses":{"200":{"description":"The channel.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WhatsappChannel"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `AUTH-1003`: your seat was deactivated (view only). `AUTH-1004`: all seats are inactive because the seat charge was not paid (view only). `AUTH-1002`: your role lacks the `channels.manage` permission. `API-8102`: the API key or app lacks the `channels:write` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in. `API-8148`: not available to test keys (API test mode).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"`WA-2101`: no WhatsApp channel with this id in your organization.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"409":{"description":"`WA-2103`: the channel is not active (disconnected or waiting for a reconnection).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["channels:write"]},{"oauth2":["channels:write"]}],"summary":"Rename a WhatsApp Cloud API number","tags":["channels"]}},"/v1/channels/whatsapp/{channelId}/register":{"post":{"description":"Registers the number on the Cloud API (after `WA-2071` at connection, `WA-2022` or `WA-2075`) with its two-step verification PIN: the given one, or the saved one.","operationId":"registerWhatsappNumber","parameters":[{"name":"channelId","required":true,"in":"path","description":"The WhatsApp channel id.","schema":{"type":"string","format":"uuid","description":"The WhatsApp channel id."}},{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}},{"name":"Idempotency-Key","in":"header","description":"A unique key for this operation (e.g. a UUID, 1 to 255 visible characters), kept 24 hours: repeating the request with the same key returns the first answer (`Idempotent-Replayed: true`) instead of doing it again. Errors: `API-8109` (400) a key that is not valid, `API-8108` (409, retryable) the first request with this key is still running, `API-8107` (422) the key was used for a different request; `API-8118` (409) the first request created something whose secret is shown only once, so its answer is not repeated. An answer with `shown_once` repeats its secret within 10 minutes, then `API-8118`.","required":false,"schema":{"type":"string","minLength":1,"maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RegisterWhatsappNumber"}}}},"responses":{"200":{"description":"The channel.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WhatsappChannel"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `AUTH-1003`: your seat was deactivated (view only). `AUTH-1004`: all seats are inactive because the seat charge was not paid (view only). `AUTH-1002`: your role lacks the `channels.manage` permission. `API-8102`: the API key or app lacks the `channels:write` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in. `API-8148`: not available to test keys (API test mode).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"`WA-2101`: no WhatsApp channel with this id in your organization.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"409":{"description":"`WA-2103`: the channel is not active (disconnected or waiting for a reconnection).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"description":"`API-8001`: some fields are missing or not valid. `details.fields` lists each invalid field with its own code (e.g. `API-8002` required, `API-8012` wrong format). `WA-2104`: no PIN. `WA-2071`–`WA-2077`: Meta refused the registration. `WA-20xx`: Meta refused (its code and message are in `provider`); `WA-2999` for a code Rabt does not know yet.","headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["channels:write"]},{"oauth2":["channels:write"]}],"summary":"Register the number again","tags":["channels"]}},"/v1/channels/whatsapp/{channelId}/health-check":{"post":{"description":"Reads Meta's health status of the number (can it send, and why not) with its quality rating and messaging limit. Rabt also checks it before sending.","operationId":"checkWhatsappHealth","parameters":[{"name":"channelId","required":true,"in":"path","description":"The WhatsApp channel id.","schema":{"type":"string","format":"uuid","description":"The WhatsApp channel id."}},{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"The channel.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WhatsappChannel"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `AUTH-1003`: your seat was deactivated (view only). `AUTH-1004`: all seats are inactive because the seat charge was not paid (view only). `AUTH-1002`: your role lacks the `channels.manage` permission. `API-8102`: the API key or app lacks the `channels:write` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in. `API-8148`: not available to test keys (API test mode).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"`WA-2101`: no WhatsApp channel with this id in your organization.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"409":{"description":"`WA-2103`: the channel is not active (disconnected or waiting for a reconnection).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["channels:write"]},{"oauth2":["channels:write"]}],"summary":"Check the health status now","tags":["channels"]}},"/v1/channels/whatsapp/{channelId}/resume-sending":{"post":{"description":"Lifts the stop Rabt put on the number after WhatsApp flagged spam or restricted the account. Meta's health status is read again first: a number Meta reports blocked stays stopped (`WA-2105`). A number that is not stopped is returned as it is.","operationId":"resumeWhatsappSending","parameters":[{"name":"channelId","required":true,"in":"path","description":"The WhatsApp channel id.","schema":{"type":"string","format":"uuid","description":"The WhatsApp channel id."}},{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}},{"name":"Idempotency-Key","in":"header","description":"A unique key for this operation (e.g. a UUID, 1 to 255 visible characters), kept 24 hours: repeating the request with the same key returns the first answer (`Idempotent-Replayed: true`) instead of doing it again. Errors: `API-8109` (400) a key that is not valid, `API-8108` (409, retryable) the first request with this key is still running, `API-8107` (422) the key was used for a different request; `API-8118` (409) the first request created something whose secret is shown only once, so its answer is not repeated. An answer with `shown_once` repeats its secret within 10 minutes, then `API-8118`.","required":false,"schema":{"type":"string","minLength":1,"maxLength":255}}],"responses":{"200":{"description":"The channel.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WhatsappChannel"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `AUTH-1003`: your seat was deactivated (view only). `AUTH-1004`: all seats are inactive because the seat charge was not paid (view only). `AUTH-1002`: your role lacks the `channels.manage` permission. `API-8102`: the API key or app lacks the `channels:write` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in. `API-8148`: not available to test keys (API test mode).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"`WA-2101`: no WhatsApp channel with this id in your organization.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"409":{"description":"`WA-2103`: the channel is not active (disconnected or waiting for a reconnection).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"description":"`API-8001`: some fields are missing or not valid. `details.fields` lists each invalid field with its own code (e.g. `API-8002` required, `API-8012` wrong format). `WA-2105`: Meta reports the number blocked: it stays stopped.","headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"429":{"$ref":"#/components/responses/RateLimited"},"503":{"description":"`SYS-1001`: WhatsApp is not set up on this Rabt (the platform console's Meta card in Integrations); `service` names the card fields still missing as `<card>.<field>`, e.g. `WhatsApp (meta.whatsapp_config_id)`.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["channels:write"]},{"oauth2":["channels:write"]}],"summary":"Resume sending after a stop","tags":["channels"]}},"/v1/channels/whatsapp/{channelId}/history":{"post":{"description":"For a WhatsApp Business app number (coexistence): asks Meta again to share the app's contacts and up to 6 months of chat history (within 24 hours of connecting). Imported chats are kept in closed history tickets.","operationId":"requestWhatsappHistory","parameters":[{"name":"channelId","required":true,"in":"path","description":"The WhatsApp channel id.","schema":{"type":"string","format":"uuid","description":"The WhatsApp channel id."}},{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}},{"name":"Idempotency-Key","in":"header","description":"A unique key for this operation (e.g. a UUID, 1 to 255 visible characters), kept 24 hours: repeating the request with the same key returns the first answer (`Idempotent-Replayed: true`) instead of doing it again. Errors: `API-8109` (400) a key that is not valid, `API-8108` (409, retryable) the first request with this key is still running, `API-8107` (422) the key was used for a different request; `API-8118` (409) the first request created something whose secret is shown only once, so its answer is not repeated. An answer with `shown_once` repeats its secret within 10 minutes, then `API-8118`.","required":false,"schema":{"type":"string","minLength":1,"maxLength":255}}],"responses":{"200":{"description":"The channel.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WhatsappChannel"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `AUTH-1003`: your seat was deactivated (view only). `AUTH-1004`: all seats are inactive because the seat charge was not paid (view only). `AUTH-1002`: your role lacks the `channels.manage` permission. `API-8102`: the API key or app lacks the `channels:write` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in. `API-8148`: not available to test keys (API test mode).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"`WA-2101`: no WhatsApp channel with this id in your organization.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"description":"`API-8001`: some fields are missing or not valid. `details.fields` lists each invalid field with its own code (e.g. `API-8002` required, `API-8012` wrong format). `WA-2122`: not a WhatsApp Business app number, or the history cannot be shared.","headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["channels:write"]},{"oauth2":["channels:write"]}],"summary":"Ask for the WhatsApp Business app history again","tags":["channels"]}},"/v1/channels/whatsapp/{channelId}/disconnect":{"post":{"description":"Stops the account's webhooks to Rabt, forgets the saved token; the number stays registered at Meta, which bills the business directly. The channel and its tickets stay (Rabt never deletes).","operationId":"disconnectWhatsappChannel","parameters":[{"name":"channelId","required":true,"in":"path","description":"The WhatsApp channel id.","schema":{"type":"string","format":"uuid","description":"The WhatsApp channel id."}},{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}},{"name":"Idempotency-Key","in":"header","description":"A unique key for this operation (e.g. a UUID, 1 to 255 visible characters), kept 24 hours: repeating the request with the same key returns the first answer (`Idempotent-Replayed: true`) instead of doing it again. Errors: `API-8109` (400) a key that is not valid, `API-8108` (409, retryable) the first request with this key is still running, `API-8107` (422) the key was used for a different request; `API-8118` (409) the first request created something whose secret is shown only once, so its answer is not repeated. An answer with `shown_once` repeats its secret within 10 minutes, then `API-8118`.","required":false,"schema":{"type":"string","minLength":1,"maxLength":255}}],"responses":{"200":{"description":"The channel.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WhatsappChannel"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `AUTH-1003`: your seat was deactivated (view only). `AUTH-1004`: all seats are inactive because the seat charge was not paid (view only). `AUTH-1002`: your role lacks the `channels.manage` permission. `API-8102`: the API key or app lacks the `channels:write` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in. `API-8148`: not available to test keys (API test mode).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"`WA-2101`: no WhatsApp channel with this id in your organization.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["channels:write"]},{"oauth2":["channels:write"]}],"summary":"Disconnect a WhatsApp Cloud API number","tags":["channels"]}},"/v1/channels/whatsapp/{channelId}/events":{"get":{"description":"Quality rating and messaging limit changes, account updates (restrictions, violations), capability limits, template approvals, pauses and quality, health status and history import, newest first.","operationId":"listWhatsappAccountEvents","parameters":[{"name":"channelId","required":true,"in":"path","description":"The WhatsApp channel id.","schema":{"type":"string","format":"uuid","description":"The WhatsApp channel id."}},{"name":"before","required":false,"in":"query","description":"Only events before this time (paging).","schema":{"description":"Only events before this time (paging).","type":"string","format":"date-time"}},{"name":"page","required":false,"in":"query","description":"A numbered page to jump to, from 1, of `limit` rows: its first row must be within the first 10000 rows of the list. Ignored with `cursor`; the next pages follow `next_cursor`.","schema":{"description":"A numbered page to jump to, from 1, of `limit` rows: its first row must be within the first 10000 rows of the list. Ignored with `cursor`; the next pages follow `next_cursor`.","type":"integer","minimum":1,"maximum":10000}},{"name":"limit","required":false,"in":"query","schema":{"type":"integer","minimum":1,"maximum":200}},{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"The events.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WhatsappAccountEventList"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `AUTH-1002`: your role lacks the `channels.manage` permission. `API-8102`: the API key or app lacks the `channels:read` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"`WA-2101`: no WhatsApp channel with this id in your organization.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["channels:read"]},{"oauth2":["channels:read"]}],"summary":"What Meta reported about the number","tags":["channels"]}},"/v1/channels/whatsapp/{channelId}/templates":{"get":{"description":"The number's account templates with their approval status, quality and pauses.","operationId":"listWhatsappTemplates","parameters":[{"name":"channelId","required":true,"in":"path","description":"The WhatsApp channel id.","schema":{"type":"string","format":"uuid","description":"The WhatsApp channel id."}},{"name":"status","required":false,"in":"query","description":"Only templates with this status, e.g. `approved`.","schema":{"description":"Only templates with this status, e.g. `approved`.","type":"string","pattern":"^[a-z_]{1,40}$"}},{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"The templates.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WhatsappTemplateList"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `AUTH-1002`: your role lacks the `channels.manage` permission. `API-8102`: the API key or app lacks the `channels:read` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"`WA-2101`: no WhatsApp channel with this id in your organization.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["channels:read"]},{"oauth2":["channels:read"]}],"summary":"List the templates","tags":["channels"]},"post":{"description":"Submits the template to Meta for review (`pending`); its approval arrives by webhook. Meta may put it in another category than asked.","operationId":"createWhatsappTemplate","parameters":[{"name":"channelId","required":true,"in":"path","description":"The WhatsApp channel id.","schema":{"type":"string","format":"uuid","description":"The WhatsApp channel id."}},{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}},{"name":"Idempotency-Key","in":"header","description":"A unique key for this operation (e.g. a UUID, 1 to 255 visible characters), kept 24 hours: repeating the request with the same key returns the first answer (`Idempotent-Replayed: true`) instead of doing it again. Errors: `API-8109` (400) a key that is not valid, `API-8108` (409, retryable) the first request with this key is still running, `API-8107` (422) the key was used for a different request; `API-8118` (409) the first request created something whose secret is shown only once, so its answer is not repeated. An answer with `shown_once` repeats its secret within 10 minutes, then `API-8118`.","required":false,"schema":{"type":"string","minLength":1,"maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateWhatsappTemplate"}}}},"responses":{"201":{"description":"The template.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WhatsappTemplate"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `AUTH-1003`: your seat was deactivated (view only). `AUTH-1004`: all seats are inactive because the seat charge was not paid (view only). `AUTH-1002`: your role lacks the `channels.manage` permission. `API-8102`: the API key or app lacks the `channels:write` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in. `API-8148`: not available to test keys (API test mode).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"`WA-2101`: no WhatsApp channel with this id in your organization.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"409":{"description":"`WA-2110`: a template with this name and language exists.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"description":"`API-8001`: some fields are missing or not valid. `details.fields` lists each invalid field with its own code (e.g. `API-8002` required, `API-8012` wrong format). `WA-20xx`: Meta refused (its code and message are in `provider`); `WA-2999` for a code Rabt does not know yet.","headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["channels:write"]},{"oauth2":["channels:write"]}],"summary":"Create a template","tags":["channels"]}},"/v1/channels/whatsapp/{channelId}/start-templates":{"get":{"description":"The number’s approved templates, for a member starting a ticket on it (`createTicket` `first_message.whatsapp_template`): a WhatsApp conversation a business starts opens with one.","operationId":"listWhatsappStartTemplates","parameters":[{"name":"channelId","required":true,"in":"path","description":"The WhatsApp channel id.","schema":{"type":"string","format":"uuid","description":"The WhatsApp channel id."}},{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"The approved templates.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WhatsappTemplateList"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `AUTH-1002`: your role lacks the `tickets.reply` permission. `API-8102`: the API key or app lacks the `tickets:read` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"`WA-2101`: no WhatsApp channel with this id in your organization.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["tickets:read"]},{"oauth2":["tickets:read"]}],"summary":"List the templates a conversation opens with","tags":["channels"]}},"/v1/channels/whatsapp/{channelId}/templates/sync":{"post":{"description":"Once a minute per number.","operationId":"syncWhatsappTemplates","parameters":[{"name":"channelId","required":true,"in":"path","description":"The WhatsApp channel id.","schema":{"type":"string","format":"uuid","description":"The WhatsApp channel id."}},{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}},{"name":"Idempotency-Key","in":"header","description":"A unique key for this operation (e.g. a UUID, 1 to 255 visible characters), kept 24 hours: repeating the request with the same key returns the first answer (`Idempotent-Replayed: true`) instead of doing it again. Errors: `API-8109` (400) a key that is not valid, `API-8108` (409, retryable) the first request with this key is still running, `API-8107` (422) the key was used for a different request; `API-8118` (409) the first request created something whose secret is shown only once, so its answer is not repeated. An answer with `shown_once` repeats its secret within 10 minutes, then `API-8118`.","required":false,"schema":{"type":"string","minLength":1,"maxLength":255}}],"responses":{"200":{"description":"The templates.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WhatsappTemplateList"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `AUTH-1003`: your seat was deactivated (view only). `AUTH-1004`: all seats are inactive because the seat charge was not paid (view only). `AUTH-1002`: your role lacks the `channels.manage` permission. `API-8102`: the API key or app lacks the `channels:write` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in. `API-8148`: not available to test keys (API test mode).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"`WA-2101`: no WhatsApp channel with this id in your organization.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"description":"`API-8004`: a rate limit quota is used up (see `RateLimit`). Try again after `Retry-After` seconds. `WA-2118`: synchronized less than a minute ago.","headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"},"Retry-After":{"$ref":"#/components/headers/Retry-After"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["channels:write"]},{"oauth2":["channels:write"]}],"summary":"Read the templates from Meta again","tags":["channels"]}},"/v1/channels/whatsapp/{channelId}/templates/{templateId}":{"get":{"operationId":"getWhatsappTemplate","parameters":[{"name":"channelId","required":true,"in":"path","description":"The WhatsApp channel id.","schema":{"type":"string","format":"uuid","description":"The WhatsApp channel id."}},{"name":"templateId","required":true,"in":"path","description":"The template id.","schema":{"type":"string","format":"uuid","description":"The template id."}},{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"The template.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WhatsappTemplate"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `AUTH-1002`: your role lacks the `channels.manage` permission. `API-8102`: the API key or app lacks the `channels:read` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"`WA-2101`: no WhatsApp channel with this id in your organization. `WA-2109`: no such template.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["channels:read"]},{"oauth2":["channels:read"]}],"summary":"A template","tags":["channels"]},"patch":{"description":"Changes its components or category at Meta; it is reviewed again.","operationId":"editWhatsappTemplate","parameters":[{"name":"channelId","required":true,"in":"path","description":"The WhatsApp channel id.","schema":{"type":"string","format":"uuid","description":"The WhatsApp channel id."}},{"name":"templateId","required":true,"in":"path","description":"The template id.","schema":{"type":"string","format":"uuid","description":"The template id."}},{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}},{"name":"Idempotency-Key","in":"header","description":"A unique key for this operation (e.g. a UUID, 1 to 255 visible characters), kept 24 hours: repeating the request with the same key returns the first answer (`Idempotent-Replayed: true`) instead of doing it again. Errors: `API-8109` (400) a key that is not valid, `API-8108` (409, retryable) the first request with this key is still running, `API-8107` (422) the key was used for a different request; `API-8118` (409) the first request created something whose secret is shown only once, so its answer is not repeated. An answer with `shown_once` repeats its secret within 10 minutes, then `API-8118`.","required":false,"schema":{"type":"string","minLength":1,"maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EditWhatsappTemplate"}}}},"responses":{"200":{"description":"The template.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WhatsappTemplate"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `AUTH-1003`: your seat was deactivated (view only). `AUTH-1004`: all seats are inactive because the seat charge was not paid (view only). `AUTH-1002`: your role lacks the `channels.manage` permission. `API-8102`: the API key or app lacks the `channels:write` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in. `API-8148`: not available to test keys (API test mode).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"`WA-2101`: no WhatsApp channel with this id in your organization. `WA-2109`: no such template.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"description":"`API-8001`: some fields are missing or not valid. `details.fields` lists each invalid field with its own code (e.g. `API-8002` required, `API-8012` wrong format). `WA-20xx`: Meta refused (its code and message are in `provider`); `WA-2999` for a code Rabt does not know yet.","headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["channels:write"]},{"oauth2":["channels:write"]}],"summary":"Edit a template","tags":["channels"]}},"/v1/channels/whatsapp/tickets/{ticketId}/composer":{"get":{"description":"On a WhatsApp ticket, or a phone thread whose number is also a WhatsApp number (a ticket that started with a call; its `channels` list the number): the 24-hour window (from Meta’s timestamp of the customer’s last WhatsApp message), whether free-form content may be sent or only an approved template, the content types and limits, and the approved templates. A ticket without a WhatsApp channel is `WA-2115`.","operationId":"getWhatsappComposer","parameters":[{"name":"ticketId","required":true,"in":"path","description":"The WhatsApp ticket id.","schema":{"type":"string","format":"uuid","description":"The WhatsApp ticket id."}},{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"The composer’s capabilities.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WhatsappComposer"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `AUTH-1002`: your role lacks the `tickets.reply` permission. `API-8102`: the API key or app lacks the `tickets:read` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"`TKT-6101`: no such ticket you can see.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["tickets:read"]},{"oauth2":["tickets:read"]}],"summary":"What can be sent on a Cloud API ticket","tags":["channels"]}},"/v1/channels/whatsapp/tickets/{ticketId}/messages":{"post":{"description":"Queued like any reply on the ticket’s WhatsApp number (also on a phone thread that started with a call) and paid when sent (prepaid: `WAL-1001` on the message when the balance cannot pay). Free-form content (also interactive messages) needs the 24-hour window open; a template needs to be approved. Buttons or a list beyond WhatsApp’s limits (3 buttons of 20 characters; 10 options of 24) is refused before anything is queued.","operationId":"sendWhatsappMessage","parameters":[{"name":"ticketId","required":true,"in":"path","description":"The WhatsApp ticket id.","schema":{"type":"string","format":"uuid","description":"The WhatsApp ticket id."}},{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}},{"name":"Idempotency-Key","in":"header","description":"A unique key for this operation (e.g. a UUID, 1 to 255 visible characters), kept 24 hours: repeating the request with the same key returns the first answer (`Idempotent-Replayed: true`) instead of doing it again. Errors: `API-8109` (400) a key that is not valid, `API-8108` (409, retryable) the first request with this key is still running, `API-8107` (422) the key was used for a different request; `API-8118` (409) the first request created something whose secret is shown only once, so its answer is not repeated. An answer with `shown_once` repeats its secret within 10 minutes, then `API-8118`.","required":false,"schema":{"type":"string","minLength":1,"maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SendWhatsappMessage"}}}},"responses":{"201":{"description":"The queued message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WhatsappSentMessage"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `AUTH-1003`: your seat was deactivated (view only). `AUTH-1004`: all seats are inactive because the seat charge was not paid (view only). `AUTH-1002`: your role lacks the `tickets.reply` permission. `API-8102`: the API key or app lacks the `tickets:write` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"`TKT-6101`: no such ticket you can see. `WA-2109`: no such template.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"409":{"description":"`WA-2103`: the channel is not active (disconnected or waiting for a reconnection).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"description":"`API-8001`: some fields are missing or not valid. `details.fields` lists each invalid field with its own code (e.g. `API-8002` required, `API-8012` wrong format). `WA-2047`: the 24-hour window is closed: send a template. `WA-2108`: the template is not approved.","headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["tickets:write"]},{"oauth2":["tickets:write"]}],"summary":"Send a template, location, contact cards, an interactive message or a reaction","tags":["channels"]}},"/v1/channels/whatsapp/tickets/{ticketId}/messages/{messageId}/media-download":{"post":{"description":"For a customer's message whose file could not be downloaded from Meta (its `error`): downloads it again in the background; the file appears on the message once stored, or the message shows the new error. Meta keeps received files for 30 days.","operationId":"retryWhatsappMediaDownload","parameters":[{"name":"ticketId","required":true,"in":"path","description":"The WhatsApp ticket id.","schema":{"type":"string","format":"uuid","description":"The WhatsApp ticket id."}},{"name":"messageId","required":true,"in":"path","description":"The message id.","schema":{"type":"string","format":"uuid","description":"The message id."}},{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}},{"name":"Idempotency-Key","in":"header","description":"A unique key for this operation (e.g. a UUID, 1 to 255 visible characters), kept 24 hours: repeating the request with the same key returns the first answer (`Idempotent-Replayed: true`) instead of doing it again. Errors: `API-8109` (400) a key that is not valid, `API-8108` (409, retryable) the first request with this key is still running, `API-8107` (422) the key was used for a different request; `API-8118` (409) the first request created something whose secret is shown only once, so its answer is not repeated. An answer with `shown_once` repeats its secret within 10 minutes, then `API-8118`.","required":false,"schema":{"type":"string","minLength":1,"maxLength":255}}],"responses":{"202":{"description":"The download is queued.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WhatsappMediaRetry"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `AUTH-1003`: your seat was deactivated (view only). `AUTH-1004`: all seats are inactive because the seat charge was not paid (view only). `AUTH-1002`: your role lacks the `tickets.reply` permission. `API-8102`: the API key or app lacks the `tickets:write` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"`TKT-6101`: no such ticket you can see. `TKT-6105`: no such message.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"409":{"description":"`WA-2124`: the message misses no file. `WA-2103`: the channel is not active (disconnected or waiting for a reconnection).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"410":{"description":"`WA-2125`: Meta no longer keeps the file (after 30 days).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"503":{"description":"`SYS-1001`: WhatsApp is not set up on this Rabt (the platform console's Meta card in Integrations); `service` names the card fields still missing as `<card>.<field>`, e.g. `WhatsApp (meta.whatsapp_config_id)`.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["tickets:write"]},{"oauth2":["tickets:write"]}],"summary":"Download a customer's file again","tags":["channels"]}},"/v1/channels/whatsapp/tickets/{ticketId}/typing":{"post":{"description":"Marks the customer's newest message read and shows the typing indicator for up to 25 seconds or until the reply is sent. Nothing is stored; free.","operationId":"sendWhatsappTyping","parameters":[{"name":"ticketId","required":true,"in":"path","description":"The WhatsApp ticket id.","schema":{"type":"string","format":"uuid","description":"The WhatsApp ticket id."}},{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}}],"responses":{"204":{"description":"Shown (or nothing to show: the window is closed).","headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `AUTH-1002`: your role lacks the `tickets.reply` permission. `API-8102`: the API key or app lacks the `tickets:write` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"`TKT-6101`: no such ticket you can see.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["tickets:write"]},{"oauth2":["tickets:write"]}],"summary":"Show the customer that you are typing","tags":["channels"]}},"/v1/channels/facebook":{"get":{"description":"Every connected Page with its status, the permissions granted and who connected it (never a token); disconnected ones last.","operationId":"listFacebookChannels","parameters":[{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"The channels.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FacebookChannelList"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `AUTH-1002`: your role lacks the `channels.manage` permission. `API-8102`: the API key or app lacks the `channels:read` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["channels:read"]},{"oauth2":["channels:read"]}],"summary":"List the Facebook Page channels","tags":["channels"]}},"/v1/channels/facebook/connect":{"post":{"description":"Returns Facebook's login dialog (Facebook Login for Business, with `state` and PKCE) for the person to sign in, choose Pages and approve permissions. Facebook sends them back to Rabt's callback page, which completes the connection (`POST /v1/channels/facebook/connect/complete`) within 10 minutes.","operationId":"startFacebookConnect","parameters":[{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}},{"name":"Idempotency-Key","in":"header","description":"A unique key for this operation (e.g. a UUID, 1 to 255 visible characters), kept 24 hours: repeating the request with the same key returns the first answer (`Idempotent-Replayed: true`) instead of doing it again. Errors: `API-8109` (400) a key that is not valid, `API-8108` (409, retryable) the first request with this key is still running, `API-8107` (422) the key was used for a different request; `API-8118` (409) the first request created something whose secret is shown only once, so its answer is not repeated. An answer with `shown_once` repeats its secret within 10 minutes, then `API-8118`.","required":false,"schema":{"type":"string","minLength":1,"maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StartFacebookConnect"}}}},"responses":{"200":{"description":"The login dialog.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FacebookConnectStart"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `AUTH-1003`: your seat was deactivated (view only). `AUTH-1004`: all seats are inactive because the seat charge was not paid (view only). `AUTH-1002`: your role lacks the `channels.manage` permission. `API-8102`: the API key or app lacks the `channels:write` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in. `API-8148`: not available to test keys (API test mode).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"`FB-2006`: no Facebook channel with this id in your organization.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"409":{"description":"`FB-2007`: the channel is disconnected or needs a reconnection.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"description":"`API-8001`: some fields are missing or not valid. `details.fields` lists each invalid field with its own code (e.g. `API-8002` required, `API-8012` wrong format). `SPC-6223`: the channel is held back or not set up yet: «coming soon», nothing to connect.","headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"429":{"$ref":"#/components/responses/RateLimited"},"503":{"description":"`SYS-1001`: Facebook is not set up on this Rabt (the platform console's Meta card in Integrations); `service` names the card fields still missing as `<card>.<field>`, e.g. `Facebook (meta.messenger_config_id)`.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["channels:write"]},{"oauth2":["channels:write"]}],"summary":"Start connecting Facebook Pages","tags":["channels"]}},"/v1/channels/facebook/connect/complete":{"post":{"description":"Takes what Facebook sent back (the `state` of a flow this member started here, and the `code`), exchanges it server side and connects every Page chosen: a new channel each, or a reconnection of the Page's channel here. Each is subscribed to Rabt's webhooks (`active`), or stays `pending` with the error.","operationId":"completeFacebookConnect","parameters":[{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}},{"name":"Idempotency-Key","in":"header","description":"A unique key for this operation (e.g. a UUID, 1 to 255 visible characters), kept 24 hours: repeating the request with the same key returns the first answer (`Idempotent-Replayed: true`) instead of doing it again. Errors: `API-8109` (400) a key that is not valid, `API-8108` (409, retryable) the first request with this key is still running, `API-8107` (422) the key was used for a different request; `API-8118` (409) the first request created something whose secret is shown only once, so its answer is not repeated. An answer with `shown_once` repeats its secret within 10 minutes, then `API-8118`.","required":false,"schema":{"type":"string","minLength":1,"maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CompleteFacebookConnect"}}}},"responses":{"200":{"description":"The Pages connected.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FacebookConnectResult"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`FB-2004`: the flow expired, was already used or was started elsewhere.\n\n`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1097`: the sign-in was started in the desktop app by another member or on another device.\n\n`AUTH-1040`: you are not a member of the organization named. `AUTH-1003`: your seat was deactivated (view only). `AUTH-1004`: all seats are inactive because the seat charge was not paid (view only). `AUTH-1002`: your role lacks the `channels.manage` permission. `API-8102`: the API key or app lacks the `channels:write` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in. `API-8148`: not available to test keys (API test mode).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"409":{"description":"`FB-2005`: the only Page chosen is connected to another organization in Rabt.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"description":"`API-8001`: some fields are missing or not valid. `details.fields` lists each invalid field with its own code (e.g. `API-8002` required, `API-8012` wrong format). `FB-2002`: the sign-in was cancelled or refused. `FB-2003`: no Page was chosen. `FB-2031`: Pages were chosen but Meta gave no Page token (the person has no task on them), with the counts of each step. `FB-2008`: permissions Rabt needs were declined. Meta’s own refusals keep their FB code and Meta’s message in `provider`.","headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"429":{"$ref":"#/components/responses/RateLimited"},"503":{"description":"`SYS-1001`: Facebook is not set up on this Rabt (the platform console's Meta card in Integrations); `service` names the card fields still missing as `<card>.<field>`, e.g. `Facebook (meta.messenger_config_id)`.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["channels:write"]},{"oauth2":["channels:write"]}],"summary":"Complete connecting Facebook Pages","tags":["channels"]}},"/v1/channels/facebook/{channelId}":{"get":{"operationId":"getFacebookChannel","parameters":[{"name":"channelId","required":true,"in":"path","description":"The Facebook channel id.","schema":{"type":"string","format":"uuid","description":"The Facebook channel id."}},{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"The channel.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FacebookChannel"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `AUTH-1002`: your role lacks the `channels.manage` permission. `API-8102`: the API key or app lacks the `channels:read` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"`FB-2006`: no Facebook channel with this id in your organization.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["channels:read"]},{"oauth2":["channels:read"]}],"summary":"A Facebook Page channel","tags":["channels"]},"patch":{"description":"The name members see in Rabt; the Page keeps its name on Facebook.","operationId":"updateFacebookChannel","parameters":[{"name":"channelId","required":true,"in":"path","description":"The Facebook channel id.","schema":{"type":"string","format":"uuid","description":"The Facebook channel id."}},{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}},{"name":"Idempotency-Key","in":"header","description":"A unique key for this operation (e.g. a UUID, 1 to 255 visible characters), kept 24 hours: repeating the request with the same key returns the first answer (`Idempotent-Replayed: true`) instead of doing it again. Errors: `API-8109` (400) a key that is not valid, `API-8108` (409, retryable) the first request with this key is still running, `API-8107` (422) the key was used for a different request; `API-8118` (409) the first request created something whose secret is shown only once, so its answer is not repeated. An answer with `shown_once` repeats its secret within 10 minutes, then `API-8118`.","required":false,"schema":{"type":"string","minLength":1,"maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateFacebookChannel"}}}},"responses":{"200":{"description":"The channel.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FacebookChannel"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `AUTH-1003`: your seat was deactivated (view only). `AUTH-1004`: all seats are inactive because the seat charge was not paid (view only). `AUTH-1002`: your role lacks the `channels.manage` permission. `API-8102`: the API key or app lacks the `channels:write` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in. `API-8148`: not available to test keys (API test mode).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"`FB-2006`: no Facebook channel with this id in your organization.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"409":{"description":"`FB-2007`: the channel is disconnected or needs a reconnection.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["channels:write"]},{"oauth2":["channels:write"]}],"summary":"Rename a Facebook Page channel","tags":["channels"]}},"/v1/channels/facebook/{channelId}/subscription":{"post":{"description":"After a subscription Meta refused (the channel is `pending` with the error): the Page is subscribed to its messages, deliveries, reads, reactions, edits, postbacks, policy notices and comments again, and becomes `active`.","operationId":"subscribeFacebookChannel","parameters":[{"name":"channelId","required":true,"in":"path","description":"The Facebook channel id.","schema":{"type":"string","format":"uuid","description":"The Facebook channel id."}},{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}},{"name":"Idempotency-Key","in":"header","description":"A unique key for this operation (e.g. a UUID, 1 to 255 visible characters), kept 24 hours: repeating the request with the same key returns the first answer (`Idempotent-Replayed: true`) instead of doing it again. Errors: `API-8109` (400) a key that is not valid, `API-8108` (409, retryable) the first request with this key is still running, `API-8107` (422) the key was used for a different request; `API-8118` (409) the first request created something whose secret is shown only once, so its answer is not repeated. An answer with `shown_once` repeats its secret within 10 minutes, then `API-8118`.","required":false,"schema":{"type":"string","minLength":1,"maxLength":255}}],"responses":{"200":{"description":"The channel.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FacebookChannel"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `AUTH-1003`: your seat was deactivated (view only). `AUTH-1004`: all seats are inactive because the seat charge was not paid (view only). `AUTH-1002`: your role lacks the `channels.manage` permission. `API-8102`: the API key or app lacks the `channels:write` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in. `API-8148`: not available to test keys (API test mode).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"`FB-2006`: no Facebook channel with this id in your organization.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"409":{"description":"`FB-2007`: the channel is disconnected or needs a reconnection.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"503":{"description":"`SYS-1001`: Facebook is not set up on this Rabt (the platform console's Meta card in Integrations); `service` names the card fields still missing as `<card>.<field>`, e.g. `Facebook (meta.messenger_config_id)`.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["channels:write"]},{"oauth2":["channels:write"]}],"summary":"Subscribe the Page to Rabt’s webhooks again","tags":["channels"]}},"/v1/channels/facebook/{channelId}/disconnect":{"post":{"description":"Unsubscribes the Page from Rabt’s webhooks, revokes its token and stops sending and receiving; the channel and its tickets stay (Rabt never deletes).","operationId":"disconnectFacebookChannel","parameters":[{"name":"channelId","required":true,"in":"path","description":"The Facebook channel id.","schema":{"type":"string","format":"uuid","description":"The Facebook channel id."}},{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}},{"name":"Idempotency-Key","in":"header","description":"A unique key for this operation (e.g. a UUID, 1 to 255 visible characters), kept 24 hours: repeating the request with the same key returns the first answer (`Idempotent-Replayed: true`) instead of doing it again. Errors: `API-8109` (400) a key that is not valid, `API-8108` (409, retryable) the first request with this key is still running, `API-8107` (422) the key was used for a different request; `API-8118` (409) the first request created something whose secret is shown only once, so its answer is not repeated. An answer with `shown_once` repeats its secret within 10 minutes, then `API-8118`.","required":false,"schema":{"type":"string","minLength":1,"maxLength":255}}],"responses":{"200":{"description":"The channel.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FacebookChannel"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `AUTH-1003`: your seat was deactivated (view only). `AUTH-1004`: all seats are inactive because the seat charge was not paid (view only). `AUTH-1002`: your role lacks the `channels.manage` permission. `API-8102`: the API key or app lacks the `channels:write` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in. `API-8148`: not available to test keys (API test mode).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"`FB-2006`: no Facebook channel with this id in your organization.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["channels:write"]},{"oauth2":["channels:write"]}],"summary":"Disconnect a Facebook Page","tags":["channels"]}},"/v1/channels/instagram/tickets/{ticketId}/media":{"get":{"description":"The 25 latest posts, reels and stories of the ticket’s Instagram account (newest first), read from Meta, to choose one for `post_share`.","operationId":"listInstagramMedia","parameters":[{"name":"ticketId","required":true,"in":"path","description":"The Instagram ticket id (a customer’s direct conversation).","schema":{"type":"string","format":"uuid","description":"The Instagram ticket id (a customer’s direct conversation)."}},{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"The media.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InstagramMediaList"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `AUTH-1002`: your role lacks the `tickets.reply` permission. `API-8102`: the API key or app lacks the `tickets:read` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"`TKT-6101`: no such ticket you can see. `IG-2006`: no Instagram channel with this id in your organization.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"409":{"description":"`IG-2007`: the channel is disconnected or needs a reconnection.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"description":"`API-8001`: some fields are missing or not valid. `details.fields` lists each invalid field with its own code (e.g. `API-8002` required, `API-8012` wrong format). `IG-2023`: not a customer’s direct conversation.","headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["tickets:read"]},{"oauth2":["tickets:read"]}],"summary":"The account’s recent media, to share in a conversation","tags":["channels"]}},"/v1/channels/instagram/tickets/{ticketId}/messages":{"post":{"description":"Queued like any reply on the customer’s direct conversation (the reply window and the human agent tag apply; the status follows: queued, sending, sent, read, or failed with the reason). `post_share` takes one of the account’s recent media.","operationId":"sendInstagramMessage","parameters":[{"name":"ticketId","required":true,"in":"path","description":"The Instagram ticket id (a customer’s direct conversation).","schema":{"type":"string","format":"uuid","description":"The Instagram ticket id (a customer’s direct conversation)."}},{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}},{"name":"Idempotency-Key","in":"header","description":"A unique key for this operation (e.g. a UUID, 1 to 255 visible characters), kept 24 hours: repeating the request with the same key returns the first answer (`Idempotent-Replayed: true`) instead of doing it again. Errors: `API-8109` (400) a key that is not valid, `API-8108` (409, retryable) the first request with this key is still running, `API-8107` (422) the key was used for a different request; `API-8118` (409) the first request created something whose secret is shown only once, so its answer is not repeated. An answer with `shown_once` repeats its secret within 10 minutes, then `API-8118`.","required":false,"schema":{"type":"string","minLength":1,"maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SendInstagramMessage"}}}},"responses":{"201":{"description":"The queued message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InstagramSentMessage"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `AUTH-1003`: your seat was deactivated (view only). `AUTH-1004`: all seats are inactive because the seat charge was not paid (view only). `AUTH-1002`: your role lacks the `tickets.reply` permission. `API-8102`: the API key or app lacks the `tickets:write` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"`TKT-6101`: no such ticket you can see. `IG-2006`: no Instagram channel with this id in your organization. `IG-2025`: no such recent media of the account.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"409":{"description":"`IG-2007`: the channel is disconnected or needs a reconnection.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"description":"`API-8001`: some fields are missing or not valid. `details.fields` lists each invalid field with its own code (e.g. `API-8002` required, `API-8012` wrong format). `IG-2023`: not a customer’s direct conversation. `IG-2010`/`IG-2011`: the reply window.","headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["tickets:write"]},{"oauth2":["tickets:write"]}],"summary":"Share one of the account’s posts, or send the heart sticker","tags":["channels"]}},"/v1/channels/instagram":{"get":{"description":"Every connected professional account with its status, how it was connected, the permissions granted and who connected it (never a token); disconnected ones last. `logins` says which ways to connect this Rabt offers.","operationId":"listInstagramChannels","parameters":[{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"The channels.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InstagramChannelList"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `AUTH-1002`: your role lacks the `channels.manage` permission. `API-8102`: the API key or app lacks the `channels:read` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["channels:read"]},{"oauth2":["channels:read"]}],"summary":"List the Instagram channels","tags":["channels"]}},"/v1/channels/instagram/connect":{"post":{"description":"Returns Meta's sign-in window for the chosen way: Facebook Login for Business (`facebook`, with `state` and PKCE; the person chooses the Pages whose Instagram accounts to connect) or Instagram Login (`instagram`, with `state`; the professional account signs in). Meta sends them back to Rabt's callback page, which completes the connection (`POST /v1/channels/instagram/connect/complete`) within 10 minutes.","operationId":"startInstagramConnect","parameters":[{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}},{"name":"Idempotency-Key","in":"header","description":"A unique key for this operation (e.g. a UUID, 1 to 255 visible characters), kept 24 hours: repeating the request with the same key returns the first answer (`Idempotent-Replayed: true`) instead of doing it again. Errors: `API-8109` (400) a key that is not valid, `API-8108` (409, retryable) the first request with this key is still running, `API-8107` (422) the key was used for a different request; `API-8118` (409) the first request created something whose secret is shown only once, so its answer is not repeated. An answer with `shown_once` repeats its secret within 10 minutes, then `API-8118`.","required":false,"schema":{"type":"string","minLength":1,"maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StartInstagramConnect"}}}},"responses":{"200":{"description":"The sign-in window.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InstagramConnectStart"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `AUTH-1003`: your seat was deactivated (view only). `AUTH-1004`: all seats are inactive because the seat charge was not paid (view only). `AUTH-1002`: your role lacks the `channels.manage` permission. `API-8102`: the API key or app lacks the `channels:write` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in. `API-8148`: not available to test keys (API test mode).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"`IG-2006`: no Instagram channel with this id in your organization.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"409":{"description":"`IG-2007`: the channel is disconnected or needs a reconnection.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"description":"`API-8001`: some fields are missing or not valid. `details.fields` lists each invalid field with its own code (e.g. `API-8002` required, `API-8012` wrong format). `SPC-6223`: the channel is held back or not set up yet: «coming soon», nothing to connect.","headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"429":{"$ref":"#/components/responses/RateLimited"},"503":{"description":"`SYS-1001`: Instagram (or the chosen way to connect) is not set up on this Rabt.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["channels:write"]},{"oauth2":["channels:write"]}],"summary":"Start connecting Instagram accounts","tags":["channels"]}},"/v1/channels/instagram/connect/complete":{"post":{"description":"Takes what Meta sent back (the `state` of a flow this member started here, and the `code`), exchanges it server side and connects every professional account the sign-in gives access to: a new channel each, or a reconnection of the account's channel here. Each is subscribed to Rabt's webhooks (`active`), or stays `pending` with the error.","operationId":"completeInstagramConnect","parameters":[{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}},{"name":"Idempotency-Key","in":"header","description":"A unique key for this operation (e.g. a UUID, 1 to 255 visible characters), kept 24 hours: repeating the request with the same key returns the first answer (`Idempotent-Replayed: true`) instead of doing it again. Errors: `API-8109` (400) a key that is not valid, `API-8108` (409, retryable) the first request with this key is still running, `API-8107` (422) the key was used for a different request; `API-8118` (409) the first request created something whose secret is shown only once, so its answer is not repeated. An answer with `shown_once` repeats its secret within 10 minutes, then `API-8118`.","required":false,"schema":{"type":"string","minLength":1,"maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CompleteInstagramConnect"}}}},"responses":{"200":{"description":"The accounts connected.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InstagramConnectResult"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`IG-2004`: the flow expired, was already used or was started elsewhere.\n\n`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1097`: the sign-in was started in the desktop app by another member or on another device.\n\n`AUTH-1040`: you are not a member of the organization named. `AUTH-1003`: your seat was deactivated (view only). `AUTH-1004`: all seats are inactive because the seat charge was not paid (view only). `AUTH-1002`: your role lacks the `channels.manage` permission. `API-8102`: the API key or app lacks the `channels:write` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in. `API-8148`: not available to test keys (API test mode).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"409":{"description":"`IG-2005`: the only account is connected to another organization in Rabt.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"description":"`API-8001`: some fields are missing or not valid. `details.fields` lists each invalid field with its own code (e.g. `API-8002` required, `API-8012` wrong format). `IG-2002`: the sign-in was cancelled or refused. `IG-2003`: no professional account in the sign-in. `IG-2033`: Pages were chosen but Meta gave no Page token (the person has no task on them), with the counts of each step. `IG-2008`: permissions Rabt needs were declined. Meta’s own refusals keep their IG code and Meta’s message in `provider`.","headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"429":{"$ref":"#/components/responses/RateLimited"},"503":{"description":"`SYS-1001`: Instagram (or the chosen way to connect) is not set up on this Rabt.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["channels:write"]},{"oauth2":["channels:write"]}],"summary":"Complete connecting Instagram accounts","tags":["channels"]}},"/v1/channels/instagram/{channelId}":{"get":{"operationId":"getInstagramChannel","parameters":[{"name":"channelId","required":true,"in":"path","description":"The Instagram channel id.","schema":{"type":"string","format":"uuid","description":"The Instagram channel id."}},{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"The channel.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InstagramChannel"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `AUTH-1002`: your role lacks the `channels.manage` permission. `API-8102`: the API key or app lacks the `channels:read` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"`IG-2006`: no Instagram channel with this id in your organization.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["channels:read"]},{"oauth2":["channels:read"]}],"summary":"An Instagram channel","tags":["channels"]},"patch":{"description":"The name members see in Rabt; the account keeps its username on Instagram.","operationId":"updateInstagramChannel","parameters":[{"name":"channelId","required":true,"in":"path","description":"The Instagram channel id.","schema":{"type":"string","format":"uuid","description":"The Instagram channel id."}},{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}},{"name":"Idempotency-Key","in":"header","description":"A unique key for this operation (e.g. a UUID, 1 to 255 visible characters), kept 24 hours: repeating the request with the same key returns the first answer (`Idempotent-Replayed: true`) instead of doing it again. Errors: `API-8109` (400) a key that is not valid, `API-8108` (409, retryable) the first request with this key is still running, `API-8107` (422) the key was used for a different request; `API-8118` (409) the first request created something whose secret is shown only once, so its answer is not repeated. An answer with `shown_once` repeats its secret within 10 minutes, then `API-8118`.","required":false,"schema":{"type":"string","minLength":1,"maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateInstagramChannel"}}}},"responses":{"200":{"description":"The channel.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InstagramChannel"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `AUTH-1003`: your seat was deactivated (view only). `AUTH-1004`: all seats are inactive because the seat charge was not paid (view only). `AUTH-1002`: your role lacks the `channels.manage` permission. `API-8102`: the API key or app lacks the `channels:write` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in. `API-8148`: not available to test keys (API test mode).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"`IG-2006`: no Instagram channel with this id in your organization.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"409":{"description":"`IG-2007`: the channel is disconnected or needs a reconnection.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["channels:write"]},{"oauth2":["channels:write"]}],"summary":"Rename an Instagram channel","tags":["channels"]}},"/v1/channels/instagram/{channelId}/subscription":{"post":{"description":"After a subscription Meta refused (the channel is `pending` with the error): the account (Instagram Login) or its Page (Facebook Login) is subscribed again, and the channel becomes `active`.","operationId":"subscribeInstagramChannel","parameters":[{"name":"channelId","required":true,"in":"path","description":"The Instagram channel id.","schema":{"type":"string","format":"uuid","description":"The Instagram channel id."}},{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}},{"name":"Idempotency-Key","in":"header","description":"A unique key for this operation (e.g. a UUID, 1 to 255 visible characters), kept 24 hours: repeating the request with the same key returns the first answer (`Idempotent-Replayed: true`) instead of doing it again. Errors: `API-8109` (400) a key that is not valid, `API-8108` (409, retryable) the first request with this key is still running, `API-8107` (422) the key was used for a different request; `API-8118` (409) the first request created something whose secret is shown only once, so its answer is not repeated. An answer with `shown_once` repeats its secret within 10 minutes, then `API-8118`.","required":false,"schema":{"type":"string","minLength":1,"maxLength":255}}],"responses":{"200":{"description":"The channel.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InstagramChannel"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `AUTH-1003`: your seat was deactivated (view only). `AUTH-1004`: all seats are inactive because the seat charge was not paid (view only). `AUTH-1002`: your role lacks the `channels.manage` permission. `API-8102`: the API key or app lacks the `channels:write` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in. `API-8148`: not available to test keys (API test mode).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"`IG-2006`: no Instagram channel with this id in your organization.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"409":{"description":"`IG-2007`: the channel is disconnected or needs a reconnection.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"503":{"description":"`SYS-1001`: Instagram (or the chosen way to connect) is not set up on this Rabt.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["channels:write"]},{"oauth2":["channels:write"]}],"summary":"Subscribe the account to Rabt’s webhooks again","tags":["channels"]}},"/v1/channels/instagram/{channelId}/disconnect":{"post":{"description":"Unsubscribes the account from Rabt’s webhooks (Instagram Login), revokes its token and stops sending and receiving; the channel and its tickets stay (Rabt never deletes).","operationId":"disconnectInstagramChannel","parameters":[{"name":"channelId","required":true,"in":"path","description":"The Instagram channel id.","schema":{"type":"string","format":"uuid","description":"The Instagram channel id."}},{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}},{"name":"Idempotency-Key","in":"header","description":"A unique key for this operation (e.g. a UUID, 1 to 255 visible characters), kept 24 hours: repeating the request with the same key returns the first answer (`Idempotent-Replayed: true`) instead of doing it again. Errors: `API-8109` (400) a key that is not valid, `API-8108` (409, retryable) the first request with this key is still running, `API-8107` (422) the key was used for a different request; `API-8118` (409) the first request created something whose secret is shown only once, so its answer is not repeated. An answer with `shown_once` repeats its secret within 10 minutes, then `API-8118`.","required":false,"schema":{"type":"string","minLength":1,"maxLength":255}}],"responses":{"200":{"description":"The channel.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InstagramChannel"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `AUTH-1003`: your seat was deactivated (view only). `AUTH-1004`: all seats are inactive because the seat charge was not paid (view only). `AUTH-1002`: your role lacks the `channels.manage` permission. `API-8102`: the API key or app lacks the `channels:write` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in. `API-8148`: not available to test keys (API test mode).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"`IG-2006`: no Instagram channel with this id in your organization.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["channels:write"]},{"oauth2":["channels:write"]}],"summary":"Disconnect an Instagram account","tags":["channels"]}},"/v1/tickets/{ticketId}/messages/{messageId}/comment-actions":{"post":{"description":"Carried out on the ticket’s platform (Facebook or Instagram) at once. A deleted comment stays in the ticket (Rabt never deletes); only the platform’s copy goes. Doing what is already so changes nothing. Instagram has no like.","operationId":"actOnComment","parameters":[{"name":"ticketId","required":true,"in":"path","description":"The ticket id.","schema":{"type":"string","format":"uuid","description":"The ticket id."}},{"name":"messageId","required":true,"in":"path","description":"The message id.","schema":{"type":"string","format":"uuid","description":"The message id."}},{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}},{"name":"Idempotency-Key","in":"header","description":"A unique key for this operation (e.g. a UUID, 1 to 255 visible characters), kept 24 hours: repeating the request with the same key returns the first answer (`Idempotent-Replayed: true`) instead of doing it again. Errors: `API-8109` (400) a key that is not valid, `API-8108` (409, retryable) the first request with this key is still running, `API-8107` (422) the key was used for a different request; `API-8118` (409) the first request created something whose secret is shown only once, so its answer is not repeated. An answer with `shown_once` repeats its secret within 10 minutes, then `API-8118`.","required":false,"schema":{"type":"string","minLength":1,"maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CommentAction"}}}},"responses":{"200":{"description":"The comment’s state.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CommentState"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `AUTH-1003`: your seat was deactivated (view only). `AUTH-1004`: all seats are inactive because the seat charge was not paid (view only). `AUTH-1002`: your role lacks the `tickets.reply` permission. `API-8102`: the API key or app lacks the `tickets:write` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"`TKT-6101`: no such ticket, or it is not visible to you. `FB-2025` / `IG-2025`: the comment no longer exists on the platform.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"409":{"description":"`FB-2007` / `IG-2007`: the Page or Instagram account is disconnected or needs a reconnection.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"description":"`API-8001`: some fields are missing or not valid. `details.fields` lists each invalid field with its own code (e.g. `API-8002` required, `API-8012` wrong format). `FB-2027` / `IG-2027`: the message is not a customer’s comment of that platform (or `like` on Instagram). `IG-2032`: Instagram allows no hide or delete of a live video’s comment. Meta’s refusals keep their FB or IG code and Meta’s message in `provider`.","headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"429":{"$ref":"#/components/responses/RateLimited"},"503":{"description":"`SYS-1001`: Facebook or Instagram is not set up on this Rabt.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["tickets:write"]},{"oauth2":["tickets:write"]}],"summary":"Hide, unhide, delete, like or unlike a customer’s comment","tags":["tickets"]}},"/v1/tickets/{ticketId}/messages/{messageId}/reaction":{"post":{"description":"The Page (Messenger) or the Instagram account reacts with one emoji to a customer’s message in a direct conversation ticket; another emoji changes the reaction and `null` removes it. Carried out on the platform at once; asking for what is already so changes nothing. Channels that support it say `send.reaction` in their capabilities.","operationId":"reactToMessage","parameters":[{"name":"ticketId","required":true,"in":"path","description":"The ticket id.","schema":{"type":"string","format":"uuid","description":"The ticket id."}},{"name":"messageId","required":true,"in":"path","description":"The message id.","schema":{"type":"string","format":"uuid","description":"The message id."}},{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}},{"name":"Idempotency-Key","in":"header","description":"A unique key for this operation (e.g. a UUID, 1 to 255 visible characters), kept 24 hours: repeating the request with the same key returns the first answer (`Idempotent-Replayed: true`) instead of doing it again. Errors: `API-8109` (400) a key that is not valid, `API-8108` (409, retryable) the first request with this key is still running, `API-8107` (422) the key was used for a different request; `API-8118` (409) the first request created something whose secret is shown only once, so its answer is not repeated. An answer with `shown_once` repeats its secret within 10 minutes, then `API-8118`.","required":false,"schema":{"type":"string","minLength":1,"maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MessageReaction"}}}},"responses":{"200":{"description":"The Page’s reaction to the message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PageReaction"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `AUTH-1003`: your seat was deactivated (view only). `AUTH-1004`: all seats are inactive because the seat charge was not paid (view only). `AUTH-1002`: your role lacks the `tickets.reply` permission. `API-8102`: the API key or app lacks the `tickets:write` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"`TKT-6101`: no such ticket, or it is not visible to you.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"409":{"description":"`FB-2007` / `IG-2007`: the Page or Instagram account is disconnected or needs a reconnection.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"description":"`API-8001`: some fields are missing or not valid. `details.fields` lists each invalid field with its own code (e.g. `API-8002` required, `API-8012` wrong format). `FB-2029` / `IG-2028`: the message is not a customer’s Messenger or Instagram direct message. Meta’s refusals keep their FB or IG code and Meta’s message in `provider` (`FB-2012`/`IG-2012` outside the reply window, `FB-2013`/`IG-2013` the customer is not available, `FB-2024`/`IG-2024` Meta refused the reaction).","headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"429":{"$ref":"#/components/responses/RateLimited"},"503":{"description":"`SYS-1001`: Facebook or Instagram is not set up on this Rabt.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["tickets:write"]},{"oauth2":["tickets:write"]}],"summary":"React to a customer’s message, change the reaction or remove it","tags":["tickets"]}},"/v1/tickets/{ticketId}/messages/{messageId}/react":{"post":{"description":"The business reacts with one emoji to a customer’s message, on the ticket’s channel (Messenger, Instagram and WhatsApp today: channels whose capabilities say `actions.reaction.send`); another emoji changes it and null removes it. Carried out on the platform at once.","operationId":"reactToTicketMessage","parameters":[{"name":"ticketId","required":true,"in":"path","description":"The ticket id.","schema":{"type":"string","format":"uuid","description":"The ticket id."}},{"name":"messageId","required":true,"in":"path","description":"The message id.","schema":{"type":"string","format":"uuid","description":"The message id."}},{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}},{"name":"Idempotency-Key","in":"header","description":"A unique key for this operation (e.g. a UUID, 1 to 255 visible characters), kept 24 hours: repeating the request with the same key returns the first answer (`Idempotent-Replayed: true`) instead of doing it again. Errors: `API-8109` (400) a key that is not valid, `API-8108` (409, retryable) the first request with this key is still running, `API-8107` (422) the key was used for a different request; `API-8118` (409) the first request created something whose secret is shown only once, so its answer is not repeated. An answer with `shown_once` repeats its secret within 10 minutes, then `API-8118`.","required":false,"schema":{"type":"string","minLength":1,"maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReactToTicketMessage"}}}},"responses":{"200":{"description":"The business’s reaction now.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TicketMessageReaction"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `AUTH-1003`: your seat was deactivated (view only). `AUTH-1004`: all seats are inactive because the seat charge was not paid (view only). `AUTH-1002`: your role lacks the `tickets.reply` permission. `API-8102`: the API key or app lacks the `tickets:write` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"`TKT-6101`: no such ticket, or it is not visible to you. `TKT-6105`: no such message in this ticket.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"description":"`API-8001`: some fields are missing or not valid. `details.fields` lists each invalid field with its own code (e.g. `API-8002` required, `API-8012` wrong format). `TKT-6198`: the ticket's channel takes no reactions from the business. The channel’s own refusals keep their code and the platform’s message in `provider` (for example `FB-2012`/`IG-2012` outside the reply window, `WA-2047`, `TT-3022`, `X-3029`).","headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["tickets:write"]},{"oauth2":["tickets:write"]}],"summary":"React to a customer’s message on any channel","tags":["tickets"]}},"/v1/tickets/{ticketId}/typing":{"post":{"description":"On a ticket whose channel declares `actions.typing.send`: the customer sees that a member is typing for a few seconds or until the reply (where the channel says `with_read`, their newest message is marked read too). Nothing is stored; free. Send it at most every 10 seconds while writing.","operationId":"sendTicketTyping","parameters":[{"name":"ticketId","required":true,"in":"path","description":"The ticket id.","schema":{"type":"string","format":"uuid","description":"The ticket id."}},{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}}],"responses":{"204":{"description":"Shown (or nothing to show: the reply window is closed).","headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `AUTH-1002`: your role lacks the `tickets.reply` permission. `API-8102`: the API key or app lacks the `tickets:write` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"`TKT-6101`: no such ticket, or it is not visible to you. `TKT-6105`: no such message in this ticket.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"description":"`API-8001`: some fields are missing or not valid. `details.fields` lists each invalid field with its own code (e.g. `API-8002` required, `API-8012` wrong format). `TKT-6275`: the ticket's channel does not offer typing (its capabilities). The channel’s own refusals keep their code and the platform’s message in `provider` (for example `FB-2012`/`IG-2012` outside the reply window, `WA-2047`, `TT-3022`, `X-3029`).","headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["tickets:write"]},{"oauth2":["tickets:write"]}],"summary":"Show the customer that you are typing","tags":["tickets"]}},"/v1/tickets/{ticketId}/messages/{messageId}/edit":{"post":{"description":"Changes the text of the organization’s own sent text message on the ticket’s channel, where its capabilities say `actions.edits.own`, within `own_window_minutes` of sending; the earlier text stays in the message’s history.","operationId":"editTicketMessage","parameters":[{"name":"ticketId","required":true,"in":"path","description":"The ticket id.","schema":{"type":"string","format":"uuid","description":"The ticket id."}},{"name":"messageId","required":true,"in":"path","description":"The message id.","schema":{"type":"string","format":"uuid","description":"The message id."}},{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}},{"name":"Idempotency-Key","in":"header","description":"A unique key for this operation (e.g. a UUID, 1 to 255 visible characters), kept 24 hours: repeating the request with the same key returns the first answer (`Idempotent-Replayed: true`) instead of doing it again. Errors: `API-8109` (400) a key that is not valid, `API-8108` (409, retryable) the first request with this key is still running, `API-8107` (422) the key was used for a different request; `API-8118` (409) the first request created something whose secret is shown only once, so its answer is not repeated. An answer with `shown_once` repeats its secret within 10 minutes, then `API-8118`.","required":false,"schema":{"type":"string","minLength":1,"maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EditTicketMessage"}}}},"responses":{"200":{"description":"The message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TicketMessageDone"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `AUTH-1003`: your seat was deactivated (view only). `AUTH-1004`: all seats are inactive because the seat charge was not paid (view only). `AUTH-1002`: your role lacks the `tickets.reply` permission. `API-8102`: the API key or app lacks the `tickets:write` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"`TKT-6101`: no such ticket, or it is not visible to you. `TKT-6105`: no such message in this ticket.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"description":"`API-8001`: some fields are missing or not valid. `details.fields` lists each invalid field with its own code (e.g. `API-8002` required, `API-8012` wrong format). `TKT-6275`: the ticket's channel does not offer editing your messages (its capabilities). The channel’s own refusals keep their code and the platform’s message in `provider` (for example `FB-2012`/`IG-2012` outside the reply window, `WA-2047`, `TT-3022`, `X-3029`).","headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["tickets:write"]},{"oauth2":["tickets:write"]}],"summary":"Edit your sent message on its channel","tags":["tickets"]}},"/v1/tickets/{ticketId}/messages/{messageId}/delete":{"post":{"description":"Deletes the organization’s own sent message on the ticket’s channel for everyone, where its capabilities’ `actions.deletes.own` hold `for_everyone` for the ticket’s kind. Rabt keeps it, marked deleted (never removed).","operationId":"deleteTicketMessage","parameters":[{"name":"ticketId","required":true,"in":"path","description":"The ticket id.","schema":{"type":"string","format":"uuid","description":"The ticket id."}},{"name":"messageId","required":true,"in":"path","description":"The message id.","schema":{"type":"string","format":"uuid","description":"The message id."}},{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}},{"name":"Idempotency-Key","in":"header","description":"A unique key for this operation (e.g. a UUID, 1 to 255 visible characters), kept 24 hours: repeating the request with the same key returns the first answer (`Idempotent-Replayed: true`) instead of doing it again. Errors: `API-8109` (400) a key that is not valid, `API-8108` (409, retryable) the first request with this key is still running, `API-8107` (422) the key was used for a different request; `API-8118` (409) the first request created something whose secret is shown only once, so its answer is not repeated. An answer with `shown_once` repeats its secret within 10 minutes, then `API-8118`.","required":false,"schema":{"type":"string","minLength":1,"maxLength":255}}],"responses":{"200":{"description":"The message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TicketMessageDone"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `AUTH-1003`: your seat was deactivated (view only). `AUTH-1004`: all seats are inactive because the seat charge was not paid (view only). `AUTH-1002`: your role lacks the `tickets.reply` permission. `API-8102`: the API key or app lacks the `tickets:write` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"`TKT-6101`: no such ticket, or it is not visible to you. `TKT-6105`: no such message in this ticket.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"description":"`API-8001`: some fields are missing or not valid. `details.fields` lists each invalid field with its own code (e.g. `API-8002` required, `API-8012` wrong format). `TKT-6275`: the ticket's channel does not offer deleting your messages (its capabilities). The channel’s own refusals keep their code and the platform’s message in `provider` (for example `FB-2012`/`IG-2012` outside the reply window, `WA-2047`, `TT-3022`, `X-3029`).","headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["tickets:write"]},{"oauth2":["tickets:write"]}],"summary":"Delete your sent message for everyone on its channel","tags":["tickets"]}},"/v1/tickets/{ticketId}/messages/{messageId}/media-download":{"post":{"description":"For a customer's message whose file could not be downloaded (its `error`), on a channel whose capabilities say `actions.media_retry`: downloads it again in the background while the platform keeps it (`kept_hours` after the message); the file appears on the message once stored, or the message shows the new error.","operationId":"retryTicketMediaDownload","parameters":[{"name":"ticketId","required":true,"in":"path","description":"The ticket id.","schema":{"type":"string","format":"uuid","description":"The ticket id."}},{"name":"messageId","required":true,"in":"path","description":"The message id.","schema":{"type":"string","format":"uuid","description":"The message id."}},{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}},{"name":"Idempotency-Key","in":"header","description":"A unique key for this operation (e.g. a UUID, 1 to 255 visible characters), kept 24 hours: repeating the request with the same key returns the first answer (`Idempotent-Replayed: true`) instead of doing it again. Errors: `API-8109` (400) a key that is not valid, `API-8108` (409, retryable) the first request with this key is still running, `API-8107` (422) the key was used for a different request; `API-8118` (409) the first request created something whose secret is shown only once, so its answer is not repeated. An answer with `shown_once` repeats its secret within 10 minutes, then `API-8118`.","required":false,"schema":{"type":"string","minLength":1,"maxLength":255}}],"responses":{"202":{"description":"The download is queued.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TicketMediaRetry"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `AUTH-1003`: your seat was deactivated (view only). `AUTH-1004`: all seats are inactive because the seat charge was not paid (view only). `AUTH-1002`: your role lacks the `tickets.reply` permission. `API-8102`: the API key or app lacks the `tickets:write` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"`TKT-6101`: no such ticket, or it is not visible to you. `TKT-6105`: no such message in this ticket.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"description":"`API-8001`: some fields are missing or not valid. `details.fields` lists each invalid field with its own code (e.g. `API-8002` required, `API-8012` wrong format). `TKT-6275`: the ticket's channel does not offer downloading files again (its capabilities). The channel’s own refusals keep their code and the platform’s message in `provider` (for example `FB-2012`/`IG-2012` outside the reply window, `WA-2047`, `TT-3022`, `X-3029`).","headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["tickets:write"]},{"oauth2":["tickets:write"]}],"summary":"Download a customer's file again","tags":["tickets"]}},"/v1/tickets/{ticketId}/composer":{"get":{"description":"On a ticket whose channel declares interactive messages (`send.interactive`): whether content beyond an approved template may go now (the reply window), why nothing can (a catalog code), and the interactive messages’ limits.","operationId":"getTicketComposer","parameters":[{"name":"ticketId","required":true,"in":"path","description":"The ticket id.","schema":{"type":"string","format":"uuid","description":"The ticket id."}},{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"The composer’s state.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TicketComposer"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `AUTH-1002`: your role lacks the `tickets.reply` permission. `API-8102`: the API key or app lacks the `tickets:read` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"`TKT-6101`: no such ticket, or it is not visible to you. `TKT-6105`: no such message in this ticket.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"description":"`API-8001`: some fields are missing or not valid. `details.fields` lists each invalid field with its own code (e.g. `API-8002` required, `API-8012` wrong format). `TKT-6275`: the ticket's channel does not offer interactive messages (its capabilities).","headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["tickets:read"]},{"oauth2":["tickets:read"]}],"summary":"What may be sent now beyond text and files","tags":["tickets"]}},"/v1/tickets/{ticketId}/channel-messages":{"post":{"description":"Queued like any reply on the ticket’s channel, as its capabilities declare (`send.interactive`, `send.template`, `send.share`, `send.heart`); a paid channel is paid when sent. Interactive messages need the reply window open (`GET /v1/tickets/{ticketId}/composer`). Text, files and voice notes use `POST /v1/tickets/{ticketId}/messages`.","operationId":"sendTicketChannelMessage","parameters":[{"name":"ticketId","required":true,"in":"path","description":"The ticket id.","schema":{"type":"string","format":"uuid","description":"The ticket id."}},{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}},{"name":"Idempotency-Key","in":"header","description":"A unique key for this operation (e.g. a UUID, 1 to 255 visible characters), kept 24 hours: repeating the request with the same key returns the first answer (`Idempotent-Replayed: true`) instead of doing it again. Errors: `API-8109` (400) a key that is not valid, `API-8108` (409, retryable) the first request with this key is still running, `API-8107` (422) the key was used for a different request; `API-8118` (409) the first request created something whose secret is shown only once, so its answer is not repeated. An answer with `shown_once` repeats its secret within 10 minutes, then `API-8118`.","required":false,"schema":{"type":"string","minLength":1,"maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SendTicketChannelMessage"}}}},"responses":{"201":{"description":"The queued message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TicketChannelMessageSent"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `AUTH-1003`: your seat was deactivated (view only). `AUTH-1004`: all seats are inactive because the seat charge was not paid (view only). `AUTH-1002`: your role lacks the `tickets.reply` permission. `API-8102`: the API key or app lacks the `tickets:write` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"`TKT-6101`: no such ticket, or it is not visible to you. `TKT-6105`: no such message in this ticket.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"description":"`API-8001`: some fields are missing or not valid. `details.fields` lists each invalid field with its own code (e.g. `API-8002` required, `API-8012` wrong format). `TKT-6275`: the ticket's channel does not offer this kind of message (its capabilities). The channel’s own refusals keep their code and the platform’s message in `provider` (for example `FB-2012`/`IG-2012` outside the reply window, `WA-2047`, `TT-3022`, `X-3029`).","headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["tickets:write"]},{"oauth2":["tickets:write"]}],"summary":"Send buttons, a list, a template, a shared post or the heart sticker","tags":["tickets"]}},"/v1/tickets/{ticketId}/shareable-media":{"get":{"description":"On a direct conversation whose channel declares `send.share`: the account’s own recent posts, reels and stories, newest first (`media_id` of `POST /v1/tickets/{ticketId}/channel-messages` `post_share`).","operationId":"listTicketShareableMedia","parameters":[{"name":"ticketId","required":true,"in":"path","description":"The ticket id.","schema":{"type":"string","format":"uuid","description":"The ticket id."}},{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"The posts.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InstagramMediaList"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `AUTH-1002`: your role lacks the `tickets.reply` permission. `API-8102`: the API key or app lacks the `tickets:read` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"`TKT-6101`: no such ticket, or it is not visible to you. `TKT-6105`: no such message in this ticket.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"description":"`API-8001`: some fields are missing or not valid. `details.fields` lists each invalid field with its own code (e.g. `API-8002` required, `API-8012` wrong format). `TKT-6275`: the ticket's channel does not offer shared posts (its capabilities). The channel’s own refusals keep their code and the platform’s message in `provider` (for example `FB-2012`/`IG-2012` outside the reply window, `WA-2047`, `TT-3022`, `X-3029`).","headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["tickets:read"]},{"oauth2":["tickets:read"]}],"summary":"The account’s posts a conversation may share","tags":["tickets"]}},"/v1/tickets/{ticketId}/messages/{messageId}/moderate":{"post":{"description":"Carried out on the ticket’s channel at once, as its capabilities’ `public_actions` allow: a customer’s comment (Facebook, Instagram, TikTok), a reply to the account’s X post, or the account’s own X reply or direct message to delete. A deleted item stays in the ticket (Rabt never deletes), marked; doing what is already so changes nothing.","operationId":"moderateTicketMessage","parameters":[{"name":"ticketId","required":true,"in":"path","description":"The ticket id.","schema":{"type":"string","format":"uuid","description":"The ticket id."}},{"name":"messageId","required":true,"in":"path","description":"The message id.","schema":{"type":"string","format":"uuid","description":"The message id."}},{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}},{"name":"Idempotency-Key","in":"header","description":"A unique key for this operation (e.g. a UUID, 1 to 255 visible characters), kept 24 hours: repeating the request with the same key returns the first answer (`Idempotent-Replayed: true`) instead of doing it again. Errors: `API-8109` (400) a key that is not valid, `API-8108` (409, retryable) the first request with this key is still running, `API-8107` (422) the key was used for a different request; `API-8118` (409) the first request created something whose secret is shown only once, so its answer is not repeated. An answer with `shown_once` repeats its secret within 10 minutes, then `API-8118`.","required":false,"schema":{"type":"string","minLength":1,"maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ModerateTicketMessage"}}}},"responses":{"200":{"description":"What was done.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TicketMessageModeration"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `AUTH-1003`: your seat was deactivated (view only). `AUTH-1004`: all seats are inactive because the seat charge was not paid (view only). `AUTH-1002`: your role lacks the `tickets.reply` permission. `API-8102`: the API key or app lacks the `tickets:write` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"`TKT-6101`: no such ticket, or it is not visible to you. `TKT-6105`: no such message in this ticket.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"description":"`API-8001`: some fields are missing or not valid. `details.fields` lists each invalid field with its own code (e.g. `API-8002` required, `API-8012` wrong format). `TKT-6202`: the ticket's channel does not offer this action. The channel’s own refusals keep their code and the platform’s message in `provider` (for example `FB-2012`/`IG-2012` outside the reply window, `WA-2047`, `TT-3022`, `X-3029`).","headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["tickets:write"]},{"oauth2":["tickets:write"]}],"summary":"Hide, unhide, delete, like or unlike a public item on any channel","tags":["tickets"]}},"/v1/channels/{channelId}/templates":{"get":{"description":"On a channel whose capabilities say `send.template`: its approved templates, which a member opens a conversation with (`createTicket` `first_message.template`) or answers with once the reply window closed.","operationId":"listChannelTemplates","parameters":[{"name":"channelId","required":true,"in":"path","description":"The channel id.","schema":{"type":"string","format":"uuid","description":"The channel id."}},{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"The approved templates.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChannelTemplateList"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `AUTH-1002`: your role lacks the `tickets.reply` permission. `API-8102`: the API key or app lacks the `tickets:read` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"`TKT-6276`: no such channel.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"description":"`API-8001`: some fields are missing or not valid. `details.fields` lists each invalid field with its own code (e.g. `API-8002` required, `API-8012` wrong format). `TKT-6275`: the channel sends no templates.","headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["tickets:read"]},{"oauth2":["tickets:read"]}],"summary":"The approved templates of a channel","tags":["channels"]}},"/v1/channels/capabilities":{"get":{"description":"Per channel type: what can be sent (text, files and their kinds and sizes), the text limit, the reply window and what may go out after it, the actions on public items and the delivery statuses reported; and, per conversation kind, the composer, the text limit in the unit the channel counts, each file kind’s limits, the private reply, message actions, the identity, how a ticket may be started and whether the AI agent may reply. The composer offers only these.","operationId":"listChannelCapabilities","parameters":[{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"The capabilities.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChannelCapabilitiesList"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `API-8102`: the API key or app lacks the `tickets:read` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["tickets:read"]},{"oauth2":["tickets:read"]}],"summary":"What each channel supports","tags":["channels"]}},"/v1/channels/x":{"get":{"description":"Every connected X account with its status, how events arrive, whether it is paused at zero balance, and what it can do; disconnected ones last. Never its tokens.","operationId":"listXChannels","parameters":[{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"The channels.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/XChannelList"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `AUTH-1002`: your role lacks the `channels.manage` permission. `API-8102`: the API key or app lacks the `channels:read` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["channels:read"]},{"oauth2":["channels:read"]}],"summary":"List the X channels","tags":["channels"]}},"/v1/channels/x/connect":{"post":{"description":"The address of X’s consent page (OAuth 2.0 with PKCE). Open it in the member’s browser: X sends them back to Rabt’s callback with its answer, which `POST /v1/channels/x/connect/complete` finishes within 10 minutes. With `channel_id`, reconnects that channel.","operationId":"beginXConnect","parameters":[{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}},{"name":"Idempotency-Key","in":"header","description":"A unique key for this operation (e.g. a UUID, 1 to 255 visible characters), kept 24 hours: repeating the request with the same key returns the first answer (`Idempotent-Replayed: true`) instead of doing it again. Errors: `API-8109` (400) a key that is not valid, `API-8108` (409, retryable) the first request with this key is still running, `API-8107` (422) the key was used for a different request; `API-8118` (409) the first request created something whose secret is shown only once, so its answer is not repeated. An answer with `shown_once` repeats its secret within 10 minutes, then `API-8118`.","required":false,"schema":{"type":"string","minLength":1,"maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BeginXConnect"}}}},"responses":{"200":{"description":"The consent page.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/XConnectStart"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `AUTH-1003`: your seat was deactivated (view only). `AUTH-1004`: all seats are inactive because the seat charge was not paid (view only). `AUTH-1002`: your role lacks the `channels.manage` permission. `API-8102`: the API key or app lacks the `channels:write` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in. `API-8148`: not available to test keys (API test mode).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"`X-3023`: no X channel with this id in your organization.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"409":{"description":"`X-3024`: the channel to reconnect is disconnected.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"description":"`API-8001`: some fields are missing or not valid. `details.fields` lists each invalid field with its own code (e.g. `API-8002` required, `API-8012` wrong format). `SPC-6223`: the channel is held back or not set up yet: «coming soon», nothing to connect.","headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"429":{"$ref":"#/components/responses/RateLimited"},"503":{"description":"`SYS-1001`: X is not set up on this Rabt.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["channels:write"]},{"oauth2":["channels:write"]}],"summary":"Start connecting an X account","tags":["channels"]}},"/v1/channels/x/connect/complete":{"post":{"description":"Takes X’s answer from the callback (`state`, `code` or `error`), exchanges the code, reads the account (a paid read) and stores the channel `active`; the account is then subscribed to X’s events and its recent history is read. Connecting an account already connected in the organization reconnects it.","operationId":"completeXConnect","parameters":[{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}},{"name":"Idempotency-Key","in":"header","description":"A unique key for this operation (e.g. a UUID, 1 to 255 visible characters), kept 24 hours: repeating the request with the same key returns the first answer (`Idempotent-Replayed: true`) instead of doing it again. Errors: `API-8109` (400) a key that is not valid, `API-8108` (409, retryable) the first request with this key is still running, `API-8107` (422) the key was used for a different request; `API-8118` (409) the first request created something whose secret is shown only once, so its answer is not repeated. An answer with `shown_once` repeats its secret within 10 minutes, then `API-8118`.","required":false,"schema":{"type":"string","minLength":1,"maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CompleteXConnect"}}}},"responses":{"201":{"description":"The channel.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/XChannel"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`X-3025`: the connection was not started by this member here, expired or was already used.\n\n`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"402":{"description":"`WAL-1001`: the wallet cannot pay the call at X (top up first). Nothing was read at X; the connection can be started again after a top-up.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`X-3011`: the member declined on X’s consent page.\n\n`AUTH-1097`: the sign-in was started in the desktop app by another member or on another device.\n\n`AUTH-1040`: you are not a member of the organization named. `AUTH-1003`: your seat was deactivated (view only). `AUTH-1004`: all seats are inactive because the seat charge was not paid (view only). `AUTH-1002`: your role lacks the `channels.manage` permission. `API-8102`: the API key or app lacks the `channels:write` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in. `API-8148`: not available to test keys (API test mode).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"409":{"description":"`X-3026`: the account is connected in another organization.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"description":"`API-8001`: some fields are missing or not valid. `details.fields` lists each invalid field with its own code (e.g. `API-8002` required, `API-8012` wrong format). `X-3027`: X granted fewer permissions than Rabt needs.","headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"429":{"$ref":"#/components/responses/RateLimited"},"502":{"description":"`X-3001`–`X-3017`: X refused or failed the call; X’s own answer is in `provider`. `X-3009`: X no longer accepts the code (valid 30 s).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"503":{"description":"`SYS-1001`: X is not set up on this Rabt.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["channels:write"]},{"oauth2":["channels:write"]}],"summary":"Finish connecting an X account","tags":["channels"]}},"/v1/channels/x/{channelId}":{"get":{"operationId":"getXChannel","parameters":[{"name":"channelId","required":true,"in":"path","description":"The X channel id.","schema":{"type":"string","format":"uuid","description":"The X channel id."}},{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"The channel.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/XChannel"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `AUTH-1002`: your role lacks the `channels.manage` permission. `API-8102`: the API key or app lacks the `channels:read` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"`X-3023`: no X channel with this id in your organization.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["channels:read"]},{"oauth2":["channels:read"]}],"summary":"An X channel","tags":["channels"]},"patch":{"operationId":"updateXChannel","parameters":[{"name":"channelId","required":true,"in":"path","description":"The X channel id.","schema":{"type":"string","format":"uuid","description":"The X channel id."}},{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}},{"name":"Idempotency-Key","in":"header","description":"A unique key for this operation (e.g. a UUID, 1 to 255 visible characters), kept 24 hours: repeating the request with the same key returns the first answer (`Idempotent-Replayed: true`) instead of doing it again. Errors: `API-8109` (400) a key that is not valid, `API-8108` (409, retryable) the first request with this key is still running, `API-8107` (422) the key was used for a different request; `API-8118` (409) the first request created something whose secret is shown only once, so its answer is not repeated. An answer with `shown_once` repeats its secret within 10 minutes, then `API-8118`.","required":false,"schema":{"type":"string","minLength":1,"maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateXChannel"}}}},"responses":{"200":{"description":"The channel.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/XChannel"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `AUTH-1003`: your seat was deactivated (view only). `AUTH-1004`: all seats are inactive because the seat charge was not paid (view only). `AUTH-1002`: your role lacks the `channels.manage` permission. `API-8102`: the API key or app lacks the `channels:write` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in. `API-8148`: not available to test keys (API test mode).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"`X-3023`: no X channel with this id in your organization.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["channels:write"]},{"oauth2":["channels:write"]}],"summary":"Rename an X channel","tags":["channels"]}},"/v1/channels/x/{channelId}/disconnect":{"post":{"description":"Revokes Rabt’s tokens at X and in the vault and removes the account’s event subscriptions; the channel and its tickets stay (Rabt never deletes).","operationId":"disconnectXChannel","parameters":[{"name":"channelId","required":true,"in":"path","description":"The X channel id.","schema":{"type":"string","format":"uuid","description":"The X channel id."}},{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}},{"name":"Idempotency-Key","in":"header","description":"A unique key for this operation (e.g. a UUID, 1 to 255 visible characters), kept 24 hours: repeating the request with the same key returns the first answer (`Idempotent-Replayed: true`) instead of doing it again. Errors: `API-8109` (400) a key that is not valid, `API-8108` (409, retryable) the first request with this key is still running, `API-8107` (422) the key was used for a different request; `API-8118` (409) the first request created something whose secret is shown only once, so its answer is not repeated. An answer with `shown_once` repeats its secret within 10 minutes, then `API-8118`.","required":false,"schema":{"type":"string","minLength":1,"maxLength":255}}],"responses":{"200":{"description":"The channel.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/XChannel"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `AUTH-1003`: your seat was deactivated (view only). `AUTH-1004`: all seats are inactive because the seat charge was not paid (view only). `AUTH-1002`: your role lacks the `channels.manage` permission. `API-8102`: the API key or app lacks the `channels:write` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in. `API-8148`: not available to test keys (API test mode).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"`X-3023`: no X channel with this id in your organization.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["channels:write"]},{"oauth2":["channels:write"]}],"summary":"Disconnect an X channel","tags":["channels"]}},"/v1/channels/x/messages/{messageId}/moderation":{"post":{"description":"Hides or shows again a customer’s reply to the account’s post, or deletes the account’s own reply or DM on X (a paid call). The message stays in the ticket, marked with what was done.","operationId":"moderateXMessage","parameters":[{"name":"messageId","required":true,"in":"path","description":"The message id (an X item).","schema":{"type":"string","format":"uuid","description":"The message id (an X item)."}},{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}},{"name":"Idempotency-Key","in":"header","description":"A unique key for this operation (e.g. a UUID, 1 to 255 visible characters), kept 24 hours: repeating the request with the same key returns the first answer (`Idempotent-Replayed: true`) instead of doing it again. Errors: `API-8109` (400) a key that is not valid, `API-8108` (409, retryable) the first request with this key is still running, `API-8107` (422) the key was used for a different request; `API-8118` (409) the first request created something whose secret is shown only once, so its answer is not repeated. An answer with `shown_once` repeats its secret within 10 minutes, then `API-8118`.","required":false,"schema":{"type":"string","minLength":1,"maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ModerateXMessage"}}}},"responses":{"200":{"description":"What was done.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/XModeration"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"402":{"description":"`WAL-1001`: the wallet cannot pay the call at X (top up first).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `AUTH-1003`: your seat was deactivated (view only). `AUTH-1004`: all seats are inactive because the seat charge was not paid (view only). `AUTH-1002`: your role lacks the `tickets.reply` permission. `API-8102`: the API key or app lacks the `tickets:write` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"`TKT-6101`: no X message with this id in a ticket you can see.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"409":{"description":"`X-3024`: the channel is disconnected, needs a reconnection, or is paused at zero balance.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"description":"`API-8001`: some fields are missing or not valid. `details.fields` lists each invalid field with its own code (e.g. `API-8002` required, `API-8012` wrong format). `X-3029`: X does not allow this action on this item.","headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"429":{"$ref":"#/components/responses/RateLimited"},"502":{"description":"`X-3001`–`X-3017`: X refused or failed the call; X’s own answer is in `provider`.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["tickets:write"]},{"oauth2":["tickets:write"]}],"summary":"Hide, show or delete an X item","tags":["channels"]}},"/v1/channels/x/tickets/{ticketId}/chat-keys":{"post":{"description":"X Chat is encrypted end to end and its keys never reach Rabt: the member’s device unlocks the account’s keys with its X Chat PIN (the X Chat XDK) using the key store settings returned here, and decrypts and encrypts there. Returns the account’s X user id and newest key version, its key store settings (`juicebox_config`, with the realms’ auth tokens) and both participants’ signing keys. Keys are read from X (a paid user read each, `x.read`) once per UTC day and kept; `refresh=true` reads them again when the device could not decrypt or verify with them (at most once per ticket every 5 minutes). Never a private key, a PIN or a text. A retry with the same `Idempotency-Key` returns the first answer and is paid once.","operationId":"getXChatKeys","parameters":[{"name":"ticketId","required":true,"in":"path","description":"The X Chat ticket id.","schema":{"type":"string","format":"uuid","description":"The X Chat ticket id."}},{"name":"refresh","required":false,"in":"query","description":"Read the keys from X again instead of the ones kept today (the device could not decrypt or verify a message with them: a key changed). At most once per ticket every 5 minutes; asked again sooner, the kept keys are returned.","schema":{"description":"Read the keys from X again instead of the ones kept today (the device could not decrypt or verify a message with them: a key changed). At most once per ticket every 5 minutes; asked again sooner, the kept keys are returned.","type":"string","enum":["true","false"]}},{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}},{"name":"Idempotency-Key","in":"header","description":"A unique key for this operation (e.g. a UUID, 1 to 255 visible characters), kept 24 hours: repeating the request with the same key returns the first answer (`Idempotent-Replayed: true`) instead of doing it again. Errors: `API-8109` (400) a key that is not valid, `API-8108` (409, retryable) the first request with this key is still running, `API-8107` (422) the key was used for a different request; `API-8118` (409) the first request created something whose secret is shown only once, so its answer is not repeated. An answer with `shown_once` repeats its secret within 10 minutes, then `API-8118`.","required":false,"schema":{"type":"string","minLength":1,"maxLength":255}}],"responses":{"200":{"description":"The keys.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/XChatKeys"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"402":{"description":"`WAL-1001`: the wallet cannot pay the call at X (top up first).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `AUTH-1003`: your seat was deactivated (view only). `AUTH-1004`: all seats are inactive because the seat charge was not paid (view only). `AUTH-1002`: your role lacks the `tickets.reply` permission. `API-8102`: the API key or app lacks the `tickets:write` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"`TKT-6101`: no ticket with this id you can see.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"409":{"description":"`X-3024`: the channel is disconnected, needs a reconnection, or is paused at zero balance. `X-3039`: the account has no X Chat keys registered at X.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"description":"`API-8001`: some fields are missing or not valid. `details.fields` lists each invalid field with its own code (e.g. `API-8002` required, `API-8012` wrong format). `X-3029`: the ticket is not an X Chat conversation.","headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"429":{"$ref":"#/components/responses/RateLimited"},"502":{"description":"`X-3001`–`X-3017`: X refused or failed the call; X’s own answer is in `provider`.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"503":{"description":"`SYS-1001`: X is not set up on this Rabt.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["tickets:write"]},{"oauth2":["tickets:write"]}],"summary":"What a device needs for an X Chat conversation","tags":["channels"]}},"/v1/channels/x/tickets/{ticketId}/chat-messages":{"post":{"description":"X Chat is end-to-end encrypted and its keys never leave the member’s device: the client encrypts and signs the message with the X Chat XDK, and Rabt queues and relays it as is (paid like a DM). Rabt never sees its text.","operationId":"sendXChatMessage","parameters":[{"name":"ticketId","required":true,"in":"path","description":"The X Chat ticket id.","schema":{"type":"string","format":"uuid","description":"The X Chat ticket id."}},{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}},{"name":"Idempotency-Key","in":"header","description":"A unique key for this operation (e.g. a UUID, 1 to 255 visible characters), kept 24 hours: repeating the request with the same key returns the first answer (`Idempotent-Replayed: true`) instead of doing it again. Errors: `API-8109` (400) a key that is not valid, `API-8108` (409, retryable) the first request with this key is still running, `API-8107` (422) the key was used for a different request; `API-8118` (409) the first request created something whose secret is shown only once, so its answer is not repeated. An answer with `shown_once` repeats its secret within 10 minutes, then `API-8118`.","required":false,"schema":{"type":"string","minLength":1,"maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/XChatMessage"}}}},"responses":{"201":{"description":"The queued message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/XChatMessageQueued"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `AUTH-1003`: your seat was deactivated (view only). `AUTH-1004`: all seats are inactive because the seat charge was not paid (view only). `AUTH-1002`: your role lacks the `tickets.reply` permission. `API-8102`: the API key or app lacks the `tickets:write` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"`TKT-6101`: no ticket with this id you can see.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"description":"`API-8001`: some fields are missing or not valid. `details.fields` lists each invalid field with its own code (e.g. `API-8002` required, `API-8012` wrong format). `X-3029`: the ticket is not an X Chat conversation.","headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"429":{"$ref":"#/components/responses/RateLimited"},"503":{"description":"`SYS-1001`: X is not set up on this Rabt.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["tickets:write"]},{"oauth2":["tickets:write"]}],"summary":"Send an X Chat message encrypted on the device","tags":["channels"]}},"/v1/channels/tiktok":{"get":{"description":"Every connected TikTok business account with its status, permissions and token expiry (never its tokens); disconnected ones last. `configured` is false when TikTok is not set up on this Rabt.","operationId":"listTikTokChannels","parameters":[{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"The channels.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TikTokChannelList"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `AUTH-1002`: your role lacks the `channels.manage` permission. `API-8102`: the API key or app lacks the `channels:read` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["channels:read"]},{"oauth2":["channels:read"]}],"summary":"List the TikTok channels","tags":["channels"]}},"/v1/channels/tiktok/capabilities":{"get":{"description":"The capability matrix (docs/channels/tiktok.md): what may be sent, the limits and the public actions. The composer offers only this.","operationId":"getTikTokCapabilities","parameters":[{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"The capabilities.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TikTokCapabilities"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `API-8102`: the API key or app lacks the `tickets:read` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["tickets:read"]},{"oauth2":["tickets:read"]}],"summary":"What TikTok supports","tags":["channels"]}},"/v1/channels/tiktok/connect":{"post":{"description":"Returns TikTok’s page where the account holder signs in and approves Rabt (valid 10 minutes, once). TikTok sends them back to Rabt’s callback page, which completes the connection.","operationId":"startTikTokConnect","parameters":[{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}},{"name":"Idempotency-Key","in":"header","description":"A unique key for this operation (e.g. a UUID, 1 to 255 visible characters), kept 24 hours: repeating the request with the same key returns the first answer (`Idempotent-Replayed: true`) instead of doing it again. Errors: `API-8109` (400) a key that is not valid, `API-8108` (409, retryable) the first request with this key is still running, `API-8107` (422) the key was used for a different request; `API-8118` (409) the first request created something whose secret is shown only once, so its answer is not repeated. An answer with `shown_once` repeats its secret within 10 minutes, then `API-8118`.","required":false,"schema":{"type":"string","minLength":1,"maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StartTikTokConnect"}}}},"responses":{"200":{"description":"Where to sign in.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TikTokConnectStart"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `AUTH-1003`: your seat was deactivated (view only). `AUTH-1004`: all seats are inactive because the seat charge was not paid (view only). `AUTH-1002`: your role lacks the `channels.manage` permission. `API-8102`: the API key or app lacks the `channels:write` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in. `API-8148`: not available to test keys (API test mode).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"`TT-3018`: no TikTok channel with this id in your organization.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"description":"`API-8001`: some fields are missing or not valid. `details.fields` lists each invalid field with its own code (e.g. `API-8002` required, `API-8012` wrong format). `SPC-6223`: the channel is held back or not set up yet: «coming soon», nothing to connect.","headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"429":{"$ref":"#/components/responses/RateLimited"},"503":{"description":"`SYS-1001`: TikTok is not set up in the platform console Integrations page.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["channels:write"]},{"oauth2":["channels:write"]}],"summary":"Start connecting a TikTok account","tags":["channels"]}},"/v1/channels/tiktok/connect/complete":{"post":{"description":"With the `state` and `code` TikTok sent back: the account is checked (a business account, every permission granted) and connected, or reconnected when it is already connected here.","operationId":"completeTikTokConnect","parameters":[{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}},{"name":"Idempotency-Key","in":"header","description":"A unique key for this operation (e.g. a UUID, 1 to 255 visible characters), kept 24 hours: repeating the request with the same key returns the first answer (`Idempotent-Replayed: true`) instead of doing it again. Errors: `API-8109` (400) a key that is not valid, `API-8108` (409, retryable) the first request with this key is still running, `API-8107` (422) the key was used for a different request; `API-8118` (409) the first request created something whose secret is shown only once, so its answer is not repeated. An answer with `shown_once` repeats its secret within 10 minutes, then `API-8118`.","required":false,"schema":{"type":"string","minLength":1,"maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CompleteTikTokConnect"}}}},"responses":{"201":{"description":"The channel.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TikTokChannel"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`TT-3016`: the state is unknown, expired, used, or another member’s.\n\n`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1097`: the sign-in was started in the desktop app by another member or on another device.\n\n`AUTH-1040`: you are not a member of the organization named. `AUTH-1003`: your seat was deactivated (view only). `AUTH-1004`: all seats are inactive because the seat charge was not paid (view only). `AUTH-1002`: your role lacks the `channels.manage` permission. `API-8102`: the API key or app lacks the `channels:write` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in. `API-8148`: not available to test keys (API test mode).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"409":{"description":"`TT-3020`: the account is connected to another organization.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"description":"`API-8001`: some fields are missing or not valid. `details.fields` lists each invalid field with its own code (e.g. `API-8002` required, `API-8012` wrong format). `TT-3001`–`TT-3030`: TikTok refused (credentials, permissions, eligibility, limits); TikTok’s own code and message are in `provider`.","headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"429":{"$ref":"#/components/responses/RateLimited"},"503":{"description":"`SYS-1001`: TikTok is not set up in the platform console Integrations page.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["channels:write"]},{"oauth2":["channels:write"]}],"summary":"Complete connecting a TikTok account","tags":["channels"]}},"/v1/channels/tiktok/tickets/{ticketId}/reply-rules":{"get":{"description":"TikTok’s rules for the ticket: replies within 48 hours of the customer’s last message, at most 10 until the customer writes again, text or one image; comment replies of up to 150 characters. `applies` is false for tickets of other channels.","operationId":"getTikTokReplyRules","parameters":[{"name":"ticketId","required":true,"in":"path","description":"The ticket id.","schema":{"type":"string","format":"uuid","description":"The ticket id."}},{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"The rules.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TikTokReplyRules"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `API-8102`: the API key or app lacks the `tickets:read` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"`TKT-6101`: no ticket with this id that you may see.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["tickets:read"]},{"oauth2":["tickets:read"]}],"summary":"What a reply on a ticket may be now","tags":["channels"]}},"/v1/channels/tiktok/comments/{messageId}/actions":{"post":{"description":"Acts on a customer’s comment on the account’s video, from its ticket. Deleting removes it on TikTok only: Rabt keeps its copy, marked as deleted there. Audited; emits `message.channel_changed`.","operationId":"actOnTikTokComment","parameters":[{"name":"messageId","required":true,"in":"path","description":"The id of the comment’s message.","schema":{"type":"string","format":"uuid","description":"The id of the comment’s message."}},{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}},{"name":"Idempotency-Key","in":"header","description":"A unique key for this operation (e.g. a UUID, 1 to 255 visible characters), kept 24 hours: repeating the request with the same key returns the first answer (`Idempotent-Replayed: true`) instead of doing it again. Errors: `API-8109` (400) a key that is not valid, `API-8108` (409, retryable) the first request with this key is still running, `API-8107` (422) the key was used for a different request; `API-8118` (409) the first request created something whose secret is shown only once, so its answer is not repeated. An answer with `shown_once` repeats its secret within 10 minutes, then `API-8118`.","required":false,"schema":{"type":"string","minLength":1,"maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TikTokCommentAction"}}}},"responses":{"200":{"description":"What was done.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TikTokCommentActionResult"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `AUTH-1003`: your seat was deactivated (view only). `AUTH-1004`: all seats are inactive because the seat charge was not paid (view only). `AUTH-1002`: your role lacks the `tickets.reply` permission. `API-8102`: the API key or app lacks the `tickets:write` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"`TKT-6105`: no message with this id that you may see.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"409":{"description":"`TT-3019`: the channel is disconnected or needs a reconnection.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"description":"`API-8001`: some fields are missing or not valid. `details.fields` lists each invalid field with its own code (e.g. `API-8002` required, `API-8012` wrong format). `TT-3044`: comments are off until TikTok approves Rabt’s app for the Organic API. `TT-3022`: not a customer’s TikTok comment. `TT-3001`–`TT-3030`: TikTok refused (credentials, permissions, eligibility, limits); TikTok’s own code and message are in `provider`.","headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["tickets:write"]},{"oauth2":["tickets:write"]}],"summary":"Hide, unhide or delete a comment on TikTok","tags":["channels"]}},"/v1/channels/tiktok/messages/{messageId}/fetch-files":{"post":{"description":"For an image or video received from TikTok whose file could not be fetched (the message shows the error in `metadata.fileError`): the worker fetches it again. On success the file arrives as `attachment.stored` and the error is cleared; a new failure is attached again. Audited; emits `message.file_fetch_requested`.","operationId":"fetchTikTokMessageFiles","parameters":[{"name":"messageId","required":true,"in":"path","description":"The id of the comment’s message.","schema":{"type":"string","format":"uuid","description":"The id of the comment’s message."}},{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}},{"name":"Idempotency-Key","in":"header","description":"A unique key for this operation (e.g. a UUID, 1 to 255 visible characters), kept 24 hours: repeating the request with the same key returns the first answer (`Idempotent-Replayed: true`) instead of doing it again. Errors: `API-8109` (400) a key that is not valid, `API-8108` (409, retryable) the first request with this key is still running, `API-8107` (422) the key was used for a different request; `API-8118` (409) the first request created something whose secret is shown only once, so its answer is not repeated. An answer with `shown_once` repeats its secret within 10 minutes, then `API-8118`.","required":false,"schema":{"type":"string","minLength":1,"maxLength":255}}],"responses":{"202":{"description":"The fetch is queued.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TikTokFileFetch"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `AUTH-1003`: your seat was deactivated (view only). `AUTH-1004`: all seats are inactive because the seat charge was not paid (view only). `AUTH-1002`: your role lacks the `tickets.reply` permission. `API-8102`: the API key or app lacks the `tickets:write` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"`TKT-6105`: no message with this id that you may see.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"409":{"description":"`TT-3019`: the channel is disconnected or needs a reconnection.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"description":"`API-8001`: some fields are missing or not valid. `details.fields` lists each invalid field with its own code (e.g. `API-8002` required, `API-8012` wrong format). `TT-3034`: the message has no file to fetch from TikTok.","headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"429":{"$ref":"#/components/responses/RateLimited"},"503":{"description":"`SYS-1001`: TikTok is not set up in the platform console Integrations page.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["tickets:write"]},{"oauth2":["tickets:write"]}],"summary":"Fetch a received file from TikTok again","tags":["channels"]}},"/v1/channels/tiktok/{channelId}":{"get":{"operationId":"getTikTokChannel","parameters":[{"name":"channelId","required":true,"in":"path","description":"The TikTok channel id.","schema":{"type":"string","format":"uuid","description":"The TikTok channel id."}},{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"The channel.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TikTokChannel"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `AUTH-1002`: your role lacks the `channels.manage` permission. `API-8102`: the API key or app lacks the `channels:read` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"`TT-3018`: no TikTok channel with this id in your organization.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["channels:read"]},{"oauth2":["channels:read"]}],"summary":"A TikTok channel","tags":["channels"]},"patch":{"operationId":"updateTikTokChannel","parameters":[{"name":"channelId","required":true,"in":"path","description":"The TikTok channel id.","schema":{"type":"string","format":"uuid","description":"The TikTok channel id."}},{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}},{"name":"Idempotency-Key","in":"header","description":"A unique key for this operation (e.g. a UUID, 1 to 255 visible characters), kept 24 hours: repeating the request with the same key returns the first answer (`Idempotent-Replayed: true`) instead of doing it again. Errors: `API-8109` (400) a key that is not valid, `API-8108` (409, retryable) the first request with this key is still running, `API-8107` (422) the key was used for a different request; `API-8118` (409) the first request created something whose secret is shown only once, so its answer is not repeated. An answer with `shown_once` repeats its secret within 10 minutes, then `API-8118`.","required":false,"schema":{"type":"string","minLength":1,"maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateTikTokChannel"}}}},"responses":{"200":{"description":"The channel.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TikTokChannel"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `AUTH-1003`: your seat was deactivated (view only). `AUTH-1004`: all seats are inactive because the seat charge was not paid (view only). `AUTH-1002`: your role lacks the `channels.manage` permission. `API-8102`: the API key or app lacks the `channels:write` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in. `API-8148`: not available to test keys (API test mode).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"`TT-3018`: no TikTok channel with this id in your organization.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"409":{"description":"`TT-3019`: the channel is disconnected.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["channels:write"]},{"oauth2":["channels:write"]}],"summary":"Rename a TikTok channel","tags":["channels"]}},"/v1/channels/tiktok/{channelId}/disconnect":{"post":{"description":"Revokes Rabt’s access at TikTok and the tokens in the vault, and stops receiving and sending on the account; the channel and its tickets stay (Rabt never deletes).","operationId":"disconnectTikTokChannel","parameters":[{"name":"channelId","required":true,"in":"path","description":"The TikTok channel id.","schema":{"type":"string","format":"uuid","description":"The TikTok channel id."}},{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}},{"name":"Idempotency-Key","in":"header","description":"A unique key for this operation (e.g. a UUID, 1 to 255 visible characters), kept 24 hours: repeating the request with the same key returns the first answer (`Idempotent-Replayed: true`) instead of doing it again. Errors: `API-8109` (400) a key that is not valid, `API-8108` (409, retryable) the first request with this key is still running, `API-8107` (422) the key was used for a different request; `API-8118` (409) the first request created something whose secret is shown only once, so its answer is not repeated. An answer with `shown_once` repeats its secret within 10 minutes, then `API-8118`.","required":false,"schema":{"type":"string","minLength":1,"maxLength":255}}],"responses":{"200":{"description":"The channel.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TikTokChannel"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `AUTH-1003`: your seat was deactivated (view only). `AUTH-1004`: all seats are inactive because the seat charge was not paid (view only). `AUTH-1002`: your role lacks the `channels.manage` permission. `API-8102`: the API key or app lacks the `channels:write` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in. `API-8148`: not available to test keys (API test mode).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"`TT-3018`: no TikTok channel with this id in your organization.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["channels:write"]},{"oauth2":["channels:write"]}],"summary":"Disconnect a TikTok channel","tags":["channels"]}},"/v1/channels/tiktok/login-kit/accounts":{"get":{"description":"The organization’s TikTok accounts linked by signing in only (name, picture; never their tokens), and `mode`: how Connect links an account now (`business` when the Business Messaging API app is set up, else `login_kit`). A linked account receives and sends nothing (`messaging` false).","operationId":"listTikTokLoginKitAccounts","parameters":[{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"The linked accounts.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TikTokLoginKitAccountList"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `AUTH-1002`: your role lacks the `channels.manage` permission. `API-8102`: the API key or app lacks the `channels:read` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["channels:read"]},{"oauth2":["channels:read"]}],"summary":"List the TikTok accounts linked with Login Kit","tags":["channels"]}},"/v1/channels/tiktok/login-kit/connect":{"post":{"description":"Returns TikTok’s page where the account holder signs in and approves `user.info.basic` (valid 10 minutes, once). TikTok sends them back to Rabt’s callback page, which completes the link.","operationId":"startTikTokLoginKitConnect","parameters":[{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}},{"name":"Idempotency-Key","in":"header","description":"A unique key for this operation (e.g. a UUID, 1 to 255 visible characters), kept 24 hours: repeating the request with the same key returns the first answer (`Idempotent-Replayed: true`) instead of doing it again. Errors: `API-8109` (400) a key that is not valid, `API-8108` (409, retryable) the first request with this key is still running, `API-8107` (422) the key was used for a different request; `API-8118` (409) the first request created something whose secret is shown only once, so its answer is not repeated. An answer with `shown_once` repeats its secret within 10 minutes, then `API-8118`.","required":false,"schema":{"type":"string","minLength":1,"maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StartTikTokLoginKitConnect"}}}},"responses":{"200":{"description":"Where to sign in.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TikTokConnectStart"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `AUTH-1003`: your seat was deactivated (view only). `AUTH-1004`: all seats are inactive because the seat charge was not paid (view only). `AUTH-1002`: your role lacks the `channels.manage` permission. `API-8102`: the API key or app lacks the `channels:write` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in. `API-8148`: not available to test keys (API test mode).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"description":"`API-8001`: some fields are missing or not valid. `details.fields` lists each invalid field with its own code (e.g. `API-8002` required, `API-8012` wrong format). `SPC-6223`: the channel is held back or not set up yet: «coming soon», nothing to connect.","headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"429":{"$ref":"#/components/responses/RateLimited"},"503":{"description":"`SYS-1001`: TikTok Login Kit (the TikTok card’s client key) is not set up in the platform console Integrations page.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["channels:write"]},{"oauth2":["channels:write"]}],"summary":"Start linking a TikTok account with Login Kit","tags":["channels"]}},"/v1/channels/tiktok/login-kit/connect/complete":{"post":{"description":"With the `state` and `code` TikTok sent back: the code is exchanged, the profile read and the account linked (its live link renewed when it is already linked here). Audited (`channel.account_linked`). Nothing is received, sent or charged on it.","operationId":"completeTikTokLoginKitConnect","parameters":[{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}},{"name":"Idempotency-Key","in":"header","description":"A unique key for this operation (e.g. a UUID, 1 to 255 visible characters), kept 24 hours: repeating the request with the same key returns the first answer (`Idempotent-Replayed: true`) instead of doing it again. Errors: `API-8109` (400) a key that is not valid, `API-8108` (409, retryable) the first request with this key is still running, `API-8107` (422) the key was used for a different request; `API-8118` (409) the first request created something whose secret is shown only once, so its answer is not repeated. An answer with `shown_once` repeats its secret within 10 minutes, then `API-8118`.","required":false,"schema":{"type":"string","minLength":1,"maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CompleteTikTokLoginKitConnect"}}}},"responses":{"201":{"description":"The linked account.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TikTokLoginKitAccount"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`TT-3016`: the state is unknown, expired, used, or another member’s.\n\n`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1097`: the sign-in was started in the desktop app by another member or on another device.\n\n`AUTH-1040`: you are not a member of the organization named. `AUTH-1003`: your seat was deactivated (view only). `AUTH-1004`: all seats are inactive because the seat charge was not paid (view only). `AUTH-1002`: your role lacks the `channels.manage` permission. `API-8102`: the API key or app lacks the `channels:write` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in. `API-8148`: not available to test keys (API test mode).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"description":"`API-8001`: some fields are missing or not valid. `details.fields` lists each invalid field with its own code (e.g. `API-8002` required, `API-8012` wrong format). `TT-3017` declined, `TT-3039` Rabt’s Login Kit app refused, `TT-3040` the sign-in code expired, `TT-3041` `user.info.basic` not granted; TikTok’s own code and message are in `provider`.","headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"429":{"$ref":"#/components/responses/RateLimited"},"503":{"description":"`SYS-1001`: TikTok Login Kit (the TikTok card’s client key) is not set up in the platform console Integrations page.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["channels:write"]},{"oauth2":["channels:write"]}],"summary":"Complete linking a TikTok account with Login Kit","tags":["channels"]}},"/v1/channels/tiktok/login-kit/accounts/{accountId}/disconnect":{"post":{"description":"Revokes Rabt’s access at TikTok and the tokens in the vault; the record is kept (`disconnected_at`). Audited (`channel.account_unlinked`).","operationId":"disconnectTikTokLoginKitAccount","parameters":[{"name":"accountId","required":true,"in":"path","description":"The linked TikTok account id.","schema":{"type":"string","format":"uuid","description":"The linked TikTok account id."}},{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}},{"name":"Idempotency-Key","in":"header","description":"A unique key for this operation (e.g. a UUID, 1 to 255 visible characters), kept 24 hours: repeating the request with the same key returns the first answer (`Idempotent-Replayed: true`) instead of doing it again. Errors: `API-8109` (400) a key that is not valid, `API-8108` (409, retryable) the first request with this key is still running, `API-8107` (422) the key was used for a different request; `API-8118` (409) the first request created something whose secret is shown only once, so its answer is not repeated. An answer with `shown_once` repeats its secret within 10 minutes, then `API-8118`.","required":false,"schema":{"type":"string","minLength":1,"maxLength":255}}],"responses":{"200":{"description":"The unlinked account.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TikTokLoginKitAccount"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `AUTH-1003`: your seat was deactivated (view only). `AUTH-1004`: all seats are inactive because the seat charge was not paid (view only). `AUTH-1002`: your role lacks the `channels.manage` permission. `API-8102`: the API key or app lacks the `channels:write` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in. `API-8148`: not available to test keys (API test mode).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"`TT-3043`: no linked TikTok account with this id in your organization.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["channels:write"]},{"oauth2":["channels:write"]}],"summary":"Unlink a TikTok account linked with Login Kit","tags":["channels"]}},"/v1/channels/youtube":{"get":{"description":"Every connected YouTube channel with its status, permission and token expiry (never its tokens); disconnected ones last. `configured` is false when Google sign-in is not set up in the platform console.","operationId":"listYouTubeChannels","parameters":[{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"The channels.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/YouTubeChannelList"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `AUTH-1002`: your role lacks the `channels.manage` permission. `API-8102`: the API key or app lacks the `channels:read` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["channels:read"]},{"oauth2":["channels:read"]}],"summary":"List the YouTube channels","tags":["channels"]}},"/v1/channels/youtube/quota":{"get":{"description":"The units your organization and all organizations together spent today, and the limits. Reading comments costs 1 unit a call, a reply, a hold for review and a deletion 50; a call over a limit is refused (`YT-3911`, `YT-3912`) until the quota renews at midnight Pacific time.","operationId":"getYouTubeQuota","parameters":[{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"The quota day.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/YouTubeQuota"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `AUTH-1002`: your role lacks the `channels.manage` permission. `API-8102`: the API key or app lacks the `channels:read` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["channels:read"]},{"oauth2":["channels:read"]}],"summary":"Today’s YouTube quota","tags":["channels"]}},"/v1/channels/youtube/connect":{"post":{"description":"Returns Google’s page where the channel owner signs in and approves Rabt (valid 10 minutes, once). Google sends them back to Rabt’s callback page, which completes the connection with `POST /v1/channels/youtube/connect/complete`.","operationId":"startYouTubeConnect","parameters":[{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}},{"name":"Idempotency-Key","in":"header","description":"A unique key for this operation (e.g. a UUID, 1 to 255 visible characters), kept 24 hours: repeating the request with the same key returns the first answer (`Idempotent-Replayed: true`) instead of doing it again. Errors: `API-8109` (400) a key that is not valid, `API-8108` (409, retryable) the first request with this key is still running, `API-8107` (422) the key was used for a different request; `API-8118` (409) the first request created something whose secret is shown only once, so its answer is not repeated. An answer with `shown_once` repeats its secret within 10 minutes, then `API-8118`.","required":false,"schema":{"type":"string","minLength":1,"maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StartYouTubeConnect"}}}},"responses":{"200":{"description":"Where to sign in.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/YouTubeConnectStart"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `AUTH-1003`: your seat was deactivated (view only). `AUTH-1004`: all seats are inactive because the seat charge was not paid (view only). `AUTH-1002`: your role lacks the `channels.manage` permission. `API-8102`: the API key or app lacks the `channels:write` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in. `API-8148`: not available to test keys (API test mode).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"`YT-3918`: no YouTube channel with this id in your organization.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"description":"`API-8001`: some fields are missing or not valid. `details.fields` lists each invalid field with its own code (e.g. `API-8002` required, `API-8012` wrong format). `SPC-6223`: the channel is held back or not set up yet: «coming soon», nothing to connect.","headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"429":{"$ref":"#/components/responses/RateLimited"},"503":{"description":"`SYS-1001`: Google sign-in is not set up in the platform console Integrations page.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["channels:write"]},{"oauth2":["channels:write"]}],"summary":"Start connecting a YouTube channel","tags":["channels"]}},"/v1/channels/youtube/connect/complete":{"post":{"description":"With the `state` and `code` Google sent back: the permission is checked and the Google account’s YouTube channel connected, or reconnected when it is already connected here.","operationId":"completeYouTubeConnect","parameters":[{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}},{"name":"Idempotency-Key","in":"header","description":"A unique key for this operation (e.g. a UUID, 1 to 255 visible characters), kept 24 hours: repeating the request with the same key returns the first answer (`Idempotent-Replayed: true`) instead of doing it again. Errors: `API-8109` (400) a key that is not valid, `API-8108` (409, retryable) the first request with this key is still running, `API-8107` (422) the key was used for a different request; `API-8118` (409) the first request created something whose secret is shown only once, so its answer is not repeated. An answer with `shown_once` repeats its secret within 10 minutes, then `API-8118`.","required":false,"schema":{"type":"string","minLength":1,"maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CompleteYouTubeConnect"}}}},"responses":{"201":{"description":"The channel.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/YouTubeChannel"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1097`: the sign-in was started in the desktop app by another member or on another device.\n\n`AUTH-1040`: you are not a member of the organization named. `AUTH-1003`: your seat was deactivated (view only). `AUTH-1004`: all seats are inactive because the seat charge was not paid (view only). `AUTH-1002`: your role lacks the `channels.manage` permission. `API-8102`: the API key or app lacks the `channels:write` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in. `API-8148`: not available to test keys (API test mode).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"409":{"description":"`YT-3916`: the channel is connected to another organization.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"description":"`API-8001`: some fields are missing or not valid. `details.fields` lists each invalid field with its own code (e.g. `API-8002` required, `API-8012` wrong format). `YT-3901`–`YT-3923`: YouTube or Google refused (credentials, permissions, quota, limits); Google’s own code and message are in `provider`.","headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"429":{"$ref":"#/components/responses/RateLimited"},"503":{"description":"`SYS-1001`: Google sign-in is not set up in the platform console Integrations page.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["channels:write"]},{"oauth2":["channels:write"]}],"summary":"Complete connecting a YouTube channel","tags":["channels"]}},"/v1/channels/youtube/tickets/{ticketId}/reply-rules":{"get":{"description":"YouTube’s rules for the ticket: a public text reply of up to 10,000 characters, no files. The composer offers only this.","operationId":"getYouTubeReplyRules","parameters":[{"name":"ticketId","required":true,"in":"path","description":"The ticket id.","schema":{"type":"string","format":"uuid","description":"The ticket id."}},{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"The rules.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/YouTubeReplyRules"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `API-8102`: the API key or app lacks the `tickets:read` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"`TKT-6101`: no ticket with this id that you may see.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["tickets:read"]},{"oauth2":["tickets:read"]}],"summary":"What a reply on a ticket may be now","tags":["channels"]}},"/v1/channels/youtube/comments/{messageId}/actions":{"post":{"description":"Acts on a customer’s comment on the channel’s video, from its ticket. Deleting removes it on YouTube only: Rabt keeps its copy, marked as deleted there. Audited; emits `message.channel_changed`.","operationId":"actOnYouTubeComment","parameters":[{"name":"messageId","required":true,"in":"path","description":"The id of the comment’s message.","schema":{"type":"string","format":"uuid","description":"The id of the comment’s message."}},{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}},{"name":"Idempotency-Key","in":"header","description":"A unique key for this operation (e.g. a UUID, 1 to 255 visible characters), kept 24 hours: repeating the request with the same key returns the first answer (`Idempotent-Replayed: true`) instead of doing it again. Errors: `API-8109` (400) a key that is not valid, `API-8108` (409, retryable) the first request with this key is still running, `API-8107` (422) the key was used for a different request; `API-8118` (409) the first request created something whose secret is shown only once, so its answer is not repeated. An answer with `shown_once` repeats its secret within 10 minutes, then `API-8118`.","required":false,"schema":{"type":"string","minLength":1,"maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/YouTubeCommentAction"}}}},"responses":{"200":{"description":"What was done.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/YouTubeCommentActionResult"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `AUTH-1003`: your seat was deactivated (view only). `AUTH-1004`: all seats are inactive because the seat charge was not paid (view only). `AUTH-1002`: your role lacks the `tickets.reply` permission. `API-8102`: the API key or app lacks the `tickets:write` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"`TKT-6105`: no message with this id that you may see.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"409":{"description":"`YT-3919`: the channel is disconnected or needs a reconnection.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"description":"`API-8001`: some fields are missing or not valid. `details.fields` lists each invalid field with its own code (e.g. `API-8002` required, `API-8012` wrong format). `YT-3920`: not a customer’s YouTube comment. `YT-3901`–`YT-3923`: YouTube or Google refused (credentials, permissions, quota, limits); Google’s own code and message are in `provider`.","headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["tickets:write"]},{"oauth2":["tickets:write"]}],"summary":"Hold for review, publish or delete a comment on YouTube","tags":["channels"]}},"/v1/channels/youtube/{channelId}":{"get":{"operationId":"getYouTubeChannel","parameters":[{"name":"channelId","required":true,"in":"path","description":"The YouTube channel id.","schema":{"type":"string","format":"uuid","description":"The YouTube channel id."}},{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"The channel.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/YouTubeChannel"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `AUTH-1002`: your role lacks the `channels.manage` permission. `API-8102`: the API key or app lacks the `channels:read` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"`YT-3918`: no YouTube channel with this id in your organization.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["channels:read"]},{"oauth2":["channels:read"]}],"summary":"A YouTube channel","tags":["channels"]},"patch":{"operationId":"updateYouTubeChannel","parameters":[{"name":"channelId","required":true,"in":"path","description":"The YouTube channel id.","schema":{"type":"string","format":"uuid","description":"The YouTube channel id."}},{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}},{"name":"Idempotency-Key","in":"header","description":"A unique key for this operation (e.g. a UUID, 1 to 255 visible characters), kept 24 hours: repeating the request with the same key returns the first answer (`Idempotent-Replayed: true`) instead of doing it again. Errors: `API-8109` (400) a key that is not valid, `API-8108` (409, retryable) the first request with this key is still running, `API-8107` (422) the key was used for a different request; `API-8118` (409) the first request created something whose secret is shown only once, so its answer is not repeated. An answer with `shown_once` repeats its secret within 10 minutes, then `API-8118`.","required":false,"schema":{"type":"string","minLength":1,"maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateYouTubeChannel"}}}},"responses":{"200":{"description":"The channel.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/YouTubeChannel"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `AUTH-1003`: your seat was deactivated (view only). `AUTH-1004`: all seats are inactive because the seat charge was not paid (view only). `AUTH-1002`: your role lacks the `channels.manage` permission. `API-8102`: the API key or app lacks the `channels:write` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in. `API-8148`: not available to test keys (API test mode).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"`YT-3918`: no YouTube channel with this id in your organization.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"409":{"description":"`YT-3919`: the channel is disconnected.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["channels:write"]},{"oauth2":["channels:write"]}],"summary":"Rename a YouTube channel","tags":["channels"]}},"/v1/channels/youtube/{channelId}/disconnect":{"post":{"description":"Revokes Rabt’s access at Google (unless another connected channel uses the same Google account) and the tokens in the vault, and stops reading and replying; the channel and its tickets stay (Rabt never deletes). YouTube’s policies require its data to go: within 7 days the comment text, commenter names, pictures and channel ids are removed from the tickets (`data_deletion_due_at` on the channel); a commenter’s own request goes through the contact erasure (`requestContactErasure`).","operationId":"disconnectYouTubeChannel","parameters":[{"name":"channelId","required":true,"in":"path","description":"The YouTube channel id.","schema":{"type":"string","format":"uuid","description":"The YouTube channel id."}},{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}},{"name":"Idempotency-Key","in":"header","description":"A unique key for this operation (e.g. a UUID, 1 to 255 visible characters), kept 24 hours: repeating the request with the same key returns the first answer (`Idempotent-Replayed: true`) instead of doing it again. Errors: `API-8109` (400) a key that is not valid, `API-8108` (409, retryable) the first request with this key is still running, `API-8107` (422) the key was used for a different request; `API-8118` (409) the first request created something whose secret is shown only once, so its answer is not repeated. An answer with `shown_once` repeats its secret within 10 minutes, then `API-8118`.","required":false,"schema":{"type":"string","minLength":1,"maxLength":255}}],"responses":{"200":{"description":"The channel.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/YouTubeChannel"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `AUTH-1003`: your seat was deactivated (view only). `AUTH-1004`: all seats are inactive because the seat charge was not paid (view only). `AUTH-1002`: your role lacks the `channels.manage` permission. `API-8102`: the API key or app lacks the `channels:write` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in. `API-8148`: not available to test keys (API test mode).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"`YT-3918`: no YouTube channel with this id in your organization.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["channels:write"]},{"oauth2":["channels:write"]}],"summary":"Disconnect a YouTube channel","tags":["channels"]}},"/v1/channels/web-forms":{"get":{"description":"Every web form that is not disconnected, with its key, its submission address, an HTML example and Rabt’s ready form.","operationId":"listWebForms","parameters":[{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"The forms.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebFormList"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `AUTH-1002`: your role lacks the `channels.manage` permission. `API-8102`: the API key or app lacks the `channels:read` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["channels:read"]},{"oauth2":["channels:read"]}],"summary":"List the web forms","tags":["channels"]},"post":{"description":"A new web form, at once and on: named «نموذج الموقع» unless a name is given, routed as every new channel (its destination: `PUT /v1/routing/items/channel/{channelId}/destination`). Its key works from any website.","operationId":"createWebForm","parameters":[{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}},{"name":"Idempotency-Key","in":"header","description":"A unique key for this operation (e.g. a UUID, 1 to 255 visible characters), kept 24 hours: repeating the request with the same key returns the first answer (`Idempotent-Replayed: true`) instead of doing it again. Errors: `API-8109` (400) a key that is not valid, `API-8108` (409, retryable) the first request with this key is still running, `API-8107` (422) the key was used for a different request; `API-8118` (409) the first request created something whose secret is shown only once, so its answer is not repeated. An answer with `shown_once` repeats its secret within 10 minutes, then `API-8118`.","required":false,"schema":{"type":"string","minLength":1,"maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateWebForm"}}}},"responses":{"201":{"description":"The form.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebForm"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `AUTH-1003`: your seat was deactivated (view only). `AUTH-1004`: all seats are inactive because the seat charge was not paid (view only). `AUTH-1002`: your role lacks the `channels.manage` permission. `API-8102`: the API key or app lacks the `channels:write` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in. `API-8148`: not available to test keys (API test mode).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["channels:write"]},{"oauth2":["channels:write"]}],"summary":"Create a web form","tags":["channels"]}},"/v1/channels/web-forms/{channelId}":{"get":{"operationId":"getWebForm","parameters":[{"name":"channelId","required":true,"in":"path","description":"The web form channel id.","schema":{"type":"string","format":"uuid","description":"The web form channel id."}},{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"The form.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebForm"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `AUTH-1002`: your role lacks the `channels.manage` permission. `API-8102`: the API key or app lacks the `channels:read` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"`WEB-4028`: no web form with this id in your organization.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["channels:read"]},{"oauth2":["channels:read"]}],"summary":"Get a web form","tags":["channels"]},"patch":{"description":"Its name, or switches it off and on (`enabled`).","operationId":"updateWebForm","parameters":[{"name":"channelId","required":true,"in":"path","description":"The web form channel id.","schema":{"type":"string","format":"uuid","description":"The web form channel id."}},{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}},{"name":"Idempotency-Key","in":"header","description":"A unique key for this operation (e.g. a UUID, 1 to 255 visible characters), kept 24 hours: repeating the request with the same key returns the first answer (`Idempotent-Replayed: true`) instead of doing it again. Errors: `API-8109` (400) a key that is not valid, `API-8108` (409, retryable) the first request with this key is still running, `API-8107` (422) the key was used for a different request; `API-8118` (409) the first request created something whose secret is shown only once, so its answer is not repeated. An answer with `shown_once` repeats its secret within 10 minutes, then `API-8118`.","required":false,"schema":{"type":"string","minLength":1,"maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateWebForm"}}}},"responses":{"200":{"description":"The form.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebForm"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `AUTH-1003`: your seat was deactivated (view only). `AUTH-1004`: all seats are inactive because the seat charge was not paid (view only). `AUTH-1002`: your role lacks the `channels.manage` permission. `API-8102`: the API key or app lacks the `channels:write` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in. `API-8148`: not available to test keys (API test mode).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"`WEB-4028`: no web form with this id in your organization.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["channels:write"]},{"oauth2":["channels:write"]}],"summary":"Change a web form","tags":["channels"]}},"/v1/channels/web-forms/{channelId}/disconnect":{"post":{"description":"Final: its key stops working at once; its tickets stay.","operationId":"disconnectWebForm","parameters":[{"name":"channelId","required":true,"in":"path","description":"The web form channel id.","schema":{"type":"string","format":"uuid","description":"The web form channel id."}},{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}},{"name":"Idempotency-Key","in":"header","description":"A unique key for this operation (e.g. a UUID, 1 to 255 visible characters), kept 24 hours: repeating the request with the same key returns the first answer (`Idempotent-Replayed: true`) instead of doing it again. Errors: `API-8109` (400) a key that is not valid, `API-8108` (409, retryable) the first request with this key is still running, `API-8107` (422) the key was used for a different request; `API-8118` (409) the first request created something whose secret is shown only once, so its answer is not repeated. An answer with `shown_once` repeats its secret within 10 minutes, then `API-8118`.","required":false,"schema":{"type":"string","minLength":1,"maxLength":255}}],"responses":{"200":{"description":"The form.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebForm"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `AUTH-1003`: your seat was deactivated (view only). `AUTH-1004`: all seats are inactive because the seat charge was not paid (view only). `AUTH-1002`: your role lacks the `channels.manage` permission. `API-8102`: the API key or app lacks the `channels:write` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in. `API-8148`: not available to test keys (API test mode).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"`WEB-4028`: no web form with this id in your organization.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["channels:write"]},{"oauth2":["channels:write"]}],"summary":"Disconnect a web form","tags":["channels"]}},"/v1/channels/app-store":{"get":{"description":"Every App Store Connect team connected, with its status, key ID (never the private key), apps and how their polling goes; disconnected ones last.","operationId":"listAppStoreChannels","parameters":[{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"The channels.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AppStoreChannelList"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `AUTH-1002`: your role lacks the `channels.manage` permission. `API-8102`: the API key or app lacks the `channels:read` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["channels:read"]},{"oauth2":["channels:read"]}],"summary":"List the App Store channels","tags":["channels"]},"post":{"description":"Rabt signs a token with the key and lists its apps first (the key is validated on save); then the channel is stored `active`, the key in the token vault, and each app becomes an address routed to the member who connected the channel, else the owner, until a space or member takes it. Reviews arrive by polling.","operationId":"connectAppStoreChannel","parameters":[{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}},{"name":"Idempotency-Key","in":"header","description":"A unique key for this operation (e.g. a UUID, 1 to 255 visible characters), kept 24 hours: repeating the request with the same key returns the first answer (`Idempotent-Replayed: true`) instead of doing it again. Errors: `API-8109` (400) a key that is not valid, `API-8108` (409, retryable) the first request with this key is still running, `API-8107` (422) the key was used for a different request; `API-8118` (409) the first request created something whose secret is shown only once, so its answer is not repeated. An answer with `shown_once` repeats its secret within 10 minutes, then `API-8118`.","required":false,"schema":{"type":"string","minLength":1,"maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConnectAppStoreChannel"}}}},"responses":{"201":{"description":"The channel.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AppStoreChannel"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `AUTH-1003`: your seat was deactivated (view only). `AUTH-1004`: all seats are inactive because the seat charge was not paid (view only). `AUTH-1002`: your role lacks the `channels.manage` permission. `API-8102`: the API key or app lacks the `channels:write` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in. `API-8148`: not available to test keys (API test mode).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"409":{"description":"`CHN-3001`: this team (issuer ID) is already connected.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"description":"`API-8001`: some fields are missing or not valid. `details.fields` lists each invalid field with its own code (e.g. `API-8002` required, `API-8012` wrong format). `APS-3720` the `.p8` file is not an ES256 key; `APS-3701`–`APS-3708` Apple refused the key or the request (Apple’s code and message in `provider`); `APS-3730` the key sees no apps.","headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["channels:write"]},{"oauth2":["channels:write"]}],"summary":"Connect an App Store Connect team","tags":["channels"]}},"/v1/channels/app-store/{channelId}":{"get":{"operationId":"getAppStoreChannel","parameters":[{"name":"channelId","required":true,"in":"path","description":"The App Store channel id.","schema":{"type":"string","format":"uuid","description":"The App Store channel id."}},{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"The channel.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AppStoreChannel"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `AUTH-1002`: your role lacks the `channels.manage` permission. `API-8102`: the API key or app lacks the `channels:read` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"`APS-3722`: no App Store channel with this id in your organization.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["channels:read"]},{"oauth2":["channels:read"]}],"summary":"An App Store channel","tags":["channels"]},"patch":{"operationId":"updateAppStoreChannel","parameters":[{"name":"channelId","required":true,"in":"path","description":"The App Store channel id.","schema":{"type":"string","format":"uuid","description":"The App Store channel id."}},{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}},{"name":"Idempotency-Key","in":"header","description":"A unique key for this operation (e.g. a UUID, 1 to 255 visible characters), kept 24 hours: repeating the request with the same key returns the first answer (`Idempotent-Replayed: true`) instead of doing it again. Errors: `API-8109` (400) a key that is not valid, `API-8108` (409, retryable) the first request with this key is still running, `API-8107` (422) the key was used for a different request; `API-8118` (409) the first request created something whose secret is shown only once, so its answer is not repeated. An answer with `shown_once` repeats its secret within 10 minutes, then `API-8118`.","required":false,"schema":{"type":"string","minLength":1,"maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateAppStoreChannel"}}}},"responses":{"200":{"description":"The channel.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AppStoreChannel"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `AUTH-1003`: your seat was deactivated (view only). `AUTH-1004`: all seats are inactive because the seat charge was not paid (view only). `AUTH-1002`: your role lacks the `channels.manage` permission. `API-8102`: the API key or app lacks the `channels:write` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in. `API-8148`: not available to test keys (API test mode).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"`APS-3722`: no App Store channel with this id in your organization.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"409":{"description":"`APS-3724`: the channel is disconnected or needs a reconnection.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["channels:write"]},{"oauth2":["channels:write"]}],"summary":"Rename an App Store channel","tags":["channels"]}},"/v1/channels/app-store/{channelId}/reconnect":{"post":{"description":"After Apple refused the saved key (`needs_reauth`), or to rotate it: a new key of the same team is tried, then kept, and the apps are read again.","operationId":"reconnectAppStoreChannel","parameters":[{"name":"channelId","required":true,"in":"path","description":"The App Store channel id.","schema":{"type":"string","format":"uuid","description":"The App Store channel id."}},{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}},{"name":"Idempotency-Key","in":"header","description":"A unique key for this operation (e.g. a UUID, 1 to 255 visible characters), kept 24 hours: repeating the request with the same key returns the first answer (`Idempotent-Replayed: true`) instead of doing it again. Errors: `API-8109` (400) a key that is not valid, `API-8108` (409, retryable) the first request with this key is still running, `API-8107` (422) the key was used for a different request; `API-8118` (409) the first request created something whose secret is shown only once, so its answer is not repeated. An answer with `shown_once` repeats its secret within 10 minutes, then `API-8118`.","required":false,"schema":{"type":"string","minLength":1,"maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReconnectAppStoreChannel"}}}},"responses":{"200":{"description":"The channel.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AppStoreChannel"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `AUTH-1003`: your seat was deactivated (view only). `AUTH-1004`: all seats are inactive because the seat charge was not paid (view only). `AUTH-1002`: your role lacks the `channels.manage` permission. `API-8102`: the API key or app lacks the `channels:write` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in. `API-8148`: not available to test keys (API test mode).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"`APS-3722`: no App Store channel with this id in your organization.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"409":{"description":"`APS-3724`: the channel is disconnected or needs a reconnection.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"description":"`API-8001`: some fields are missing or not valid. `details.fields` lists each invalid field with its own code (e.g. `API-8002` required, `API-8012` wrong format). `APS-3720` the `.p8` file is not an ES256 key; `APS-3701`–`APS-3708` Apple refused the key or the request (Apple’s code and message in `provider`); `APS-3730` the key sees no apps.","headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["channels:write"]},{"oauth2":["channels:write"]}],"summary":"Reconnect with a new key","tags":["channels"]}},"/v1/channels/app-store/{channelId}/refresh-apps":{"post":{"description":"New apps become addresses (routed to the member who connected the channel, else the owner, until a space or member takes them), removed apps are removed with their address; reviews and tickets stay.","operationId":"refreshAppStoreApps","parameters":[{"name":"channelId","required":true,"in":"path","description":"The App Store channel id.","schema":{"type":"string","format":"uuid","description":"The App Store channel id."}},{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}},{"name":"Idempotency-Key","in":"header","description":"A unique key for this operation (e.g. a UUID, 1 to 255 visible characters), kept 24 hours: repeating the request with the same key returns the first answer (`Idempotent-Replayed: true`) instead of doing it again. Errors: `API-8109` (400) a key that is not valid, `API-8108` (409, retryable) the first request with this key is still running, `API-8107` (422) the key was used for a different request; `API-8118` (409) the first request created something whose secret is shown only once, so its answer is not repeated. An answer with `shown_once` repeats its secret within 10 minutes, then `API-8118`.","required":false,"schema":{"type":"string","minLength":1,"maxLength":255}}],"responses":{"200":{"description":"The channel.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AppStoreChannel"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `AUTH-1003`: your seat was deactivated (view only). `AUTH-1004`: all seats are inactive because the seat charge was not paid (view only). `AUTH-1002`: your role lacks the `channels.manage` permission. `API-8102`: the API key or app lacks the `channels:write` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in. `API-8148`: not available to test keys (API test mode).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"`APS-3722`: no App Store channel with this id in your organization.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"409":{"description":"`APS-3724`: the channel is disconnected or needs a reconnection.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"description":"`API-8001`: some fields are missing or not valid. `details.fields` lists each invalid field with its own code (e.g. `API-8002` required, `API-8012` wrong format). `APS-3720` the `.p8` file is not an ES256 key; `APS-3701`–`APS-3708` Apple refused the key or the request (Apple’s code and message in `provider`); `APS-3730` the key sees no apps.","headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["channels:write"]},{"oauth2":["channels:write"]}],"summary":"Read the key’s apps again","tags":["channels"]}},"/v1/channels/app-store/{channelId}/disconnect":{"post":{"description":"Revokes Rabt’s copy of the key and stops polling and replying; the channel, its reviews and their tickets stay (Rabt never deletes). Revoke the key itself in App Store Connect.","operationId":"disconnectAppStoreChannel","parameters":[{"name":"channelId","required":true,"in":"path","description":"The App Store channel id.","schema":{"type":"string","format":"uuid","description":"The App Store channel id."}},{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}},{"name":"Idempotency-Key","in":"header","description":"A unique key for this operation (e.g. a UUID, 1 to 255 visible characters), kept 24 hours: repeating the request with the same key returns the first answer (`Idempotent-Replayed: true`) instead of doing it again. Errors: `API-8109` (400) a key that is not valid, `API-8108` (409, retryable) the first request with this key is still running, `API-8107` (422) the key was used for a different request; `API-8118` (409) the first request created something whose secret is shown only once, so its answer is not repeated. An answer with `shown_once` repeats its secret within 10 minutes, then `API-8118`.","required":false,"schema":{"type":"string","minLength":1,"maxLength":255}}],"responses":{"200":{"description":"The channel.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AppStoreChannel"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `AUTH-1003`: your seat was deactivated (view only). `AUTH-1004`: all seats are inactive because the seat charge was not paid (view only). `AUTH-1002`: your role lacks the `channels.manage` permission. `API-8102`: the API key or app lacks the `channels:write` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in. `API-8148`: not available to test keys (API test mode).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"`APS-3722`: no App Store channel with this id in your organization.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["channels:write"]},{"oauth2":["channels:write"]}],"summary":"Disconnect an App Store channel","tags":["channels"]}},"/v1/channels/google-play":{"get":{"description":"Every service account connected, with its status, key id (never the key), apps and how current their reviews are; disconnected ones last.","operationId":"listGooglePlayChannels","parameters":[{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"The channels.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GooglePlayChannelList"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `AUTH-1002`: your role lacks the `channels.manage` permission. `API-8102`: the API key or app lacks the `channels:read` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["channels:read"]},{"oauth2":["channels:read"]}],"summary":"List the Google Play channels","tags":["channels"]},"post":{"description":"The earlier way, for API clients (members connect with a Google sign-in, `startGooglePlayConnection`). Rabt gets an access token with the key, lists the apps Google’s Reporting API gives for it and the package names sent, and reads each app’s reviews once (the key is validated on save); then the channel is stored `active`, the key in the token vault, and each app becomes an address routed to the member who connected the channel, else the owner, until a space or member takes it. Reviews arrive by polling (Google lists the last 7 days).","operationId":"connectGooglePlayChannel","parameters":[{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}},{"name":"Idempotency-Key","in":"header","description":"A unique key for this operation (e.g. a UUID, 1 to 255 visible characters), kept 24 hours: repeating the request with the same key returns the first answer (`Idempotent-Replayed: true`) instead of doing it again. Errors: `API-8109` (400) a key that is not valid, `API-8108` (409, retryable) the first request with this key is still running, `API-8107` (422) the key was used for a different request; `API-8118` (409) the first request created something whose secret is shown only once, so its answer is not repeated. An answer with `shown_once` repeats its secret within 10 minutes, then `API-8118`.","required":false,"schema":{"type":"string","minLength":1,"maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConnectGooglePlayChannel"}}}},"responses":{"201":{"description":"The channel.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GooglePlayChannel"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `AUTH-1003`: your seat was deactivated (view only). `AUTH-1004`: all seats are inactive because the seat charge was not paid (view only). `AUTH-1002`: your role lacks the `channels.manage` permission. `API-8102`: the API key or app lacks the `channels:write` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in. `API-8148`: not available to test keys (API test mode).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"409":{"description":"`CHN-3001`: this account is already connected.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"description":"`API-8001`: some fields are missing or not valid. `details.fields` lists each invalid field with its own code (e.g. `API-8002` required, `API-8012` wrong format). `GPL-3820` the key file is not a service account JSON key; `GPL-3844` it is an OAuth client file; `GPL-3801`–`GPL-3808` Google refused the key, a permission, an API or the request (Google’s code and message in `provider`); `GPL-3831` the key reaches no app.","headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["channels:write"]},{"oauth2":["channels:write"]}],"summary":"Connect Google Play with a service account key","tags":["channels"]}},"/v1/channels/google-play/authorizations":{"post":{"description":"Returns the Google sign-in URL (authorization code with PKCE and `state`, offline access, the `androidpublisher` and `playdeveloperreporting` permissions). The member signs in with the Google account that manages the apps in Play Console; Google sends them back to Rabt’s callback page with `state` and `code`, which finishes with `completeGooglePlayConnection` within ten minutes.","operationId":"startGooglePlayConnection","parameters":[{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}},{"name":"Idempotency-Key","in":"header","description":"A unique key for this operation (e.g. a UUID, 1 to 255 visible characters), kept 24 hours: repeating the request with the same key returns the first answer (`Idempotent-Replayed: true`) instead of doing it again. Errors: `API-8109` (400) a key that is not valid, `API-8108` (409, retryable) the first request with this key is still running, `API-8107` (422) the key was used for a different request; `API-8118` (409) the first request created something whose secret is shown only once, so its answer is not repeated. An answer with `shown_once` repeats its secret within 10 minutes, then `API-8118`.","required":false,"schema":{"type":"string","minLength":1,"maxLength":255}}],"responses":{"201":{"description":"The sign-in.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GooglePlayAuthorization"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `AUTH-1003`: your seat was deactivated (view only). `AUTH-1004`: all seats are inactive because the seat charge was not paid (view only). `AUTH-1002`: your role lacks the `channels.manage` permission. `API-8102`: the API key or app lacks the `channels:write` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in. `API-8148`: not available to test keys (API test mode).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"description":"`API-8001`: some fields are missing or not valid. `details.fields` lists each invalid field with its own code (e.g. `API-8002` required, `API-8012` wrong format). `SPC-6223`: the channel is held back or not set up yet: «coming soon», nothing to connect.","headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"429":{"$ref":"#/components/responses/RateLimited"},"503":{"description":"`SYS-1001`: Google is not set up on the platform yet (the Google card of the platform console).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["channels:write"]},{"oauth2":["channels:write"]}],"summary":"Start connecting Google Play with a Google sign-in","tags":["channels"]}},"/v1/channels/google-play/authorizations/complete":{"post":{"description":"The code is exchanged and the Google Play permission checked, the apps the account sees are listed and each app’s reviews read once, then the channel is stored `active` (or reconnected), each app an address routed to the member who connected the channel, else the owner, until a space or member takes it, and the first import started (it states Google’s 7-day limit). Each sign-in is used once, in the organization that started it; a failure gives the grant back.","operationId":"completeGooglePlayConnection","parameters":[{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}},{"name":"Idempotency-Key","in":"header","description":"A unique key for this operation (e.g. a UUID, 1 to 255 visible characters), kept 24 hours: repeating the request with the same key returns the first answer (`Idempotent-Replayed: true`) instead of doing it again. Errors: `API-8109` (400) a key that is not valid, `API-8108` (409, retryable) the first request with this key is still running, `API-8107` (422) the key was used for a different request; `API-8118` (409) the first request created something whose secret is shown only once, so its answer is not repeated. An answer with `shown_once` repeats its secret within 10 minutes, then `API-8118`.","required":false,"schema":{"type":"string","minLength":1,"maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CompleteGooglePlayConnection"}}}},"responses":{"200":{"description":"The channel.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GooglePlayChannel"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1097`: the sign-in was started in the desktop app by another member or on another device.\n\n`AUTH-1040`: you are not a member of the organization named. `AUTH-1003`: your seat was deactivated (view only). `AUTH-1004`: all seats are inactive because the seat charge was not paid (view only). `AUTH-1002`: your role lacks the `channels.manage` permission. `API-8102`: the API key or app lacks the `channels:write` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in. `API-8148`: not available to test keys (API test mode).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"409":{"description":"`GPL-3843`: a reconnection signed in with another Google account..","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"410":{"description":"`GPL-3839`: the sign-in expired, was used, or belongs to another organization.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"description":"`API-8001`: some fields are missing or not valid. `details.fields` lists each invalid field with its own code (e.g. `API-8002` required, `API-8012` wrong format). `GPL-3841`: the member declined at Google (or a Workspace policy refused). `GPL-3842`: the Google Play permission was not granted. `GPL-3820` the key file is not a service account JSON key; `GPL-3844` it is an OAuth client file; `GPL-3801`–`GPL-3808` Google refused the key, a permission, an API or the request (Google’s code and message in `provider`); `GPL-3831` the key reaches no app.","headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"429":{"$ref":"#/components/responses/RateLimited"},"503":{"description":"`SYS-1001`: Google is not set up on the platform yet (the Google card of the platform console).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["channels:write"]},{"oauth2":["channels:write"]}],"summary":"Finish connecting Google Play with what Google sent back","tags":["channels"]}},"/v1/channels/google-play/{channelId}":{"get":{"operationId":"getGooglePlayChannel","parameters":[{"name":"channelId","required":true,"in":"path","description":"The Google Play channel id.","schema":{"type":"string","format":"uuid","description":"The Google Play channel id."}},{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"The channel.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GooglePlayChannel"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `AUTH-1002`: your role lacks the `channels.manage` permission. `API-8102`: the API key or app lacks the `channels:read` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"`GPL-3822`: no Google Play channel with this id in your organization.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["channels:read"]},{"oauth2":["channels:read"]}],"summary":"A Google Play channel","tags":["channels"]},"patch":{"description":"New package names are tried with the saved key first; apps no longer named or listed are removed with their address (reviews and tickets stay).","operationId":"updateGooglePlayChannel","parameters":[{"name":"channelId","required":true,"in":"path","description":"The Google Play channel id.","schema":{"type":"string","format":"uuid","description":"The Google Play channel id."}},{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}},{"name":"Idempotency-Key","in":"header","description":"A unique key for this operation (e.g. a UUID, 1 to 255 visible characters), kept 24 hours: repeating the request with the same key returns the first answer (`Idempotent-Replayed: true`) instead of doing it again. Errors: `API-8109` (400) a key that is not valid, `API-8108` (409, retryable) the first request with this key is still running, `API-8107` (422) the key was used for a different request; `API-8118` (409) the first request created something whose secret is shown only once, so its answer is not repeated. An answer with `shown_once` repeats its secret within 10 minutes, then `API-8118`.","required":false,"schema":{"type":"string","minLength":1,"maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateGooglePlayChannel"}}}},"responses":{"200":{"description":"The channel.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GooglePlayChannel"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `AUTH-1003`: your seat was deactivated (view only). `AUTH-1004`: all seats are inactive because the seat charge was not paid (view only). `AUTH-1002`: your role lacks the `channels.manage` permission. `API-8102`: the API key or app lacks the `channels:write` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in. `API-8148`: not available to test keys (API test mode).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"`GPL-3822`: no Google Play channel with this id in your organization.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"409":{"description":"`GPL-3824`: the channel is disconnected or needs a reconnection.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"description":"`API-8001`: some fields are missing or not valid. `details.fields` lists each invalid field with its own code (e.g. `API-8002` required, `API-8012` wrong format). `GPL-3820` the key file is not a service account JSON key; `GPL-3844` it is an OAuth client file; `GPL-3801`–`GPL-3808` Google refused the key, a permission, an API or the request (Google’s code and message in `provider`); `GPL-3831` the key reaches no app.","headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["channels:write"]},{"oauth2":["channels:write"]}],"summary":"Rename a Google Play channel or change its package names","tags":["channels"]}},"/v1/channels/google-play/{channelId}/reconnect":{"post":{"description":"After Google refused the access, a permission or an API (`needs_reauth`): leave the key out to try the saved access again (a sign-in or a key), or, on a channel connected with a key, send a new key of the same service account (`GPL-3836` otherwise). The apps are read again and the channel is `active`. A sign-in channel whose grant was revoked signs in again with `startGooglePlayChannelReconnection`.","operationId":"reconnectGooglePlayChannel","parameters":[{"name":"channelId","required":true,"in":"path","description":"The Google Play channel id.","schema":{"type":"string","format":"uuid","description":"The Google Play channel id."}},{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}},{"name":"Idempotency-Key","in":"header","description":"A unique key for this operation (e.g. a UUID, 1 to 255 visible characters), kept 24 hours: repeating the request with the same key returns the first answer (`Idempotent-Replayed: true`) instead of doing it again. Errors: `API-8109` (400) a key that is not valid, `API-8108` (409, retryable) the first request with this key is still running, `API-8107` (422) the key was used for a different request; `API-8118` (409) the first request created something whose secret is shown only once, so its answer is not repeated. An answer with `shown_once` repeats its secret within 10 minutes, then `API-8118`.","required":false,"schema":{"type":"string","minLength":1,"maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReconnectGooglePlayChannel"}}}},"responses":{"200":{"description":"The channel.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GooglePlayChannel"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `AUTH-1003`: your seat was deactivated (view only). `AUTH-1004`: all seats are inactive because the seat charge was not paid (view only). `AUTH-1002`: your role lacks the `channels.manage` permission. `API-8102`: the API key or app lacks the `channels:write` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in. `API-8148`: not available to test keys (API test mode).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"`GPL-3822`: no Google Play channel with this id in your organization.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"409":{"description":"`GPL-3824`: the channel is disconnected or needs a reconnection.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"description":"`API-8001`: some fields are missing or not valid. `details.fields` lists each invalid field with its own code (e.g. `API-8002` required, `API-8012` wrong format). `GPL-3820` the key file is not a service account JSON key; `GPL-3844` it is an OAuth client file; `GPL-3801`–`GPL-3808` Google refused the key, a permission, an API or the request (Google’s code and message in `provider`); `GPL-3831` the key reaches no app. `GPL-3836`: a key of another service account.","headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["channels:write"]},{"oauth2":["channels:write"]}],"summary":"Check the access again, or reconnect with a new key","tags":["channels"]}},"/v1/channels/google-play/{channelId}/authorizations":{"post":{"description":"Returns a Google sign-in URL for the channel’s own Google account (after Google refused the saved access: `needs_reauth`); finishing it with `completeGooglePlayConnection` makes the channel active again. A channel connected with a key is reconnected with `reconnectGooglePlayChannel` (`GPL-3836`).","operationId":"startGooglePlayChannelReconnection","parameters":[{"name":"channelId","required":true,"in":"path","description":"The Google Play channel id.","schema":{"type":"string","format":"uuid","description":"The Google Play channel id."}},{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}},{"name":"Idempotency-Key","in":"header","description":"A unique key for this operation (e.g. a UUID, 1 to 255 visible characters), kept 24 hours: repeating the request with the same key returns the first answer (`Idempotent-Replayed: true`) instead of doing it again. Errors: `API-8109` (400) a key that is not valid, `API-8108` (409, retryable) the first request with this key is still running, `API-8107` (422) the key was used for a different request; `API-8118` (409) the first request created something whose secret is shown only once, so its answer is not repeated. An answer with `shown_once` repeats its secret within 10 minutes, then `API-8118`.","required":false,"schema":{"type":"string","minLength":1,"maxLength":255}}],"responses":{"201":{"description":"The sign-in.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GooglePlayAuthorization"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `AUTH-1003`: your seat was deactivated (view only). `AUTH-1004`: all seats are inactive because the seat charge was not paid (view only). `AUTH-1002`: your role lacks the `channels.manage` permission. `API-8102`: the API key or app lacks the `channels:write` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in. `API-8148`: not available to test keys (API test mode).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"`GPL-3822`: no Google Play channel with this id in your organization.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"409":{"description":"`GPL-3824`: the channel is disconnected or needs a reconnection.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"description":"`API-8001`: some fields are missing or not valid. `details.fields` lists each invalid field with its own code (e.g. `API-8002` required, `API-8012` wrong format). `GPL-3836`: the channel is connected with a key.","headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"429":{"$ref":"#/components/responses/RateLimited"},"503":{"description":"`SYS-1001`: Google is not set up on the platform yet (the Google card of the platform console).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["channels:write"]},{"oauth2":["channels:write"]}],"summary":"Sign in again to reconnect a Google Play channel","tags":["channels"]}},"/v1/channels/google-play/{channelId}/refresh-apps":{"post":{"description":"New apps become addresses (routed to the member who connected the channel, else the owner, until a space or member takes them), removed apps are removed with their address; reviews and tickets stay.","operationId":"refreshGooglePlayApps","parameters":[{"name":"channelId","required":true,"in":"path","description":"The Google Play channel id.","schema":{"type":"string","format":"uuid","description":"The Google Play channel id."}},{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}},{"name":"Idempotency-Key","in":"header","description":"A unique key for this operation (e.g. a UUID, 1 to 255 visible characters), kept 24 hours: repeating the request with the same key returns the first answer (`Idempotent-Replayed: true`) instead of doing it again. Errors: `API-8109` (400) a key that is not valid, `API-8108` (409, retryable) the first request with this key is still running, `API-8107` (422) the key was used for a different request; `API-8118` (409) the first request created something whose secret is shown only once, so its answer is not repeated. An answer with `shown_once` repeats its secret within 10 minutes, then `API-8118`.","required":false,"schema":{"type":"string","minLength":1,"maxLength":255}}],"responses":{"200":{"description":"The channel.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GooglePlayChannel"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `AUTH-1003`: your seat was deactivated (view only). `AUTH-1004`: all seats are inactive because the seat charge was not paid (view only). `AUTH-1002`: your role lacks the `channels.manage` permission. `API-8102`: the API key or app lacks the `channels:write` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in. `API-8148`: not available to test keys (API test mode).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"`GPL-3822`: no Google Play channel with this id in your organization.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"409":{"description":"`GPL-3824`: the channel is disconnected or needs a reconnection.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"description":"`API-8001`: some fields are missing or not valid. `details.fields` lists each invalid field with its own code (e.g. `API-8002` required, `API-8012` wrong format). `GPL-3820` the key file is not a service account JSON key; `GPL-3844` it is an OAuth client file; `GPL-3801`–`GPL-3808` Google refused the key, a permission, an API or the request (Google’s code and message in `provider`); `GPL-3831` the key reaches no app.","headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["channels:write"]},{"oauth2":["channels:write"]}],"summary":"Read the service account’s apps again","tags":["channels"]}},"/v1/channels/google-play/{channelId}/disconnect":{"post":{"description":"Revokes Rabt’s copy of the key and stops polling and replying; the channel, its reviews and their tickets stay (Rabt never deletes). Delete the key itself in Google Cloud.","operationId":"disconnectGooglePlayChannel","parameters":[{"name":"channelId","required":true,"in":"path","description":"The Google Play channel id.","schema":{"type":"string","format":"uuid","description":"The Google Play channel id."}},{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}},{"name":"Idempotency-Key","in":"header","description":"A unique key for this operation (e.g. a UUID, 1 to 255 visible characters), kept 24 hours: repeating the request with the same key returns the first answer (`Idempotent-Replayed: true`) instead of doing it again. Errors: `API-8109` (400) a key that is not valid, `API-8108` (409, retryable) the first request with this key is still running, `API-8107` (422) the key was used for a different request; `API-8118` (409) the first request created something whose secret is shown only once, so its answer is not repeated. An answer with `shown_once` repeats its secret within 10 minutes, then `API-8118`.","required":false,"schema":{"type":"string","minLength":1,"maxLength":255}}],"responses":{"200":{"description":"The channel.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GooglePlayChannel"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `AUTH-1003`: your seat was deactivated (view only). `AUTH-1004`: all seats are inactive because the seat charge was not paid (view only). `AUTH-1002`: your role lacks the `channels.manage` permission. `API-8102`: the API key or app lacks the `channels:write` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in. `API-8148`: not available to test keys (API test mode).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"`GPL-3822`: no Google Play channel with this id in your organization.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["channels:write"]},{"oauth2":["channels:write"]}],"summary":"Disconnect a Google Play channel","tags":["channels"]}},"/v1/channels/salla-reviews":{"get":{"description":"Every Salla reviews channel, with its status, store and how its polling goes; disconnected ones last.","operationId":"listSallaReviewsChannels","parameters":[{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"The channels.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SallaReviewsChannelList"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `AUTH-1002`: your role lacks the `channels.manage` permission. `API-8102`: the API key or app lacks the `channels:read` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["channels:read"]},{"oauth2":["channels:read"]}],"summary":"List the Salla reviews channels","tags":["channels"]},"post":{"description":"Switches the channel on for an active Salla integration: the store becomes one address (routed to the member who connected the channel, else the owner, until a space or member takes it) and its feedbacks with text become public tickets by polling and the `review.added` webhook. Enabling an integration that has a channel returns it.","operationId":"enableSallaReviewsChannel","parameters":[{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}},{"name":"Idempotency-Key","in":"header","description":"A unique key for this operation (e.g. a UUID, 1 to 255 visible characters), kept 24 hours: repeating the request with the same key returns the first answer (`Idempotent-Replayed: true`) instead of doing it again. Errors: `API-8109` (400) a key that is not valid, `API-8108` (409, retryable) the first request with this key is still running, `API-8107` (422) the key was used for a different request; `API-8118` (409) the first request created something whose secret is shown only once, so its answer is not repeated. An answer with `shown_once` repeats its secret within 10 minutes, then `API-8118`.","required":false,"schema":{"type":"string","minLength":1,"maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EnableSallaReviewsChannel"}}}},"responses":{"201":{"description":"The channel.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SallaReviewsChannel"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `AUTH-1003`: your seat was deactivated (view only). `AUTH-1004`: all seats are inactive because the seat charge was not paid (view only). `AUTH-1002`: your role lacks the `channels.manage` permission. `API-8102`: the API key or app lacks the `channels:write` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in. `API-8148`: not available to test keys (API test mode).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"`INT-7001`: no Salla integration with this id.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"409":{"description":"`INT-7002`: the Salla integration is not active.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["channels:write"]},{"oauth2":["channels:write"]}],"summary":"Enable the Salla reviews channel","tags":["channels"]}},"/v1/channels/salla-reviews/{channelId}":{"get":{"operationId":"getSallaReviewsChannel","parameters":[{"name":"channelId","required":true,"in":"path","description":"The Salla reviews channel id.","schema":{"type":"string","format":"uuid","description":"The Salla reviews channel id."}},{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"The channel.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SallaReviewsChannel"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `AUTH-1002`: your role lacks the `channels.manage` permission. `API-8102`: the API key or app lacks the `channels:read` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"`INT-7109`: no Salla reviews channel with this id in your organization.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["channels:read"]},{"oauth2":["channels:read"]}],"summary":"A Salla reviews channel","tags":["channels"]}},"/v1/channels/salla-reviews/{channelId}/disconnect":{"post":{"description":"Stops polling and replying; the Salla integration, the channel, its reviews and their tickets stay (Rabt never deletes).","operationId":"disconnectSallaReviewsChannel","parameters":[{"name":"channelId","required":true,"in":"path","description":"The Salla reviews channel id.","schema":{"type":"string","format":"uuid","description":"The Salla reviews channel id."}},{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}},{"name":"Idempotency-Key","in":"header","description":"A unique key for this operation (e.g. a UUID, 1 to 255 visible characters), kept 24 hours: repeating the request with the same key returns the first answer (`Idempotent-Replayed: true`) instead of doing it again. Errors: `API-8109` (400) a key that is not valid, `API-8108` (409, retryable) the first request with this key is still running, `API-8107` (422) the key was used for a different request; `API-8118` (409) the first request created something whose secret is shown only once, so its answer is not repeated. An answer with `shown_once` repeats its secret within 10 minutes, then `API-8118`.","required":false,"schema":{"type":"string","minLength":1,"maxLength":255}}],"responses":{"200":{"description":"The channel.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SallaReviewsChannel"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `AUTH-1003`: your seat was deactivated (view only). `AUTH-1004`: all seats are inactive because the seat charge was not paid (view only). `AUTH-1002`: your role lacks the `channels.manage` permission. `API-8102`: the API key or app lacks the `channels:write` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in. `API-8148`: not available to test keys (API test mode).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"`INT-7109`: no Salla reviews channel with this id in your organization.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["channels:write"]},{"oauth2":["channels:write"]}],"summary":"Disconnect a Salla reviews channel","tags":["channels"]}},"/v1/channels/whatsapp-web":{"get":{"description":"Every WhatsApp (QR) number, linked or being linked, with its status (disconnected ones: `getWhatsappWebChannel`).","operationId":"listWhatsappWebChannels","parameters":[{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"The channels.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WhatsappWebChannelList"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `AUTH-1002`: your role lacks the `channels.manage` permission. `API-8102`: the API key or app lacks the `channels:read` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["channels:read"]},{"oauth2":["channels:read"]}],"summary":"List the WhatsApp (QR) numbers","tags":["channels"]},"post":{"description":"Creates the channel (`pending`) and starts the link: with `pairing`, type the returned `pairing_code` on the phone (WhatsApp › Linked devices › Link a device › Link with phone number instead); read `getWhatsappWebLink` until `linked`. The code expires in about 3 minutes (`WAW-2502`: start again). A channel that never linked is reused. Unofficial: the organization alone answers for its use of the number. At most 5 link attempts an hour per organization, one waiting at a time, and 3 pairing codes an hour per number (`WAW-2519`, 429).","operationId":"linkWhatsappWebNumber","parameters":[{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}},{"name":"Idempotency-Key","in":"header","description":"A unique key for this operation (e.g. a UUID, 1 to 255 visible characters), kept 24 hours: repeating the request with the same key returns the first answer (`Idempotent-Replayed: true`) instead of doing it again. Errors: `API-8109` (400) a key that is not valid, `API-8108` (409, retryable) the first request with this key is still running, `API-8107` (422) the key was used for a different request; `API-8118` (409) the first request created something whose secret is shown only once, so its answer is not repeated. An answer with `shown_once` repeats its secret within 10 minutes, then `API-8118`.","required":false,"schema":{"type":"string","minLength":1,"maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LinkWhatsappWebNumber"}}}},"responses":{"201":{"description":"The link.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WhatsappWebLink"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `AUTH-1003`: your seat was deactivated (view only). `AUTH-1004`: all seats are inactive because the seat charge was not paid (view only). `AUTH-1002`: your role lacks the `channels.manage` permission. `API-8102`: the API key or app lacks the `channels:write` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in. `API-8148`: not available to test keys (API test mode).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"409":{"description":"`WAW-2512`: the number is linked in another channel.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"description":"`API-8001`: some fields are missing or not valid. `details.fields` lists each invalid field with its own code (e.g. `API-8002` required, `API-8012` wrong format). `WAW-2507`: the number is not a valid phone number.","headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"429":{"$ref":"#/components/responses/RateLimited"},"503":{"description":"`WAW-2506`: the WhatsApp (QR) gateway is not set up on the platform. `WAW-2520`: the WhatsApp (QR) service is full (try later).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["channels:write"]},{"oauth2":["channels:write"]}],"summary":"Link a WhatsApp (QR) number","tags":["channels"]}},"/v1/channels/whatsapp-web/{channelId}":{"get":{"operationId":"getWhatsappWebChannel","parameters":[{"name":"channelId","required":true,"in":"path","description":"The WhatsApp (QR) channel id.","schema":{"type":"string","format":"uuid","description":"The WhatsApp (QR) channel id."}},{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"The channel.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WhatsappWebChannel"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `AUTH-1002`: your role lacks the `channels.manage` permission. `API-8102`: the API key or app lacks the `channels:read` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"`WAW-2516`: no WhatsApp (QR) channel with this id in your organization.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["channels:read"]},{"oauth2":["channels:read"]}],"summary":"A WhatsApp (QR) number","tags":["channels"]},"patch":{"operationId":"renameWhatsappWebChannel","parameters":[{"name":"channelId","required":true,"in":"path","description":"The WhatsApp (QR) channel id.","schema":{"type":"string","format":"uuid","description":"The WhatsApp (QR) channel id."}},{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}},{"name":"Idempotency-Key","in":"header","description":"A unique key for this operation (e.g. a UUID, 1 to 255 visible characters), kept 24 hours: repeating the request with the same key returns the first answer (`Idempotent-Replayed: true`) instead of doing it again. Errors: `API-8109` (400) a key that is not valid, `API-8108` (409, retryable) the first request with this key is still running, `API-8107` (422) the key was used for a different request; `API-8118` (409) the first request created something whose secret is shown only once, so its answer is not repeated. An answer with `shown_once` repeats its secret within 10 minutes, then `API-8118`.","required":false,"schema":{"type":"string","minLength":1,"maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RenameWhatsappWebChannel"}}}},"responses":{"200":{"description":"The channel.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WhatsappWebChannel"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `AUTH-1003`: your seat was deactivated (view only). `AUTH-1004`: all seats are inactive because the seat charge was not paid (view only). `AUTH-1002`: your role lacks the `channels.manage` permission. `API-8102`: the API key or app lacks the `channels:write` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in. `API-8148`: not available to test keys (API test mode).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"`WAW-2516`: no WhatsApp (QR) channel with this id in your organization.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["channels:write"]},{"oauth2":["channels:write"]}],"summary":"Rename a WhatsApp (QR) number","tags":["channels"]}},"/v1/channels/whatsapp-web/{channelId}/link":{"get":{"description":"`waiting` with the code (a QR code is renewed every 20 seconds), `linked` once the phone confirmed, `failed` with its code.","operationId":"getWhatsappWebLink","parameters":[{"name":"channelId","required":true,"in":"path","description":"The WhatsApp (QR) channel id.","schema":{"type":"string","format":"uuid","description":"The WhatsApp (QR) channel id."}},{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"The link.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WhatsappWebLink"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `AUTH-1002`: your role lacks the `channels.manage` permission. `API-8102`: the API key or app lacks the `channels:read` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"`WAW-2516`: no WhatsApp (QR) channel with this id in your organization.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"503":{"description":"`WAW-2506`: the WhatsApp (QR) gateway is not set up on the platform.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["channels:read"]},{"oauth2":["channels:read"]}],"summary":"The state of a number’s link","tags":["channels"]},"post":{"description":"After WhatsApp ended the session (`needs_reauth`): starts a new link of the same channel, so its contacts, tickets and history continue. A linked, connected channel is refused (`WAW-2521`). A disconnected channel stays disconnected (`WAW-2515`): link the number as a new channel, which continues its phone threads. The number must stay the same (`WAW-2522` once the phone confirms another). At most 5 link attempts an hour per organization, one waiting at a time, and 3 pairing codes an hour per number (`WAW-2519`, 429).","operationId":"relinkWhatsappWebNumber","parameters":[{"name":"channelId","required":true,"in":"path","description":"The WhatsApp (QR) channel id.","schema":{"type":"string","format":"uuid","description":"The WhatsApp (QR) channel id."}},{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}},{"name":"Idempotency-Key","in":"header","description":"A unique key for this operation (e.g. a UUID, 1 to 255 visible characters), kept 24 hours: repeating the request with the same key returns the first answer (`Idempotent-Replayed: true`) instead of doing it again. Errors: `API-8109` (400) a key that is not valid, `API-8108` (409, retryable) the first request with this key is still running, `API-8107` (422) the key was used for a different request; `API-8118` (409) the first request created something whose secret is shown only once, so its answer is not repeated. An answer with `shown_once` repeats its secret within 10 minutes, then `API-8118`.","required":false,"schema":{"type":"string","minLength":1,"maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LinkWhatsappWebNumber"}}}},"responses":{"201":{"description":"The link.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WhatsappWebLink"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `AUTH-1003`: your seat was deactivated (view only). `AUTH-1004`: all seats are inactive because the seat charge was not paid (view only). `AUTH-1002`: your role lacks the `channels.manage` permission. `API-8102`: the API key or app lacks the `channels:write` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in. `API-8148`: not available to test keys (API test mode).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"`WAW-2516`: no WhatsApp (QR) channel with this id in your organization.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"409":{"description":"`WAW-2521`: the number is linked and connected. `WAW-2512`: the number is linked in another channel.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"description":"`API-8001`: some fields are missing or not valid. `details.fields` lists each invalid field with its own code (e.g. `API-8002` required, `API-8012` wrong format). `WAW-2507`: the number is not a valid phone number.","headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"429":{"$ref":"#/components/responses/RateLimited"},"503":{"description":"`WAW-2506`: the WhatsApp (QR) gateway is not set up on the platform. `WAW-2520`: the WhatsApp (QR) service is full (try later).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["channels:write"]},{"oauth2":["channels:write"]}],"summary":"Link a number again","tags":["channels"]}},"/v1/channels/whatsapp-web/{channelId}/disconnect":{"post":{"description":"Logs the device out of WhatsApp and stops receiving and sending; the channel, contacts, tickets and history stay (Rabt never deletes) and a relink continues them.","operationId":"disconnectWhatsappWebChannel","parameters":[{"name":"channelId","required":true,"in":"path","description":"The WhatsApp (QR) channel id.","schema":{"type":"string","format":"uuid","description":"The WhatsApp (QR) channel id."}},{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}},{"name":"Idempotency-Key","in":"header","description":"A unique key for this operation (e.g. a UUID, 1 to 255 visible characters), kept 24 hours: repeating the request with the same key returns the first answer (`Idempotent-Replayed: true`) instead of doing it again. Errors: `API-8109` (400) a key that is not valid, `API-8108` (409, retryable) the first request with this key is still running, `API-8107` (422) the key was used for a different request; `API-8118` (409) the first request created something whose secret is shown only once, so its answer is not repeated. An answer with `shown_once` repeats its secret within 10 minutes, then `API-8118`.","required":false,"schema":{"type":"string","minLength":1,"maxLength":255}}],"responses":{"200":{"description":"The channel.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WhatsappWebChannel"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `AUTH-1003`: your seat was deactivated (view only). `AUTH-1004`: all seats are inactive because the seat charge was not paid (view only). `AUTH-1002`: your role lacks the `channels.manage` permission. `API-8102`: the API key or app lacks the `channels:write` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in. `API-8148`: not available to test keys (API test mode).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"`WAW-2516`: no WhatsApp (QR) channel with this id in your organization.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["channels:write"]},{"oauth2":["channels:write"]}],"summary":"Disconnect a WhatsApp (QR) number","tags":["channels"]}},"/v1/channels/whatsapp-web/{channelId}/status":{"post":{"description":"Posted to the customers who have a ticket on this number (up to 10,000); WhatsApp shows it to those who saved the number, for 24 hours.","operationId":"postWhatsappWebStatus","parameters":[{"name":"channelId","required":true,"in":"path","description":"The WhatsApp (QR) channel id.","schema":{"type":"string","format":"uuid","description":"The WhatsApp (QR) channel id."}},{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}},{"name":"Idempotency-Key","in":"header","description":"A unique key for this operation (e.g. a UUID, 1 to 255 visible characters), kept 24 hours: repeating the request with the same key returns the first answer (`Idempotent-Replayed: true`) instead of doing it again. Errors: `API-8109` (400) a key that is not valid, `API-8108` (409, retryable) the first request with this key is still running, `API-8107` (422) the key was used for a different request; `API-8118` (409) the first request created something whose secret is shown only once, so its answer is not repeated. An answer with `shown_once` repeats its secret within 10 minutes, then `API-8118`.","required":false,"schema":{"type":"string","minLength":1,"maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PostWhatsappWebStatus"}}}},"responses":{"201":{"description":"The status.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WhatsappWebStatusPosted"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `AUTH-1003`: your seat was deactivated (view only). `AUTH-1004`: all seats are inactive because the seat charge was not paid (view only). `AUTH-1002`: your role lacks the `channels.manage` permission. `API-8102`: the API key or app lacks the `channels:write` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in. `API-8148`: not available to test keys (API test mode).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"`WAW-2516`: no WhatsApp (QR) channel with this id in your organization.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"409":{"description":"`WAW-2515`: the number is not linked (link it again).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"503":{"description":"`WAW-2506`: the WhatsApp (QR) gateway is not set up on the platform. `WAW-2505`: the connection to WhatsApp was lost (retry). `WAW-2503`/`WAW-2504`/`WAW-2513`: WhatsApp ended the session.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["channels:write"]},{"oauth2":["channels:write"]}],"summary":"Post a text status from the number","tags":["channels"]}},"/v1/channels/whatsapp-web/tickets/{ticketId}/messages":{"post":{"description":"Queued like any reply on the ticket’s linked number, at any time (no 24-hour window, no template) and free. Text, files and voice notes go through `sendTicketMessage`.","operationId":"sendWhatsappWebMessage","parameters":[{"name":"ticketId","required":true,"in":"path","description":"The ticket id.","schema":{"type":"string","format":"uuid","description":"The ticket id."}},{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}},{"name":"Idempotency-Key","in":"header","description":"A unique key for this operation (e.g. a UUID, 1 to 255 visible characters), kept 24 hours: repeating the request with the same key returns the first answer (`Idempotent-Replayed: true`) instead of doing it again. Errors: `API-8109` (400) a key that is not valid, `API-8108` (409, retryable) the first request with this key is still running, `API-8107` (422) the key was used for a different request; `API-8118` (409) the first request created something whose secret is shown only once, so its answer is not repeated. An answer with `shown_once` repeats its secret within 10 minutes, then `API-8118`.","required":false,"schema":{"type":"string","minLength":1,"maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SendWhatsappWebMessage"}}}},"responses":{"201":{"description":"The queued message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WhatsappWebSentMessage"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `AUTH-1003`: your seat was deactivated (view only). `AUTH-1004`: all seats are inactive because the seat charge was not paid (view only). `AUTH-1002`: your role lacks the `tickets.reply` permission. `API-8102`: the API key or app lacks the `tickets:write` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"`TKT-6101`: no such ticket you can see.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"409":{"description":"`WAW-2515`: the number is not linked (link it again).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["tickets:write"]},{"oauth2":["tickets:write"]}],"summary":"Send a location, contact cards or a poll","tags":["channels"]}},"/v1/channels/whatsapp-web/tickets/{ticketId}/messages/{messageId}":{"patch":{"description":"Changes the text of the organization’s own sent message on WhatsApp (WhatsApp allows it for 15 minutes); the earlier text stays in the message’s history.","operationId":"editWhatsappWebMessage","parameters":[{"name":"ticketId","required":true,"in":"path","description":"The ticket id.","schema":{"type":"string","format":"uuid","description":"The ticket id."}},{"name":"messageId","required":true,"in":"path","description":"The message id.","schema":{"type":"string","format":"uuid","description":"The message id."}},{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}},{"name":"Idempotency-Key","in":"header","description":"A unique key for this operation (e.g. a UUID, 1 to 255 visible characters), kept 24 hours: repeating the request with the same key returns the first answer (`Idempotent-Replayed: true`) instead of doing it again. Errors: `API-8109` (400) a key that is not valid, `API-8108` (409, retryable) the first request with this key is still running, `API-8107` (422) the key was used for a different request; `API-8118` (409) the first request created something whose secret is shown only once, so its answer is not repeated. An answer with `shown_once` repeats its secret within 10 minutes, then `API-8118`.","required":false,"schema":{"type":"string","minLength":1,"maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EditWhatsappWebMessage"}}}},"responses":{"200":{"description":"The message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WhatsappWebMessageDone"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `AUTH-1003`: your seat was deactivated (view only). `AUTH-1004`: all seats are inactive because the seat charge was not paid (view only). `AUTH-1002`: your role lacks the `tickets.reply` permission. `API-8102`: the API key or app lacks the `tickets:write` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"`TKT-6101`: no such ticket. `TKT-6105`: no such message.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"409":{"description":"`WAW-2511`: the message is not sent yet. `WAW-2515`: the number is not linked (link it again).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"503":{"description":"`WAW-2505`: the connection to WhatsApp was lost (retry). `WAW-2503`/`WAW-2504`/`WAW-2513`: WhatsApp ended the session.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["tickets:write"]},{"oauth2":["tickets:write"]}],"summary":"Edit a sent text message","tags":["channels"]}},"/v1/channels/whatsapp-web/tickets/{ticketId}/messages/{messageId}/delete":{"post":{"description":"Deletes the organization’s own sent message on WhatsApp for everyone; Rabt keeps it, marked deleted (never removed).","operationId":"deleteWhatsappWebMessage","parameters":[{"name":"ticketId","required":true,"in":"path","description":"The ticket id.","schema":{"type":"string","format":"uuid","description":"The ticket id."}},{"name":"messageId","required":true,"in":"path","description":"The message id.","schema":{"type":"string","format":"uuid","description":"The message id."}},{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}},{"name":"Idempotency-Key","in":"header","description":"A unique key for this operation (e.g. a UUID, 1 to 255 visible characters), kept 24 hours: repeating the request with the same key returns the first answer (`Idempotent-Replayed: true`) instead of doing it again. Errors: `API-8109` (400) a key that is not valid, `API-8108` (409, retryable) the first request with this key is still running, `API-8107` (422) the key was used for a different request; `API-8118` (409) the first request created something whose secret is shown only once, so its answer is not repeated. An answer with `shown_once` repeats its secret within 10 minutes, then `API-8118`.","required":false,"schema":{"type":"string","minLength":1,"maxLength":255}}],"responses":{"200":{"description":"The message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WhatsappWebMessageDone"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `AUTH-1003`: your seat was deactivated (view only). `AUTH-1004`: all seats are inactive because the seat charge was not paid (view only). `AUTH-1002`: your role lacks the `tickets.reply` permission. `API-8102`: the API key or app lacks the `tickets:write` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"`TKT-6101`: no such ticket. `TKT-6105`: no such message.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"409":{"description":"`WAW-2511`: the message is not sent yet. `WAW-2515`: the number is not linked (link it again).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"503":{"description":"`WAW-2505`: the connection to WhatsApp was lost (retry). `WAW-2503`/`WAW-2504`/`WAW-2513`: WhatsApp ended the session.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["tickets:write"]},{"oauth2":["tickets:write"]}],"summary":"Delete a sent message for everyone","tags":["channels"]}},"/v1/channels/whatsapp-web/tickets/{ticketId}/typing":{"post":{"description":"WhatsApp shows it for about 25 seconds or until the reply. Nothing is stored.","operationId":"sendWhatsappWebTyping","parameters":[{"name":"ticketId","required":true,"in":"path","description":"The ticket id.","schema":{"type":"string","format":"uuid","description":"The ticket id."}},{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}}],"responses":{"204":{"description":"Shown.","headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `AUTH-1002`: your role lacks the `tickets.reply` permission. `API-8102`: the API key or app lacks the `tickets:write` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"`TKT-6101`: no such ticket you can see.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"409":{"description":"`WAW-2515`: the number is not linked (link it again).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["tickets:write"]},{"oauth2":["tickets:write"]}],"summary":"Show the customer that you are typing","tags":["channels"]}},"/v1/reviews":{"get":{"description":"App Store, Google Play, Google Maps, Salla and Zid reviews and Zid product questions in one shape (stars, text, author, app or location, ticket, public reply and its state), newest written first, of the tickets you may see. Follow `next_cursor` until null. Reply with `POST /v1/reviews/{review_id}/reply`. Comments on posts and videos (YouTube, Facebook, Instagram, X, TikTok) are tickets: `GET /v1/tickets?channel_type=`.","operationId":"listReviews","parameters":[{"name":"channel_type","required":false,"in":"query","description":"Only this review channel type.","schema":{"description":"Only this review channel type.","type":"string","enum":["app_store","google_play","google_business","salla_reviews","zid_questions","zid_reviews"]}},{"name":"channel_id","required":false,"in":"query","description":"Only this channel.","schema":{"description":"Only this channel.","type":"string","format":"uuid"}},{"name":"min_rating","required":false,"in":"query","description":"At least these stars (a question without stars never matches).","schema":{"description":"At least these stars (a question without stars never matches).","type":"integer","minimum":1,"maximum":5}},{"name":"max_rating","required":false,"in":"query","description":"At most these stars.","schema":{"description":"At most these stars.","type":"integer","minimum":1,"maximum":5}},{"name":"from","required":false,"in":"query","description":"Written at or after (UTC).","schema":{"description":"Written at or after (UTC).","type":"string","format":"date-time"}},{"name":"to","required":false,"in":"query","description":"Written before (UTC).","schema":{"description":"Written before (UTC).","type":"string","format":"date-time"}},{"name":"needs_reply","required":false,"in":"query","description":"true: no reply on the store now (none, deleted or rejected), still on the store, and the store takes a reply from Rabt; false: a reply pending or published.","schema":{"description":"true: no reply on the store now (none, deleted or rejected), still on the store, and the store takes a reply from Rabt; false: a reply pending or published.","type":"boolean"}},{"name":"cursor","required":false,"in":"query","description":"The `next_cursor` of the previous page.","schema":{"description":"The `next_cursor` of the previous page.","type":"string","maxLength":200,"pattern":"^[A-Za-z0-9_-]+$"}},{"name":"limit","required":false,"in":"query","description":"Records per page (1 to 500, default 25).","schema":{"default":25,"description":"Records per page (1 to 500, default 25).","type":"integer","minimum":1,"maximum":500}},{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"A page of reviews.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReviewPage"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `API-8102`: the API key or app lacks the `tickets:read` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["tickets:read"]},{"oauth2":["tickets:read"]}],"summary":"List the reviews of every review channel","tags":["reviews"]}},"/v1/reviews/{reviewId}/reply":{"post":{"description":"The review’s public reply on its store (it replaces the published one), sent as the reply of the review’s ticket: the same rules, states and `message.status_changed` as `POST /v1/tickets/{ticket_id}/messages`. Read its state on the review (`reply.state`).","operationId":"replyToReview","parameters":[{"name":"reviewId","required":true,"in":"path","description":"The review id (Rabt’s).","schema":{"type":"string","format":"uuid","description":"The review id (Rabt’s)."}},{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}},{"name":"Idempotency-Key","in":"header","description":"A unique key for this operation (e.g. a UUID, 1 to 255 visible characters), kept 24 hours: repeating the request with the same key returns the first answer (`Idempotent-Replayed: true`) instead of doing it again. Errors: `API-8109` (400) a key that is not valid, `API-8108` (409, retryable) the first request with this key is still running, `API-8107` (422) the key was used for a different request; `API-8118` (409) the first request created something whose secret is shown only once, so its answer is not repeated. An answer with `shown_once` repeats its secret within 10 minutes, then `API-8118`.","required":false,"schema":{"type":"string","minLength":1,"maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReplyToReview"}}}},"responses":{"201":{"description":"The reply message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SendResult"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `AUTH-1003`: your seat was deactivated (view only). `AUTH-1004`: all seats are inactive because the seat charge was not paid (view only). `AUTH-1002`: your role lacks the `tickets.reply` permission. `API-8102`: the API key or app lacks the `tickets:write` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"`APS-3725`: no review with this id, or the ticket holds no review (or you may not see it).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"409":{"description":"`INT-7212`: Zid product reviews take no reply from Rabt (reply in Zid). `TKT-6102`: the ticket is closed.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"410":{"description":"The store no longer has the review: `APS-3734`, `GPL-3837`, `GBP-3838`, `INT-7108`, `INT-7208`.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["tickets:write"]},{"oauth2":["tickets:write"]}],"summary":"Reply publicly to a review","tags":["reviews"]},"delete":{"description":"Deletes the review’s public reply on the store (the App Store takes some time to remove it; on Google Maps a reply already gone counts as deleted). The reply stays in the ticket’s timeline and on the review as `deleted`, and the deletion is audited.","operationId":"deleteReviewReply","parameters":[{"name":"reviewId","required":true,"in":"path","description":"The review id (Rabt’s).","schema":{"type":"string","format":"uuid","description":"The review id (Rabt’s)."}},{"name":"Idempotency-Key","in":"header","description":"A unique key for this operation (e.g. a UUID, 1 to 255 visible characters), kept 24 hours: repeating the request with the same key returns the first answer (`Idempotent-Replayed: true`) instead of doing it again. Errors: `API-8109` (400) a key that is not valid, `API-8108` (409, retryable) the first request with this key is still running, `API-8107` (422) the key was used for a different request; `API-8118` (409) the first request created something whose secret is shown only once, so its answer is not repeated. An answer with `shown_once` repeats its secret within 10 minutes, then `API-8118`.","required":false,"schema":{"type":"string","minLength":1,"maxLength":255}},{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"The review.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Review"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`GBP-3803`: Google refused the channel’s access (it is now `needs_reauth`).\n\n`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `AUTH-1003`: your seat was deactivated (view only). `AUTH-1004`: all seats are inactive because the seat charge was not paid (view only). `AUTH-1002`: your role lacks the `tickets.reply` permission. `API-8102`: the API key or app lacks the `tickets:write` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"`APS-3725`: no review with this id, or the ticket holds no review (or you may not see it).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"409":{"description":"`APS-3726` (`GBP-3832` on Google Maps): the review has no reply on the store; `APS-3724` (`GBP-3823`): the channel is not active; `INT-7212`: a Zid product review’s reply is managed in Zid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["tickets:write"]},{"oauth2":["tickets:write"]}],"summary":"Delete the public reply on the store","tags":["reviews"]}},"/v1/reviews/{reviewId}":{"get":{"description":"The review as the customer wrote it (stars, title, text, public name, country, app version when given), its app or location, its ticket, and its public reply with the reply’s state on the store.","operationId":"getReview","parameters":[{"name":"reviewId","required":true,"in":"path","description":"The review id (Rabt’s).","schema":{"type":"string","format":"uuid","description":"The review id (Rabt’s)."}},{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"The review.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Review"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `API-8102`: the API key or app lacks the `tickets:read` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"`APS-3725`: no review with this id, or the ticket holds no review (or you may not see it).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["tickets:read"]},{"oauth2":["tickets:read"]}],"summary":"A store review","tags":["reviews"]}},"/v1/reviews/{reviewId}/versions":{"get":{"description":"What the customer’s review said before each change on the store, newest first: stars, title, text, public name, the store’s time, when Rabt read the newer version, and the ticket message that carried it. The review keeps the current version; `review.updated` names the version each change kept.","operationId":"listReviewVersions","parameters":[{"name":"reviewId","required":true,"in":"path","description":"The review id (Rabt’s).","schema":{"type":"string","format":"uuid","description":"The review id (Rabt’s)."}},{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"The earlier versions.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReviewVersionList"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `API-8102`: the API key or app lacks the `tickets:read` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"`APS-3725`: no review with this id, or the ticket holds no review (or you may not see it).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["tickets:read"]},{"oauth2":["tickets:read"]}],"summary":"The earlier versions of a store review","tags":["reviews"]}},"/v1/tickets/{ticketId}/review":{"get":{"description":"For a ticket of a review channel (App Store, Google Play, Google Maps, a Zid store’s questions or reviews): the review and its reply.","operationId":"getTicketReview","parameters":[{"name":"ticketId","required":true,"in":"path","description":"The ticket id.","schema":{"type":"string","format":"uuid","description":"The ticket id."}},{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"The review.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Review"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `API-8102`: the API key or app lacks the `tickets:read` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"`APS-3725`: no review with this id, or the ticket holds no review (or you may not see it). `TKT-6101`: no such ticket.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["tickets:read"]},{"oauth2":["tickets:read"]}],"summary":"The review a ticket holds","tags":["reviews"]}},"/v1/channels/google-business":{"get":{"description":"Every Google account connected for Google Maps reviews, with its status, business accounts (and their real-time notifications), chosen locations (each a channel address with its last reading) and reply rules; disconnected ones last. Tokens are never returned.","operationId":"listGoogleBusinessChannels","parameters":[{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"The channels.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GoogleBusinessChannelList"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `AUTH-1002`: your role lacks the `channels.manage` permission. `API-8102`: the API key or app lacks the `channels:read` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["channels:read"]},{"oauth2":["channels:read"]}],"summary":"List the Google Maps channels","tags":["channels"]}},"/v1/channels/google-business/authorizations":{"post":{"description":"Returns the Google sign-in URL (authorization code with PKCE and `state`, offline access, the `business.manage` permission). The member signs in there; Google sends them back to Rabt’s callback page with `state` and `code`, which finishes with `completeGoogleBusinessConnection` within ten minutes.","operationId":"startGoogleBusinessConnection","parameters":[{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}},{"name":"Idempotency-Key","in":"header","description":"A unique key for this operation (e.g. a UUID, 1 to 255 visible characters), kept 24 hours: repeating the request with the same key returns the first answer (`Idempotent-Replayed: true`) instead of doing it again. Errors: `API-8109` (400) a key that is not valid, `API-8108` (409, retryable) the first request with this key is still running, `API-8107` (422) the key was used for a different request; `API-8118` (409) the first request created something whose secret is shown only once, so its answer is not repeated. An answer with `shown_once` repeats its secret within 10 minutes, then `API-8118`.","required":false,"schema":{"type":"string","minLength":1,"maxLength":255}}],"responses":{"201":{"description":"The sign-in.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GoogleBusinessAuthorization"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `AUTH-1003`: your seat was deactivated (view only). `AUTH-1004`: all seats are inactive because the seat charge was not paid (view only). `AUTH-1002`: your role lacks the `channels.manage` permission. `API-8102`: the API key or app lacks the `channels:write` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in. `API-8148`: not available to test keys (API test mode).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"description":"`API-8001`: some fields are missing or not valid. `details.fields` lists each invalid field with its own code (e.g. `API-8002` required, `API-8012` wrong format). `SPC-6223`: the channel is held back or not set up yet: «coming soon», nothing to connect.","headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"429":{"$ref":"#/components/responses/RateLimited"},"503":{"description":"`SYS-1001`: Google is not set up on this Rabt.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["channels:write"]},{"oauth2":["channels:write"]}],"summary":"Start connecting a Google account for Google Maps reviews","tags":["channels"]}},"/v1/channels/google-business/authorizations/complete":{"post":{"description":"With what Google sent back: the code is exchanged, the `business.manage` permission checked, the business accounts read, and the channel stored `active` (or reconnected). Then choose its locations with `selectGoogleBusinessLocations`. Each sign-in is used once, in the organization that started it.","operationId":"completeGoogleBusinessConnection","parameters":[{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}},{"name":"Idempotency-Key","in":"header","description":"A unique key for this operation (e.g. a UUID, 1 to 255 visible characters), kept 24 hours: repeating the request with the same key returns the first answer (`Idempotent-Replayed: true`) instead of doing it again. Errors: `API-8109` (400) a key that is not valid, `API-8108` (409, retryable) the first request with this key is still running, `API-8107` (422) the key was used for a different request; `API-8118` (409) the first request created something whose secret is shown only once, so its answer is not repeated. An answer with `shown_once` repeats its secret within 10 minutes, then `API-8118`.","required":false,"schema":{"type":"string","minLength":1,"maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CompleteGoogleBusinessConnection"}}}},"responses":{"200":{"description":"The channel.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GoogleBusinessChannel"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1097`: the sign-in was started in the desktop app by another member or on another device.\n\n`AUTH-1040`: you are not a member of the organization named. `AUTH-1003`: your seat was deactivated (view only). `AUTH-1004`: all seats are inactive because the seat charge was not paid (view only). `AUTH-1002`: your role lacks the `channels.manage` permission. `API-8102`: the API key or app lacks the `channels:write` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in. `API-8148`: not available to test keys (API test mode).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"409":{"description":"`GBP-3822`: a reconnection signed in with another Google account.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"410":{"description":"`GBP-3820`: the sign-in expired, was used, or belongs to another organization.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"description":"`API-8001`: some fields are missing or not valid. `details.fields` lists each invalid field with its own code (e.g. `API-8002` required, `API-8012` wrong format). `GBP-3800`: the member declined at Google. `GBP-3801`: the business permission was not granted.","headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"429":{"$ref":"#/components/responses/RateLimited"},"503":{"description":"`SYS-1001`: Google is not set up on this Rabt. `GBP-3805`: Google has not approved or enabled Rabt’s access to the Business Profile APIs yet.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["channels:write"]},{"oauth2":["channels:write"]}],"summary":"Finish connecting a Google account for Google Maps reviews","tags":["channels"]}},"/v1/channels/google-business/{channelId}":{"get":{"operationId":"getGoogleBusinessChannel","parameters":[{"name":"channelId","required":true,"in":"path","description":"The Google Maps channel id.","schema":{"type":"string","format":"uuid","description":"The Google Maps channel id."}},{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"The channel.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GoogleBusinessChannel"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `AUTH-1002`: your role lacks the `channels.manage` permission. `API-8102`: the API key or app lacks the `channels:read` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"`GBP-3821`: no Google Maps channel with this id in your organization.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["channels:read"]},{"oauth2":["channels:read"]}],"summary":"A Google Maps channel","tags":["channels"]},"patch":{"operationId":"updateGoogleBusinessChannel","parameters":[{"name":"channelId","required":true,"in":"path","description":"The Google Maps channel id.","schema":{"type":"string","format":"uuid","description":"The Google Maps channel id."}},{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}},{"name":"Idempotency-Key","in":"header","description":"A unique key for this operation (e.g. a UUID, 1 to 255 visible characters), kept 24 hours: repeating the request with the same key returns the first answer (`Idempotent-Replayed: true`) instead of doing it again. Errors: `API-8109` (400) a key that is not valid, `API-8108` (409, retryable) the first request with this key is still running, `API-8107` (422) the key was used for a different request; `API-8118` (409) the first request created something whose secret is shown only once, so its answer is not repeated. An answer with `shown_once` repeats its secret within 10 minutes, then `API-8118`.","required":false,"schema":{"type":"string","minLength":1,"maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateGoogleBusinessChannel"}}}},"responses":{"200":{"description":"The channel.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GoogleBusinessChannel"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `AUTH-1003`: your seat was deactivated (view only). `AUTH-1004`: all seats are inactive because the seat charge was not paid (view only). `AUTH-1002`: your role lacks the `channels.manage` permission. `API-8102`: the API key or app lacks the `channels:write` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in. `API-8148`: not available to test keys (API test mode).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"`GBP-3821`: no Google Maps channel with this id in your organization.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"409":{"description":"`GBP-3823`: the channel is disconnected or waits for a reconnection (`needs_reauth`).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["channels:write"]},{"oauth2":["channels:write"]}],"summary":"Rename a Google Maps channel","tags":["channels"]}},"/v1/channels/google-business/{channelId}/available-locations":{"get":{"description":"Reads the business accounts and their locations from Google (the location picker), each marked chosen on this channel, or carried by another channel of the organization.","operationId":"listGoogleBusinessAvailableLocations","parameters":[{"name":"channelId","required":true,"in":"path","description":"The Google Maps channel id.","schema":{"type":"string","format":"uuid","description":"The Google Maps channel id."}},{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"The accounts and locations.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GoogleBusinessAvailableLocations"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`GBP-3803`: Google refused the saved access (the channel is now `needs_reauth`). `GBP-3806`: the Google account no longer manages the account or location.\n\n`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `AUTH-1002`: your role lacks the `channels.manage` permission. `API-8102`: the API key or app lacks the `channels:read` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"`GBP-3821`: no Google Maps channel with this id in your organization.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"409":{"description":"`GBP-3823`: the channel is disconnected or waits for a reconnection (`needs_reauth`).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["channels:read"]},{"oauth2":["channels:read"]}],"summary":"The business locations the Google account manages","tags":["channels"]}},"/v1/channels/google-business/{channelId}/locations":{"put":{"description":"The chosen locations become the channel’s addresses (each routed to the member who connected the channel, else the owner, until a space or member takes it, docs/17); locations left out are removed (their reviews and tickets stay). Each business account with a chosen location publishes its review notifications to Rabt, and the new locations’ reviews of the last 30 days are read.","operationId":"selectGoogleBusinessLocations","parameters":[{"name":"channelId","required":true,"in":"path","description":"The Google Maps channel id.","schema":{"type":"string","format":"uuid","description":"The Google Maps channel id."}},{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}},{"name":"Idempotency-Key","in":"header","description":"A unique key for this operation (e.g. a UUID, 1 to 255 visible characters), kept 24 hours: repeating the request with the same key returns the first answer (`Idempotent-Replayed: true`) instead of doing it again. Errors: `API-8109` (400) a key that is not valid, `API-8108` (409, retryable) the first request with this key is still running, `API-8107` (422) the key was used for a different request; `API-8118` (409) the first request created something whose secret is shown only once, so its answer is not repeated. An answer with `shown_once` repeats its secret within 10 minutes, then `API-8118`.","required":false,"schema":{"type":"string","minLength":1,"maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SelectGoogleBusinessLocations"}}}},"responses":{"200":{"description":"The channel.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GoogleBusinessChannel"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`GBP-3803`: Google refused the saved access (the channel is now `needs_reauth`). `GBP-3806`: the Google account no longer manages the account or location.\n\n`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `AUTH-1003`: your seat was deactivated (view only). `AUTH-1004`: all seats are inactive because the seat charge was not paid (view only). `AUTH-1002`: your role lacks the `channels.manage` permission. `API-8102`: the API key or app lacks the `channels:write` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in. `API-8148`: not available to test keys (API test mode).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"`GBP-3821`: no Google Maps channel with this id in your organization.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"409":{"description":"`GBP-3823`: the channel is disconnected or waits for a reconnection (`needs_reauth`). `GBP-3825`: another channel of the organization carries the location.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"description":"`API-8001`: some fields are missing or not valid. `details.fields` lists each invalid field with its own code (e.g. `API-8002` required, `API-8012` wrong format). `GBP-3826`: the Google account does not manage the location.","headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["channels:write"]},{"oauth2":["channels:write"]}],"summary":"Choose the locations of a Google Maps channel","tags":["channels"]}},"/v1/channels/google-business/{channelId}/reconnect":{"post":{"description":"Returns a Google sign-in URL for the channel’s own Google account (`needs_reauth` after Google refused the saved access); finishing it with `completeGoogleBusinessConnection` makes the channel active again and reads the reviews missed meanwhile.","operationId":"reconnectGoogleBusinessChannel","parameters":[{"name":"channelId","required":true,"in":"path","description":"The Google Maps channel id.","schema":{"type":"string","format":"uuid","description":"The Google Maps channel id."}},{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}},{"name":"Idempotency-Key","in":"header","description":"A unique key for this operation (e.g. a UUID, 1 to 255 visible characters), kept 24 hours: repeating the request with the same key returns the first answer (`Idempotent-Replayed: true`) instead of doing it again. Errors: `API-8109` (400) a key that is not valid, `API-8108` (409, retryable) the first request with this key is still running, `API-8107` (422) the key was used for a different request; `API-8118` (409) the first request created something whose secret is shown only once, so its answer is not repeated. An answer with `shown_once` repeats its secret within 10 minutes, then `API-8118`.","required":false,"schema":{"type":"string","minLength":1,"maxLength":255}}],"responses":{"201":{"description":"The sign-in.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GoogleBusinessAuthorization"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `AUTH-1003`: your seat was deactivated (view only). `AUTH-1004`: all seats are inactive because the seat charge was not paid (view only). `AUTH-1002`: your role lacks the `channels.manage` permission. `API-8102`: the API key or app lacks the `channels:write` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in. `API-8148`: not available to test keys (API test mode).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"`GBP-3821`: no Google Maps channel with this id in your organization.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"409":{"description":"`GBP-3823`: the channel is disconnected or waits for a reconnection (`needs_reauth`).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"503":{"description":"`SYS-1001`: Google is not set up on this Rabt.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["channels:write"]},{"oauth2":["channels:write"]}],"summary":"Reconnect a Google Maps channel","tags":["channels"]}},"/v1/channels/google-business/{channelId}/disconnect":{"post":{"description":"Turns the accounts’ review notifications off, revokes Rabt’s access at Google (unless another channel of the organization signs in with the same Google account) and in the token vault, and removes the locations; the channel, its reviews and tickets stay (Rabt never deletes).","operationId":"disconnectGoogleBusinessChannel","parameters":[{"name":"channelId","required":true,"in":"path","description":"The Google Maps channel id.","schema":{"type":"string","format":"uuid","description":"The Google Maps channel id."}},{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}},{"name":"Idempotency-Key","in":"header","description":"A unique key for this operation (e.g. a UUID, 1 to 255 visible characters), kept 24 hours: repeating the request with the same key returns the first answer (`Idempotent-Replayed: true`) instead of doing it again. Errors: `API-8109` (400) a key that is not valid, `API-8108` (409, retryable) the first request with this key is still running, `API-8107` (422) the key was used for a different request; `API-8118` (409) the first request created something whose secret is shown only once, so its answer is not repeated. An answer with `shown_once` repeats its secret within 10 minutes, then `API-8118`.","required":false,"schema":{"type":"string","minLength":1,"maxLength":255}}],"responses":{"200":{"description":"The channel.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GoogleBusinessChannel"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `AUTH-1003`: your seat was deactivated (view only). `AUTH-1004`: all seats are inactive because the seat charge was not paid (view only). `AUTH-1002`: your role lacks the `channels.manage` permission. `API-8102`: the API key or app lacks the `channels:write` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in. `API-8148`: not available to test keys (API test mode).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"`GBP-3821`: no Google Maps channel with this id in your organization.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["channels:write"]},{"oauth2":["channels:write"]}],"summary":"Disconnect a Google Maps channel","tags":["channels"]}},"/v1/integrations/connectors":{"get":{"description":"Every connector with its status, last error, latest run and records count; removed ones last. Secrets are never returned.","operationId":"listRecordConnectors","parameters":[{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"The connectors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RecordConnectorList"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `AUTH-1002`: your role lacks the `settings.manage` permission. `API-8102`: the API key or app lacks the `integrations:read` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["integrations:read"]},{"oauth2":["integrations:read"]}],"summary":"List the REST connectors","tags":["integrations"]},"post":{"description":"Saves the connector (its secret only in the token vault) and queues its first run; the `oauth_authorization_code` kind is saved `needs_auth` until a member signs in (`startRecordConnectorSignIn`). Test the settings first with `testRecordConnector`.","operationId":"createRecordConnector","parameters":[{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}},{"name":"Idempotency-Key","in":"header","description":"A unique key for this operation (e.g. a UUID, 1 to 255 visible characters), kept 24 hours: repeating the request with the same key returns the first answer (`Idempotent-Replayed: true`) instead of doing it again. Errors: `API-8109` (400) a key that is not valid, `API-8108` (409, retryable) the first request with this key is still running, `API-8107` (422) the key was used for a different request; `API-8118` (409) the first request created something whose secret is shown only once, so its answer is not repeated. An answer with `shown_once` repeats its secret within 10 minutes, then `API-8118`.","required":false,"schema":{"type":"string","minLength":1,"maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateRecordConnector"}}}},"responses":{"201":{"description":"The connector.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RecordConnector"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `AUTH-1003`: your seat was deactivated (view only). `AUTH-1004`: all seats are inactive because the seat charge was not paid (view only). `AUTH-1002`: your role lacks the `settings.manage` permission. `API-8102`: the API key or app lacks the `integrations:write` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in. `API-8148`: not available to test keys (API test mode).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"409":{"description":"`INT-7415`: a live connector already writes this source and type.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"description":"`API-8001`: some fields are missing or not valid. `details.fields` lists each invalid field with its own code (e.g. `API-8002` required, `API-8012` wrong format). `INT-7403`: an address that is not public HTTPS (private, loopback, metadata, credentials in it). `INT-7420`: the secret the authentication needs is missing.","headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["integrations:write"]},{"oauth2":["integrations:write"]}],"summary":"Set up a REST connector","tags":["integrations"]}},"/v1/integrations/connectors/test":{"post":{"description":"Reads the first page with the settings given (over a saved connector’s when `connector_id` is given, whose saved secrets are used when none are sent, only while the settings keep the origin of the base URL and of the token URL and the API key header they were entered for; otherwise INT-7420) and returns the first mapped records, the items that could not be mapped and the first item as sent. Nothing is saved.","operationId":"testRecordConnector","parameters":[{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TestRecordConnector"}}}},"responses":{"200":{"description":"The test run.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RecordConnectorTest"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `AUTH-1003`: your seat was deactivated (view only). `AUTH-1004`: all seats are inactive because the seat charge was not paid (view only). `AUTH-1002`: your role lacks the `settings.manage` permission. `API-8102`: the API key or app lacks the `integrations:write` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in. `API-8148`: not available to test keys (API test mode).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"`INT-7401`: no connector with this id in your organization.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"description":"`API-8001`: some fields are missing or not valid. `details.fields` lists each invalid field with its own code (e.g. `API-8002` required, `API-8012` wrong format). `INT-7403`: an address that is not public HTTPS (private, loopback, metadata, credentials in it). `INT-7420`: the secret the authentication needs is missing.","headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"429":{"$ref":"#/components/responses/RateLimited"},"502":{"description":"The system’s answer: `INT-7404` unreachable, `INT-7405` too slow, `INT-7406` too large, `INT-7407` credentials refused, `INT-7408` rate limited, `INT-7409` server error, `INT-7410` request refused, `INT-7411` no list at the list path, `INT-7413` a redirect, `INT-7414` the OAuth server refused, `INT-7419` pagination loops.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["integrations:write"]},{"oauth2":["integrations:write"]}],"summary":"Test a connector’s settings on the system","tags":["integrations"]}},"/v1/integrations/connectors/authorizations/complete":{"post":{"description":"With every parameter the system sent back: the code is exchanged (with the PKCE verifier) at the token address, the tokens kept in the vault, the connector made active and a run queued. Each sign-in is used once, in the organization that started it, within ten minutes.","operationId":"completeRecordConnectorSignIn","parameters":[{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}},{"name":"Idempotency-Key","in":"header","description":"A unique key for this operation (e.g. a UUID, 1 to 255 visible characters), kept 24 hours: repeating the request with the same key returns the first answer (`Idempotent-Replayed: true`) instead of doing it again. Errors: `API-8109` (400) a key that is not valid, `API-8108` (409, retryable) the first request with this key is still running, `API-8107` (422) the key was used for a different request; `API-8118` (409) the first request created something whose secret is shown only once, so its answer is not repeated. An answer with `shown_once` repeats its secret within 10 minutes, then `API-8118`.","required":false,"schema":{"type":"string","minLength":1,"maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CompleteRecordConnectorSignIn"}}}},"responses":{"200":{"description":"The connector.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RecordConnector"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1097`: the sign-in was started in the desktop app by another member or on another device.\n\n`AUTH-1040`: you are not a member of the organization named. `AUTH-1003`: your seat was deactivated (view only). `AUTH-1004`: all seats are inactive because the seat charge was not paid (view only). `AUTH-1002`: your role lacks the `settings.manage` permission. `API-8102`: the API key or app lacks the `integrations:write` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in. `API-8148`: not available to test keys (API test mode).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"410":{"description":"`INT-7416`: the sign-in expired, was used, or is another organization’s.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"description":"`API-8001`: some fields are missing or not valid. `details.fields` lists each invalid field with its own code (e.g. `API-8002` required, `API-8012` wrong format). `INT-7417`: the sign-in was declined at the system.","headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"429":{"$ref":"#/components/responses/RateLimited"},"502":{"description":"The system’s answer: `INT-7404` unreachable, `INT-7405` too slow, `INT-7406` too large, `INT-7407` credentials refused, `INT-7408` rate limited, `INT-7409` server error, `INT-7410` request refused, `INT-7411` no list at the list path, `INT-7413` a redirect, `INT-7414` the OAuth server refused, `INT-7419` pagination loops.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["integrations:write"]},{"oauth2":["integrations:write"]}],"summary":"Finish signing in to the system","tags":["integrations"]}},"/v1/integrations/connectors/{connectorId}":{"get":{"operationId":"getRecordConnector","parameters":[{"name":"connectorId","required":true,"in":"path","description":"The connector id.","schema":{"type":"string","format":"uuid","description":"The connector id."}},{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"The connector.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RecordConnector"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `AUTH-1002`: your role lacks the `settings.manage` permission. `API-8102`: the API key or app lacks the `integrations:read` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"`INT-7401`: no connector with this id in your organization.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["integrations:read"]},{"oauth2":["integrations:read"]}],"summary":"A REST connector","tags":["integrations"]},"patch":{"description":"Its name, settings, secrets (sent ones replace the saved ones) or schedule. Saved secrets and tokens stay with the origin of the base URL, the origin of the token URL and the API key header they were entered for: changing one of these needs the secret sent again (INT-7420). A change of what is read starts the reading over and queues a run; new credentials make a `needs_auth` connector active again (the authorization code kind after a sign-in).","operationId":"updateRecordConnector","parameters":[{"name":"connectorId","required":true,"in":"path","description":"The connector id.","schema":{"type":"string","format":"uuid","description":"The connector id."}},{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}},{"name":"Idempotency-Key","in":"header","description":"A unique key for this operation (e.g. a UUID, 1 to 255 visible characters), kept 24 hours: repeating the request with the same key returns the first answer (`Idempotent-Replayed: true`) instead of doing it again. Errors: `API-8109` (400) a key that is not valid, `API-8108` (409, retryable) the first request with this key is still running, `API-8107` (422) the key was used for a different request; `API-8118` (409) the first request created something whose secret is shown only once, so its answer is not repeated. An answer with `shown_once` repeats its secret within 10 minutes, then `API-8118`.","required":false,"schema":{"type":"string","minLength":1,"maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateRecordConnector"}}}},"responses":{"200":{"description":"The connector.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RecordConnector"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `AUTH-1003`: your seat was deactivated (view only). `AUTH-1004`: all seats are inactive because the seat charge was not paid (view only). `AUTH-1002`: your role lacks the `settings.manage` permission. `API-8102`: the API key or app lacks the `integrations:write` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in. `API-8148`: not available to test keys (API test mode).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"`INT-7401`: no connector with this id in your organization.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"409":{"description":"`INT-7402`: the connector is removed or waits for new credentials.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"description":"`API-8001`: some fields are missing or not valid. `details.fields` lists each invalid field with its own code (e.g. `API-8002` required, `API-8012` wrong format). `INT-7403`: an address that is not public HTTPS (private, loopback, metadata, credentials in it). `INT-7420`: the secret the authentication needs is missing.","headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["integrations:write"]},{"oauth2":["integrations:write"]}],"summary":"Change a REST connector","tags":["integrations"]}},"/v1/integrations/connectors/{connectorId}/runs":{"get":{"description":"The last 20 runs, newest first, with their counts, the items that could not be mapped and, when a run failed, its error.","operationId":"listRecordConnectorRuns","parameters":[{"name":"connectorId","required":true,"in":"path","description":"The connector id.","schema":{"type":"string","format":"uuid","description":"The connector id."}},{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"The runs.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RecordConnectorRunList"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `AUTH-1002`: your role lacks the `settings.manage` permission. `API-8102`: the API key or app lacks the `integrations:read` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"`INT-7401`: no connector with this id in your organization.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["integrations:read"]},{"oauth2":["integrations:read"]}],"summary":"The latest runs of a REST connector","tags":["integrations"]}},"/v1/integrations/connectors/{connectorId}/sync":{"post":{"description":"Queues a run (Rabt also runs it on its schedule). While a run waits or runs, that run is returned.","operationId":"syncRecordConnector","parameters":[{"name":"connectorId","required":true,"in":"path","description":"The connector id.","schema":{"type":"string","format":"uuid","description":"The connector id."}},{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}},{"name":"Idempotency-Key","in":"header","description":"A unique key for this operation (e.g. a UUID, 1 to 255 visible characters), kept 24 hours: repeating the request with the same key returns the first answer (`Idempotent-Replayed: true`) instead of doing it again. Errors: `API-8109` (400) a key that is not valid, `API-8108` (409, retryable) the first request with this key is still running, `API-8107` (422) the key was used for a different request; `API-8118` (409) the first request created something whose secret is shown only once, so its answer is not repeated. An answer with `shown_once` repeats its secret within 10 minutes, then `API-8118`.","required":false,"schema":{"type":"string","minLength":1,"maxLength":255}}],"responses":{"202":{"description":"The run.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RecordConnectorRun"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `AUTH-1003`: your seat was deactivated (view only). `AUTH-1004`: all seats are inactive because the seat charge was not paid (view only). `AUTH-1002`: your role lacks the `settings.manage` permission. `API-8102`: the API key or app lacks the `integrations:write` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in. `API-8148`: not available to test keys (API test mode).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"`INT-7401`: no connector with this id in your organization.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"409":{"description":"`INT-7402`: the connector is removed or waits for new credentials.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["integrations:write"]},{"oauth2":["integrations:write"]}],"summary":"Run a REST connector now","tags":["integrations"]}},"/v1/integrations/connectors/{connectorId}/authorizations":{"post":{"description":"For the `oauth_authorization_code` kind: returns the system’s sign-in URL (authorization code with PKCE and `state`); the system sends the member back to Rabt’s callback page, which finishes with `completeRecordConnectorSignIn`.","operationId":"startRecordConnectorSignIn","parameters":[{"name":"connectorId","required":true,"in":"path","description":"The connector id.","schema":{"type":"string","format":"uuid","description":"The connector id."}},{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}},{"name":"Idempotency-Key","in":"header","description":"A unique key for this operation (e.g. a UUID, 1 to 255 visible characters), kept 24 hours: repeating the request with the same key returns the first answer (`Idempotent-Replayed: true`) instead of doing it again. Errors: `API-8109` (400) a key that is not valid, `API-8108` (409, retryable) the first request with this key is still running, `API-8107` (422) the key was used for a different request; `API-8118` (409) the first request created something whose secret is shown only once, so its answer is not repeated. An answer with `shown_once` repeats its secret within 10 minutes, then `API-8118`.","required":false,"schema":{"type":"string","minLength":1,"maxLength":255}}],"responses":{"201":{"description":"The sign-in.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RecordConnectorAuthorization"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `AUTH-1003`: your seat was deactivated (view only). `AUTH-1004`: all seats are inactive because the seat charge was not paid (view only). `AUTH-1002`: your role lacks the `settings.manage` permission. `API-8102`: the API key or app lacks the `integrations:write` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in. `API-8148`: not available to test keys (API test mode).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"`INT-7401`: no connector with this id in your organization.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"409":{"description":"`INT-7402`: the connector is removed or waits for new credentials.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"description":"`API-8001`: some fields are missing or not valid. `details.fields` lists each invalid field with its own code (e.g. `API-8002` required, `API-8012` wrong format). `INT-7403`: an address that is not public HTTPS (private, loopback, metadata, credentials in it). `INT-7420`: the secret the authentication needs is missing.","headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["integrations:write"]},{"oauth2":["integrations:write"]}],"summary":"Start signing in to the system","tags":["integrations"]}},"/v1/integrations/connectors/{connectorId}/remove":{"post":{"description":"It stops running and its credentials are revoked in the vault; the connector, its runs and the records it read stay (Rabt never deletes).","operationId":"removeRecordConnector","parameters":[{"name":"connectorId","required":true,"in":"path","description":"The connector id.","schema":{"type":"string","format":"uuid","description":"The connector id."}},{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}},{"name":"Idempotency-Key","in":"header","description":"A unique key for this operation (e.g. a UUID, 1 to 255 visible characters), kept 24 hours: repeating the request with the same key returns the first answer (`Idempotent-Replayed: true`) instead of doing it again. Errors: `API-8109` (400) a key that is not valid, `API-8108` (409, retryable) the first request with this key is still running, `API-8107` (422) the key was used for a different request; `API-8118` (409) the first request created something whose secret is shown only once, so its answer is not repeated. An answer with `shown_once` repeats its secret within 10 minutes, then `API-8118`.","required":false,"schema":{"type":"string","minLength":1,"maxLength":255}}],"responses":{"200":{"description":"The connector.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RecordConnector"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `AUTH-1003`: your seat was deactivated (view only). `AUTH-1004`: all seats are inactive because the seat charge was not paid (view only). `AUTH-1002`: your role lacks the `settings.manage` permission. `API-8102`: the API key or app lacks the `integrations:write` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in. `API-8148`: not available to test keys (API test mode).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"`INT-7401`: no connector with this id in your organization.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["integrations:write"]},{"oauth2":["integrations:write"]}],"summary":"Remove a REST connector","tags":["integrations"]}},"/v1/integrations/records":{"get":{"description":"Records of external systems, newest first: by source, type, contact (its verified phone numbers and email addresses) or words of the title, status, id or key fields. Read only; every member may.","operationId":"listExternalRecords","parameters":[{"name":"source","required":false,"in":"query","description":"Only this source.","schema":{"description":"Only this source.","type":"string","pattern":"^[a-z0-9][a-z0-9_.-]{0,62}$"}},{"name":"type","required":false,"in":"query","description":"Only this type.","schema":{"description":"Only this type.","type":"string","pattern":"^[a-z0-9][a-z0-9_.-]{0,62}$"}},{"name":"contact_id","required":false,"in":"query","description":"Only the records of this contact (its verified phone numbers and emails).","schema":{"description":"Only the records of this contact (its verified phone numbers and emails).","type":"string","format":"uuid"}},{"name":"q","required":false,"in":"query","description":"Words of the title, status, id or key fields.","schema":{"description":"Words of the title, status, id or key fields.","type":"string","minLength":1,"maxLength":200}},{"name":"include_deleted","required":false,"in":"query","description":"Include deleted records.","schema":{"description":"Include deleted records.","default":"false","type":"string","enum":["true","false"]}},{"name":"cursor","required":false,"in":"query","description":"The `next_cursor` of the previous page.","schema":{"description":"The `next_cursor` of the previous page.","type":"string","format":"uuid"}},{"name":"limit","required":false,"in":"query","description":"Records per page (1 to 500, default 25).","schema":{"default":25,"description":"Records per page (1 to 500, default 25).","type":"integer","minimum":1,"maximum":500}},{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"The records.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExternalRecordPage"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `API-8102`: the API key or app lacks the `integrations:read` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"`CRM-6001`: no contact with this id.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["integrations:read"]},{"oauth2":["integrations:read"]}],"summary":"List or look up customer records","tags":["integrations"]}},"/v1/integrations/records/{recordId}":{"get":{"operationId":"getExternalRecord","parameters":[{"name":"recordId","required":true,"in":"path","description":"The record id.","schema":{"type":"string","format":"uuid","description":"The record id."}},{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"The record.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExternalRecord"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `API-8102`: the API key or app lacks the `integrations:read` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"`INT-7418`: no record with this id (or key) in your organization.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["integrations:read"]},{"oauth2":["integrations:read"]}],"summary":"A customer record","tags":["integrations"]}},"/v1/integrations/records/{source}/{type}/{externalId}":{"get":{"operationId":"getExternalRecordByKey","parameters":[{"name":"source","required":true,"in":"path","description":"A key of lower-case letters, digits, `_`, `-` and `.` (e.g. `qoyod`, `invoice`).","schema":{"type":"string","pattern":"^[a-z0-9][a-z0-9_.-]{0,62}$","description":"A key of lower-case letters, digits, `_`, `-` and `.` (e.g. `qoyod`, `invoice`)."}},{"name":"type","required":true,"in":"path","description":"A key of lower-case letters, digits, `_`, `-` and `.` (e.g. `qoyod`, `invoice`).","schema":{"type":"string","pattern":"^[a-z0-9][a-z0-9_.-]{0,62}$","description":"A key of lower-case letters, digits, `_`, `-` and `.` (e.g. `qoyod`, `invoice`)."}},{"name":"externalId","required":true,"in":"path","description":"The record’s id in its system.","schema":{"type":"string","minLength":1,"maxLength":200,"description":"The record’s id in its system."}},{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"The record.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExternalRecord"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `API-8102`: the API key or app lacks the `integrations:read` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"`INT-7418`: no record with this id (or key) in your organization.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["integrations:read"]},{"oauth2":["integrations:read"]}],"summary":"A customer record by its key in its system","tags":["integrations"]},"put":{"description":"Writes the record `(source, type, external_id)`: created the first time, updated after; sending the same body again changes nothing (`change: unchanged`), and a version whose `updated_at` is older than the stored one is ignored. A deleted record written again comes back. The record belongs to the contact whose verified phone number or email address it names. Emits `integration.record_changed`.","operationId":"putExternalRecord","parameters":[{"name":"source","required":true,"in":"path","description":"A key of lower-case letters, digits, `_`, `-` and `.` (e.g. `qoyod`, `invoice`).","schema":{"type":"string","pattern":"^[a-z0-9][a-z0-9_.-]{0,62}$","description":"A key of lower-case letters, digits, `_`, `-` and `.` (e.g. `qoyod`, `invoice`)."}},{"name":"type","required":true,"in":"path","description":"A key of lower-case letters, digits, `_`, `-` and `.` (e.g. `qoyod`, `invoice`).","schema":{"type":"string","pattern":"^[a-z0-9][a-z0-9_.-]{0,62}$","description":"A key of lower-case letters, digits, `_`, `-` and `.` (e.g. `qoyod`, `invoice`)."}},{"name":"externalId","required":true,"in":"path","description":"The record’s id in its system.","schema":{"type":"string","minLength":1,"maxLength":200,"description":"The record’s id in its system."}},{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}},{"name":"Idempotency-Key","in":"header","description":"A unique key for this operation (e.g. a UUID, 1 to 255 visible characters), kept 24 hours: repeating the request with the same key returns the first answer (`Idempotent-Replayed: true`) instead of doing it again. Errors: `API-8109` (400) a key that is not valid, `API-8108` (409, retryable) the first request with this key is still running, `API-8107` (422) the key was used for a different request; `API-8118` (409) the first request created something whose secret is shown only once, so its answer is not repeated. An answer with `shown_once` repeats its secret within 10 minutes, then `API-8118`.","required":false,"schema":{"type":"string","minLength":1,"maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PushExternalRecord"}}}},"responses":{"200":{"description":"The record.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WrittenExternalRecord"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `AUTH-1003`: your seat was deactivated (view only). `AUTH-1004`: all seats are inactive because the seat charge was not paid (view only). `AUTH-1002`: your role lacks the `settings.manage` permission. `API-8102`: the API key or app lacks the `integrations:write` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in. `API-8148`: not available to test keys (API test mode).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"description":"`API-8001`: some fields are missing or not valid. `details.fields` lists each invalid field with its own code (e.g. `API-8002` required, `API-8012` wrong format). `INT-7422`: a value that cannot be kept (a phone number, a currency).","headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["integrations:write"]},{"oauth2":["integrations:write"]}],"summary":"Create or update a customer record (push API)","tags":["integrations"]},"delete":{"description":"Marks the record deleted (Rabt keeps it with `deleted_at`); deleting it again changes nothing. Emits `integration.record_changed` (`deleted`).","operationId":"deleteExternalRecord","parameters":[{"name":"source","required":true,"in":"path","description":"A key of lower-case letters, digits, `_`, `-` and `.` (e.g. `qoyod`, `invoice`).","schema":{"type":"string","pattern":"^[a-z0-9][a-z0-9_.-]{0,62}$","description":"A key of lower-case letters, digits, `_`, `-` and `.` (e.g. `qoyod`, `invoice`)."}},{"name":"type","required":true,"in":"path","description":"A key of lower-case letters, digits, `_`, `-` and `.` (e.g. `qoyod`, `invoice`).","schema":{"type":"string","pattern":"^[a-z0-9][a-z0-9_.-]{0,62}$","description":"A key of lower-case letters, digits, `_`, `-` and `.` (e.g. `qoyod`, `invoice`)."}},{"name":"externalId","required":true,"in":"path","description":"The record’s id in its system.","schema":{"type":"string","minLength":1,"maxLength":200,"description":"The record’s id in its system."}},{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"The record.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WrittenExternalRecord"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `AUTH-1003`: your seat was deactivated (view only). `AUTH-1004`: all seats are inactive because the seat charge was not paid (view only). `AUTH-1002`: your role lacks the `settings.manage` permission. `API-8102`: the API key or app lacks the `integrations:write` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in. `API-8148`: not available to test keys (API test mode).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"`INT-7418`: no record with this id (or key) in your organization.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["integrations:write"]},{"oauth2":["integrations:write"]}],"summary":"Delete a customer record (push API)","tags":["integrations"]}},"/v1/integrations/record-labels":{"get":{"description":"The display names (Arabic and English) the organization registered for its push-API sources and record types; returned as `source_label` and `type_label` of its records. Read only; every member may.","operationId":"listRecordLabels","parameters":[{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"The names.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RegisteredRecordLabelList"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `API-8102`: the API key or app lacks the `integrations:read` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["integrations:read"]},{"oauth2":["integrations:read"]}],"summary":"The names registered for push-API sources and types","tags":["integrations"]}},"/v1/integrations/record-labels/{kind}/{key}":{"put":{"description":"Registers or renames the display name of a push-API source (`kind: source`) or a record type (`kind: type`), in Arabic and English; the records of that source or type then carry it as `source_label` or `type_label`. Sending the same name again changes nothing. A connected store’s source (`<adapter>.<id>`) is named by its brand and refused.","operationId":"putRecordLabel","parameters":[{"name":"kind","required":true,"in":"path","description":"`source` (a push-API source) or `type` (a record type).","schema":{"type":"string","enum":["source","type"],"description":"`source` (a push-API source) or `type` (a record type)."}},{"name":"key","required":true,"in":"path","description":"A key of lower-case letters, digits, `_`, `-` and `.` (e.g. `qoyod`, `invoice`).","schema":{"type":"string","pattern":"^[a-z0-9][a-z0-9_.-]{0,62}$","description":"A key of lower-case letters, digits, `_`, `-` and `.` (e.g. `qoyod`, `invoice`)."}},{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}},{"name":"Idempotency-Key","in":"header","description":"A unique key for this operation (e.g. a UUID, 1 to 255 visible characters), kept 24 hours: repeating the request with the same key returns the first answer (`Idempotent-Replayed: true`) instead of doing it again. Errors: `API-8109` (400) a key that is not valid, `API-8108` (409, retryable) the first request with this key is still running, `API-8107` (422) the key was used for a different request; `API-8118` (409) the first request created something whose secret is shown only once, so its answer is not repeated. An answer with `shown_once` repeats its secret within 10 minutes, then `API-8118`.","required":false,"schema":{"type":"string","minLength":1,"maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PutRecordLabelBody"}}}},"responses":{"200":{"description":"The name.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RegisteredRecordLabel"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `AUTH-1003`: your seat was deactivated (view only). `AUTH-1004`: all seats are inactive because the seat charge was not paid (view only). `AUTH-1002`: your role lacks the `settings.manage` permission. `API-8102`: the API key or app lacks the `integrations:write` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in. `API-8148`: not available to test keys (API test mode).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"description":"`API-8001`: some fields are missing or not valid. `details.fields` lists each invalid field with its own code (e.g. `API-8002` required, `API-8012` wrong format). `INT-7422`: a key that cannot be named (a connected store’s source).","headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["integrations:write"]},{"oauth2":["integrations:write"]}],"summary":"Name a push-API source or record type","tags":["integrations"]}},"/v1/integrations/contacts/{contactId}/records":{"get":{"description":"The records whose phone numbers or email addresses are the contact’s verified ones, grouped by source and type, newest first (20 per group).","operationId":"getContactExternalRecords","parameters":[{"name":"contactId","required":true,"in":"path","description":"The contact id.","schema":{"type":"string","format":"uuid","description":"The contact id."}},{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"The records.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContactExternalRecords"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `API-8102`: the API key or app lacks the `integrations:read` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"`CRM-6001`: no contact with this id.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["integrations:read"]},{"oauth2":["integrations:read"]}],"summary":"A contact’s customer records, by source and type","tags":["integrations"]}},"/v1/tickets/{ticketId}/customer-data":{"get":{"description":"One header with the customer’s own details from every connected system (equal values merged; a value systems disagree on lists its sources), then one section per system with its records, newest first (an order’s shipping, receiver or billing address only when it differs). Matched by the contact’s verified phone numbers and email addresses; records of disconnected integrations never show. Answers from Rabt’s saved copy at once; call the `refresh` operation to re-read stale systems.","operationId":"getTicketCustomerData","parameters":[{"name":"ticketId","required":true,"in":"path","description":"The ticket id.","schema":{"type":"string","format":"uuid","description":"The ticket id."}},{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"The customer data.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomerData"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `API-8102`: the API key or app lacks the `integrations:read` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"`TKT-6101`: no such ticket (or you may not see it).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["integrations:read"]},{"oauth2":["integrations:read"]}],"summary":"The customer data of a ticket’s contact","tags":["integrations"]}},"/v1/tickets/{ticketId}/customer-data/refresh":{"post":{"description":"Re-reads every connected system whose records of the contact are older than 15 minutes (each within 8 seconds, all at once), saves what they answer (the newest version wins) and returns each system’s outcome, with its error when it failed, and the customer data after.","operationId":"refreshTicketCustomerData","parameters":[{"name":"ticketId","required":true,"in":"path","description":"The ticket id.","schema":{"type":"string","format":"uuid","description":"The ticket id."}},{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}},{"name":"Idempotency-Key","in":"header","description":"A unique key for this operation (e.g. a UUID, 1 to 255 visible characters), kept 24 hours: repeating the request with the same key returns the first answer (`Idempotent-Replayed: true`) instead of doing it again. Errors: `API-8109` (400) a key that is not valid, `API-8108` (409, retryable) the first request with this key is still running, `API-8107` (422) the key was used for a different request; `API-8118` (409) the first request created something whose secret is shown only once, so its answer is not repeated. An answer with `shown_once` repeats its secret within 10 minutes, then `API-8118`.","required":false,"schema":{"type":"string","minLength":1,"maxLength":255}}],"responses":{"200":{"description":"Each system’s outcome and the data.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomerDataRefresh"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `API-8102`: the API key or app lacks the `integrations:read` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"`TKT-6101`: no such ticket (or you may not see it).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["integrations:read"]},{"oauth2":["integrations:read"]}],"summary":"Re-read the stale customer data of a ticket’s contact","tags":["integrations"]}},"/v1/integrations/contacts/{contactId}/customer-data":{"get":{"description":"One header with the customer’s own details from every connected system (equal values merged; a value systems disagree on lists its sources), then one section per system with its records, newest first (an order’s shipping, receiver or billing address only when it differs). Matched by the contact’s verified phone numbers and email addresses; records of disconnected integrations never show. Answers from Rabt’s saved copy at once; call the `refresh` operation to re-read stale systems.","operationId":"getContactCustomerData","parameters":[{"name":"contactId","required":true,"in":"path","description":"The contact id.","schema":{"type":"string","format":"uuid","description":"The contact id."}},{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"The customer data.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomerData"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `API-8102`: the API key or app lacks the `integrations:read` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"`CRM-6001`: no contact with this id.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["integrations:read"]},{"oauth2":["integrations:read"]}],"summary":"A contact’s customer data","tags":["integrations"]}},"/v1/integrations/contacts/{contactId}/customer-data/refresh":{"post":{"description":"Re-reads every connected system whose records of the contact are older than 15 minutes (each within 8 seconds, all at once), saves what they answer (the newest version wins) and returns each system’s outcome, with its error when it failed, and the customer data after.","operationId":"refreshContactCustomerData","parameters":[{"name":"contactId","required":true,"in":"path","description":"The contact id.","schema":{"type":"string","format":"uuid","description":"The contact id."}},{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}},{"name":"Idempotency-Key","in":"header","description":"A unique key for this operation (e.g. a UUID, 1 to 255 visible characters), kept 24 hours: repeating the request with the same key returns the first answer (`Idempotent-Replayed: true`) instead of doing it again. Errors: `API-8109` (400) a key that is not valid, `API-8108` (409, retryable) the first request with this key is still running, `API-8107` (422) the key was used for a different request; `API-8118` (409) the first request created something whose secret is shown only once, so its answer is not repeated. An answer with `shown_once` repeats its secret within 10 minutes, then `API-8118`.","required":false,"schema":{"type":"string","minLength":1,"maxLength":255}}],"responses":{"200":{"description":"Each system’s outcome and the data.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomerDataRefresh"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `API-8102`: the API key or app lacks the `integrations:read` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"`CRM-6001`: no contact with this id.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["integrations:read"]},{"oauth2":["integrations:read"]}],"summary":"Re-read a contact’s stale customer data","tags":["integrations"]}},"/v1/integrations/records/{recordId}/document":{"get":{"description":"The official document of a customer data record whose `document` is true: the PDF its system renders for an invoice, a credit note or a quote (Wafeq), fetched from the system on every request and never stored.","operationId":"getRecordDocument","parameters":[{"name":"recordId","required":true,"in":"path","description":"The record id (`records[].id`).","schema":{"type":"string","format":"uuid","description":"The record id (`records[].id`)."}},{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"The PDF.","content":{"application/pdf":{"schema":{"type":"string","format":"binary"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `API-8102`: the API key or app lacks the `integrations:read` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"`INT-7020`: no such record, or its system provides no document for it (any longer).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"409":{"description":"`INT-7006`: the system’s access must be renewed (reconnect it).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["integrations:read"]},{"oauth2":["integrations:read"]}],"summary":"Download a record’s official document (PDF)","tags":["integrations"]}},"/v1/integrations/platforms":{"get":{"description":"Every platform (stores, accounting and business systems), each with whether it can be connected on this Rabt and what the member types before signing in.","operationId":"listIntegrationPlatforms","parameters":[{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"The platforms.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationPlatformList"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `AUTH-1002`: your role lacks the `settings.manage` permission. `API-8102`: the API key or app lacks the `integrations:read` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["integrations:read"]},{"oauth2":["integrations:read"]}],"summary":"List the platforms stores can be connected from","tags":["integrations"]}},"/v1/integrations/orders":{"get":{"description":"Asks every working store, live, for the orders matching an order number, a phone number, an email address or a contact’s phone numbers and email addresses; newest first. Stores that could not answer are listed in `failures` with their error. Read only.","operationId":"lookUpOrders","parameters":[{"name":"order_number","required":false,"in":"query","description":"The order number the customer gave.","schema":{"description":"The order number the customer gave.","type":"string","minLength":1,"maxLength":100}},{"name":"phone","required":false,"in":"query","description":"The customer’s phone number, E.164.","schema":{"description":"The customer’s phone number, E.164.","type":"string","pattern":"^\\+[1-9]\\d{1,14}$"}},{"name":"email","required":false,"in":"query","description":"The customer’s email address.","schema":{"description":"The customer’s email address.","type":"string","maxLength":254,"format":"email"}},{"name":"contact_id","required":false,"in":"query","description":"A contact: its phone numbers and email addresses are looked up.","schema":{"description":"A contact: its phone numbers and email addresses are looked up.","type":"string","format":"uuid"}},{"name":"limit","required":false,"in":"query","description":"Orders per store and key (1 to 20, default 10).","schema":{"default":10,"description":"Orders per store and key (1 to 20, default 10).","type":"integer","minimum":1,"maximum":20}},{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"The orders found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrderLookupResult"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`INT-7010`: no order number, phone, email or contact was given.\n\n`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `API-8102`: the API key or app lacks the `integrations:read` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"`CRM-6001`: no contact with this id.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["integrations:read"]},{"oauth2":["integrations:read"]}],"summary":"Look up orders in the connected stores","tags":["integrations"]}},"/v1/integrations/contacts/{contactId}":{"get":{"description":"The store customers matching the contact’s verified phone numbers and email addresses (orders count, total spent) and their latest orders, as last read from the stores.","operationId":"getContactStoreRecords","parameters":[{"name":"contactId","required":true,"in":"path","description":"The contact id.","schema":{"type":"string","format":"uuid","description":"The contact id."}},{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"The records.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContactStoreRecords"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `API-8102`: the API key or app lacks the `integrations:read` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"`CRM-6001`: no contact with this id.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["integrations:read"]},{"oauth2":["integrations:read"]}],"summary":"A contact’s customer records and orders in the connected stores","tags":["integrations"]}},"/v1/integrations":{"get":{"description":"Every connected store with its status, last error, webhook and sync state and how many customers and orders were read; disconnected ones last. Credentials are never returned.","operationId":"listIntegrations","parameters":[{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"The integrations.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationList"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `AUTH-1002`: your role lacks the `settings.manage` permission. `API-8102`: the API key or app lacks the `integrations:read` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["integrations:read"]},{"oauth2":["integrations:read"]}],"summary":"List the integrations","tags":["integrations"]}},"/v1/integrations/authorizations":{"post":{"description":"Returns the platform’s sign-in URL (authorization code with PKCE and `state`). The store’s owner signs in there and approves; the platform sends them back to Rabt’s callback page, which finishes with `completeIntegrationConnection` within ten minutes.","operationId":"startIntegrationConnection","parameters":[{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}},{"name":"Idempotency-Key","in":"header","description":"A unique key for this operation (e.g. a UUID, 1 to 255 visible characters), kept 24 hours: repeating the request with the same key returns the first answer (`Idempotent-Replayed: true`) instead of doing it again. Errors: `API-8109` (400) a key that is not valid, `API-8108` (409, retryable) the first request with this key is still running, `API-8107` (422) the key was used for a different request; `API-8118` (409) the first request created something whose secret is shown only once, so its answer is not repeated. An answer with `shown_once` repeats its secret within 10 minutes, then `API-8118`.","required":false,"schema":{"type":"string","minLength":1,"maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StartIntegrationConnection"}}}},"responses":{"201":{"description":"The sign-in.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationAuthorization"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `AUTH-1003`: your seat was deactivated (view only). `AUTH-1004`: all seats are inactive because the seat charge was not paid (view only). `AUTH-1002`: your role lacks the `settings.manage` permission. `API-8102`: the API key or app lacks the `integrations:write` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in. `API-8148`: not available to test keys (API test mode).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"description":"`API-8001`: some fields are missing or not valid. `details.fields` lists each invalid field with its own code (e.g. `API-8002` required, `API-8012` wrong format). `INT-7007`: the platform needs the store’s address.","headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"429":{"$ref":"#/components/responses/RateLimited"},"503":{"description":"`SYS-1001`: the platform is not set up on this Rabt.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["integrations:write"]},{"oauth2":["integrations:write"]}],"summary":"Start connecting a store","tags":["integrations"]}},"/v1/integrations/installs/claim":{"post":{"description":"A store that installed Rabt’s app from its platform (Salla) with no member’s sign-in open gets Rabt’s welcome email; its link opens the app, which sends the `install` and `token` of its fragment here. The store is connected to this organization in the background (as from Salla’s embedded page); the integration then appears with an `integration.connected` event. Already connected here: its `integration_id`, nothing queued.","operationId":"claimIntegrationInstall","parameters":[{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}},{"name":"Idempotency-Key","in":"header","description":"A unique key for this operation (e.g. a UUID, 1 to 255 visible characters), kept 24 hours: repeating the request with the same key returns the first answer (`Idempotent-Replayed: true`) instead of doing it again. Errors: `API-8109` (400) a key that is not valid, `API-8108` (409, retryable) the first request with this key is still running, `API-8107` (422) the key was used for a different request; `API-8118` (409) the first request created something whose secret is shown only once, so its answer is not repeated. An answer with `shown_once` repeats its secret within 10 minutes, then `API-8118`.","required":false,"schema":{"type":"string","minLength":1,"maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClaimIntegrationInstall"}}}},"responses":{"202":{"description":"The connection is under way.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationInstallClaim"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `AUTH-1003`: your seat was deactivated (view only). `AUTH-1004`: all seats are inactive because the seat charge was not paid (view only). `AUTH-1002`: your role lacks the `settings.manage` permission. `API-8102`: the API key or app lacks the `integrations:write` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in. `API-8148`: not available to test keys (API test mode).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"409":{"description":"`INT-7019`: the store is connected to another organization.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"410":{"description":"`INT-7021`: the link is incomplete, was used, is older than seven days, or a newer install replaced it.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"503":{"description":"`SYS-1001`: the platform is not set up on this Rabt.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["integrations:write"]},{"oauth2":["integrations:write"]}],"summary":"Connect a store from its welcome link","tags":["integrations"]}},"/v1/integrations/authorizations/complete":{"post":{"description":"With every parameter the platform sent back: the code is exchanged, the store read, and the integration stored `active` (or reconnected); its webhooks are created where needed and its first sync queued. Each sign-in is used once, in the organization that started it.","operationId":"completeIntegrationConnection","parameters":[{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}},{"name":"Idempotency-Key","in":"header","description":"A unique key for this operation (e.g. a UUID, 1 to 255 visible characters), kept 24 hours: repeating the request with the same key returns the first answer (`Idempotent-Replayed: true`) instead of doing it again. Errors: `API-8109` (400) a key that is not valid, `API-8108` (409, retryable) the first request with this key is still running, `API-8107` (422) the key was used for a different request; `API-8118` (409) the first request created something whose secret is shown only once, so its answer is not repeated. An answer with `shown_once` repeats its secret within 10 minutes, then `API-8118`.","required":false,"schema":{"type":"string","minLength":1,"maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CompleteIntegrationConnection"}}}},"responses":{"200":{"description":"The integration.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Integration"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1097`: the sign-in was started in the desktop app by another member or on another device.\n\n`AUTH-1040`: you are not a member of the organization named. `AUTH-1003`: your seat was deactivated (view only). `AUTH-1004`: all seats are inactive because the seat charge was not paid (view only). `AUTH-1002`: your role lacks the `settings.manage` permission. `API-8102`: the API key or app lacks the `integrations:write` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in. `API-8148`: not available to test keys (API test mode).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"409":{"description":"`INT-7005`: a reconnection signed in to another store. `INT-7002`: the integration to reconnect is disconnected.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"410":{"description":"`INT-7003`: the sign-in expired, was used, or belongs to another organization.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"description":"`API-8001`: some fields are missing or not valid. `details.fields` lists each invalid field with its own code (e.g. `API-8002` required, `API-8012` wrong format). `INT-7004`: the owner declined at the platform. `INT-7015`: a permission Rabt needs was not granted.","headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"429":{"$ref":"#/components/responses/RateLimited"},"503":{"description":"`SYS-1001`: the platform is not set up on this Rabt.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["integrations:write"]},{"oauth2":["integrations:write"]}],"summary":"Finish connecting a store","tags":["integrations"]}},"/v1/integrations/{integrationId}":{"get":{"operationId":"getIntegration","parameters":[{"name":"integrationId","required":true,"in":"path","description":"The integration id.","schema":{"type":"string","format":"uuid","description":"The integration id."}},{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"The integration.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Integration"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `AUTH-1002`: your role lacks the `settings.manage` permission. `API-8102`: the API key or app lacks the `integrations:read` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"`INT-7001`: no integration with this id in your organization.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["integrations:read"]},{"oauth2":["integrations:read"]}],"summary":"An integration","tags":["integrations"]}},"/v1/integrations/{integrationId}/sync-runs":{"get":{"description":"The last 20 runs, newest first, each with its counts and, when it failed, its error.","operationId":"listIntegrationSyncRuns","parameters":[{"name":"integrationId","required":true,"in":"path","description":"The integration id.","schema":{"type":"string","format":"uuid","description":"The integration id."}},{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"The runs.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationSyncRunList"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `AUTH-1002`: your role lacks the `settings.manage` permission. `API-8102`: the API key or app lacks the `integrations:read` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"`INT-7001`: no integration with this id in your organization.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["integrations:read"]},{"oauth2":["integrations:read"]}],"summary":"The latest sync runs of an integration","tags":["integrations"]}},"/v1/integrations/{integrationId}/sync":{"post":{"description":"Queues a reading of the system’s customers and orders changed since the last one (Rabt also syncs hourly and on every webhook). While a run waits or runs, that run is returned. A store read per contact (`reads_on_contact`: Salla, Zid) is never synced: `INT-7023`.","operationId":"syncIntegration","parameters":[{"name":"integrationId","required":true,"in":"path","description":"The integration id.","schema":{"type":"string","format":"uuid","description":"The integration id."}},{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}},{"name":"Idempotency-Key","in":"header","description":"A unique key for this operation (e.g. a UUID, 1 to 255 visible characters), kept 24 hours: repeating the request with the same key returns the first answer (`Idempotent-Replayed: true`) instead of doing it again. Errors: `API-8109` (400) a key that is not valid, `API-8108` (409, retryable) the first request with this key is still running, `API-8107` (422) the key was used for a different request; `API-8118` (409) the first request created something whose secret is shown only once, so its answer is not repeated. An answer with `shown_once` repeats its secret within 10 minutes, then `API-8118`.","required":false,"schema":{"type":"string","minLength":1,"maxLength":255}}],"responses":{"202":{"description":"The sync run.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationSyncRun"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `AUTH-1003`: your seat was deactivated (view only). `AUTH-1004`: all seats are inactive because the seat charge was not paid (view only). `AUTH-1002`: your role lacks the `settings.manage` permission. `API-8102`: the API key or app lacks the `integrations:write` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in. `API-8148`: not available to test keys (API test mode).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"`INT-7001`: no integration with this id in your organization.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"409":{"description":"`INT-7002`: the integration is disconnected or waits for a reconnection. `INT-7023`: a store read per contact has no sync.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"503":{"description":"`SYS-1001`: the platform is not set up on this Rabt.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["integrations:write"]},{"oauth2":["integrations:write"]}],"summary":"Sync a store now","tags":["integrations"]}},"/v1/integrations/{integrationId}/reconnect":{"post":{"description":"Returns a sign-in URL for the integration’s own store (`needs_reauth` after the platform refused the saved access, or an active one to grant newly added permissions); finishing it with `completeIntegrationConnection` makes it active again.","operationId":"reconnectIntegration","parameters":[{"name":"integrationId","required":true,"in":"path","description":"The integration id.","schema":{"type":"string","format":"uuid","description":"The integration id."}},{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}},{"name":"Idempotency-Key","in":"header","description":"A unique key for this operation (e.g. a UUID, 1 to 255 visible characters), kept 24 hours: repeating the request with the same key returns the first answer (`Idempotent-Replayed: true`) instead of doing it again. Errors: `API-8109` (400) a key that is not valid, `API-8108` (409, retryable) the first request with this key is still running, `API-8107` (422) the key was used for a different request; `API-8118` (409) the first request created something whose secret is shown only once, so its answer is not repeated. An answer with `shown_once` repeats its secret within 10 minutes, then `API-8118`.","required":false,"schema":{"type":"string","minLength":1,"maxLength":255}}],"responses":{"201":{"description":"The sign-in.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationAuthorization"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `AUTH-1003`: your seat was deactivated (view only). `AUTH-1004`: all seats are inactive because the seat charge was not paid (view only). `AUTH-1002`: your role lacks the `settings.manage` permission. `API-8102`: the API key or app lacks the `integrations:write` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in. `API-8148`: not available to test keys (API test mode).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"`INT-7001`: no integration with this id in your organization.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"409":{"description":"`INT-7002`: the integration is disconnected or waits for a reconnection.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"503":{"description":"`SYS-1001`: the platform is not set up on this Rabt.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["integrations:write"]},{"oauth2":["integrations:write"]}],"summary":"Reconnect an integration","tags":["integrations"]}},"/v1/integrations/{integrationId}/disconnect":{"post":{"description":"Removes Rabt’s app from the store where the platform allows it and revokes the access in the token vault; the integration and the customers and orders read stay (Rabt never deletes).","operationId":"disconnectIntegration","parameters":[{"name":"integrationId","required":true,"in":"path","description":"The integration id.","schema":{"type":"string","format":"uuid","description":"The integration id."}},{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}},{"name":"Idempotency-Key","in":"header","description":"A unique key for this operation (e.g. a UUID, 1 to 255 visible characters), kept 24 hours: repeating the request with the same key returns the first answer (`Idempotent-Replayed: true`) instead of doing it again. Errors: `API-8109` (400) a key that is not valid, `API-8108` (409, retryable) the first request with this key is still running, `API-8107` (422) the key was used for a different request; `API-8118` (409) the first request created something whose secret is shown only once, so its answer is not repeated. An answer with `shown_once` repeats its secret within 10 minutes, then `API-8118`.","required":false,"schema":{"type":"string","minLength":1,"maxLength":255}}],"responses":{"200":{"description":"The integration.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Integration"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `AUTH-1003`: your seat was deactivated (view only). `AUTH-1004`: all seats are inactive because the seat charge was not paid (view only). `AUTH-1002`: your role lacks the `settings.manage` permission. `API-8102`: the API key or app lacks the `integrations:write` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in. `API-8148`: not available to test keys (API test mode).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"`INT-7001`: no integration with this id in your organization.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["integrations:write"]},{"oauth2":["integrations:write"]}],"summary":"Disconnect an integration","tags":["integrations"]}},"/v1/search":{"get":{"description":"Tickets, message texts on every channel, internal notes, contacts, companies and their notes, and your internal chat messages, in one query, grouped by kind, newest first within a kind (a ticket number or an exact phone or email match first). Only what you may see: tickets assigned to you or in your spaces (all of them with `tickets.view_all`) and only the chat rooms you belong to. An API key or app gets only the kinds it also has a read scope for (`tickets:read`, `contacts:read`, `companies:read`, `chat:read`). While the Rabt team has paused non-essential features during an incident, it answers `SYS-1071`.","operationId":"search","parameters":[{"name":"q","required":true,"in":"query","description":"What to find: words (prefixes match), a phone number, an email address or a ticket number (`1283` or `#1283`). Arabic-aware (hamza, ta marbuta, diacritics, Arabic-Indic digits).","schema":{"type":"string","minLength":1,"maxLength":200,"description":"What to find: words (prefixes match), a phone number, an email address or a ticket number (`1283` or `#1283`). Arabic-aware (hamza, ta marbuta, diacritics, Arabic-Indic digits)."}},{"name":"types","required":false,"in":"query","description":"Only these kinds, comma-separated (e.g. `ticket,message`); default: all.","schema":{"description":"Only these kinds, comma-separated (e.g. `ticket,message`); default: all.","type":"string","maxLength":200,"pattern":"^(ticket|message|note|contact|company|contact_note|company_note|chat_message|external_record)(,(ticket|message|note|contact|company|contact_note|company_note|chat_message|external_record))*$"}},{"name":"limit","required":false,"in":"query","description":"Results of each kind (1 to 20, default 5).","schema":{"default":5,"description":"Results of each kind (1 to 20, default 5).","type":"integer","minimum":1,"maximum":20}},{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"The results.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchResults"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `API-8102`: the API key or app lacks the `search:read` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["search:read"]},{"oauth2":["search:read"]}],"summary":"Search everything","tags":["search"]}},"/v1/ai/levels":{"get":{"description":"The organization's connected channels and web chat widgets with their conversation sides, addresses and phone numbers (each a level below the organization), and how many blocks and whether switches are set at each level.","operationId":"listAiLevels","parameters":[{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"The levels.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AiLevels"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `AUTH-1002`: your role lacks the `ai.manage` permission. `API-8102`: the API key or app lacks the `ai:read` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["ai:read"]},{"oauth2":["ai:read"]}],"summary":"The levels of AI blocks and switches","tags":["ai"]}},"/v1/ai/blocks":{"get":{"description":"The Markdown blocks of the AI agent, by level and order; filter by level, channel type, channel, private/public or address.","operationId":"listAiBlocks","parameters":[{"name":"level","required":false,"in":"query","schema":{"$ref":"#/components/schemas/AiLevel"}},{"name":"channel_type","required":false,"in":"query","description":"Blocks of this channel type.","schema":{"description":"Blocks of this channel type.","$ref":"#/components/schemas/AiChannelType"}},{"name":"channel_id","required":false,"in":"query","description":"Blocks of this channel (every level).","schema":{"description":"Blocks of this channel (every level).","type":"string","format":"uuid"}},{"name":"kind","required":false,"in":"query","schema":{"$ref":"#/components/schemas/AiKind"}},{"name":"channel_address_id","required":false,"in":"query","schema":{"type":"string","format":"uuid"}},{"name":"phone_number_id","required":false,"in":"query","description":"Its id, or the number in E.164 (the organization’s active number with it; VOI-4578 if none).","schema":{"description":"Its id, or the number in E.164 (the organization’s active number with it; VOI-4578 if none).","anyOf":[{"type":"string","format":"uuid"},{"type":"string","pattern":"^[+][1-9][0-9]{1,14}$"}]}},{"name":"include_archived","required":false,"in":"query","description":"Include archived blocks (default false).","schema":{"description":"Include archived blocks (default false).","type":"string","enum":["true","false"]}},{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"The blocks.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AiBlockList"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `AUTH-1002`: your role lacks the `ai.manage` permission. `API-8102`: the API key or app lacks the `ai:read` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["ai:read"]},{"oauth2":["ai:read"]}],"summary":"List AI blocks","tags":["ai"]},"post":{"description":"A Markdown block of knowledge or instructions at one level. It applies immediately; the more specific levels come last and take precedence. One topic per block, titled by the topic or question; facts (prices, hours, policies, links), no stories and no customer data; say when to hand off to a member. General rules once at the organization level, a lower level only for what differs: read list_ai_blocks for the level and its parents first, to avoid duplicates. `internal` is guidance never quoted to a customer; `always_include` is for rules that must always apply. A reply reads every block up to 120 KB (above it only the related parts); a call carries 24 KB. See rabt://guide/ai-instructions.","operationId":"createAiBlock","parameters":[{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}},{"name":"Idempotency-Key","in":"header","description":"A unique key for this operation (e.g. a UUID, 1 to 255 visible characters), kept 24 hours: repeating the request with the same key returns the first answer (`Idempotent-Replayed: true`) instead of doing it again. Errors: `API-8109` (400) a key that is not valid, `API-8108` (409, retryable) the first request with this key is still running, `API-8107` (422) the key was used for a different request; `API-8118` (409) the first request created something whose secret is shown only once, so its answer is not repeated. An answer with `shown_once` repeats its secret within 10 minutes, then `API-8118`.","required":false,"schema":{"type":"string","minLength":1,"maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateAiBlock"}}}},"responses":{"201":{"description":"The block.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AiBlock"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `AUTH-1003`: your seat was deactivated (view only). `AUTH-1004`: all seats are inactive because the seat charge was not paid (view only). `AUTH-1002`: your role lacks the `ai.manage` permission. `API-8102`: the API key or app lacks the `ai:write` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"description":"`API-8001`: some fields are missing or not valid. `details.fields` lists each invalid field with its own code (e.g. `API-8002` required, `API-8012` wrong format). `AI-5031`: `channel_id` is not a connected channel or web chat widget of the organization. `AI-5032`: `channel_address_id` is not a current address (of that channel). `AI-5035`: a `kind` level on a channel with one side only (its account is that side). `AI-5036`: a level the channel does not have (an `address` of a channel whose account is its connection, or a `channel_type` the AI agent does not reply on). `AI-5037`: `channel` on a connection whose accounts are its addresses (email, calls, reviews).","headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["ai:write"]},{"oauth2":["ai:write"]}],"summary":"Add an AI block","tags":["ai"]}},"/v1/ai/blocks/{blockId}":{"get":{"operationId":"getAiBlock","parameters":[{"name":"blockId","required":true,"in":"path","description":"The block id.","schema":{"type":"string","format":"uuid","description":"The block id."}},{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"The block.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AiBlock"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `AUTH-1002`: your role lacks the `ai.manage` permission. `API-8102`: the API key or app lacks the `ai:read` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"`AI-5030`: no such block in this organization.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["ai:read"]},{"oauth2":["ai:read"]}],"summary":"An AI block","tags":["ai"]},"patch":{"description":"Its title, content, 'always include' flag, 'internal' flag, active flag or order. One topic per block, titled by the topic or question; facts (prices, hours, policies, links), no stories and no customer data; say when to hand off to a member. General rules once at the organization level, a lower level only for what differs: read list_ai_blocks for the level and its parents first, to avoid duplicates. `internal` is guidance never quoted to a customer; `always_include` is for rules that must always apply. A reply reads every block up to 120 KB (above it only the related parts); a call carries 24 KB. See rabt://guide/ai-instructions.","operationId":"updateAiBlock","parameters":[{"name":"blockId","required":true,"in":"path","description":"The block id.","schema":{"type":"string","format":"uuid","description":"The block id."}},{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}},{"name":"Idempotency-Key","in":"header","description":"A unique key for this operation (e.g. a UUID, 1 to 255 visible characters), kept 24 hours: repeating the request with the same key returns the first answer (`Idempotent-Replayed: true`) instead of doing it again. Errors: `API-8109` (400) a key that is not valid, `API-8108` (409, retryable) the first request with this key is still running, `API-8107` (422) the key was used for a different request; `API-8118` (409) the first request created something whose secret is shown only once, so its answer is not repeated. An answer with `shown_once` repeats its secret within 10 minutes, then `API-8118`.","required":false,"schema":{"type":"string","minLength":1,"maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateAiBlock"}}}},"responses":{"200":{"description":"The block.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AiBlock"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `AUTH-1003`: your seat was deactivated (view only). `AUTH-1004`: all seats are inactive because the seat charge was not paid (view only). `AUTH-1002`: your role lacks the `ai.manage` permission. `API-8102`: the API key or app lacks the `ai:write` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"`AI-5030`: no such block in this organization.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"409":{"description":"`AI-5033`: the block is archived.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["ai:write"]},{"oauth2":["ai:write"]}],"summary":"Edit an AI block","tags":["ai"]}},"/v1/ai/blocks/{blockId}/archive":{"post":{"description":"Never deleted: the AI agent no longer receives it. Archiving it again changes nothing.","operationId":"archiveAiBlock","parameters":[{"name":"blockId","required":true,"in":"path","description":"The block id.","schema":{"type":"string","format":"uuid","description":"The block id."}},{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}},{"name":"Idempotency-Key","in":"header","description":"A unique key for this operation (e.g. a UUID, 1 to 255 visible characters), kept 24 hours: repeating the request with the same key returns the first answer (`Idempotent-Replayed: true`) instead of doing it again. Errors: `API-8109` (400) a key that is not valid, `API-8108` (409, retryable) the first request with this key is still running, `API-8107` (422) the key was used for a different request; `API-8118` (409) the first request created something whose secret is shown only once, so its answer is not repeated. An answer with `shown_once` repeats its secret within 10 minutes, then `API-8118`.","required":false,"schema":{"type":"string","minLength":1,"maxLength":255}}],"responses":{"200":{"description":"The archived block.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AiBlock"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `AUTH-1003`: your seat was deactivated (view only). `AUTH-1004`: all seats are inactive because the seat charge was not paid (view only). `AUTH-1002`: your role lacks the `ai.manage` permission. `API-8102`: the API key or app lacks the `ai:write` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"`AI-5030`: no such block in this organization.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["ai:write"]},{"oauth2":["ai:write"]}],"summary":"Archive an AI block","tags":["ai"]}},"/v1/ai/blocks/{blockId}/files":{"get":{"description":"The files the AI agent may send with this block, oldest first.","operationId":"listAiBlockFiles","parameters":[{"name":"blockId","required":true,"in":"path","description":"The block id.","schema":{"type":"string","format":"uuid","description":"The block id."}},{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"The files.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AiBlockFileList"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `AUTH-1002`: your role lacks the `ai.manage` permission. `API-8102`: the API key or app lacks the `ai:read` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"`AI-5030`: no such block in this organization.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["ai:read"]},{"oauth2":["ai:read"]}],"summary":"List the files of an AI block","tags":["ai"]},"post":{"description":"An image, PDF, document or video the AI agent may send with this block. Returns the signed request that uploads it straight to storage (valid 15 minutes); then complete the upload. It is scanned for malware next. Audited as `ai_block.file_added`.","operationId":"addAiBlockFile","parameters":[{"name":"blockId","required":true,"in":"path","description":"The block id.","schema":{"type":"string","format":"uuid","description":"The block id."}},{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}},{"name":"Idempotency-Key","in":"header","description":"A unique key for this operation (e.g. a UUID, 1 to 255 visible characters), kept 24 hours: repeating the request with the same key returns the first answer (`Idempotent-Replayed: true`) instead of doing it again. Errors: `API-8109` (400) a key that is not valid, `API-8108` (409, retryable) the first request with this key is still running, `API-8107` (422) the key was used for a different request; `API-8118` (409) the first request created something whose secret is shown only once, so its answer is not repeated. An answer with `shown_once` repeats its secret within 10 minutes, then `API-8118`.","required":false,"schema":{"type":"string","minLength":1,"maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AiBlockFileUploadRequest"}}}},"responses":{"201":{"description":"The file and its upload.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AiBlockFileUpload"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `AUTH-1003`: your seat was deactivated (view only). `AUTH-1004`: all seats are inactive because the seat charge was not paid (view only). `AUTH-1002`: your role lacks the `ai.manage` permission. `API-8102`: the API key or app lacks the `ai:write` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"`AI-5030`: no such block in this organization. Also an archived block.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"description":"`API-8001`: some fields are missing or not valid. `details.fields` lists each invalid field with its own code (e.g. `API-8002` required, `API-8012` wrong format). `AI-5064`: a type a knowledge block does not take. `AI-5065`: the block holds the most files it can. `TKT-6114`: the file is larger than allowed.","headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["ai:write"]},{"oauth2":["ai:write"]}],"summary":"Add a file to an AI block","tags":["ai"]}},"/v1/ai/files/{fileId}/complete":{"post":{"description":"Once the file is in storage with its size; it is scanned for malware next.","operationId":"completeAiBlockFile","parameters":[{"name":"fileId","required":true,"in":"path","description":"The file id.","schema":{"type":"string","format":"uuid","description":"The file id."}},{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}},{"name":"Idempotency-Key","in":"header","description":"A unique key for this operation (e.g. a UUID, 1 to 255 visible characters), kept 24 hours: repeating the request with the same key returns the first answer (`Idempotent-Replayed: true`) instead of doing it again. Errors: `API-8109` (400) a key that is not valid, `API-8108` (409, retryable) the first request with this key is still running, `API-8107` (422) the key was used for a different request; `API-8118` (409) the first request created something whose secret is shown only once, so its answer is not repeated. An answer with `shown_once` repeats its secret within 10 minutes, then `API-8118`.","required":false,"schema":{"type":"string","minLength":1,"maxLength":255}}],"responses":{"200":{"description":"The file.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AiBlockFile"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `AUTH-1003`: your seat was deactivated (view only). `AUTH-1004`: all seats are inactive because the seat charge was not paid (view only). `AUTH-1002`: your role lacks the `ai.manage` permission. `API-8102`: the API key or app lacks the `ai:write` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"`AI-5066`: no such file of a block in this organization (or it was removed).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"409":{"description":"`TKT-6115`: the file is not in storage, or has another size.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["ai:write"]},{"oauth2":["ai:write"]}],"summary":"Complete an AI block file upload","tags":["ai"]}},"/v1/ai/files/{fileId}":{"get":{"operationId":"getAiBlockFile","parameters":[{"name":"fileId","required":true,"in":"path","description":"The file id.","schema":{"type":"string","format":"uuid","description":"The file id."}},{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"The file.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AiBlockFile"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `AUTH-1002`: your role lacks the `ai.manage` permission. `API-8102`: the API key or app lacks the `ai:read` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"`AI-5066`: no such file of a block in this organization (or it was removed).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["ai:read"]},{"oauth2":["ai:read"]}],"summary":"An AI block file (its scan status)","tags":["ai"]}},"/v1/ai/files/{fileId}/download":{"get":{"operationId":"downloadAiBlockFile","parameters":[{"name":"fileId","required":true,"in":"path","description":"The file id.","schema":{"type":"string","format":"uuid","description":"The file id."}},{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"The link.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AiBlockFileDownload"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `AUTH-1002`: your role lacks the `ai.manage` permission. `API-8102`: the API key or app lacks the `ai:read` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"`AI-5066`: no such file of a block in this organization (or it was removed).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"409":{"description":"`TKT-6112`: not uploaded or scanned yet (or the scan failed). `TKT-6113`: quarantined, it contains malware.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["ai:read"]},{"oauth2":["ai:read"]}],"summary":"A download link for an AI block file (valid 5 minutes)","tags":["ai"]}},"/v1/ai/files/{fileId}/remove":{"post":{"description":"Kept, never deleted: the AI agent no longer sends it and its link stops working. Audited as `ai_block.file_removed`.","operationId":"removeAiBlockFile","parameters":[{"name":"fileId","required":true,"in":"path","description":"The file id.","schema":{"type":"string","format":"uuid","description":"The file id."}},{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}},{"name":"Idempotency-Key","in":"header","description":"A unique key for this operation (e.g. a UUID, 1 to 255 visible characters), kept 24 hours: repeating the request with the same key returns the first answer (`Idempotent-Replayed: true`) instead of doing it again. Errors: `API-8109` (400) a key that is not valid, `API-8108` (409, retryable) the first request with this key is still running, `API-8107` (422) the key was used for a different request; `API-8118` (409) the first request created something whose secret is shown only once, so its answer is not repeated. An answer with `shown_once` repeats its secret within 10 minutes, then `API-8118`.","required":false,"schema":{"type":"string","minLength":1,"maxLength":255}}],"responses":{"200":{"description":"The removed file.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AiBlockFile"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `AUTH-1003`: your seat was deactivated (view only). `AUTH-1004`: all seats are inactive because the seat charge was not paid (view only). `AUTH-1002`: your role lacks the `ai.manage` permission. `API-8102`: the API key or app lacks the `ai:write` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"`AI-5066`: no such file of a block in this organization (or it was removed).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["ai:write"]},{"oauth2":["ai:write"]}],"summary":"Remove a file from its AI block","tags":["ai"]}},"/v1/ai/settings":{"get":{"description":"Every channel, private/public and address level that was set, with whether the AI agent replies there. A level never set has its wider level's value; a channel never set is off. The organization level has no switch and is not listed.","operationId":"listAiSettings","parameters":[{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"The switches.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AiSettingsList"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `API-8102`: the API key or app lacks the `ai:read` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["ai:read"]},{"oauth2":["ai:read"]}],"summary":"List the AI switches of every level","tags":["ai"]},"put":{"description":"The AI agent replies at one channel, private/public or address level, or not (`enabled`). A level never set has its wider level's value; a channel never set is off. Deprecated: `level: organization` sets every text channel and web chat widget with no value of its own to `enabled` and answers with the organization's row.","operationId":"setAiSettings","parameters":[{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}},{"name":"Idempotency-Key","in":"header","description":"A unique key for this operation (e.g. a UUID, 1 to 255 visible characters), kept 24 hours: repeating the request with the same key returns the first answer (`Idempotent-Replayed: true`) instead of doing it again. Errors: `API-8109` (400) a key that is not valid, `API-8108` (409, retryable) the first request with this key is still running, `API-8107` (422) the key was used for a different request; `API-8118` (409) the first request created something whose secret is shown only once, so its answer is not repeated. An answer with `shown_once` repeats its secret within 10 minutes, then `API-8118`.","required":false,"schema":{"type":"string","minLength":1,"maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SetAiSettings"}}}},"responses":{"200":{"description":"The switch.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AiSettings"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `AUTH-1003`: your seat was deactivated (view only). `AUTH-1004`: all seats are inactive because the seat charge was not paid (view only). `AUTH-1002`: your role lacks the `ai.manage` permission. `API-8102`: the API key or app lacks the `ai:write` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"description":"`API-8001`: some fields are missing or not valid. `details.fields` lists each invalid field with its own code (e.g. `API-8002` required, `API-8012` wrong format). `AI-5031`: `channel_id` is not a connected channel or web chat widget of the organization. `AI-5032`: `channel_address_id` is not a current address (of that channel). `AI-5035`: a `kind` level on a channel with one side only (its account is that side). `AI-5036`: a level the channel does not have (an `address` of a channel whose account is its connection, or a `channel_type` the AI agent does not reply on). `AI-5037`: `channel` on a connection whose accounts are its addresses (email, calls, reviews).","headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["ai:write"]},{"oauth2":["ai:write"]}],"summary":"Turn the AI agent on or off at a level","tags":["ai"]}},"/v1/ai/settings/effective":{"get":{"description":"For a ticket on a channel, private or public, and address: whether the AI agent replies, with the level that decided it.","operationId":"getEffectiveAiSettings","parameters":[{"name":"channel_id","required":false,"in":"query","description":"The channel or web chat widget; omitted: the organization level only.","schema":{"description":"The channel or web chat widget; omitted: the organization level only.","type":"string","format":"uuid"}},{"name":"kind","required":false,"in":"query","description":"Private (default) or public.","schema":{"description":"Private (default) or public.","$ref":"#/components/schemas/AiKind"}},{"name":"channel_address_id","required":false,"in":"query","description":"The address, if any.","schema":{"description":"The address, if any.","type":"string","format":"uuid"}},{"name":"phone_number_id","required":false,"in":"query","description":"The phone number, if any: its id, or the number in E.164.","schema":{"description":"The phone number, if any: its id, or the number in E.164.","anyOf":[{"type":"string","format":"uuid"},{"type":"string","pattern":"^[+][1-9][0-9]{1,14}$"}]}},{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"The switches.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EffectiveAiSettings"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `API-8102`: the API key or app lacks the `ai:read` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"description":"`API-8001`: some fields are missing or not valid. `details.fields` lists each invalid field with its own code (e.g. `API-8002` required, `API-8012` wrong format). `AI-5032`: `channel_address_id` is not a current address (of that channel).","headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["ai:read"]},{"oauth2":["ai:read"]}],"summary":"The AI switch that applies","tags":["ai"]}},"/v1/ai/knowledge":{"get":{"description":"The blocks of the organization, the channel, private or public, and the address, in the order they are sent; whether they are sent in full or as the relevant parts; and the switches that apply.","operationId":"previewAiKnowledge","parameters":[{"name":"channel_id","required":false,"in":"query","description":"The channel or web chat widget; omitted: the organization level only.","schema":{"description":"The channel or web chat widget; omitted: the organization level only.","type":"string","format":"uuid"}},{"name":"kind","required":false,"in":"query","description":"Private (default) or public.","schema":{"description":"Private (default) or public.","$ref":"#/components/schemas/AiKind"}},{"name":"channel_address_id","required":false,"in":"query","description":"The address, if any.","schema":{"description":"The address, if any.","type":"string","format":"uuid"}},{"name":"phone_number_id","required":false,"in":"query","description":"The phone number, if any: its id, or the number in E.164.","schema":{"description":"The phone number, if any: its id, or the number in E.164.","anyOf":[{"type":"string","format":"uuid"},{"type":"string","pattern":"^[+][1-9][0-9]{1,14}$"}]}},{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"The knowledge.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AiKnowledgePreview"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `AUTH-1002`: your role lacks the `ai.manage` permission. `API-8102`: the API key or app lacks the `ai:read` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"description":"`API-8001`: some fields are missing or not valid. `details.fields` lists each invalid field with its own code (e.g. `API-8002` required, `API-8012` wrong format). `AI-5032`: `channel_address_id` is not a current address (of that channel).","headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["ai:read"]},{"oauth2":["ai:read"]}],"summary":"What the AI agent receives for a ticket","tags":["ai"]}},"/v1/ai/knowledge/embed":{"post":{"description":"Asks the worker to prepare the organization's large block set now (after a failure shown as `embedding_error` on the blocks), instead of waiting for the hourly run. Paid as AI usage; nothing is prepared while the blocks are small.","operationId":"requestAiKnowledgeEmbedding","parameters":[{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}},{"name":"Idempotency-Key","in":"header","description":"A unique key for this operation (e.g. a UUID, 1 to 255 visible characters), kept 24 hours: repeating the request with the same key returns the first answer (`Idempotent-Replayed: true`) instead of doing it again. Errors: `API-8109` (400) a key that is not valid, `API-8108` (409, retryable) the first request with this key is still running, `API-8107` (422) the key was used for a different request; `API-8118` (409) the first request created something whose secret is shown only once, so its answer is not repeated. An answer with `shown_once` repeats its secret within 10 minutes, then `API-8118`.","required":false,"schema":{"type":"string","minLength":1,"maxLength":255}}],"responses":{"202":{"description":"Asked for.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AiEmbeddingRequest"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `AUTH-1003`: your seat was deactivated (view only). `AUTH-1004`: all seats are inactive because the seat charge was not paid (view only). `AUTH-1002`: your role lacks the `ai.manage` permission. `API-8102`: the API key or app lacks the `ai:write` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["ai:write"]},{"oauth2":["ai:write"]}],"summary":"Prepare the AI blocks again now","tags":["ai"]}},"/v1/ai/agent":{"get":{"description":"The organization's one kill switch of the AI agent, messages and calls: while it is stopped the AI agent replies nowhere and answers no call, whatever the level switches say. The same switch is `kill_switch` on `PATCH /v1/voice/ai-agent`.","operationId":"getAiAgentSwitch","parameters":[{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"The switch.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AiAgentSwitch"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `AUTH-1002`: your role lacks the `ai.manage` permission. `API-8102`: the API key or app lacks the `ai:read` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["ai:read"]},{"oauth2":["ai:read"]}],"summary":"Whether the AI agent is stopped everywhere","tags":["ai"]},"put":{"description":"One click (docs/24 #41), for messages and calls: `stopped: true` stops the AI agent on every channel and every call, hands every conversation it is replying in to the members at once and every call it is on within seconds; `false` starts it again (it takes new conversations and calls; a member turns it on again in a handed-off one). The same switch is `kill_switch` on `PATCH /v1/voice/ai-agent`; each change publishes `ai_agent.switch_changed` and `voice.settings_updated`. Setting the state it has changes nothing.","operationId":"setAiAgentSwitch","parameters":[{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}},{"name":"Idempotency-Key","in":"header","description":"A unique key for this operation (e.g. a UUID, 1 to 255 visible characters), kept 24 hours: repeating the request with the same key returns the first answer (`Idempotent-Replayed: true`) instead of doing it again. Errors: `API-8109` (400) a key that is not valid, `API-8108` (409, retryable) the first request with this key is still running, `API-8107` (422) the key was used for a different request; `API-8118` (409) the first request created something whose secret is shown only once, so its answer is not repeated. An answer with `shown_once` repeats its secret within 10 minutes, then `API-8118`.","required":false,"schema":{"type":"string","minLength":1,"maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SetAiAgentSwitch"}}}},"responses":{"200":{"description":"The switch.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AiAgentSwitch"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `AUTH-1003`: your seat was deactivated (view only). `AUTH-1004`: all seats are inactive because the seat charge was not paid (view only). `AUTH-1002`: your role lacks the `ai.manage` permission. `API-8102`: the API key or app lacks the `ai:write` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["ai:write"]},{"oauth2":["ai:write"]}],"summary":"Stop the AI agent everywhere, or start it again","tags":["ai"]}},"/v1/ai/interactions":{"get":{"description":"Every turn of the AI agent, newest first: the customer message it answered, its reply, the blocks it read, the tools it called, what it was charged, or its error. Filter by ticket or outcome.","operationId":"listAiInteractions","parameters":[{"name":"ticket_id","required":false,"in":"query","description":"Only the turns of this ticket.","schema":{"description":"Only the turns of this ticket.","type":"string","format":"uuid"}},{"name":"outcome","required":false,"in":"query","schema":{"$ref":"#/components/schemas/AiInteractionOutcome"}},{"name":"cursor","required":false,"in":"query","description":"`next_cursor` of a page.","schema":{"description":"`next_cursor` of a page.","type":"string","minLength":1,"maxLength":200}},{"name":"page","required":false,"in":"query","description":"A numbered page to jump to, from 1, of `limit` rows: its first row must be within the first 10000 rows of the list. Ignored with `cursor`; the next pages follow `next_cursor`.","schema":{"description":"A numbered page to jump to, from 1, of `limit` rows: its first row must be within the first 10000 rows of the list. Ignored with `cursor`; the next pages follow `next_cursor`.","type":"integer","minimum":1,"maximum":10000}},{"name":"limit","required":false,"in":"query","description":"1–100 (50).","schema":{"description":"1–100 (50).","type":"integer","minimum":1,"maximum":100}},{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"A page.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AiInteractionPage"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`API-8001`: a cursor that is not one of ours.\n\n`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `AUTH-1002`: your role lacks the `ai.manage` permission. `API-8102`: the API key or app lacks the `ai:read` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["ai:read"]},{"oauth2":["ai:read"]}],"summary":"The AI agent's turns","tags":["ai"]}},"/v1/ai/interactions/{interactionId}":{"get":{"operationId":"getAiInteraction","parameters":[{"name":"interactionId","required":true,"in":"path","description":"The AI agent turn id.","schema":{"type":"string","format":"uuid","description":"The AI agent turn id."}},{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"The turn.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AiInteraction"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `AUTH-1002`: your role lacks the `ai.manage` permission. `API-8102`: the API key or app lacks the `ai:read` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"`AI-5041`: no such turn in this organization.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["ai:read"]},{"oauth2":["ai:read"]}],"summary":"One turn of the AI agent","tags":["ai"]}},"/v1/webchat-widgets":{"get":{"operationId":"listWebchatWidgets","parameters":[{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"The widgets.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebchatWidgetList"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `API-8102`: the API key or app lacks the `channels:read` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["channels:read"]},{"oauth2":["channels:read"]}],"summary":"List the chat widgets","tags":["webchat"]},"post":{"description":"A widget for the organization’s websites; every field may be left out (no body): its name is then the organization’s. It loads on any website with its key; its language and side follow the visitor. The answer carries the widget with its embed snippet, and `identity_secret: null` (deprecated): identity verification is set up later with `rotateWebchatWidgetSecret`.","operationId":"createWebchatWidget","parameters":[{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}},{"name":"Idempotency-Key","in":"header","description":"A unique key for this operation (e.g. a UUID, 1 to 255 visible characters), kept 24 hours: repeating the request with the same key returns the first answer (`Idempotent-Replayed: true`) instead of doing it again. Errors: `API-8109` (400) a key that is not valid, `API-8108` (409, retryable) the first request with this key is still running, `API-8107` (422) the key was used for a different request; `API-8118` (409) the first request created something whose secret is shown only once, so its answer is not repeated. An answer with `shown_once` repeats its secret within 10 minutes, then `API-8118`.","required":false,"schema":{"type":"string","minLength":1,"maxLength":255}}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateWebchatWidget"}}}},"responses":{"201":{"description":"The widget; `identity_secret` is `null` (deprecated here).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebchatWidgetCreated"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `AUTH-1003`: your seat was deactivated (view only). `AUTH-1004`: all seats are inactive because the seat charge was not paid (view only). `AUTH-1002`: your role lacks the `channels.manage` permission. `API-8102`: the API key or app lacks the `channels:write` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in. `API-8148`: not available to test keys (API test mode).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"409":{"description":"`WEB-4015`: the organization has its maximum of chat widgets.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["channels:write"]},{"oauth2":["channels:write"]}],"summary":"Create a chat widget","tags":["webchat"]}},"/v1/webchat-widgets/{id}":{"get":{"operationId":"getWebchatWidget","parameters":[{"name":"id","required":true,"in":"path","description":"The widget id.","schema":{"type":"string","format":"uuid","description":"The widget id."}},{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"The widget.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebchatWidget"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `API-8102`: the API key or app lacks the `channels:read` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"`WEB-4014`: no such chat widget (or it was removed).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["channels:read"]},{"oauth2":["channels:read"]}],"summary":"Get a chat widget","tags":["webchat"]},"patch":{"description":"Its name, header color, privacy policy or pre-chat form; `status: disabled` switches it off on every website.","operationId":"updateWebchatWidget","parameters":[{"name":"id","required":true,"in":"path","description":"The widget id.","schema":{"type":"string","format":"uuid","description":"The widget id."}},{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}},{"name":"Idempotency-Key","in":"header","description":"A unique key for this operation (e.g. a UUID, 1 to 255 visible characters), kept 24 hours: repeating the request with the same key returns the first answer (`Idempotent-Replayed: true`) instead of doing it again. Errors: `API-8109` (400) a key that is not valid, `API-8108` (409, retryable) the first request with this key is still running, `API-8107` (422) the key was used for a different request; `API-8118` (409) the first request created something whose secret is shown only once, so its answer is not repeated. An answer with `shown_once` repeats its secret within 10 minutes, then `API-8118`.","required":false,"schema":{"type":"string","minLength":1,"maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateWebchatWidget"}}}},"responses":{"200":{"description":"The widget.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebchatWidget"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `AUTH-1003`: your seat was deactivated (view only). `AUTH-1004`: all seats are inactive because the seat charge was not paid (view only). `AUTH-1002`: your role lacks the `channels.manage` permission. `API-8102`: the API key or app lacks the `channels:write` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in. `API-8148`: not available to test keys (API test mode).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"`WEB-4014`: no such chat widget (or it was removed).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["channels:write"]},{"oauth2":["channels:write"]}],"summary":"Update a chat widget","tags":["webchat"]},"delete":{"description":"It stops loading on every website and its visitors’ sessions end; its conversations stay tickets.","operationId":"deleteWebchatWidget","parameters":[{"name":"id","required":true,"in":"path","description":"The widget id.","schema":{"type":"string","format":"uuid","description":"The widget id."}},{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}}],"responses":{"204":{"description":"Removed.","headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `AUTH-1003`: your seat was deactivated (view only). `AUTH-1004`: all seats are inactive because the seat charge was not paid (view only). `AUTH-1002`: your role lacks the `channels.manage` permission. `API-8102`: the API key or app lacks the `channels:write` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in. `API-8148`: not available to test keys (API test mode).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"`WEB-4014`: no such chat widget (or it was removed).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["channels:write"]},{"oauth2":["channels:write"]}],"summary":"Remove a chat widget","tags":["webchat"]}},"/v1/webchat-widgets/{id}/logo":{"put":{"description":"PNG, JPEG or WebP, at most 128 KB, sent as base64. The file is scanned for malware before it is kept.","operationId":"setWebchatWidgetLogo","parameters":[{"name":"id","required":true,"in":"path","description":"The widget id.","schema":{"type":"string","format":"uuid","description":"The widget id."}},{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}},{"name":"Idempotency-Key","in":"header","description":"A unique key for this operation (e.g. a UUID, 1 to 255 visible characters), kept 24 hours: repeating the request with the same key returns the first answer (`Idempotent-Replayed: true`) instead of doing it again. Errors: `API-8109` (400) a key that is not valid, `API-8108` (409, retryable) the first request with this key is still running, `API-8107` (422) the key was used for a different request; `API-8118` (409) the first request created something whose secret is shown only once, so its answer is not repeated. An answer with `shown_once` repeats its secret within 10 minutes, then `API-8118`.","required":false,"schema":{"type":"string","minLength":1,"maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebchatWidgetLogo"}}}},"responses":{"200":{"description":"The widget.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebchatWidget"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `AUTH-1003`: your seat was deactivated (view only). `AUTH-1004`: all seats are inactive because the seat charge was not paid (view only). `AUTH-1002`: your role lacks the `channels.manage` permission. `API-8102`: the API key or app lacks the `channels:write` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in. `API-8148`: not available to test keys (API test mode).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"`WEB-4014`: no such chat widget (or it was removed).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"description":"`API-8001`: some fields are missing or not valid. `details.fields` lists each invalid field with its own code (e.g. `API-8002` required, `API-8012` wrong format). `WEB-4017`: the image is not a PNG, JPEG or WebP of at most 128 KB. `TKT-6194`: the malware scan found malware in it (refused, not kept).","headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"429":{"$ref":"#/components/responses/RateLimited"},"503":{"description":"`TKT-6195`: the malware scanner did not answer (upload it again later). `SYS-1001`: in production the malware scanner (ClamAV) is not configured.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["channels:write"]},{"oauth2":["channels:write"]}],"summary":"Replace a chat widget’s logo","tags":["webchat"]},"delete":{"description":"The widget shows the business’s initials instead.","operationId":"removeWebchatWidgetLogo","parameters":[{"name":"id","required":true,"in":"path","description":"The widget id.","schema":{"type":"string","format":"uuid","description":"The widget id."}},{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"The widget.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebchatWidget"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `AUTH-1003`: your seat was deactivated (view only). `AUTH-1004`: all seats are inactive because the seat charge was not paid (view only). `AUTH-1002`: your role lacks the `channels.manage` permission. `API-8102`: the API key or app lacks the `channels:write` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in. `API-8148`: not available to test keys (API test mode).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"`WEB-4014`: no such chat widget (or it was removed).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["channels:write"]},{"oauth2":["channels:write"]}],"summary":"Remove a chat widget’s logo","tags":["webchat"]}},"/v1/webchat-widgets/{id}/identity-secret":{"post":{"description":"A new identity-verification secret, shown once; the first one sets identity verification up. A previous one keeps verifying signed-in users for 24 hours, so the website can switch without signing anyone out.\n\nFor each page, your server signs an identity token for the signed-in user with the secret: a JWT (HS256) with `sub` (the user’s id), `email` and `phone` (only ones your website verified), `iat`, `exp` (at most 24 hours after `iat`) and a unique `jti`. The page names the user after the embed snippet:\n\n```js\nrabt('identify', { token, name });\nrabt('logout'); // when the user signs out\n```\n\nWith a token, the AI agent may read that user’s earlier conversations and records (by the signed email and phone only). A token that is not signed with the secret, expired, used by another session or contradicted by a `userId`, `email` or `phone` passed beside it is refused (`WEB-4005`), as is a signed user without a secret.\n\nDeprecated: `rabt('identify', { userId, userHash, name, email, phone })`, `userHash` = hex HMAC-SHA256(secret, userId); it signs the user id only, so the AI agent reads nothing for it.","operationId":"rotateWebchatWidgetSecret","parameters":[{"name":"id","required":true,"in":"path","description":"The widget id.","schema":{"type":"string","format":"uuid","description":"The widget id."}},{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}},{"name":"Idempotency-Key","in":"header","description":"A unique key for this operation (e.g. a UUID, 1 to 255 visible characters), kept 24 hours: repeating the request with the same key returns the first answer (`Idempotent-Replayed: true`) instead of doing it again. Errors: `API-8109` (400) a key that is not valid, `API-8108` (409, retryable) the first request with this key is still running, `API-8107` (422) the key was used for a different request; `API-8118` (409) the first request created something whose secret is shown only once, so its answer is not repeated. An answer with `shown_once` repeats its secret within 10 minutes, then `API-8118`.","required":false,"schema":{"type":"string","minLength":1,"maxLength":255}}],"responses":{"201":{"description":"The widget and its new secret.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebchatWidgetWithSecret"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `AUTH-1003`: your seat was deactivated (view only). `AUTH-1004`: all seats are inactive because the seat charge was not paid (view only). `AUTH-1002`: your role lacks the `channels.manage` permission. `API-8102`: the API key or app lacks the `channels:write` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in. `API-8148`: not available to test keys (API test mode).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"`WEB-4014`: no such chat widget (or it was removed).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["channels:write"]},{"oauth2":["channels:write"]}],"summary":"Rotate a chat widget’s identity secret","tags":["webchat"]}},"/v1/abuse-protection/blocks":{"get":{"description":"The live entries, newest first; `include_removed=true` adds the removed ones.","operationId":"listSenderBlocks","parameters":[{"name":"include_removed","required":false,"in":"query","description":"`true`: the removed entries too.","schema":{"description":"`true`: the removed entries too.","type":"string","enum":["true","false"]}},{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"The entries.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SenderBlockList"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `AUTH-1002`: your role lacks the `settings.manage` permission. `API-8102`: the API key or app lacks the `abuse:read` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["abuse:read"]},{"oauth2":["abuse:read"]}],"summary":"List the block list","tags":["abuse-protection"]},"post":{"description":"A phone number, an email address, a handle on a channel, or a web chat network. What a blocked sender sends creates nothing; each refusal is counted on the entry.","operationId":"createSenderBlock","parameters":[{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}},{"name":"Idempotency-Key","in":"header","description":"A unique key for this operation (e.g. a UUID, 1 to 255 visible characters), kept 24 hours: repeating the request with the same key returns the first answer (`Idempotent-Replayed: true`) instead of doing it again. Errors: `API-8109` (400) a key that is not valid, `API-8108` (409, retryable) the first request with this key is still running, `API-8107` (422) the key was used for a different request; `API-8118` (409) the first request created something whose secret is shown only once, so its answer is not repeated. An answer with `shown_once` repeats its secret within 10 minutes, then `API-8118`.","required":false,"schema":{"type":"string","minLength":1,"maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateSenderBlock"}}}},"responses":{"201":{"description":"The entry.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SenderBlock"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `AUTH-1003`: your seat was deactivated (view only). `AUTH-1004`: all seats are inactive because the seat charge was not paid (view only). `AUTH-1002`: your role lacks the `settings.manage` permission. `API-8102`: the API key or app lacks the `abuse:write` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"409":{"description":"`TKT-6143`: the same entry is already on the list.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"description":"`API-8001`: some fields are missing or not valid. `details.fields` lists each invalid field with its own code (e.g. `API-8002` required, `API-8012` wrong format). `TKT-6141`: the value does not fit its kind.","headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["abuse:write"]},{"oauth2":["abuse:write"]}],"summary":"Add to the block list","tags":["abuse-protection"]}},"/v1/abuse-protection/blocks/{id}":{"get":{"operationId":"getSenderBlock","parameters":[{"name":"id","required":true,"in":"path","description":"The block list entry id.","schema":{"type":"string","format":"uuid","description":"The block list entry id."}},{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"The entry.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SenderBlock"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `AUTH-1002`: your role lacks the `settings.manage` permission. `API-8102`: the API key or app lacks the `abuse:read` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"`TKT-6142`: no such block list entry (or it was already removed).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["abuse:read"]},{"oauth2":["abuse:read"]}],"summary":"Get a block list entry","tags":["abuse-protection"]},"delete":{"description":"The sender can write again. The entry is kept with when and by whom it was removed.","operationId":"removeSenderBlock","parameters":[{"name":"id","required":true,"in":"path","description":"The block list entry id.","schema":{"type":"string","format":"uuid","description":"The block list entry id."}},{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"The removed entry.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SenderBlock"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `AUTH-1003`: your seat was deactivated (view only). `AUTH-1004`: all seats are inactive because the seat charge was not paid (view only). `AUTH-1002`: your role lacks the `settings.manage` permission. `API-8102`: the API key or app lacks the `abuse:write` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"`TKT-6142`: no such block list entry (or it was already removed).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["abuse:write"]},{"oauth2":["abuse:write"]}],"summary":"Remove from the block list","tags":["abuse-protection"]}},"/v1/abuse-protection/contacts/{id}/blocks":{"get":{"description":"The live block list entries that match the contact’s phone numbers, email addresses and handles; empty: the contact is not blocked.","operationId":"listContactBlocks","parameters":[{"name":"id","required":true,"in":"path","description":"The contact id.","schema":{"type":"string","format":"uuid","description":"The contact id."}},{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"The entries.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SenderBlockList"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `AUTH-1002`: your role lacks the `settings.manage` permission. `API-8102`: the API key or app lacks the `abuse:read` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"`CRM-6001`: no such contact.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["abuse:read"]},{"oauth2":["abuse:read"]}],"summary":"List a contact’s blocks","tags":["abuse-protection"]}},"/v1/abuse-protection/contacts/{id}/block":{"post":{"description":"Their phone numbers, email addresses and handles go on the block list (those already there are kept); what they send then creates nothing. A sender in quarantine is resolved as blocked.","operationId":"blockContact","parameters":[{"name":"id","required":true,"in":"path","description":"The contact id.","schema":{"type":"string","format":"uuid","description":"The contact id."}},{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}},{"name":"Idempotency-Key","in":"header","description":"A unique key for this operation (e.g. a UUID, 1 to 255 visible characters), kept 24 hours: repeating the request with the same key returns the first answer (`Idempotent-Replayed: true`) instead of doing it again. Errors: `API-8109` (400) a key that is not valid, `API-8108` (409, retryable) the first request with this key is still running, `API-8107` (422) the key was used for a different request; `API-8118` (409) the first request created something whose secret is shown only once, so its answer is not repeated. An answer with `shown_once` repeats its secret within 10 minutes, then `API-8118`.","required":false,"schema":{"type":"string","minLength":1,"maxLength":255}}],"responses":{"200":{"description":"The entries.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SenderBlockList"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `AUTH-1003`: your seat was deactivated (view only). `AUTH-1004`: all seats are inactive because the seat charge was not paid (view only). `AUTH-1002`: your role lacks the `settings.manage` permission. `API-8102`: the API key or app lacks the `abuse:write` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"`CRM-6001`: no such contact.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"description":"`API-8001`: some fields are missing or not valid. `details.fields` lists each invalid field with its own code (e.g. `API-8002` required, `API-8012` wrong format). `TKT-6146`: the contact has no phone, email or handle to block.","headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["abuse:write"]},{"oauth2":["abuse:write"]}],"summary":"Block a contact","tags":["abuse-protection"]}},"/v1/abuse-protection/contacts/{id}/unblock":{"post":{"description":"The live entries that match the contact are removed (kept with when and by whom); the contact can write again.","operationId":"unblockContact","parameters":[{"name":"id","required":true,"in":"path","description":"The contact id.","schema":{"type":"string","format":"uuid","description":"The contact id."}},{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}},{"name":"Idempotency-Key","in":"header","description":"A unique key for this operation (e.g. a UUID, 1 to 255 visible characters), kept 24 hours: repeating the request with the same key returns the first answer (`Idempotent-Replayed: true`) instead of doing it again. Errors: `API-8109` (400) a key that is not valid, `API-8108` (409, retryable) the first request with this key is still running, `API-8107` (422) the key was used for a different request; `API-8118` (409) the first request created something whose secret is shown only once, so its answer is not repeated. An answer with `shown_once` repeats its secret within 10 minutes, then `API-8118`.","required":false,"schema":{"type":"string","minLength":1,"maxLength":255}}],"responses":{"200":{"description":"The removed entries.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SenderBlockList"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `AUTH-1003`: your seat was deactivated (view only). `AUTH-1004`: all seats are inactive because the seat charge was not paid (view only). `AUTH-1002`: your role lacks the `settings.manage` permission. `API-8102`: the API key or app lacks the `abuse:write` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"`CRM-6001`: no such contact.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["abuse:write"]},{"oauth2":["abuse:write"]}],"summary":"Unblock a contact","tags":["abuse-protection"]}},"/v1/abuse-protection/quarantines":{"get":{"description":"The active quarantines (oldest first), then the 100 newest released or blocked ones; `status` narrows to one state.","operationId":"listSenderQuarantines","parameters":[{"name":"status","required":false,"in":"query","description":"Only this state (default: the active ones, then the newest resolved).","schema":{"description":"Only this state (default: the active ones, then the newest resolved).","type":"string","enum":["active","released","blocked"]}},{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"The quarantines.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SenderQuarantineList"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `AUTH-1002`: your role lacks the `settings.manage` permission. `API-8102`: the API key or app lacks the `abuse:read` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["abuse:read"]},{"oauth2":["abuse:read"]}],"summary":"List the quarantined senders","tags":["abuse-protection"]}},"/v1/abuse-protection/quarantines/{id}":{"get":{"operationId":"getSenderQuarantine","parameters":[{"name":"id","required":true,"in":"path","description":"The quarantine id.","schema":{"type":"string","format":"uuid","description":"The quarantine id."}},{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"The quarantine.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SenderQuarantine"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `AUTH-1002`: your role lacks the `settings.manage` permission. `API-8102`: the API key or app lacks the `abuse:read` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"`TKT-6147`: no such quarantine.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["abuse:read"]},{"oauth2":["abuse:read"]}],"summary":"Get a quarantined sender","tags":["abuse-protection"]}},"/v1/abuse-protection/quarantines/{id}/release":{"post":{"description":"Their ticket leaves quarantine (and returns to its space’s queue when it waits for a member); what they send is handled as usual again.","operationId":"releaseSender","parameters":[{"name":"id","required":true,"in":"path","description":"The quarantine id.","schema":{"type":"string","format":"uuid","description":"The quarantine id."}},{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}},{"name":"Idempotency-Key","in":"header","description":"A unique key for this operation (e.g. a UUID, 1 to 255 visible characters), kept 24 hours: repeating the request with the same key returns the first answer (`Idempotent-Replayed: true`) instead of doing it again. Errors: `API-8109` (400) a key that is not valid, `API-8108` (409, retryable) the first request with this key is still running, `API-8107` (422) the key was used for a different request; `API-8118` (409) the first request created something whose secret is shown only once, so its answer is not repeated. An answer with `shown_once` repeats its secret within 10 minutes, then `API-8118`.","required":false,"schema":{"type":"string","minLength":1,"maxLength":255}}],"responses":{"200":{"description":"The quarantine, released.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SenderQuarantine"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `AUTH-1003`: your seat was deactivated (view only). `AUTH-1004`: all seats are inactive because the seat charge was not paid (view only). `AUTH-1002`: your role lacks the `settings.manage` permission. `API-8102`: the API key or app lacks the `abuse:write` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"`TKT-6147`: no such quarantine.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"409":{"description":"`TKT-6144`: the sender was already released or blocked.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["abuse:write"]},{"oauth2":["abuse:write"]}],"summary":"Release a quarantined sender","tags":["abuse-protection"]}},"/v1/abuse-protection/quarantines/{id}/block":{"post":{"description":"Their phone numbers, email addresses and handles go on the block list; the quarantined ticket and its messages are kept and leave quarantine for a member to close.","operationId":"blockSender","parameters":[{"name":"id","required":true,"in":"path","description":"The quarantine id.","schema":{"type":"string","format":"uuid","description":"The quarantine id."}},{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}},{"name":"Idempotency-Key","in":"header","description":"A unique key for this operation (e.g. a UUID, 1 to 255 visible characters), kept 24 hours: repeating the request with the same key returns the first answer (`Idempotent-Replayed: true`) instead of doing it again. Errors: `API-8109` (400) a key that is not valid, `API-8108` (409, retryable) the first request with this key is still running, `API-8107` (422) the key was used for a different request; `API-8118` (409) the first request created something whose secret is shown only once, so its answer is not repeated. An answer with `shown_once` repeats its secret within 10 minutes, then `API-8118`.","required":false,"schema":{"type":"string","minLength":1,"maxLength":255}}],"responses":{"200":{"description":"The quarantine and the block list entries.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BlockedSender"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `AUTH-1003`: your seat was deactivated (view only). `AUTH-1004`: all seats are inactive because the seat charge was not paid (view only). `AUTH-1002`: your role lacks the `settings.manage` permission. `API-8102`: the API key or app lacks the `abuse:write` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"`TKT-6147`: no such quarantine.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"409":{"description":"`TKT-6144`: the sender was already released or blocked.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"description":"`API-8001`: some fields are missing or not valid. `details.fields` lists each invalid field with its own code (e.g. `API-8002` required, `API-8012` wrong format). `TKT-6146`: the sender has no phone, email or handle to block.","headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["abuse:write"]},{"oauth2":["abuse:write"]}],"summary":"Block a quarantined sender","tags":["abuse-protection"]}},"/v1/abuse-protection/spam-entries":{"get":{"description":"The live entries, newest first; `include_removed=true` adds the removed ones.","operationId":"listSpamEntries","parameters":[{"name":"include_removed","required":false,"in":"query","description":"`true`: the removed entries too.","schema":{"description":"`true`: the removed entries too.","type":"string","enum":["true","false"]}},{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"The entries.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SpamEntryList"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `AUTH-1002`: your role lacks the `settings.manage` permission. `API-8102`: the API key or app lacks the `abuse:read` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["abuse:read"]},{"oauth2":["abuse:read"]}],"summary":"List the Spam list","tags":["abuse-protection"]},"post":{"description":"An email address, an email domain, a phone number, or a handle on a channel: that sender’s messages go to Spam from now on, and their open and in-progress tickets move there in one background step (`moved_tickets`).","operationId":"createSpamEntry","parameters":[{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}},{"name":"Idempotency-Key","in":"header","description":"A unique key for this operation (e.g. a UUID, 1 to 255 visible characters), kept 24 hours: repeating the request with the same key returns the first answer (`Idempotent-Replayed: true`) instead of doing it again. Errors: `API-8109` (400) a key that is not valid, `API-8108` (409, retryable) the first request with this key is still running, `API-8107` (422) the key was used for a different request; `API-8118` (409) the first request created something whose secret is shown only once, so its answer is not repeated. An answer with `shown_once` repeats its secret within 10 minutes, then `API-8118`.","required":false,"schema":{"type":"string","minLength":1,"maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateSpamEntry"}}}},"responses":{"201":{"description":"The entry.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AddedSpamEntry"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `AUTH-1003`: your seat was deactivated (view only). `AUTH-1004`: all seats are inactive because the seat charge was not paid (view only). `AUTH-1002`: your role lacks the `settings.manage` permission. `API-8102`: the API key or app lacks the `abuse:write` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"409":{"description":"`TKT-6212`: the same entry is already on the list.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"description":"`API-8001`: some fields are missing or not valid. `details.fields` lists each invalid field with its own code (e.g. `API-8002` required, `API-8012` wrong format). `TKT-6210`: the value is none of them. `TKT-6216`: a public email provider’s domain. `TKT-6230`: a handle on WhatsApp (other than a business-scoped user id), calls or SMS: their senders go on the list by number.","headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["abuse:write"]},{"oauth2":["abuse:write"]}],"summary":"Add to the Spam list","tags":["abuse-protection"]}},"/v1/abuse-protection/spam-entries/{id}":{"get":{"operationId":"getSpamEntry","parameters":[{"name":"id","required":true,"in":"path","description":"The Spam list entry id.","schema":{"type":"string","format":"uuid","description":"The Spam list entry id."}},{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"The entry.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SpamEntry"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `AUTH-1002`: your role lacks the `settings.manage` permission. `API-8102`: the API key or app lacks the `abuse:read` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"`TKT-6211`: no such Spam list entry (or it was already removed).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["abuse:read"]},{"oauth2":["abuse:read"]}],"summary":"Get a Spam list entry","tags":["abuse-protection"]},"delete":{"description":"The sender’s new messages are handled as usual; tickets already in Spam stay there. The entry is kept with when and by whom it was removed.","operationId":"removeSpamEntry","parameters":[{"name":"id","required":true,"in":"path","description":"The Spam list entry id.","schema":{"type":"string","format":"uuid","description":"The Spam list entry id."}},{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"The removed entry.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SpamEntry"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `AUTH-1003`: your seat was deactivated (view only). `AUTH-1004`: all seats are inactive because the seat charge was not paid (view only). `AUTH-1002`: your role lacks the `settings.manage` permission. `API-8102`: the API key or app lacks the `abuse:write` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"`TKT-6211`: no such Spam list entry (or it was already removed).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["abuse:write"]},{"oauth2":["abuse:write"]}],"summary":"Remove from the Spam list","tags":["abuse-protection"]}},"/v1/contacts/{contactId}/erasure":{"post":{"description":"Asks to erase the contact's personal data for good (docs/08, PDPL): the contact goes to the trash now and stays restorable for the organization's restore window (CRM settings `erasure_window_days`); then its name, numbers, addresses, identities, fields, the text of its messages and notes, its files, recordings and voicemail are erased, while its tickets, their timeline and counts, ledger and audit entries stay. A restore from the trash, a new message or an import that brings the contact back inside the window withdraws the request. Asking again returns the request under way. Recorded in the audit log and sent as the `contact.erasure_requested` webhook.","operationId":"requestContactErasure","parameters":[{"name":"contactId","required":true,"in":"path","description":"The contact id.","schema":{"type":"string","format":"uuid","description":"The contact id."}},{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}},{"name":"Idempotency-Key","in":"header","description":"A unique key for this operation (e.g. a UUID, 1 to 255 visible characters), kept 24 hours: repeating the request with the same key returns the first answer (`Idempotent-Replayed: true`) instead of doing it again. Errors: `API-8109` (400) a key that is not valid, `API-8108` (409, retryable) the first request with this key is still running, `API-8107` (422) the key was used for a different request; `API-8118` (409) the first request created something whose secret is shown only once, so its answer is not repeated. An answer with `shown_once` repeats its secret within 10 minutes, then `API-8118`.","required":false,"schema":{"type":"string","minLength":1,"maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RequestContactErasure"}}}},"responses":{"202":{"description":"The request, scheduled for the end of the window.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContactErasure"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `AUTH-1003`: your seat was deactivated (view only). `AUTH-1004`: all seats are inactive because the seat charge was not paid (view only). `AUTH-1002`: your role lacks the `contacts.delete` permission. `API-8102`: the API key or app lacks the `erasure:write` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"`CRM-6001`: no such contact.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"409":{"description":"`CRM-6048`: the contact was already erased.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["erasure:write"]},{"oauth2":["erasure:write"]}],"summary":"Erase a contact's personal data","tags":["contacts"]}},"/v1/contact-erasures":{"get":{"description":"The requests to erase contacts’ personal data, newest first.","operationId":"listContactErasures","parameters":[{"name":"contact_id","required":false,"in":"query","description":"Only the requests of this contact.","schema":{"description":"Only the requests of this contact.","type":"string","format":"uuid"}},{"name":"status","required":false,"in":"query","description":"Only these states, comma-separated (e.g. `scheduled,failed`).","schema":{"description":"Only these states, comma-separated (e.g. `scheduled,failed`).","type":"string","maxLength":100,"pattern":"^(scheduled|erasing|erased|withdrawn|failed)(,(scheduled|erasing|erased|withdrawn|failed))*$"}},{"name":"cursor","required":false,"in":"query","description":"The `next_cursor` of the previous page.","schema":{"description":"The `next_cursor` of the previous page.","type":"string","maxLength":400,"pattern":"^[A-Za-z0-9_-]+$"}},{"name":"limit","required":false,"in":"query","description":"Requests per page (1 to 100, default 25).","schema":{"default":25,"description":"Requests per page (1 to 100, default 25).","type":"integer","minimum":1,"maximum":100}},{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"A page of requests.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContactErasurePage"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `AUTH-1002`: your role lacks the `contacts.delete` permission. `API-8102`: the API key or app lacks the `erasure:read` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["erasure:read"]},{"oauth2":["erasure:read"]}],"summary":"List the erasure requests","tags":["contacts"]}},"/v1/contact-erasures/{erasureId}":{"get":{"description":"One request with its state, its last finished step, its failure (code, reference, release) and the counts of what it erased.","operationId":"getContactErasure","parameters":[{"name":"erasureId","required":true,"in":"path","description":"The erasure request id.","schema":{"type":"string","format":"uuid","description":"The erasure request id."}},{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"The request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContactErasure"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `AUTH-1002`: your role lacks the `contacts.delete` permission. `API-8102`: the API key or app lacks the `erasure:read` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"`CRM-6045`: no such erasure request.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["erasure:read"]},{"oauth2":["erasure:read"]}],"summary":"Get an erasure request","tags":["contacts"]}},"/v1/contact-erasures/{erasureId}/retry":{"post":{"description":"Runs a failed request again: it resumes at the step that failed. Recorded in the audit log (`contact.erasure_retried`).","operationId":"retryContactErasure","parameters":[{"name":"erasureId","required":true,"in":"path","description":"The erasure request id.","schema":{"type":"string","format":"uuid","description":"The erasure request id."}},{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}},{"name":"Idempotency-Key","in":"header","description":"A unique key for this operation (e.g. a UUID, 1 to 255 visible characters), kept 24 hours: repeating the request with the same key returns the first answer (`Idempotent-Replayed: true`) instead of doing it again. Errors: `API-8109` (400) a key that is not valid, `API-8108` (409, retryable) the first request with this key is still running, `API-8107` (422) the key was used for a different request; `API-8118` (409) the first request created something whose secret is shown only once, so its answer is not repeated. An answer with `shown_once` repeats its secret within 10 minutes, then `API-8118`.","required":false,"schema":{"type":"string","minLength":1,"maxLength":255}}],"responses":{"200":{"description":"The request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContactErasure"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `AUTH-1003`: your seat was deactivated (view only). `AUTH-1004`: all seats are inactive because the seat charge was not paid (view only). `AUTH-1002`: your role lacks the `contacts.delete` permission. `API-8102`: the API key or app lacks the `erasure:write` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"`CRM-6045`: no such erasure request.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"409":{"description":"`CRM-6046`: the request is not failed.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["erasure:write"]},{"oauth2":["erasure:write"]}],"summary":"Retry a stopped erasure","tags":["contacts"]}},"/v1/organization/deletion":{"get":{"description":"The latest request to delete the organization (null: none): when it closes, whether it was withdrawn, and how many contacts were erased.","operationId":"getOrganizationDeletion","parameters":[{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"The state.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrganizationDeletionState"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `API-8102`: the API key or app lacks the `organization:read` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["organization:read"]},{"oauth2":["organization:read"]}],"summary":"Get the deletion of the organization","tags":["organizations"]},"post":{"description":"Owner only (or asked through Help, where the Rabt team does it), a sensitive action (a code entered within the last 10 minutes), with a reason and the organization's name typed. The organization keeps working until `delete_after` (the restore window of the CRM settings), when the owner may withdraw it; then it closes (no member can open it, its channels' messages are refused) and every contact's personal data is erased; its records, ledger, invoices and audit entries stay. Asking again returns the request under way. Recorded in the audit log and sent as the `organization.deletion_requested` webhook. With the owner's own personal key or app it waits instead (`status` `approval_required`): `approval_view.url` opens it in Rabt's app, where the owner approves it with a code within 10 minutes; only then it is requested.","operationId":"requestOrganizationDeletion","parameters":[{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}},{"name":"Idempotency-Key","in":"header","description":"A unique key for this operation (e.g. a UUID, 1 to 255 visible characters), kept 24 hours: repeating the request with the same key returns the first answer (`Idempotent-Replayed: true`) instead of doing it again. Errors: `API-8109` (400) a key that is not valid, `API-8108` (409, retryable) the first request with this key is still running, `API-8107` (422) the key was used for a different request; `API-8118` (409) the first request created something whose secret is shown only once, so its answer is not repeated. An answer with `shown_once` repeats its secret within 10 minutes, then `API-8118`.","required":false,"schema":{"type":"string","minLength":1,"maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RequestOrganizationDeletion"}}}},"responses":{"202":{"description":"The request; asked with the owner's key or app, the pending approval (`PendingApproval`).","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/OrganizationDeletion"},{"$ref":"#/components/schemas/PendingApproval"}]}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `AUTH-1003`: your seat was deactivated (view only). `AUTH-1004`: all seats are inactive because the seat charge was not paid (view only). `AUTH-1042`: only the owner can do this. `AUTH-1013`: a sensitive action; no code was entered in this session within the last 10 minutes. Re-authenticate (`POST /v1/auth/reauthentication`), then repeat the request. `API-8102`: the API key or app lacks the `organization:write` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in. `API-8169`: a connection made by the organization's trusted issuer.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"description":"`API-8001`: some fields are missing or not valid. `details.fields` lists each invalid field with its own code (e.g. `API-8002` required, `API-8012` wrong format). `CRM-6051`: the name typed is not the organization’s.","headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["organization:write"]},{"oauth2":["organization:write"]}],"summary":"Delete the organization","tags":["organizations"]}},"/v1/organization/deletion/withdraw":{"post":{"description":"Owner only (or asked through Help, where the Rabt team does it), inside the window: in the owner's session a sensitive action (a code entered within the last 10 minutes); with the owner's own personal key or app it runs at once (it keeps the organization). Recorded in the audit log and sent as the `organization.deletion_withdrawn` webhook.","operationId":"withdrawOrganizationDeletion","parameters":[{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}},{"name":"Idempotency-Key","in":"header","description":"A unique key for this operation (e.g. a UUID, 1 to 255 visible characters), kept 24 hours: repeating the request with the same key returns the first answer (`Idempotent-Replayed: true`) instead of doing it again. Errors: `API-8109` (400) a key that is not valid, `API-8108` (409, retryable) the first request with this key is still running, `API-8107` (422) the key was used for a different request; `API-8118` (409) the first request created something whose secret is shown only once, so its answer is not repeated. An answer with `shown_once` repeats its secret within 10 minutes, then `API-8118`.","required":false,"schema":{"type":"string","minLength":1,"maxLength":255}}],"responses":{"200":{"description":"The withdrawn request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrganizationDeletion"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `AUTH-1003`: your seat was deactivated (view only). `AUTH-1004`: all seats are inactive because the seat charge was not paid (view only). `AUTH-1042`: only the owner can do this. `AUTH-1013`: a sensitive action; no code was entered in this session within the last 10 minutes. Re-authenticate (`POST /v1/auth/reauthentication`), then repeat the request. `API-8102`: the API key or app lacks the `organization:write` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in. `API-8169`: a connection made by the organization's trusted issuer.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"`CRM-6049`: there is no deletion to withdraw.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"409":{"description":"`CRM-6050`: the window ended; the deletion is under way or done.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["organization:write"]},{"oauth2":["organization:write"]}],"summary":"Withdraw the deletion of the organization","tags":["organizations"]}},"/v1/phone-numbers":{"get":{"description":"The organization’s numbers with their recording, ringing times and rental; released ones last (`status` keeps one status).","operationId":"listPhoneNumbers","parameters":[{"name":"status","required":false,"in":"query","description":"Only numbers in this status (`active`, `suspended` or `released`).","schema":{"description":"Only numbers in this status (`active`, `suspended` or `released`).","type":"string","enum":["active","suspended","released"]}},{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"The numbers.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PhoneNumberList"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `API-8102`: the API key or app lacks the `voice:read` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["voice:read"]},{"oauth2":["voice:read"]}],"summary":"List the phone numbers","tags":["voice"]},"post":{"description":"Takes an available number: its first month is charged from the wallet now (the rental is prepaid, monthly), then it is active, routed to the member who took it (docs/17). Nothing is charged when the wallet cannot pay (`WAL-1001`): the number stays in the stock.","operationId":"assignPhoneNumber","parameters":[{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}},{"name":"Idempotency-Key","in":"header","description":"A unique key for this operation (e.g. a UUID, 1 to 255 visible characters), kept 24 hours: repeating the request with the same key returns the first answer (`Idempotent-Replayed: true`) instead of doing it again. Errors: `API-8109` (400) a key that is not valid, `API-8108` (409, retryable) the first request with this key is still running, `API-8107` (422) the key was used for a different request; `API-8118` (409) the first request created something whose secret is shown only once, so its answer is not repeated. An answer with `shown_once` repeats its secret within 10 minutes, then `API-8118`.","required":false,"schema":{"type":"string","minLength":1,"maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AssignPhoneNumber"}}}},"responses":{"201":{"description":"The number.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PhoneNumber"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"402":{"description":"`WAL-1001`: the wallet cannot pay the first month.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `AUTH-1003`: your seat was deactivated (view only). `AUTH-1004`: all seats are inactive because the seat charge was not paid (view only). `AUTH-1002`: your role lacks the `channels.manage` permission. `API-8102`: the API key or app lacks the `voice:write` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in. `API-8148`: not available to test keys (API test mode).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"409":{"description":"`VOI-4501`: the number is no longer available.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["voice:write"]},{"oauth2":["voice:write"]}],"summary":"Pick a phone number","tags":["voice"]}},"/v1/phone-numbers/available":{"get":{"description":"Numbers of Rabt’s stock the organization may pick, with their monthly rental in halalas (charged in advance when picked).","operationId":"listAvailablePhoneNumbers","parameters":[{"name":"type","required":false,"in":"query","description":"Only numbers of this type.","schema":{"description":"Only numbers of this type.","type":"string","enum":["geographic","unified_9200","toll_free_800","mobile"]}},{"name":"contains","required":false,"in":"query","description":"Digits the number contains.","schema":{"description":"Digits the number contains.","type":"string","pattern":"^\\d{1,15}$"}},{"name":"limit","required":false,"in":"query","description":"Items per page (1 to 100).","schema":{"description":"Items per page (1 to 100).","type":"integer","minimum":1,"maximum":100}},{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"The available numbers.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AvailableNumberList"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `AUTH-1002`: your role lacks the `channels.manage` permission. `API-8102`: the API key or app lacks the `voice:read` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["voice:read"]},{"oauth2":["voice:read"]}],"summary":"Numbers available to pick","tags":["voice"]}},"/v1/phone-numbers/{phoneNumberId}":{"get":{"description":"Any of the organization’s numbers by its id, a released one too (200 with `status` `released`; its history stays); by its E.164 number, the active one.","operationId":"getPhoneNumber","parameters":[{"name":"phoneNumberId","required":true,"in":"path","description":"Its id, or the number in E.164 (the organization’s active number with it; VOI-4578 if none).","schema":{"description":"Its id, or the number in E.164 (the organization’s active number with it; VOI-4578 if none).","anyOf":[{"type":"string","format":"uuid"},{"type":"string","pattern":"^[+][1-9][0-9]{1,14}$"}]}},{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"The number.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PhoneNumber"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `API-8102`: the API key or app lacks the `voice:read` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"`VOI-4500`: no phone number with this id in your organization. `VOI-4578`: no active number with this E.164.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["voice:read"]},{"oauth2":["voice:read"]}],"summary":"A phone number","tags":["voice"]},"patch":{"description":"Its name, recording and the recording notice, and the lines of your own number (a Rabt number’s are set by the Rabt team). Its destination is set with `setRoutingDestination`; the deprecated `destination` field is mapped onto it and needs `spaces.manage` (`AUTH-1002`).","operationId":"updatePhoneNumber","parameters":[{"name":"phoneNumberId","required":true,"in":"path","description":"Its id, or the number in E.164 (the organization’s active number with it; VOI-4578 if none).","schema":{"description":"Its id, or the number in E.164 (the organization’s active number with it; VOI-4578 if none).","anyOf":[{"type":"string","format":"uuid"},{"type":"string","pattern":"^[+][1-9][0-9]{1,14}$"}]}},{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}},{"name":"Idempotency-Key","in":"header","description":"A unique key for this operation (e.g. a UUID, 1 to 255 visible characters), kept 24 hours: repeating the request with the same key returns the first answer (`Idempotent-Replayed: true`) instead of doing it again. Errors: `API-8109` (400) a key that is not valid, `API-8108` (409, retryable) the first request with this key is still running, `API-8107` (422) the key was used for a different request; `API-8118` (409) the first request created something whose secret is shown only once, so its answer is not repeated. An answer with `shown_once` repeats its secret within 10 minutes, then `API-8118`.","required":false,"schema":{"type":"string","minLength":1,"maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdatePhoneNumber"}}}},"responses":{"200":{"description":"The number.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PhoneNumber"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `AUTH-1003`: your seat was deactivated (view only). `AUTH-1004`: all seats are inactive because the seat charge was not paid (view only). `AUTH-1002`: your role lacks the `channels.manage` permission. `API-8102`: the API key or app lacks the `voice:write` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in. `API-8148`: not available to test keys (API test mode).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"`VOI-4500`: no phone number with this id in your organization. `VOI-4578`: no active number with this E.164.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"409":{"description":"`VOI-4504`: the number was released. `VOI-4565`: the lines of a Rabt number are set by the Rabt team.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"description":"`API-8001`: some fields are missing or not valid. `details.fields` lists each invalid field with its own code (e.g. `API-8002` required, `API-8012` wrong format). `VOI-4539`: the member cannot take calls. `SPC-6201`: no such space. `SPC-6222`: `all` (never a destination).","headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["voice:write"]},{"oauth2":["voice:write"]}],"summary":"Change a phone number","tags":["voice"]}},"/v1/phone-numbers/{phoneNumberId}/release":{"post":{"description":"Final: the number stops taking calls and goes back to Rabt’s stock; its calls and tickets stay. The paid month is not returned (no refunds).","operationId":"releasePhoneNumber","parameters":[{"name":"phoneNumberId","required":true,"in":"path","description":"Its id, or the number in E.164 (the organization’s active number with it; VOI-4578 if none).","schema":{"description":"Its id, or the number in E.164 (the organization’s active number with it; VOI-4578 if none).","anyOf":[{"type":"string","format":"uuid"},{"type":"string","pattern":"^[+][1-9][0-9]{1,14}$"}]}},{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}},{"name":"Idempotency-Key","in":"header","description":"A unique key for this operation (e.g. a UUID, 1 to 255 visible characters), kept 24 hours: repeating the request with the same key returns the first answer (`Idempotent-Replayed: true`) instead of doing it again. Errors: `API-8109` (400) a key that is not valid, `API-8108` (409, retryable) the first request with this key is still running, `API-8107` (422) the key was used for a different request; `API-8118` (409) the first request created something whose secret is shown only once, so its answer is not repeated. An answer with `shown_once` repeats its secret within 10 minutes, then `API-8118`.","required":false,"schema":{"type":"string","minLength":1,"maxLength":255}}],"responses":{"200":{"description":"The number.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PhoneNumber"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `AUTH-1003`: your seat was deactivated (view only). `AUTH-1004`: all seats are inactive because the seat charge was not paid (view only). `AUTH-1002`: your role lacks the `channels.manage` permission. `API-8102`: the API key or app lacks the `voice:write` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in. `API-8148`: not available to test keys (API test mode).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"`VOI-4500`: no phone number with this id in your organization. `VOI-4578`: no active number with this E.164.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"409":{"description":"`VOI-4504`: the number was released.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["voice:write"]},{"oauth2":["voice:write"]}],"summary":"Release a phone number","tags":["voice"]}},"/v1/voice/settings":{"get":{"operationId":"getVoiceSettings","parameters":[{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"The settings.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VoiceSettings"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `API-8102`: the API key or app lacks the `voice:read` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["voice:read"]},{"oauth2":["voice:read"]}],"summary":"The voice settings","tags":["voice"]},"patch":{"description":"International calling (off by default) with the countries allowed, and the default number outbound calls leave from.","operationId":"updateVoiceSettings","parameters":[{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}},{"name":"Idempotency-Key","in":"header","description":"A unique key for this operation (e.g. a UUID, 1 to 255 visible characters), kept 24 hours: repeating the request with the same key returns the first answer (`Idempotent-Replayed: true`) instead of doing it again. Errors: `API-8109` (400) a key that is not valid, `API-8108` (409, retryable) the first request with this key is still running, `API-8107` (422) the key was used for a different request; `API-8118` (409) the first request created something whose secret is shown only once, so its answer is not repeated. An answer with `shown_once` repeats its secret within 10 minutes, then `API-8118`.","required":false,"schema":{"type":"string","minLength":1,"maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateVoiceSettings"}}}},"responses":{"200":{"description":"The settings.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VoiceSettings"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `AUTH-1003`: your seat was deactivated (view only). `AUTH-1004`: all seats are inactive because the seat charge was not paid (view only). `AUTH-1002`: your role lacks the `channels.manage` permission. `API-8102`: the API key or app lacks the `voice:write` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in. `API-8148`: not available to test keys (API test mode).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"`VOI-4500`: no phone number with this id in your organization. `VOI-4578`: no active number with this E.164.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["voice:write"]},{"oauth2":["voice:write"]}],"summary":"Change the voice settings","tags":["voice"]}},"/v1/voice/ai-agent":{"get":{"description":"Its on/off switch and voice at the voice level (a number has it until the number’s own is set), the organization’s one kill switch (the same as `GET /v1/ai/agent`), and whether it is stopped because the wallet ran out.","operationId":"getVoiceAiAgent","parameters":[{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"The switches.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VoiceAiAgent"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `API-8102`: the API key or app lacks the `voice:read` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["voice:read"]},{"oauth2":["voice:read"]}],"summary":"The voice AI agent’s switches","tags":["voice"]},"patch":{"description":"On or off (off by default: every minute is paid), its voice (female or male), and the organization’s one kill switch (the same as `PUT /v1/ai/agent`), which stops the AI agent on every call within seconds and in every conversation.","operationId":"updateVoiceAiAgent","parameters":[{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}},{"name":"Idempotency-Key","in":"header","description":"A unique key for this operation (e.g. a UUID, 1 to 255 visible characters), kept 24 hours: repeating the request with the same key returns the first answer (`Idempotent-Replayed: true`) instead of doing it again. Errors: `API-8109` (400) a key that is not valid, `API-8108` (409, retryable) the first request with this key is still running, `API-8107` (422) the key was used for a different request; `API-8118` (409) the first request created something whose secret is shown only once, so its answer is not repeated. An answer with `shown_once` repeats its secret within 10 minutes, then `API-8118`.","required":false,"schema":{"type":"string","minLength":1,"maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateVoiceAiAgent"}}}},"responses":{"200":{"description":"The switches.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VoiceAiAgent"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `AUTH-1003`: your seat was deactivated (view only). `AUTH-1004`: all seats are inactive because the seat charge was not paid (view only). `AUTH-1002`: your role lacks the `ai.manage` permission. `API-8102`: the API key or app lacks the `voice:write` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in. `API-8148`: not available to test keys (API test mode).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["voice:write"]},{"oauth2":["voice:write"]}],"summary":"Change the voice AI agent’s switches","tags":["voice"]}},"/v1/phone-numbers/{phoneNumberId}/ai-agent":{"patch":{"description":"The voice AI agent answers this number’s calls, or not; until set, the number has the voice level’s value. The organization’s kill switch always wins.","operationId":"updatePhoneNumberAiAgent","parameters":[{"name":"phoneNumberId","required":true,"in":"path","description":"Its id, or the number in E.164 (the organization’s active number with it; VOI-4578 if none).","schema":{"description":"Its id, or the number in E.164 (the organization’s active number with it; VOI-4578 if none).","anyOf":[{"type":"string","format":"uuid"},{"type":"string","pattern":"^[+][1-9][0-9]{1,14}$"}]}},{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}},{"name":"Idempotency-Key","in":"header","description":"A unique key for this operation (e.g. a UUID, 1 to 255 visible characters), kept 24 hours: repeating the request with the same key returns the first answer (`Idempotent-Replayed: true`) instead of doing it again. Errors: `API-8109` (400) a key that is not valid, `API-8108` (409, retryable) the first request with this key is still running, `API-8107` (422) the key was used for a different request; `API-8118` (409) the first request created something whose secret is shown only once, so its answer is not repeated. An answer with `shown_once` repeats its secret within 10 minutes, then `API-8118`.","required":false,"schema":{"type":"string","minLength":1,"maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdatePhoneNumberAiAgent"}}}},"responses":{"200":{"description":"The number.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PhoneNumber"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `AUTH-1003`: your seat was deactivated (view only). `AUTH-1004`: all seats are inactive because the seat charge was not paid (view only). `AUTH-1002`: your role lacks the `ai.manage` permission. `API-8102`: the API key or app lacks the `voice:write` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in. `API-8148`: not available to test keys (API test mode).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"`VOI-4500`: no phone number with this id in your organization. `VOI-4578`: no active number with this E.164.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"409":{"description":"`VOI-4504`: the number was released.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["voice:write"]},{"oauth2":["voice:write"]}],"summary":"Turn the voice AI agent on or off for one number","tags":["voice"]}},"/v1/calls":{"get":{"description":"Calls of the tickets you can see and the calls you took or placed without a ticket, newest first, with their legs, outcome, duration, minutes charged and quality.","operationId":"listCalls","parameters":[{"name":"ticket_id","required":false,"in":"query","description":"Only calls of this ticket.","schema":{"description":"Only calls of this ticket.","type":"string","format":"uuid"}},{"name":"phone_number_id","required":false,"in":"query","description":"Only calls of this number (its id, or the number in E.164).","schema":{"description":"Only calls of this number (its id, or the number in E.164).","anyOf":[{"type":"string","format":"uuid"},{"type":"string","pattern":"^[+][1-9][0-9]{1,14}$"}]}},{"name":"direction","required":false,"in":"query","schema":{"type":"string","enum":["inbound","outbound"]}},{"name":"status","required":false,"in":"query","description":"`live` (not ended yet) or `ended`.","schema":{"description":"`live` (not ended yet) or `ended`.","type":"string","enum":["live","ended"]}},{"name":"cursor","required":false,"in":"query","description":"The previous page’s `next_cursor`.","schema":{"description":"The previous page’s `next_cursor`.","type":"string","maxLength":200}},{"name":"limit","required":false,"in":"query","description":"Items per page (1 to 500).","schema":{"description":"Items per page (1 to 500).","type":"integer","minimum":1,"maximum":500}},{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"A page of calls.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CallPage"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `API-8102`: the API key or app lacks the `voice:read` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["voice:read"]},{"oauth2":["voice:read"]}],"summary":"List calls","tags":["voice"]}},"/v1/calls/{callId}":{"get":{"operationId":"getCall","parameters":[{"name":"callId","required":true,"in":"path","description":"The call id.","schema":{"type":"string","format":"uuid","description":"The call id."}},{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"The call.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Call"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `API-8102`: the API key or app lacks the `voice:read` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"`VOI-4513`: no call with this id that you can see.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["voice:read"]},{"oauth2":["voice:read"]}],"summary":"A call","tags":["voice"]}},"/v1/calls/{callId}/transfer":{"post":{"description":"An answered inbound call (outbound calls cannot be transferred) to a space (its members are rung, fewest calls first) or to one member; the caller hears music meanwhile. The member on the call may transfer it; anyone else needs `tickets.assign`.","operationId":"transferCall","parameters":[{"name":"callId","required":true,"in":"path","description":"The call id.","schema":{"type":"string","format":"uuid","description":"The call id."}},{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}},{"name":"Idempotency-Key","in":"header","description":"A unique key for this operation (e.g. a UUID, 1 to 255 visible characters), kept 24 hours: repeating the request with the same key returns the first answer (`Idempotent-Replayed: true`) instead of doing it again. Errors: `API-8109` (400) a key that is not valid, `API-8108` (409, retryable) the first request with this key is still running, `API-8107` (422) the key was used for a different request; `API-8118` (409) the first request created something whose secret is shown only once, so its answer is not repeated. An answer with `shown_once` repeats its secret within 10 minutes, then `API-8118`.","required":false,"schema":{"type":"string","minLength":1,"maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TransferCall"}}}},"responses":{"200":{"description":"The call.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Call"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `AUTH-1003`: your seat was deactivated (view only). `AUTH-1004`: all seats are inactive because the seat charge was not paid (view only). `AUTH-1002`: your role lacks the `tickets.reply` permission. `API-8102`: the API key or app lacks the `voice:write` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in. `API-8148`: not available to test keys (API test mode).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"`VOI-4513`: no call with this id that you can see.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"409":{"description":"`VOI-4514`: the call is not answered, or already ended.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"description":"`API-8001`: some fields are missing or not valid. `details.fields` lists each invalid field with its own code (e.g. `API-8002` required, `API-8012` wrong format). `VOI-4539`: the member cannot take calls. `SPC-6201`: no such space.","headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"429":{"$ref":"#/components/responses/RateLimited"},"503":{"description":"`SYS-1001`: voice is not set up on this Rabt.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["voice:write"]},{"oauth2":["voice:write"]}],"summary":"Transfer a call","tags":["voice"]}},"/v1/calls/{callId}/hangup":{"post":{"description":"Ends the call on every leg; its minutes are settled. The member on the call may hang it up; anyone else needs `tickets.assign`.","operationId":"hangupCall","parameters":[{"name":"callId","required":true,"in":"path","description":"The call id.","schema":{"type":"string","format":"uuid","description":"The call id."}},{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}},{"name":"Idempotency-Key","in":"header","description":"A unique key for this operation (e.g. a UUID, 1 to 255 visible characters), kept 24 hours: repeating the request with the same key returns the first answer (`Idempotent-Replayed: true`) instead of doing it again. Errors: `API-8109` (400) a key that is not valid, `API-8108` (409, retryable) the first request with this key is still running, `API-8107` (422) the key was used for a different request; `API-8118` (409) the first request created something whose secret is shown only once, so its answer is not repeated. An answer with `shown_once` repeats its secret within 10 minutes, then `API-8118`.","required":false,"schema":{"type":"string","minLength":1,"maxLength":255}}],"responses":{"200":{"description":"The call.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Call"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `AUTH-1003`: your seat was deactivated (view only). `AUTH-1004`: all seats are inactive because the seat charge was not paid (view only). `AUTH-1002`: your role lacks the `tickets.reply` permission. `API-8102`: the API key or app lacks the `voice:write` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in. `API-8148`: not available to test keys (API test mode).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"`VOI-4513`: no call with this id that you can see.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"409":{"description":"`VOI-4514`: the call has already ended.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"503":{"description":"`SYS-1001`: voice is not set up on this Rabt.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["voice:write"]},{"oauth2":["voice:write"]}],"summary":"Hang up a call","tags":["voice"]}},"/v1/calls/{callId}/decline":{"post":{"description":"Declines the inbound call ringing the member, as Decline on their device (SIP 603): their ringing leg ends as `declined` (`call.member_declined`), the other members keep being rung and they are not rung again for this call. Answering is done on the member’s device. Declining a call already declined answers the call again with nothing changed.","operationId":"declineCall","parameters":[{"name":"callId","required":true,"in":"path","description":"The call id.","schema":{"type":"string","format":"uuid","description":"The call id."}},{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}},{"name":"Idempotency-Key","in":"header","description":"A unique key for this operation (e.g. a UUID, 1 to 255 visible characters), kept 24 hours: repeating the request with the same key returns the first answer (`Idempotent-Replayed: true`) instead of doing it again. Errors: `API-8109` (400) a key that is not valid, `API-8108` (409, retryable) the first request with this key is still running, `API-8107` (422) the key was used for a different request; `API-8118` (409) the first request created something whose secret is shown only once, so its answer is not repeated. An answer with `shown_once` repeats its secret within 10 minutes, then `API-8118`.","required":false,"schema":{"type":"string","minLength":1,"maxLength":255}}],"responses":{"200":{"description":"The call.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Call"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `AUTH-1003`: your seat was deactivated (view only). `AUTH-1004`: all seats are inactive because the seat charge was not paid (view only). `AUTH-1002`: your role lacks the `tickets.reply` permission. `API-8102`: the API key or app lacks the `voice:write` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in. `API-8148`: not available to test keys (API test mode).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"`VOI-4513`: no call with this id that you can see.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"409":{"description":"`VOI-4562`: the call is not ringing you.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"503":{"description":"`SYS-1001`: voice is not set up on this Rabt.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["voice:write"]},{"oauth2":["voice:write"]}],"summary":"Decline a call ringing you","tags":["voice"]}},"/v1/calls/{callId}/ai/take-over":{"post":{"description":"The voice AI agent stops talking on the call (its part ends as `taken_over`) and the member taking it is rung (docs/15: a member can take over any ticket at any time). Any member who can see the call and reply may take it.","operationId":"takeOverCallFromAi","parameters":[{"name":"callId","required":true,"in":"path","description":"The call id.","schema":{"type":"string","format":"uuid","description":"The call id."}},{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}},{"name":"Idempotency-Key","in":"header","description":"A unique key for this operation (e.g. a UUID, 1 to 255 visible characters), kept 24 hours: repeating the request with the same key returns the first answer (`Idempotent-Replayed: true`) instead of doing it again. Errors: `API-8109` (400) a key that is not valid, `API-8108` (409, retryable) the first request with this key is still running, `API-8107` (422) the key was used for a different request; `API-8118` (409) the first request created something whose secret is shown only once, so its answer is not repeated. An answer with `shown_once` repeats its secret within 10 minutes, then `API-8118`.","required":false,"schema":{"type":"string","minLength":1,"maxLength":255}}],"responses":{"200":{"description":"The call.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Call"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `AUTH-1003`: your seat was deactivated (view only). `AUTH-1004`: all seats are inactive because the seat charge was not paid (view only). `AUTH-1002`: your role lacks the `tickets.reply` permission. `API-8102`: the API key or app lacks the `voice:write` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in. `API-8148`: not available to test keys (API test mode).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"`VOI-4513`: no call with this id that you can see.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"409":{"description":"`AI-5054`: the voice AI agent is not talking on this call.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"503":{"description":"`SYS-1001`: voice is not set up on this Rabt.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["voice:write"]},{"oauth2":["voice:write"]}],"summary":"Take a call from the voice AI agent","tags":["voice"]}},"/v1/calls/{callId}/transcript":{"get":{"description":"What the caller and the voice AI agent said, one segment per finished utterance, in order (docs/15; no summary exists). New segments arrive as `call.transcript_added` events. Each read is in the audit log.","operationId":"getCallTranscript","parameters":[{"name":"callId","required":true,"in":"path","description":"The call id.","schema":{"type":"string","format":"uuid","description":"The call id."}},{"name":"after_seq","required":false,"in":"query","description":"The previous page’s `next_after_seq` (0 or absent: from the start).","schema":{"description":"The previous page’s `next_after_seq` (0 or absent: from the start).","type":"integer","minimum":0,"maximum":9007199254740991}},{"name":"limit","required":false,"in":"query","description":"Segments per page (1 to 500, default 200).","schema":{"description":"Segments per page (1 to 500, default 200).","type":"integer","minimum":1,"maximum":500}},{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"The transcript.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CallTranscript"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `API-8102`: the API key or app lacks the `voice:read` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"`VOI-4513`: no call with this id that you can see.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["voice:read"]},{"oauth2":["voice:read"]}],"summary":"A call’s live transcript","tags":["voice"]}},"/v1/calls/{callId}/recording":{"get":{"description":"A download link valid for five minutes (each access is in the audit log).","operationId":"getCallRecording","parameters":[{"name":"callId","required":true,"in":"path","description":"The call id.","schema":{"type":"string","format":"uuid","description":"The call id."}},{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"The link.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CallMediaLink"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `API-8102`: the API key or app lacks the `voice:read` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"`VOI-4513`: no call with this id that you can see. `VOI-4515`: there is no stored recording.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["voice:read"]},{"oauth2":["voice:read"]}],"summary":"Play a call’s recording","tags":["voice"]}},"/v1/calls/{callId}/voicemail":{"get":{"description":"A download link valid for five minutes (each access is in the audit log).","operationId":"getCallVoicemail","parameters":[{"name":"callId","required":true,"in":"path","description":"The call id.","schema":{"type":"string","format":"uuid","description":"The call id."}},{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"The link.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CallMediaLink"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `API-8102`: the API key or app lacks the `voice:read` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"`VOI-4513`: no call with this id that you can see. `VOI-4515`: there is no stored voicemail.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["voice:read"]},{"oauth2":["voice:read"]}],"summary":"Play a call’s voicemail","tags":["voice"]}},"/v1/voice/devices":{"get":{"description":"The app installs woken by a push (iOS VoIP push, Android FCM) for your calls.","operationId":"listVoiceDevices","parameters":[{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"The devices.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VoiceDeviceList"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `API-8102`: the API key or app lacks the `voice:read` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["voice:read"]},{"oauth2":["voice:read"]}],"summary":"Your mobile devices for calls","tags":["voice"]}},"/v1/voice/sip-details":{"get":{"description":"Rabt’s SIP data for a provider connection by registration: the Saudi SIP domain (your accounts’ domain and the From host), codecs and DTMF. Never Rabt’s addresses: `addresses` and `rtp.addresses` are deprecated and always empty; a connection by address is made by the Rabt team on request.","operationId":"getVoiceSipDetails","parameters":[{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"The details.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VoiceSipDetails"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `API-8102`: the API key or app lacks the `voice:read` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["voice:read"]},{"oauth2":["voice:read"]}],"summary":"Get Rabt’s SIP details","tags":["voice"]}},"/v1/voice/sip-credentials":{"get":{"description":"The username and password a provider on one of your connections by address authenticates to Rabt with by digest (instead of by its addresses). Replace them at any time; nothing needs to be kept.","operationId":"getVoiceSipCredentials","parameters":[{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"The credentials.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VoiceSipCredentials"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `AUTH-1002`: your role lacks the `channels.manage` permission. `API-8102`: the API key or app lacks the `voice:read` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"503":{"description":"`SYS-1001`: voice is not set up on this server.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["voice:read"]},{"oauth2":["voice:read"]}],"summary":"Get your organization’s SIP credentials","tags":["voice"]}},"/v1/voice/connection-sheet":{"get":{"description":"Rabt’s SIP data for a connection by registration as a PDF to give your provider or IT, in the member's language; every download is in the audit log (`voice.connection_sheet_downloaded`). No Rabt address and no SIP credentials: `include_password` is deprecated and `true` is refused (`VOI-4576`).","operationId":"getVoiceConnectionSheet","parameters":[{"name":"include_password","required":false,"in":"query","description":"Deprecated: the sheet holds no SIP credentials; `true` is refused (VOI-4576).","schema":{"deprecated":true,"description":"Deprecated: the sheet holds no SIP credentials; `true` is refused (VOI-4576).","type":"string"}},{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"The PDF.","content":{"application/pdf":{"schema":{"type":"string","format":"binary"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `AUTH-1002`: your role lacks the `channels.manage` permission. `API-8102`: the API key or app lacks the `voice:read` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"description":"`API-8001`: some fields are missing or not valid. `details.fields` lists each invalid field with its own code (e.g. `API-8002` required, `API-8012` wrong format). `VOI-4576`: a connection by address is made by the Rabt team on request (contact support).","headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"description":"`SYS-1322`: the PDF could not be drawn; no file was made.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["voice:read"]},{"oauth2":["voice:read"]}],"summary":"Download the SIP connection sheet (PDF)","tags":["voice"]}},"/v1/voice/sip-credentials/replace":{"post":{"description":"New credentials at once; the previous ones stop working (event `voice.sip_credentials.replaced`). Give the new ones to your provider.","operationId":"replaceVoiceSipCredentials","parameters":[{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}},{"name":"Idempotency-Key","in":"header","description":"A unique key for this operation (e.g. a UUID, 1 to 255 visible characters), kept 24 hours: repeating the request with the same key returns the first answer (`Idempotent-Replayed: true`) instead of doing it again. Errors: `API-8109` (400) a key that is not valid, `API-8108` (409, retryable) the first request with this key is still running, `API-8107` (422) the key was used for a different request; `API-8118` (409) the first request created something whose secret is shown only once, so its answer is not repeated. An answer with `shown_once` repeats its secret within 10 minutes, then `API-8118`.","required":false,"schema":{"type":"string","minLength":1,"maxLength":255}}],"responses":{"200":{"description":"The new credentials.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VoiceSipCredentials"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `AUTH-1003`: your seat was deactivated (view only). `AUTH-1004`: all seats are inactive because the seat charge was not paid (view only). `AUTH-1002`: your role lacks the `channels.manage` permission. `API-8102`: the API key or app lacks the `voice:write` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in. `API-8148`: not available to test keys (API test mode).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"503":{"description":"`SYS-1001`: voice is not set up on this server.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["voice:write"]},{"oauth2":["voice:write"]}],"summary":"Replace your organization’s SIP credentials","tags":["voice"]}},"/v1/voice/provider-connections":{"get":{"description":"Your organization’s SIP-provider connections: addresses, transport, port, credentials (never the password), on, off or suspended by the Rabt team (with the reason), and how many numbers are on each.","operationId":"listVoiceProviderConnections","parameters":[{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"The connections.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VoiceProviderConnectionList"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `API-8102`: the API key or app lacks the `voice:read` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["voice:read"]},{"oauth2":["voice:read"]}],"summary":"List the provider connections","tags":["voice"]},"post":{"description":"Adds your SIP provider by registration: its registrar, transport and port (Rabt registers each number’s account to it, so Rabt needs no fixed address with the provider; each number then gives its username and password). It applies to your calls within a minute, with no approval (event `voice.provider_connection.created`). At most 10 connections. A connection by address (`authentication: address`, or `addresses` without `authentication`) is refused with `VOI-4576`: the Rabt team makes it on request.","operationId":"createVoiceProviderConnection","parameters":[{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}},{"name":"Idempotency-Key","in":"header","description":"A unique key for this operation (e.g. a UUID, 1 to 255 visible characters), kept 24 hours: repeating the request with the same key returns the first answer (`Idempotent-Replayed: true`) instead of doing it again. Errors: `API-8109` (400) a key that is not valid, `API-8108` (409, retryable) the first request with this key is still running, `API-8107` (422) the key was used for a different request; `API-8118` (409) the first request created something whose secret is shown only once, so its answer is not repeated. An answer with `shown_once` repeats its secret within 10 minutes, then `API-8118`.","required":false,"schema":{"type":"string","minLength":1,"maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateVoiceProviderConnection"}}}},"responses":{"201":{"description":"The connection.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VoiceProviderConnection"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `AUTH-1003`: your seat was deactivated (view only). `AUTH-1004`: all seats are inactive because the seat charge was not paid (view only). `AUTH-1002`: your role lacks the `channels.manage` permission. `API-8102`: the API key or app lacks the `voice:write` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in. `API-8148`: not available to test keys (API test mode).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"description":"`API-8001`: some fields are missing or not valid. `details.fields` lists each invalid field with its own code (e.g. `API-8002` required, `API-8012` wrong format). `VOI-4548`: a private, reserved or too broad address. `VOI-4556`: one of Rabt’s own addresses. `VOI-4576`: a connection by address is made by the Rabt team on request (contact support).","headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"429":{"description":"`API-8004`: a rate limit quota is used up (see `RateLimit`). Try again after `Retry-After` seconds. `VOI-4549`: too many connections.","headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"},"Retry-After":{"$ref":"#/components/headers/Retry-After"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["voice:write"]},{"oauth2":["voice:write"]}],"summary":"Add a provider connection","tags":["voice"]}},"/v1/voice/provider-connections/{connectionId}":{"get":{"operationId":"getVoiceProviderConnection","parameters":[{"name":"connectionId","required":true,"in":"path","description":"The provider connection id.","schema":{"type":"string","format":"uuid","description":"The provider connection id."}},{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"The connection.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VoiceProviderConnection"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `API-8102`: the API key or app lacks the `voice:read` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"`VOI-4546`: no provider connection with this id.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["voice:read"]},{"oauth2":["voice:read"]}],"summary":"Get a provider connection","tags":["voice"]},"patch":{"description":"Changes its addresses, transport, port, codecs, number format, From domain, channel limit, outbound credentials or registrar, or turns it off or on (event `voice.provider_connection.updated`); applied within a minute. How it authenticates (`authentication`) changes only while no number is on it, and never to `address` (`VOI-4576`: the Rabt team makes those). A connection the Rabt team suspended cannot be changed.","operationId":"updateVoiceProviderConnection","parameters":[{"name":"connectionId","required":true,"in":"path","description":"The provider connection id.","schema":{"type":"string","format":"uuid","description":"The provider connection id."}},{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}},{"name":"Idempotency-Key","in":"header","description":"A unique key for this operation (e.g. a UUID, 1 to 255 visible characters), kept 24 hours: repeating the request with the same key returns the first answer (`Idempotent-Replayed: true`) instead of doing it again. Errors: `API-8109` (400) a key that is not valid, `API-8108` (409, retryable) the first request with this key is still running, `API-8107` (422) the key was used for a different request; `API-8118` (409) the first request created something whose secret is shown only once, so its answer is not repeated. An answer with `shown_once` repeats its secret within 10 minutes, then `API-8118`.","required":false,"schema":{"type":"string","minLength":1,"maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateVoiceProviderConnection"}}}},"responses":{"200":{"description":"The connection.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VoiceProviderConnection"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `AUTH-1003`: your seat was deactivated (view only). `AUTH-1004`: all seats are inactive because the seat charge was not paid (view only). `AUTH-1002`: your role lacks the `channels.manage` permission. `API-8102`: the API key or app lacks the `voice:write` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in. `API-8148`: not available to test keys (API test mode).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"`VOI-4546`: no provider connection with this id.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"409":{"description":"`VOI-4552`: the Rabt team suspended this connection. `VOI-4571`: numbers are on it, so `authentication` does not change.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"description":"`API-8001`: some fields are missing or not valid. `details.fields` lists each invalid field with its own code (e.g. `API-8002` required, `API-8012` wrong format). `VOI-4548`: a private, reserved or too broad address. `VOI-4556`: one of Rabt’s own addresses. `VOI-4576`: a connection by address is made by the Rabt team on request (contact support).","headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["voice:write"]},{"oauth2":["voice:write"]}],"summary":"Change a provider connection","tags":["voice"]}},"/v1/voice/provider-connections/{connectionId}/remove":{"post":{"description":"Removes a connection without numbers (kept for the audit trail; its outbound password is destroyed). Calls from its addresses are no longer accepted (event `voice.provider_connection.removed`).","operationId":"removeVoiceProviderConnection","parameters":[{"name":"connectionId","required":true,"in":"path","description":"The provider connection id.","schema":{"type":"string","format":"uuid","description":"The provider connection id."}},{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}},{"name":"Idempotency-Key","in":"header","description":"A unique key for this operation (e.g. a UUID, 1 to 255 visible characters), kept 24 hours: repeating the request with the same key returns the first answer (`Idempotent-Replayed: true`) instead of doing it again. Errors: `API-8109` (400) a key that is not valid, `API-8108` (409, retryable) the first request with this key is still running, `API-8107` (422) the key was used for a different request; `API-8118` (409) the first request created something whose secret is shown only once, so its answer is not repeated. An answer with `shown_once` repeats its secret within 10 minutes, then `API-8118`.","required":false,"schema":{"type":"string","minLength":1,"maxLength":255}}],"responses":{"200":{"description":"The removed connection.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VoiceProviderConnection"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `AUTH-1003`: your seat was deactivated (view only). `AUTH-1004`: all seats are inactive because the seat charge was not paid (view only). `AUTH-1002`: your role lacks the `channels.manage` permission. `API-8102`: the API key or app lacks the `voice:write` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in. `API-8148`: not available to test keys (API test mode).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"`VOI-4546`: no provider connection with this id.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"409":{"description":"`VOI-4557`: numbers are on it: release or move them first.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["voice:write"]},{"oauth2":["voice:write"]}],"summary":"Remove a provider connection","tags":["voice"]}},"/v1/phone-numbers/own":{"post":{"description":"Adds one of your organization’s own numbers (DID) on a provider connection, or with your provider’s registrar (`connection`, by registration: a connection with the same data is reused, else one is created; by address is refused with `VOI-4576`, the Rabt team makes it). Calls reach it only on its account’s registration (given in `registration`), or, on a connection by address you have, from its addresses or with your organization’s SIP credentials; its outbound calls leave only through it, and Rabt charges nothing for it: no rental, no minutes (event `phone_number.added`). `lines` are the calls your provider package carries at once (1 by default; a call beyond them is refused). It rings All; route it like any number. Release it like any number.","operationId":"addOwnPhoneNumber","parameters":[{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}},{"name":"Idempotency-Key","in":"header","description":"A unique key for this operation (e.g. a UUID, 1 to 255 visible characters), kept 24 hours: repeating the request with the same key returns the first answer (`Idempotent-Replayed: true`) instead of doing it again. Errors: `API-8109` (400) a key that is not valid, `API-8108` (409, retryable) the first request with this key is still running, `API-8107` (422) the key was used for a different request; `API-8118` (409) the first request created something whose secret is shown only once, so its answer is not repeated. An answer with `shown_once` repeats its secret within 10 minutes, then `API-8118`.","required":false,"schema":{"type":"string","minLength":1,"maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AddOwnPhoneNumber"}}}},"responses":{"201":{"description":"The number.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PhoneNumber"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `AUTH-1003`: your seat was deactivated (view only). `AUTH-1004`: all seats are inactive because the seat charge was not paid (view only). `AUTH-1002`: your role lacks the `channels.manage` permission. `API-8102`: the API key or app lacks the `voice:write` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in. `API-8148`: not available to test keys (API test mode).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"`VOI-4546`: no provider connection with this id.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"409":{"description":"`VOI-4551`: the number is Rabt’s or already added. `VOI-4552`: the connection is off or suspended.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"description":"`API-8001`: some fields are missing or not valid. `details.fields` lists each invalid field with its own code (e.g. `API-8002` required, `API-8012` wrong format). `VOI-4548`: a private, reserved or too broad address. `VOI-4556`: one of Rabt’s own addresses. `VOI-4576`: a connection by address is made by the Rabt team on request (contact support).","headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["voice:write"]},{"oauth2":["voice:write"]}],"summary":"Add your own number","tags":["voice"]}},"/v1/phone-numbers/{phoneNumberId}/registration":{"put":{"description":"The username and password your provider gave for one of your own numbers on a connection that authenticates by registration: Rabt registers that account to the provider’s registrar and receives the number’s calls on it (numbers with the same username share one account; a new password replaces its old one). Applied within a minute; its state shows on the connection (event `phone_number.updated` with `registration`; `voice.provider_registration.changed` when the registrar answers).","operationId":"setPhoneNumberRegistration","parameters":[{"name":"phoneNumberId","required":true,"in":"path","description":"Its id, or the number in E.164 (the organization’s active number with it; VOI-4578 if none).","schema":{"description":"Its id, or the number in E.164 (the organization’s active number with it; VOI-4578 if none).","anyOf":[{"type":"string","format":"uuid"},{"type":"string","pattern":"^[+][1-9][0-9]{1,14}$"}]}},{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}},{"name":"Idempotency-Key","in":"header","description":"A unique key for this operation (e.g. a UUID, 1 to 255 visible characters), kept 24 hours: repeating the request with the same key returns the first answer (`Idempotent-Replayed: true`) instead of doing it again. Errors: `API-8109` (400) a key that is not valid, `API-8108` (409, retryable) the first request with this key is still running, `API-8107` (422) the key was used for a different request; `API-8118` (409) the first request created something whose secret is shown only once, so its answer is not repeated. An answer with `shown_once` repeats its secret within 10 minutes, then `API-8118`.","required":false,"schema":{"type":"string","minLength":1,"maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VoiceRegistrationCredentials"}}}},"responses":{"200":{"description":"The number.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PhoneNumber"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `AUTH-1003`: your seat was deactivated (view only). `AUTH-1004`: all seats are inactive because the seat charge was not paid (view only). `AUTH-1002`: your role lacks the `channels.manage` permission. `API-8102`: the API key or app lacks the `voice:write` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in. `API-8148`: not available to test keys (API test mode).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"`VOI-4500`: no number with this id.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"409":{"description":"`VOI-4504`: the number was released.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["voice:write"]},{"oauth2":["voice:write"]}],"summary":"Set your own number’s account","tags":["voice"]}},"/v1/sms/sender-names":{"get":{"description":"Every sender name of the organization with its registration status and suspension.","operationId":"listSmsSenderNames","parameters":[{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"The sender names.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SmsSenderNameList"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `API-8102`: the API key or app lacks the `sms:read` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["sms:read"]},{"oauth2":["sms:read"]}],"summary":"List the sender names","tags":["sms"]},"post":{"description":"Pending until the Rabt platform team registers it with the operators through the unified sender name system; upload its documents next.","operationId":"requestSmsSenderName","parameters":[{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}},{"name":"Idempotency-Key","in":"header","description":"A unique key for this operation (e.g. a UUID, 1 to 255 visible characters), kept 24 hours: repeating the request with the same key returns the first answer (`Idempotent-Replayed: true`) instead of doing it again. Errors: `API-8109` (400) a key that is not valid, `API-8108` (409, retryable) the first request with this key is still running, `API-8107` (422) the key was used for a different request; `API-8118` (409) the first request created something whose secret is shown only once, so its answer is not repeated. An answer with `shown_once` repeats its secret within 10 minutes, then `API-8118`.","required":false,"schema":{"type":"string","minLength":1,"maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RequestSmsSenderName"}}}},"responses":{"201":{"description":"The request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SmsSenderNameDetail"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `AUTH-1003`: your seat was deactivated (view only). `AUTH-1004`: all seats are inactive because the seat charge was not paid (view only). `AUTH-1002`: your role lacks the `channels.manage` permission. `API-8102`: the API key or app lacks the `sms:write` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"409":{"description":"`SMS-4025`: the name is already requested or registered.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"description":"`API-8001`: some fields are missing or not valid. `details.fields` lists each invalid field with its own code (e.g. `API-8002` required, `API-8012` wrong format). `SMS-4024`: the name is not in a valid format for its classification.","headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["sms:write"]},{"oauth2":["sms:write"]}],"summary":"Request a sender name","tags":["sms"]}},"/v1/sms/sender-names/{id}":{"get":{"description":"With its registration documents and the spam complaints logged against it.","operationId":"getSmsSenderName","parameters":[{"name":"id","required":true,"in":"path","description":"The sender name id.","schema":{"type":"string","format":"uuid","description":"The sender name id."}},{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"The sender name.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SmsSenderNameDetail"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `AUTH-1002`: your role lacks the `channels.manage` permission. `API-8102`: the API key or app lacks the `sms:read` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"`SMS-4020`: no such sender name in this organization.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["sms:read"]},{"oauth2":["sms:read"]}],"summary":"Get a sender name","tags":["sms"]},"patch":{"description":"Its purpose (while pending), or make it the default for SMS from tickets and the API.","operationId":"updateSmsSenderName","parameters":[{"name":"id","required":true,"in":"path","description":"The sender name id.","schema":{"type":"string","format":"uuid","description":"The sender name id."}},{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}},{"name":"Idempotency-Key","in":"header","description":"A unique key for this operation (e.g. a UUID, 1 to 255 visible characters), kept 24 hours: repeating the request with the same key returns the first answer (`Idempotent-Replayed: true`) instead of doing it again. Errors: `API-8109` (400) a key that is not valid, `API-8108` (409, retryable) the first request with this key is still running, `API-8107` (422) the key was used for a different request; `API-8118` (409) the first request created something whose secret is shown only once, so its answer is not repeated. An answer with `shown_once` repeats its secret within 10 minutes, then `API-8118`.","required":false,"schema":{"type":"string","minLength":1,"maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateSmsSenderName"}}}},"responses":{"200":{"description":"The sender name.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SmsSenderNameDetail"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `AUTH-1003`: your seat was deactivated (view only). `AUTH-1004`: all seats are inactive because the seat charge was not paid (view only). `AUTH-1002`: your role lacks the `channels.manage` permission. `API-8102`: the API key or app lacks the `sms:write` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"`SMS-4020`: no such sender name in this organization.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"409":{"description":"`SMS-4042`: the purpose of a name that is no longer pending.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"description":"`API-8001`: some fields are missing or not valid. `details.fields` lists each invalid field with its own code (e.g. `API-8002` required, `API-8012` wrong format). `SMS-4023`: only an approved service name can be the default.","headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["sms:write"]},{"oauth2":["sms:write"]}],"summary":"Update a sender name","tags":["sms"]}},"/v1/sms/sender-name-documents":{"post":{"description":"A document for the sender name registration (commercial registration, authorization letter, trademark): PDF, PNG or JPEG, at most 5 MB, sent as base64.","operationId":"uploadSmsSenderNameDocument","parameters":[{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}},{"name":"Idempotency-Key","in":"header","description":"A unique key for this operation (e.g. a UUID, 1 to 255 visible characters), kept 24 hours: repeating the request with the same key returns the first answer (`Idempotent-Replayed: true`) instead of doing it again. Errors: `API-8109` (400) a key that is not valid, `API-8108` (409, retryable) the first request with this key is still running, `API-8107` (422) the key was used for a different request; `API-8118` (409) the first request created something whose secret is shown only once, so its answer is not repeated. An answer with `shown_once` repeats its secret within 10 minutes, then `API-8118`.","required":false,"schema":{"type":"string","minLength":1,"maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UploadSmsSenderNameDocument"}}}},"responses":{"201":{"description":"The sender name.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SmsSenderNameDetail"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `AUTH-1003`: your seat was deactivated (view only). `AUTH-1004`: all seats are inactive because the seat charge was not paid (view only). `AUTH-1002`: your role lacks the `channels.manage` permission. `API-8102`: the API key or app lacks the `sms:write` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"`SMS-4020`: no such sender name in this organization.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"description":"`API-8001`: some fields are missing or not valid. `details.fields` lists each invalid field with its own code (e.g. `API-8002` required, `API-8012` wrong format). `SMS-4045`: not a PDF, PNG or JPEG of at most 5 MB. `TKT-6194`: the malware scan found malware in it (refused, not kept).","headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"429":{"$ref":"#/components/responses/RateLimited"},"503":{"description":"`TKT-6195`: the malware scanner did not answer (upload it again later). `SYS-1001`: object storage, or in production the malware scanner (ClamAV), is not configured.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["sms:write"]},{"oauth2":["sms:write"]}],"summary":"Upload a registration document","tags":["sms"]}},"/v1/sms/sender-names/{id}/documents/{documentId}/withdraw":{"post":{"description":"It no longer counts for the registration (the file is kept).","operationId":"withdrawSmsSenderNameDocument","parameters":[{"name":"id","required":true,"in":"path","description":"The sender name id.","schema":{"type":"string","format":"uuid","description":"The sender name id."}},{"name":"documentId","required":true,"in":"path","description":"The document id.","schema":{"type":"string","format":"uuid","description":"The document id."}},{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}},{"name":"Idempotency-Key","in":"header","description":"A unique key for this operation (e.g. a UUID, 1 to 255 visible characters), kept 24 hours: repeating the request with the same key returns the first answer (`Idempotent-Replayed: true`) instead of doing it again. Errors: `API-8109` (400) a key that is not valid, `API-8108` (409, retryable) the first request with this key is still running, `API-8107` (422) the key was used for a different request; `API-8118` (409) the first request created something whose secret is shown only once, so its answer is not repeated. An answer with `shown_once` repeats its secret within 10 minutes, then `API-8118`.","required":false,"schema":{"type":"string","minLength":1,"maxLength":255}}],"responses":{"200":{"description":"The sender name.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SmsSenderNameDetail"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `AUTH-1003`: your seat was deactivated (view only). `AUTH-1004`: all seats are inactive because the seat charge was not paid (view only). `AUTH-1002`: your role lacks the `channels.manage` permission. `API-8102`: the API key or app lacks the `sms:write` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"`SMS-4020` or `SMS-4046`: no such sender name or document.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["sms:write"]},{"oauth2":["sms:write"]}],"summary":"Withdraw a registration document","tags":["sms"]}},"/v1/sms/sender-names/{id}/documents/{documentId}/download":{"get":{"operationId":"downloadSmsSenderNameDocument","parameters":[{"name":"id","required":true,"in":"path","description":"The sender name id.","schema":{"type":"string","format":"uuid","description":"The sender name id."}},{"name":"documentId","required":true,"in":"path","description":"The document id.","schema":{"type":"string","format":"uuid","description":"The document id."}},{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"The link.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SmsDocumentDownload"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `AUTH-1002`: your role lacks the `channels.manage` permission. `API-8102`: the API key or app lacks the `sms:read` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"`SMS-4046`: no such document.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["sms:read"]},{"oauth2":["sms:read"]}],"summary":"A download link for a registration document (valid 5 minutes)","tags":["sms"]}},"/v1/sms/opt-outs":{"get":{"description":"The numbers that get no SMS from the organization, newest first.","operationId":"listSmsOptOuts","parameters":[{"name":"phone","required":false,"in":"query","description":"Only this number (E.164).","schema":{"description":"Only this number (E.164).","type":"string","pattern":"^\\+[1-9]\\d{6,14}$"}},{"name":"include_lifted","required":false,"in":"query","schema":{"type":"string","enum":["true","false"]}},{"name":"cursor","required":false,"in":"query","description":"The `next_cursor` of the previous page.","schema":{"description":"The `next_cursor` of the previous page.","type":"string","maxLength":200,"pattern":"^[A-Za-z0-9_-]+$"}},{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"A page of opt-outs.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SmsOptOutPage"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `AUTH-1002`: your role lacks the `channels.manage` permission. `API-8102`: the API key or app lacks the `sms:read` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["sms:read"]},{"oauth2":["sms:read"]}],"summary":"List the opt-outs","tags":["sms"]},"post":{"description":"The number gets no SMS from the organization (one-time codes it asks for excepted).","operationId":"createSmsOptOut","parameters":[{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}},{"name":"Idempotency-Key","in":"header","description":"A unique key for this operation (e.g. a UUID, 1 to 255 visible characters), kept 24 hours: repeating the request with the same key returns the first answer (`Idempotent-Replayed: true`) instead of doing it again. Errors: `API-8109` (400) a key that is not valid, `API-8108` (409, retryable) the first request with this key is still running, `API-8107` (422) the key was used for a different request; `API-8118` (409) the first request created something whose secret is shown only once, so its answer is not repeated. An answer with `shown_once` repeats its secret within 10 minutes, then `API-8118`.","required":false,"schema":{"type":"string","minLength":1,"maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateSmsOptOut"}}}},"responses":{"201":{"description":"The opt-out.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SmsOptOut"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `AUTH-1003`: your seat was deactivated (view only). `AUTH-1004`: all seats are inactive because the seat charge was not paid (view only). `AUTH-1002`: your role lacks the `channels.manage` permission. `API-8102`: the API key or app lacks the `sms:write` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"description":"`API-8001`: some fields are missing or not valid. `details.fields` lists each invalid field with its own code (e.g. `API-8002` required, `API-8012` wrong format). `SMS-4032`: not a valid mobile number.","headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["sms:write"]},{"oauth2":["sms:write"]}],"summary":"Add a number to the opt-out list","tags":["sms"]}},"/v1/sms/opt-outs/{id}/lift":{"post":{"description":"With the reason (the recipient asked to receive SMS again); the entry is kept.","operationId":"liftSmsOptOut","parameters":[{"name":"id","required":true,"in":"path","description":"The opt-out id.","schema":{"type":"string","format":"uuid","description":"The opt-out id."}},{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}},{"name":"Idempotency-Key","in":"header","description":"A unique key for this operation (e.g. a UUID, 1 to 255 visible characters), kept 24 hours: repeating the request with the same key returns the first answer (`Idempotent-Replayed: true`) instead of doing it again. Errors: `API-8109` (400) a key that is not valid, `API-8108` (409, retryable) the first request with this key is still running, `API-8107` (422) the key was used for a different request; `API-8118` (409) the first request created something whose secret is shown only once, so its answer is not repeated. An answer with `shown_once` repeats its secret within 10 minutes, then `API-8118`.","required":false,"schema":{"type":"string","minLength":1,"maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LiftSmsOptOut"}}}},"responses":{"200":{"description":"The opt-out, lifted.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SmsOptOut"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `AUTH-1003`: your seat was deactivated (view only). `AUTH-1004`: all seats are inactive because the seat charge was not paid (view only). `AUTH-1002`: your role lacks the `channels.manage` permission. `API-8102`: the API key or app lacks the `sms:write` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"`SMS-4041`: no such opt-out, or it was lifted already.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["sms:write"]},{"oauth2":["sms:write"]}],"summary":"Take a number off the opt-out list","tags":["sms"]}},"/v1/sms/settings":{"get":{"operationId":"getSmsSettings","parameters":[{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"The settings.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SmsSettings"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `AUTH-1002`: your role lacks the `channels.manage` permission. `API-8102`: the API key or app lacks the `sms:read` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["sms:read"]},{"oauth2":["sms:read"]}],"summary":"Get the SMS settings","tags":["sms"]},"patch":{"description":"The allowed destination countries and the allowed link domains.","operationId":"updateSmsSettings","parameters":[{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}},{"name":"Idempotency-Key","in":"header","description":"A unique key for this operation (e.g. a UUID, 1 to 255 visible characters), kept 24 hours: repeating the request with the same key returns the first answer (`Idempotent-Replayed: true`) instead of doing it again. Errors: `API-8109` (400) a key that is not valid, `API-8108` (409, retryable) the first request with this key is still running, `API-8107` (422) the key was used for a different request; `API-8118` (409) the first request created something whose secret is shown only once, so its answer is not repeated. An answer with `shown_once` repeats its secret within 10 minutes, then `API-8118`.","required":false,"schema":{"type":"string","minLength":1,"maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateSmsSettings"}}}},"responses":{"200":{"description":"The settings.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SmsSettings"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `AUTH-1003`: your seat was deactivated (view only). `AUTH-1004`: all seats are inactive because the seat charge was not paid (view only). `AUTH-1002`: your role lacks the `channels.manage` permission. `API-8102`: the API key or app lacks the `sms:write` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"description":"`API-8001`: some fields are missing or not valid. `details.fields` lists each invalid field with its own code (e.g. `API-8002` required, `API-8012` wrong format). `SMS-4044`: a link domain that is not valid.","headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["sms:write"]},{"oauth2":["sms:write"]}],"summary":"Update the SMS settings","tags":["sms"]}},"/v1/sms/messages":{"get":{"description":"Every SMS of the organization with its status, newest first.","operationId":"listSms","parameters":[{"name":"sender_name_id","required":false,"in":"query","description":"Only SMS under this sender name.","schema":{"description":"Only SMS under this sender name.","type":"string","format":"uuid"}},{"name":"status","required":false,"in":"query","description":"Only SMS in this status.","schema":{"description":"Only SMS in this status.","type":"string","enum":["queued","submitting","submitted","delivered","failed","unknown"]}},{"name":"ticket_id","required":false,"in":"query","description":"Only SMS sent from this ticket.","schema":{"description":"Only SMS sent from this ticket.","type":"string","format":"uuid"}},{"name":"cursor","required":false,"in":"query","description":"The `next_cursor` of the previous page.","schema":{"description":"The `next_cursor` of the previous page.","type":"string","maxLength":200,"pattern":"^[A-Za-z0-9_-]+$"}},{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"A page of SMS.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SmsPage"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `AUTH-1002`: your role lacks the `channels.manage` permission. `API-8102`: the API key or app lacks the `sms:read` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["sms:read"]},{"oauth2":["sms:read"]}],"summary":"List the SMS","tags":["sms"]},"post":{"description":"A service message or a one-time code, under an approved service sender name. Paid from the wallet when an operator accepts it (per segment, by destination); `status` follows with the delivery report (webhook `sms.status_changed`). Report a code as used with `verifySms` (OTP conversion tracking).","operationId":"sendSms","parameters":[{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}},{"name":"Idempotency-Key","in":"header","description":"A unique key for this operation (e.g. a UUID, 1 to 255 visible characters), kept 24 hours: repeating the request with the same key returns the first answer (`Idempotent-Replayed: true`) instead of doing it again. Errors: `API-8109` (400) a key that is not valid, `API-8108` (409, retryable) the first request with this key is still running, `API-8107` (422) the key was used for a different request; `API-8118` (409) the first request created something whose secret is shown only once, so its answer is not repeated. An answer with `shown_once` repeats its secret within 10 minutes, then `API-8118`.","required":false,"schema":{"type":"string","minLength":1,"maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SendSms"}}}},"responses":{"201":{"description":"The SMS, queued.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SentSms"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `AUTH-1003`: your seat was deactivated (view only). `AUTH-1004`: all seats are inactive because the seat charge was not paid (view only). `AUTH-1002`: your role lacks the `channels.manage` permission. `API-8102`: the API key or app lacks the `sms:write` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"description":"`API-8001`: some fields are missing or not valid. `details.fields` lists each invalid field with its own code (e.g. `API-8002` required, `API-8012` wrong format). The SMS was refused before sending, with its code: `SMS-4021` (not approved), `SMS-4022` (suspended by the platform team), `SMS-4023` (wrong classification), `SMS-4027` (opted out), `SMS-4028`–`SMS-4031`, `SMS-4034` (KSA content rules), `SMS-4032`/`SMS-4033` (number, country), `SMS-4038` (promotional).","headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"429":{"description":"`API-8004`: a rate limit quota is used up (see `RateLimit`). Try again after `Retry-After` seconds. `SMS-4035`–`SMS-4036`: SMS pumping protection.","headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"},"Retry-After":{"$ref":"#/components/headers/Retry-After"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["sms:write"]},{"oauth2":["sms:write"]}],"summary":"Send an SMS","tags":["sms"]}},"/v1/sms/messages/{id}":{"get":{"description":"With each submitted part and its delivery report.","operationId":"getSms","parameters":[{"name":"id","required":true,"in":"path","description":"The SMS id.","schema":{"type":"string","format":"uuid","description":"The SMS id."}},{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"The SMS.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SmsDetail"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `AUTH-1002`: your role lacks the `channels.manage` permission. `API-8102`: the API key or app lacks the `sms:read` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"`SMS-4040`: no such SMS.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["sms:read"]},{"oauth2":["sms:read"]}],"summary":"Get an SMS","tags":["sms"]}},"/v1/sms/messages/{id}/verify":{"post":{"description":"OTP conversion tracking (SMS pumping protection): codes that are sent but never used limit the organization’s code messages (`SMS-4036`).","operationId":"verifySms","parameters":[{"name":"id","required":true,"in":"path","description":"The SMS id.","schema":{"type":"string","format":"uuid","description":"The SMS id."}},{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}},{"name":"Idempotency-Key","in":"header","description":"A unique key for this operation (e.g. a UUID, 1 to 255 visible characters), kept 24 hours: repeating the request with the same key returns the first answer (`Idempotent-Replayed: true`) instead of doing it again. Errors: `API-8109` (400) a key that is not valid, `API-8108` (409, retryable) the first request with this key is still running, `API-8107` (422) the key was used for a different request; `API-8118` (409) the first request created something whose secret is shown only once, so its answer is not repeated. An answer with `shown_once` repeats its secret within 10 minutes, then `API-8118`.","required":false,"schema":{"type":"string","minLength":1,"maxLength":255}}],"responses":{"200":{"description":"The SMS.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SmsDetail"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `AUTH-1003`: your seat was deactivated (view only). `AUTH-1004`: all seats are inactive because the seat charge was not paid (view only). `AUTH-1002`: your role lacks the `channels.manage` permission. `API-8102`: the API key or app lacks the `sms:write` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"`SMS-4040`: no such SMS.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"description":"`API-8001`: some fields are missing or not valid. `details.fields` lists each invalid field with its own code (e.g. `API-8002` required, `API-8012` wrong format). `SMS-4043`: not a one-time code.","headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["sms:write"]},{"oauth2":["sms:write"]}],"summary":"Report a one-time code as used","tags":["sms"]}},"/v1/sms/preview":{"post":{"description":"Its encoding and parts, and the same checks as sending (sender name, KSA content rules, the number when given).","operationId":"previewSms","parameters":[{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PreviewSms"}}}},"responses":{"200":{"description":"The count.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SmsPreview"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `API-8102`: the API key or app lacks the `sms:read` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"description":"`API-8001`: some fields are missing or not valid. `details.fields` lists each invalid field with its own code (e.g. `API-8002` required, `API-8012` wrong format). The SMS was refused before sending, with its code: `SMS-4021` (not approved), `SMS-4022` (suspended by the platform team), `SMS-4023` (wrong classification), `SMS-4027` (opted out), `SMS-4028`–`SMS-4031`, `SMS-4034` (KSA content rules), `SMS-4032`/`SMS-4033` (number, country), `SMS-4038` (promotional).","headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["sms:read"]},{"oauth2":["sms:read"]}],"summary":"Count and check an SMS without sending it","tags":["sms"]}},"/v1/tickets/{ticketId}/sms":{"post":{"description":"To one of the contact’s mobile numbers, under an approved service sender name: recorded in the ticket’s timeline with its delivery status (SMS is one-way: the customer answers on other channels).","operationId":"sendTicketSms","parameters":[{"name":"ticketId","required":true,"in":"path","description":"The ticket id.","schema":{"type":"string","format":"uuid","description":"The ticket id."}},{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}},{"name":"Idempotency-Key","in":"header","description":"A unique key for this operation (e.g. a UUID, 1 to 255 visible characters), kept 24 hours: repeating the request with the same key returns the first answer (`Idempotent-Replayed: true`) instead of doing it again. Errors: `API-8109` (400) a key that is not valid, `API-8108` (409, retryable) the first request with this key is still running, `API-8107` (422) the key was used for a different request; `API-8118` (409) the first request created something whose secret is shown only once, so its answer is not repeated. An answer with `shown_once` repeats its secret within 10 minutes, then `API-8118`.","required":false,"schema":{"type":"string","minLength":1,"maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SendTicketSms"}}}},"responses":{"201":{"description":"The SMS, queued.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TicketSmsResult"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `AUTH-1003`: your seat was deactivated (view only). `AUTH-1004`: all seats are inactive because the seat charge was not paid (view only). `AUTH-1002`: your role lacks the `tickets.reply` permission. `API-8102`: the API key or app lacks the `tickets:write` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"`TKT-6101`: no such ticket (or not visible to you).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"description":"`API-8001`: some fields are missing or not valid. `details.fields` lists each invalid field with its own code (e.g. `API-8002` required, `API-8012` wrong format). The SMS was refused before sending, with its code: `SMS-4021` (not approved), `SMS-4022` (suspended by the platform team), `SMS-4023` (wrong classification), `SMS-4027` (opted out), `SMS-4028`–`SMS-4031`, `SMS-4034` (KSA content rules), `SMS-4032`/`SMS-4033` (number, country), `SMS-4038` (promotional). `SMS-4039`: not one of the contact’s numbers.","headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["tickets:write"]},{"oauth2":["tickets:write"]}],"summary":"Send an SMS to the ticket’s contact","tags":["sms"]}},"/v1/campaigns":{"get":{"description":"Newest first, each with its status and results so far. Needs `campaigns.manage`.","operationId":"listCampaigns","parameters":[{"name":"status","required":false,"in":"query","description":"Only campaigns in this status.","schema":{"description":"Only campaigns in this status.","type":"string","enum":["draft","scheduled","sending","paused","paused_no_balance","completed","cancelled"]}},{"name":"channel_type","required":false,"in":"query","description":"Only campaigns on this channel.","schema":{"description":"Only campaigns on this channel.","type":"string","enum":["whatsapp","sms","voice","email","whatsapp_web"]}},{"name":"cursor","required":false,"in":"query","description":"The `next_cursor` of the previous page.","schema":{"description":"The `next_cursor` of the previous page.","type":"string","maxLength":200,"pattern":"^[A-Za-z0-9_-]+$"}},{"name":"page","required":false,"in":"query","description":"A numbered page to jump to, from 1, of `limit` rows: its first row must be within the first 10000 rows of the list. Ignored with `cursor`; the next pages follow `next_cursor`.","schema":{"description":"A numbered page to jump to, from 1, of `limit` rows: its first row must be within the first 10000 rows of the list. Ignored with `cursor`; the next pages follow `next_cursor`.","type":"integer","minimum":1,"maximum":10000}},{"name":"limit","required":false,"in":"query","description":"Campaigns per page (1 to 500, default 25).","schema":{"default":25,"description":"Campaigns per page (1 to 500, default 25).","type":"integer","minimum":1,"maximum":500}},{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"A page of campaigns.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CampaignPage"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `AUTH-1002`: your role lacks the `campaigns.manage` permission. `API-8102`: the API key or app lacks the `campaigns:read` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["campaigns:read"]},{"oauth2":["campaigns:read"]}],"summary":"List the campaigns","tags":["campaigns"]},"post":{"description":"A draft on WhatsApp, SMS, email or voice: name its audience (a segment), its channel, its content and when to send, now or later. Needs `campaigns.manage`. `client_key` (or `Idempotency-Key`) never creates two.","operationId":"createCampaign","parameters":[{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}},{"name":"Idempotency-Key","in":"header","description":"A unique key for this operation (e.g. a UUID, 1 to 255 visible characters), kept 24 hours: repeating the request with the same key returns the first answer (`Idempotent-Replayed: true`) instead of doing it again. Errors: `API-8109` (400) a key that is not valid, `API-8108` (409, retryable) the first request with this key is still running, `API-8107` (422) the key was used for a different request; `API-8118` (409) the first request created something whose secret is shown only once, so its answer is not repeated. An answer with `shown_once` repeats its secret within 10 minutes, then `API-8118`.","required":false,"schema":{"type":"string","minLength":1,"maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateCampaign"}}}},"responses":{"201":{"description":"The draft.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Campaign"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `AUTH-1003`: your seat was deactivated (view only). `AUTH-1004`: all seats are inactive because the seat charge was not paid (view only). `AUTH-1002`: your role lacks the `campaigns.manage` permission. `API-8102`: the API key or app lacks the `campaigns:write` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"`CRM-6027`, `VOI-4500`, `SMS-4020` or `API-8003`: no such segment, number, sender name, WhatsApp channel or email address.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"description":"`API-8001`: some fields are missing or not valid. `details.fields` lists each invalid field with its own code (e.g. `API-8002` required, `API-8012` wrong format). `CAMP-6309`: the time has passed. `CAMP-6324`: an unknown variable.","headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["campaigns:write"]},{"oauth2":["campaigns:write"]}],"summary":"Create a campaign","tags":["campaigns"]}},"/v1/campaigns/sources":{"get":{"description":"The builder’s choices: the active WhatsApp numbers with their approved marketing templates, the approved promotional sender names (`-AD`) that are not suspended, the connected email addresses that can send, and the active phone numbers. Ids, names and public template content only. Needs `campaigns.manage` (not `channels.manage`).","operationId":"listCampaignSources","parameters":[{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"The sources.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CampaignSources"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `AUTH-1002`: your role lacks the `campaigns.manage` permission. `API-8102`: the API key or app lacks the `campaigns:read` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["campaigns:read"]},{"oauth2":["campaigns:read"]}],"summary":"List what campaigns can send from","tags":["campaigns"]}},"/v1/campaigns/{campaignId}":{"get":{"description":"With its content and results. Needs `campaigns.manage`. `status` with `wait_seconds` (up to 20) waits for a launch to move on: the answer comes when the status differs from `status` or the seconds are over.","operationId":"getCampaign","parameters":[{"name":"campaignId","required":true,"in":"path","description":"The campaign id.","schema":{"type":"string","format":"uuid","description":"The campaign id."}},{"name":"status","required":false,"in":"query","description":"With `wait_seconds`: the status the caller already knows; the answer comes once it differs.","schema":{"description":"With `wait_seconds`: the status the caller already knows; the answer comes once it differs.","type":"string","enum":["draft","scheduled","sending","paused","paused_no_balance","completed","cancelled"]}},{"name":"wait_seconds","required":false,"in":"query","description":"Seconds (0 to 20) to wait for the status to differ from `status`; the campaign is answered at the first change or when they are over.","schema":{"default":0,"description":"Seconds (0 to 20) to wait for the status to differ from `status`; the campaign is answered at the first change or when they are over.","type":"integer","minimum":0,"maximum":20}},{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"The campaign.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Campaign"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `AUTH-1002`: your role lacks the `campaigns.manage` permission. `API-8102`: the API key or app lacks the `campaigns:read` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"`CAMP-6301`: no such campaign (or a draft that was removed).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"description":"`API-8004`: a rate limit quota is used up (see `RateLimit`). Try again after `Retry-After` seconds. `API-8004`: ten waits of the organization are already open.","headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"},"Retry-After":{"$ref":"#/components/headers/Retry-After"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["campaigns:read"]},{"oauth2":["campaigns:read"]}],"summary":"Get a campaign","tags":["campaigns"]},"patch":{"description":"Its name, audience, channel, content or time. Needs `campaigns.manage`.","operationId":"updateCampaign","parameters":[{"name":"campaignId","required":true,"in":"path","description":"The campaign id.","schema":{"type":"string","format":"uuid","description":"The campaign id."}},{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}},{"name":"Idempotency-Key","in":"header","description":"A unique key for this operation (e.g. a UUID, 1 to 255 visible characters), kept 24 hours: repeating the request with the same key returns the first answer (`Idempotent-Replayed: true`) instead of doing it again. Errors: `API-8109` (400) a key that is not valid, `API-8108` (409, retryable) the first request with this key is still running, `API-8107` (422) the key was used for a different request; `API-8118` (409) the first request created something whose secret is shown only once, so its answer is not repeated. An answer with `shown_once` repeats its secret within 10 minutes, then `API-8118`.","required":false,"schema":{"type":"string","minLength":1,"maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateCampaign"}}}},"responses":{"200":{"description":"The draft.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Campaign"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `AUTH-1003`: your seat was deactivated (view only). `AUTH-1004`: all seats are inactive because the seat charge was not paid (view only). `AUTH-1002`: your role lacks the `campaigns.manage` permission. `API-8102`: the API key or app lacks the `campaigns:write` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"`CAMP-6301`: no such campaign (or a draft that was removed).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"409":{"description":"`CAMP-6302`: not possible in the campaign’s status (e.g. editing a launched campaign).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"description":"`API-8001`: some fields are missing or not valid. `details.fields` lists each invalid field with its own code (e.g. `API-8002` required, `API-8012` wrong format). `CAMP-6309`: the time has passed. `CAMP-6324`: an unknown variable.","headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["campaigns:write"]},{"oauth2":["campaigns:write"]}],"summary":"Update a draft campaign","tags":["campaigns"]},"delete":{"description":"It is no longer listed; it is kept (Rabt never deletes). Launched campaigns cannot be removed: cancel them. Needs `campaigns.manage`.","operationId":"removeCampaign","parameters":[{"name":"campaignId","required":true,"in":"path","description":"The campaign id.","schema":{"type":"string","format":"uuid","description":"The campaign id."}},{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}}],"responses":{"204":{"description":"Removed.","headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `AUTH-1003`: your seat was deactivated (view only). `AUTH-1004`: all seats are inactive because the seat charge was not paid (view only). `AUTH-1002`: your role lacks the `campaigns.manage` permission. `API-8102`: the API key or app lacks the `campaigns:write` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"`CAMP-6301`: no such campaign (or a draft that was removed).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"409":{"description":"`CAMP-6302`: not possible in the campaign’s status (e.g. editing a launched campaign).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["campaigns:write"]},{"oauth2":["campaigns:write"]}],"summary":"Remove a draft campaign","tags":["campaigns"]}},"/v1/campaigns/{campaignId}/media":{"post":{"description":"Records the file (an image, video, audio or document, with the draft’s text as its caption; audio is followed by the text as its own message) and returns the signed request that uploads it straight to storage (valid 15 minutes). Then call `completeCampaignMediaUpload`. A new request replaces the file; `content.media` null removes it. Needs `campaigns.manage`.","operationId":"requestCampaignMediaUpload","parameters":[{"name":"campaignId","required":true,"in":"path","description":"The campaign id.","schema":{"type":"string","format":"uuid","description":"The campaign id."}},{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}},{"name":"Idempotency-Key","in":"header","description":"A unique key for this operation (e.g. a UUID, 1 to 255 visible characters), kept 24 hours: repeating the request with the same key returns the first answer (`Idempotent-Replayed: true`) instead of doing it again. Errors: `API-8109` (400) a key that is not valid, `API-8108` (409, retryable) the first request with this key is still running, `API-8107` (422) the key was used for a different request; `API-8118` (409) the first request created something whose secret is shown only once, so its answer is not repeated. An answer with `shown_once` repeats its secret within 10 minutes, then `API-8118`.","required":false,"schema":{"type":"string","minLength":1,"maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RequestCampaignMediaUpload"}}}},"responses":{"201":{"description":"The draft, with its file uploading, and the upload request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CampaignMediaUpload"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `AUTH-1003`: your seat was deactivated (view only). `AUTH-1004`: all seats are inactive because the seat charge was not paid (view only). `AUTH-1002`: your role lacks the `campaigns.manage` permission. `API-8102`: the API key or app lacks the `campaigns:write` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"`CAMP-6301`: no such campaign (or a draft that was removed).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"409":{"description":"`CAMP-6302`: not possible in the campaign’s status (e.g. editing a launched campaign). Only WhatsApp (QR) drafts take a file.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"description":"`API-8001`: some fields are missing or not valid. `details.fields` lists each invalid field with its own code (e.g. `API-8002` required, `API-8012` wrong format). `WAW-2510`: WhatsApp does not take this file (its size or type for its kind).","headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"429":{"$ref":"#/components/responses/RateLimited"},"503":{"description":"`SYS-1001`: object storage is not configured.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["campaigns:write"]},{"oauth2":["campaigns:write"]}],"summary":"Upload the file of a WhatsApp (QR) campaign","tags":["campaigns"]}},"/v1/campaigns/{campaignId}/media/complete":{"post":{"description":"Checks the file is in storage with the announced size and scans it for malware (an image, video or audio at once; a document in the background: `content.media.state` `scanning`, read the draft until `ready`, `infected` or `failed`) and only a `ready` file launches. Completing again retries a `failed` scan. Completing twice is harmless. Needs `campaigns.manage`.","operationId":"completeCampaignMediaUpload","parameters":[{"name":"campaignId","required":true,"in":"path","description":"The campaign id.","schema":{"type":"string","format":"uuid","description":"The campaign id."}},{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}},{"name":"Idempotency-Key","in":"header","description":"A unique key for this operation (e.g. a UUID, 1 to 255 visible characters), kept 24 hours: repeating the request with the same key returns the first answer (`Idempotent-Replayed: true`) instead of doing it again. Errors: `API-8109` (400) a key that is not valid, `API-8108` (409, retryable) the first request with this key is still running, `API-8107` (422) the key was used for a different request; `API-8118` (409) the first request created something whose secret is shown only once, so its answer is not repeated. An answer with `shown_once` repeats its secret within 10 minutes, then `API-8118`.","required":false,"schema":{"type":"string","minLength":1,"maxLength":255}}],"responses":{"200":{"description":"The draft.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Campaign"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `AUTH-1003`: your seat was deactivated (view only). `AUTH-1004`: all seats are inactive because the seat charge was not paid (view only). `AUTH-1002`: your role lacks the `campaigns.manage` permission. `API-8102`: the API key or app lacks the `campaigns:write` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"`CAMP-6301`: no such campaign (or a draft that was removed).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"409":{"description":"`CAMP-6302`: not possible in the campaign’s status (e.g. editing a launched campaign). Only a draft with a file being uploaded.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"description":"`API-8001`: some fields are missing or not valid. `details.fields` lists each invalid field with its own code (e.g. `API-8002` required, `API-8012` wrong format). `TKT-6115`: the file is not in storage with its size yet. `TKT-6194`: the malware scan found it infected. `TKT-6195`: the scan did not answer.","headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"429":{"$ref":"#/components/responses/RateLimited"},"503":{"description":"`SYS-1001`: object storage is not configured.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["campaigns:write"]},{"oauth2":["campaigns:write"]}],"summary":"Complete the upload of a campaign’s file","tags":["campaigns"]}},"/v1/campaigns/{campaignId}/speech":{"post":{"description":"Turns its `speech_text` into the message its calls play, in its `voice`. It answers at once: speech made before for this text and voice is taken again (`content.speech_status` `ready`), otherwise it is made in the background (`creating`, then `ready`, or `failed` with `content.speech_error`; `campaign.updated` follows) and can be heard while it is made (`getCampaignSpeechStream`). Text to speech is paid from the wallet (the same text and voice are never paid twice). Needs `campaigns.send`.","operationId":"createCampaignSpeech","parameters":[{"name":"campaignId","required":true,"in":"path","description":"The campaign id.","schema":{"type":"string","format":"uuid","description":"The campaign id."}},{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}},{"name":"Idempotency-Key","in":"header","description":"A unique key for this operation (e.g. a UUID, 1 to 255 visible characters), kept 24 hours: repeating the request with the same key returns the first answer (`Idempotent-Replayed: true`) instead of doing it again. Errors: `API-8109` (400) a key that is not valid, `API-8108` (409, retryable) the first request with this key is still running, `API-8107` (422) the key was used for a different request; `API-8118` (409) the first request created something whose secret is shown only once, so its answer is not repeated. An answer with `shown_once` repeats its secret within 10 minutes, then `API-8118`.","required":false,"schema":{"type":"string","minLength":1,"maxLength":255}}],"responses":{"202":{"description":"The draft.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Campaign"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"402":{"description":"`WAL-1001`: the wallet’s balance cannot pay for it.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `AUTH-1003`: your seat was deactivated (view only). `AUTH-1004`: all seats are inactive because the seat charge was not paid (view only). `AUTH-1002`: your role lacks the `campaigns.send` permission. `API-8102`: the API key or app lacks the `campaigns:write` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"`CAMP-6301`: no such campaign (or a draft that was removed).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"409":{"description":"`CAMP-6302`: not possible in the campaign’s status (e.g. editing a launched campaign). Only voice drafts take speech.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"description":"`API-8001`: some fields are missing or not valid. `details.fields` lists each invalid field with its own code (e.g. `API-8002` required, `API-8012` wrong format). `CAMP-6303`: no speech text or no voice. `CAMP-6312`: the text is too long.","headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"429":{"$ref":"#/components/responses/RateLimited"},"503":{"description":"`SYS-1001`: text to speech or object storage is not configured.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["campaigns:write"]},{"oauth2":["campaigns:write"]}],"summary":"Create a voice campaign’s speech","tags":["campaigns"]}},"/v1/campaigns/{campaignId}/speech/stream":{"get":{"description":"The WAV of the speech of its current text and voice: from its first second while it is being made (`content.speech_status` `creating`), the stored file once it is `ready`. Needs `campaigns.manage`.","operationId":"getCampaignSpeechStream","parameters":[{"name":"campaignId","required":true,"in":"path","description":"The campaign id.","schema":{"type":"string","format":"uuid","description":"The campaign id."}},{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"The audio, as it is made.","content":{"audio/wav":{"schema":{"type":"string","format":"binary"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `AUTH-1002`: your role lacks the `campaigns.manage` permission. `API-8102`: the API key or app lacks the `campaigns:read` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"`CAMP-6301`: no such campaign (or a draft that was removed).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"description":"`API-8001`: some fields are missing or not valid. `details.fields` lists each invalid field with its own code (e.g. `API-8002` required, `API-8012` wrong format). `CAMP-6307`: no speech is made or being made for its text and voice.","headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"429":{"$ref":"#/components/responses/RateLimited"},"503":{"description":"`SYS-1001`: object storage is not configured.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["campaigns:read"]},{"oauth2":["campaigns:read"]}],"summary":"Listen to a voice draft’s speech while it is made","tags":["campaigns"]}},"/v1/campaigns/{campaignId}/audio/download":{"get":{"description":"Needs `campaigns.manage`.","operationId":"getCampaignAudioLink","parameters":[{"name":"campaignId","required":true,"in":"path","description":"The campaign id.","schema":{"type":"string","format":"uuid","description":"The campaign id."}},{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"The link.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CampaignAudioLink"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `AUTH-1002`: your role lacks the `campaigns.manage` permission. `API-8102`: the API key or app lacks the `campaigns:read` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"`CAMP-6301`: no such campaign (or a draft that was removed).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"description":"`API-8001`: some fields are missing or not valid. `details.fields` lists each invalid field with its own code (e.g. `API-8002` required, `API-8012` wrong format). `CAMP-6307`: the campaign has no audio.","headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"429":{"$ref":"#/components/responses/RateLimited"},"503":{"description":"`SYS-1001`: object storage is not configured.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["campaigns:read"]},{"oauth2":["campaigns:read"]}],"summary":"A link to listen to a voice campaign’s audio (valid 5 minutes)","tags":["campaigns"]}},"/v1/campaigns/{campaignId}/review":{"get":{"description":"Who it would send to after the automatic exclusions (no address, duplicates, suppressed, destinations not allowed), the estimated cost from the rate card (nothing is reserved) and the compliance checks. Needs `campaigns.manage`.","operationId":"reviewCampaign","parameters":[{"name":"campaignId","required":true,"in":"path","description":"The campaign id.","schema":{"type":"string","format":"uuid","description":"The campaign id."}},{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"The review.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CampaignReview"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `AUTH-1002`: your role lacks the `campaigns.manage` permission. `API-8102`: the API key or app lacks the `campaigns:read` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"`CAMP-6301`: no such campaign (or a draft that was removed).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"409":{"description":"`CAMP-6302`: not possible in the campaign’s status (e.g. editing a launched campaign).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["campaigns:read"]},{"oauth2":["campaigns:read"]}],"summary":"Review a draft before launch","tags":["campaigns"]}},"/v1/campaigns/{campaignId}/launch":{"post":{"description":"Every check must pass. The recipients are snapshot (later CRM changes do not affect it) and it sends now or at its time, each recipient paid from the wallet as it is sent. More recipients than its WhatsApp QR number’s or mailbox’s allowance today (the review’s `sender.over`) need `risk_accepted: true`, asked at every launch and audited. Needs `campaigns.send`.","operationId":"launchCampaign","parameters":[{"name":"campaignId","required":true,"in":"path","description":"The campaign id.","schema":{"type":"string","format":"uuid","description":"The campaign id."}},{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}},{"name":"Idempotency-Key","in":"header","description":"A unique key for this operation (e.g. a UUID, 1 to 255 visible characters), kept 24 hours: repeating the request with the same key returns the first answer (`Idempotent-Replayed: true`) instead of doing it again. Errors: `API-8109` (400) a key that is not valid, `API-8108` (409, retryable) the first request with this key is still running, `API-8107` (422) the key was used for a different request; `API-8118` (409) the first request created something whose secret is shown only once, so its answer is not repeated. An answer with `shown_once` repeats its secret within 10 minutes, then `API-8118`.","required":false,"schema":{"type":"string","minLength":1,"maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LaunchCampaign"}}}},"responses":{"200":{"description":"The campaign.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Campaign"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `AUTH-1003`: your seat was deactivated (view only). `AUTH-1004`: all seats are inactive because the seat charge was not paid (view only). `AUTH-1002`: your role lacks the `campaigns.send` permission. `API-8102`: the API key or app lacks the `campaigns:write` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"`CAMP-6301`: no such campaign (or a draft that was removed).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"409":{"description":"`CAMP-6302`: not possible in the campaign’s status (e.g. editing a launched campaign). `WAL-1113`: the prices changed since the review.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"description":"`API-8001`: some fields are missing or not valid. `details.fields` lists each invalid field with its own code (e.g. `API-8002` required, `API-8012` wrong format). The first failed check, with its code: `CAMP-6303` (something missing, e.g. a voice campaign’s voice), `CAMP-6304` (the WhatsApp template), `CAMP-6306` (the sender name), `CAMP-6307` (no speech made from the text), `CAMP-6308` (no one to send to), `CAMP-6309` (the time has passed), `CAMP-6320` (audience too large), `CAMP-6324` (unknown variable), `CAMP-6340` (more recipients than its sender’s allowance today, without `risk_accepted`, enforcing).","headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["campaigns:write"]},{"oauth2":["campaigns:write"]}],"summary":"Launch a campaign","tags":["campaigns"]}},"/v1/campaigns/{campaignId}/pause":{"post":{"description":"A sending or scheduled campaign stops until it is resumed. Needs `campaigns.send`.","operationId":"pauseCampaign","parameters":[{"name":"campaignId","required":true,"in":"path","description":"The campaign id.","schema":{"type":"string","format":"uuid","description":"The campaign id."}},{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}},{"name":"Idempotency-Key","in":"header","description":"A unique key for this operation (e.g. a UUID, 1 to 255 visible characters), kept 24 hours: repeating the request with the same key returns the first answer (`Idempotent-Replayed: true`) instead of doing it again. Errors: `API-8109` (400) a key that is not valid, `API-8108` (409, retryable) the first request with this key is still running, `API-8107` (422) the key was used for a different request; `API-8118` (409) the first request created something whose secret is shown only once, so its answer is not repeated. An answer with `shown_once` repeats its secret within 10 minutes, then `API-8118`.","required":false,"schema":{"type":"string","minLength":1,"maxLength":255}}],"responses":{"200":{"description":"The campaign.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Campaign"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `AUTH-1003`: your seat was deactivated (view only). `AUTH-1004`: all seats are inactive because the seat charge was not paid (view only). `AUTH-1002`: your role lacks the `campaigns.send` permission. `API-8102`: the API key or app lacks the `campaigns:write` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"`CAMP-6301`: no such campaign (or a draft that was removed).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"409":{"description":"`CAMP-6302`: not possible in the campaign’s status (e.g. editing a launched campaign).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["campaigns:write"]},{"oauth2":["campaigns:write"]}],"summary":"Pause a campaign","tags":["campaigns"]}},"/v1/campaigns/{campaignId}/resume":{"post":{"description":"From where it stopped (one the wallet stopped: after a top-up). Needs `campaigns.send`.","operationId":"resumeCampaign","parameters":[{"name":"campaignId","required":true,"in":"path","description":"The campaign id.","schema":{"type":"string","format":"uuid","description":"The campaign id."}},{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}},{"name":"Idempotency-Key","in":"header","description":"A unique key for this operation (e.g. a UUID, 1 to 255 visible characters), kept 24 hours: repeating the request with the same key returns the first answer (`Idempotent-Replayed: true`) instead of doing it again. Errors: `API-8109` (400) a key that is not valid, `API-8108` (409, retryable) the first request with this key is still running, `API-8107` (422) the key was used for a different request; `API-8118` (409) the first request created something whose secret is shown only once, so its answer is not repeated. An answer with `shown_once` repeats its secret within 10 minutes, then `API-8118`.","required":false,"schema":{"type":"string","minLength":1,"maxLength":255}}],"responses":{"200":{"description":"The campaign.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Campaign"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `AUTH-1003`: your seat was deactivated (view only). `AUTH-1004`: all seats are inactive because the seat charge was not paid (view only). `AUTH-1002`: your role lacks the `campaigns.send` permission. `API-8102`: the API key or app lacks the `campaigns:write` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"`CAMP-6301`: no such campaign (or a draft that was removed).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"409":{"description":"`CAMP-6302`: not possible in the campaign’s status (e.g. editing a launched campaign).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["campaigns:write"]},{"oauth2":["campaigns:write"]}],"summary":"Resume a paused campaign","tags":["campaigns"]}},"/v1/campaigns/{campaignId}/cancel":{"post":{"description":"The recipients not reached yet are not sent to; the campaign, its recipients and results stay. Needs `campaigns.send`.","operationId":"cancelCampaign","parameters":[{"name":"campaignId","required":true,"in":"path","description":"The campaign id.","schema":{"type":"string","format":"uuid","description":"The campaign id."}},{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}},{"name":"Idempotency-Key","in":"header","description":"A unique key for this operation (e.g. a UUID, 1 to 255 visible characters), kept 24 hours: repeating the request with the same key returns the first answer (`Idempotent-Replayed: true`) instead of doing it again. Errors: `API-8109` (400) a key that is not valid, `API-8108` (409, retryable) the first request with this key is still running, `API-8107` (422) the key was used for a different request; `API-8118` (409) the first request created something whose secret is shown only once, so its answer is not repeated. An answer with `shown_once` repeats its secret within 10 minutes, then `API-8118`.","required":false,"schema":{"type":"string","minLength":1,"maxLength":255}}],"responses":{"200":{"description":"The campaign.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Campaign"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `AUTH-1003`: your seat was deactivated (view only). `AUTH-1004`: all seats are inactive because the seat charge was not paid (view only). `AUTH-1002`: your role lacks the `campaigns.send` permission. `API-8102`: the API key or app lacks the `campaigns:write` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"`CAMP-6301`: no such campaign (or a draft that was removed).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"409":{"description":"`CAMP-6302`: not possible in the campaign’s status (e.g. editing a launched campaign).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["campaigns:write"]},{"oauth2":["campaigns:write"]}],"summary":"Cancel a campaign","tags":["campaigns"]}},"/v1/campaigns/{campaignId}/recipients":{"get":{"description":"In sending order, each with its status (the excluded ones with their reason). Needs `campaigns.manage`.","operationId":"listCampaignRecipients","parameters":[{"name":"campaignId","required":true,"in":"path","description":"The campaign id.","schema":{"type":"string","format":"uuid","description":"The campaign id."}},{"name":"status","required":false,"in":"query","description":"Only recipients in this status.","schema":{"description":"Only recipients in this status.","type":"string","enum":["pending","excluded","sending","sent","delivered","read","failed","replied","opted_out"]}},{"name":"cursor","required":false,"in":"query","description":"The `next_cursor` of the previous page.","schema":{"description":"The `next_cursor` of the previous page.","type":"string","maxLength":200,"pattern":"^[A-Za-z0-9_-]+$"}},{"name":"page","required":false,"in":"query","description":"A numbered page to jump to, from 1, of `limit` rows: its first row must be within the first 10000 rows of the list. Ignored with `cursor`; the next pages follow `next_cursor`.","schema":{"description":"A numbered page to jump to, from 1, of `limit` rows: its first row must be within the first 10000 rows of the list. Ignored with `cursor`; the next pages follow `next_cursor`.","type":"integer","minimum":1,"maximum":10000}},{"name":"limit","required":false,"in":"query","description":"Recipients per page (1 to 500, default 50).","schema":{"default":50,"description":"Recipients per page (1 to 500, default 50).","type":"integer","minimum":1,"maximum":500}},{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"A page of recipients.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CampaignRecipientPage"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `AUTH-1002`: your role lacks the `campaigns.manage` permission. `API-8102`: the API key or app lacks the `campaigns:read` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"`CAMP-6301`: no such campaign (or a draft that was removed).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["campaigns:read"]},{"oauth2":["campaigns:read"]}],"summary":"List a campaign’s recipients","tags":["campaigns"]}},"/v1/campaigns/{campaignId}/recipients/{recipientId}":{"get":{"description":"Needs `campaigns.manage`.","operationId":"getCampaignRecipient","parameters":[{"name":"campaignId","required":true,"in":"path","description":"The campaign id.","schema":{"type":"string","format":"uuid","description":"The campaign id."}},{"name":"recipientId","required":true,"in":"path","description":"The recipient id.","schema":{"type":"string","format":"uuid","description":"The recipient id."}},{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"The recipient.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CampaignRecipient"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `AUTH-1002`: your role lacks the `campaigns.manage` permission. `API-8102`: the API key or app lacks the `campaigns:read` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"`CAMP-6301`: no such campaign (or a draft that was removed). `CAMP-6323`: no such recipient in it.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["campaigns:read"]},{"oauth2":["campaigns:read"]}],"summary":"Get a campaign recipient","tags":["campaigns"]}},"/v1/calls/notifications":{"post":{"description":"One automated call to any number (E.164) from one of the organization’s numbers (`phone_number_id`: its id or the number itself): `mode: message` speaks `text` once in `voice` and ends the call (text to speech is paid, `ai.speech`); `mode: agent` has the voice AI agent talk with the person who answers, following `instructions`, in `voice`, and hand the call to the number’s members when needed. No variables: the text is final as sent. No consent check and no sending hours. The first minute is held before anything is made or dialled; minutes are charged as any outbound call (free on an own number). The contact is found or created by the number. The same `Idempotency-Key` returns the same call and never places a second one. Its end reaches the `call.ended` webhook and `GET /v1/calls/{callId}`. Needs `campaigns.send`.","operationId":"placeNotificationCall","parameters":[{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}},{"name":"Idempotency-Key","in":"header","description":"A key of your choice for this top-up (letters, digits and `. _ : - /`, at most 200 characters). Retrying with the same key returns the same top-up and never charges twice.","required":true,"schema":{"type":"string","pattern":"^[A-Za-z0-9][A-Za-z0-9._:/-]{0,199}$"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PlaceNotificationCall"}}}},"responses":{"201":{"description":"The call, placed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotificationCall"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"402":{"description":"`WAL-1001`: the wallet cannot hold the first minute.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `AUTH-1003`: your seat was deactivated (view only). `AUTH-1004`: all seats are inactive because the seat charge was not paid (view only). `AUTH-1002`: your role lacks the `campaigns.send` permission. `API-8102`: the API key or app lacks the `voice:write` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in. `API-8148`: not available to test keys (API test mode).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"`VOI-4500`: no such number in this organization. `VOI-4578`: no active number of the organization with this E.164.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"409":{"description":"`VOI-4501`, `VOI-4503`: the number cannot call now. `CAMP-6326`: the organization stopped its AI agent. `API-8148`: not in a test space.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"description":"`API-8001`: some fields are missing or not valid. `details.fields` lists each invalid field with its own code (e.g. `API-8002` required, `API-8012` wrong format). `VOI-4507` to `VOI-4510`, `VOI-4512`: the destination is not allowed. `API-8001`: `text` for a message, `instructions` for an AI call.","headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"429":{"description":"`API-8004`: a rate limit quota is used up (see `RateLimit`). Try again after `Retry-After` seconds. `VOI-4564`: every line of the number is busy (retryable: try again once a call on it ends).","headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"},"Retry-After":{"$ref":"#/components/headers/Retry-After"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"503":{"description":"`SYS-1001`: voice, object storage or text to speech is not configured.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["voice:write"]},{"oauth2":["voice:write"]}],"summary":"Place a notification call","tags":["voice"]}},"/v1/senders":{"get":{"description":"Every WhatsApp QR number and mailbox with its trust level, state and reasons, today’s use against its allowance, reply rate and the last 7 measurement days. Needs `campaigns.manage`.","operationId":"listSenderHealth","parameters":[{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"The senders.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SenderHealthList"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `AUTH-1002`: your role lacks the `campaigns.manage` permission. `API-8102`: the API key or app lacks the `campaigns:read` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["campaigns:read"]},{"oauth2":["campaigns:read"]}],"summary":"The sender health","tags":["campaigns"]}},"/v1/senders/{channelId}":{"get":{"operationId":"getSenderHealth","parameters":[{"name":"channelId","required":true,"in":"path","description":"The id of the WhatsApp QR number or mailbox (its channel id).","schema":{"type":"string","format":"uuid","description":"The id of the WhatsApp QR number or mailbox (its channel id)."}},{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"The sender.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SenderHealth"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `AUTH-1002`: your role lacks the `campaigns.manage` permission. `API-8102`: the API key or app lacks the `campaigns:read` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"`SPC-6211`: no channel with this id in the organization.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"409":{"description":"`CAMP-6342`: the channel is not a WhatsApp QR number or a mailbox (their senders only have trust levels).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["campaigns:read"]},{"oauth2":["campaigns:read"]}],"summary":"One sender’s health","tags":["campaigns"]}},"/v1/channels":{"get":{"description":"Every connected channel of every type and every web chat widget, with its status, error, number, addresses and sender names (the Channels page).","operationId":"listConnectedChannels","parameters":[{"name":"type","required":false,"in":"query","description":"Only these channel types (repeat the parameter for several).","schema":{"description":"Only these channel types (repeat the parameter for several).","anyOf":[{"$ref":"#/components/schemas/ChannelType"},{"maxItems":20,"type":"array","items":{"$ref":"#/components/schemas/ChannelType"}}]}},{"name":"status","required":false,"in":"query","description":"Only these statuses; without it, every channel that is not disconnected.","schema":{"description":"Only these statuses; without it, every channel that is not disconnected.","anyOf":[{"$ref":"#/components/schemas/ConnectedChannelStatus"},{"maxItems":5,"type":"array","items":{"$ref":"#/components/schemas/ConnectedChannelStatus"}}]}},{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"The channels.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConnectedChannelList"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `AUTH-1003`: your seat was deactivated (view only). `AUTH-1004`: all seats are inactive because the seat charge was not paid (view only). `AUTH-1002`: your role lacks the `channels.manage` permission. `API-8102`: the API key or app lacks the `channels:read` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["channels:read"]},{"oauth2":["channels:read"]}],"summary":"List the connected channels","tags":["channels"]}},"/v1/channels/types":{"get":{"description":"The channel types the organization has connected (a channel or web chat widget that is not disconnected), for filtering tickets by channel. Every member may read it; it names no channel, number or address.","operationId":"listConnectedChannelTypes","parameters":[{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"The types.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConnectedChannelTypeList"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `API-8102`: the API key or app lacks the `channels:read` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["channels:read"]},{"oauth2":["channels:read"]}],"summary":"List the connected channel types","tags":["channels"]}},"/v1/channels/{channelId}":{"get":{"operationId":"getConnectedChannel","parameters":[{"name":"channelId","required":true,"in":"path","description":"The channel id, or the web chat widget id.","schema":{"type":"string","format":"uuid","description":"The channel id, or the web chat widget id."}},{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"The channel.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConnectedChannel"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `AUTH-1003`: your seat was deactivated (view only). `AUTH-1004`: all seats are inactive because the seat charge was not paid (view only). `AUTH-1002`: your role lacks the `channels.manage` permission. `API-8102`: the API key or app lacks the `channels:read` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"`SPC-6211`: no channel or widget with this id in the organization.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["channels:read"]},{"oauth2":["channels:read"]}],"summary":"A connected channel","tags":["channels"]}},"/v1/channels/{channelId}/disconnect":{"post":{"description":"Disconnects a channel of any type (or removes a web chat widget) exactly as its own page does: its credentials revoked, its subscriptions at the provider removed, audited. Final: connecting again makes a new channel.","operationId":"disconnectConnectedChannel","parameters":[{"name":"channelId","required":true,"in":"path","description":"The channel id, or the web chat widget id.","schema":{"type":"string","format":"uuid","description":"The channel id, or the web chat widget id."}},{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}},{"name":"Idempotency-Key","in":"header","description":"A unique key for this operation (e.g. a UUID, 1 to 255 visible characters), kept 24 hours: repeating the request with the same key returns the first answer (`Idempotent-Replayed: true`) instead of doing it again. Errors: `API-8109` (400) a key that is not valid, `API-8108` (409, retryable) the first request with this key is still running, `API-8107` (422) the key was used for a different request; `API-8118` (409) the first request created something whose secret is shown only once, so its answer is not repeated. An answer with `shown_once` repeats its secret within 10 minutes, then `API-8118`.","required":false,"schema":{"type":"string","minLength":1,"maxLength":255}}],"responses":{"200":{"description":"The channel.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConnectedChannel"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `AUTH-1003`: your seat was deactivated (view only). `AUTH-1004`: all seats are inactive because the seat charge was not paid (view only). `AUTH-1002`: your role lacks the `channels.manage` permission. `API-8102`: the API key or app lacks the `channels:write` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in. `API-8148`: not available to test keys (API test mode).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"`SPC-6211`: no channel or widget with this id in the organization.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["channels:write"]},{"oauth2":["channels:write"]}],"summary":"Disconnect a channel","tags":["channels"]}},"/v1/channels/connect/{adapter}":{"post":{"description":"Any channel type through one flow: the provider's sign-in page (`redirect`), the provider's embedded flow (`embedded`, WhatsApp), or a form connected at once (`connected`: SMTP forwarding, App Store, Google Play). Exactly what the type's own route does.","operationId":"startChannelConnection","parameters":[{"name":"adapter","required":true,"in":"path","schema":{"$ref":"#/components/schemas/ChannelAdapterKey"}},{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}},{"name":"Idempotency-Key","in":"header","description":"A unique key for this operation (e.g. a UUID, 1 to 255 visible characters), kept 24 hours: repeating the request with the same key returns the first answer (`Idempotent-Replayed: true`) instead of doing it again. Errors: `API-8109` (400) a key that is not valid, `API-8108` (409, retryable) the first request with this key is still running, `API-8107` (422) the key was used for a different request; `API-8118` (409) the first request created something whose secret is shown only once, so its answer is not repeated. An answer with `shown_once` repeats its secret within 10 minutes, then `API-8118`.","required":false,"schema":{"type":"string","minLength":1,"maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StartChannelConnection"}}}},"responses":{"200":{"description":"The next step.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChannelConnectionStart"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `AUTH-1003`: your seat was deactivated (view only). `AUTH-1004`: all seats are inactive because the seat charge was not paid (view only). `AUTH-1002`: your role lacks the `channels.manage` permission. `API-8102`: the API key or app lacks the `channels:write` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in. `API-8148`: not available to test keys (API test mode).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"description":"`API-8001`: some fields are missing or not valid. `details.fields` lists each invalid field with its own code (e.g. `API-8002` required, `API-8012` wrong format). `SPC-6214`: the adapter is not connected this way (Rabt’s own channels), or a form connection has no completion. The channel's own codes, as its own routes answer them: the provider's refusal, an account connected elsewhere, a state unknown or used, permissions missing.","headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"429":{"$ref":"#/components/responses/RateLimited"},"503":{"description":"`SYS-1001`: the provider is not set up on this Rabt.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["channels:write"]},{"oauth2":["channels:write"]}],"summary":"Start connecting a channel","tags":["channels"]}},"/v1/channels/connect/{adapter}/complete":{"post":{"description":"With everything the provider sent back: the channels connected (or reconnected when already connected here), and the accounts that could not be.","operationId":"completeChannelConnection","parameters":[{"name":"adapter","required":true,"in":"path","schema":{"$ref":"#/components/schemas/ChannelAdapterKey"}},{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}},{"name":"Idempotency-Key","in":"header","description":"A unique key for this operation (e.g. a UUID, 1 to 255 visible characters), kept 24 hours: repeating the request with the same key returns the first answer (`Idempotent-Replayed: true`) instead of doing it again. Errors: `API-8109` (400) a key that is not valid, `API-8108` (409, retryable) the first request with this key is still running, `API-8107` (422) the key was used for a different request; `API-8118` (409) the first request created something whose secret is shown only once, so its answer is not repeated. An answer with `shown_once` repeats its secret within 10 minutes, then `API-8118`.","required":false,"schema":{"type":"string","minLength":1,"maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CompleteChannelConnection"}}}},"responses":{"201":{"description":"What was connected.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChannelConnectionResult"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"The channel's own code when the state is unknown, expired, used, or another member's (e.g. `TT-3016`, `X-3025`, `FB-2004`).\n\n`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1097`: the sign-in was started in the desktop app by another member or on another device.\n\n`AUTH-1040`: you are not a member of the organization named. `AUTH-1003`: your seat was deactivated (view only). `AUTH-1004`: all seats are inactive because the seat charge was not paid (view only). `AUTH-1002`: your role lacks the `channels.manage` permission. `API-8102`: the API key or app lacks the `channels:write` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in. `API-8148`: not available to test keys (API test mode).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"409":{"description":"The channel's own code when the account is connected to another organization (e.g. `TT-3020`).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"description":"`API-8001`: some fields are missing or not valid. `details.fields` lists each invalid field with its own code (e.g. `API-8002` required, `API-8012` wrong format). `SPC-6214`: the adapter is not connected this way (Rabt’s own channels), or a form connection has no completion. The channel's own codes, as its own routes answer them: the provider's refusal, an account connected elsewhere, a state unknown or used, permissions missing.","headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["channels:write"]},{"oauth2":["channels:write"]}],"summary":"Complete connecting a channel","tags":["channels"]}},"/v1/channels/{channelId}/reconnect":{"post":{"description":"Reconnects a channel of any type, keeping its tickets and history: one waiting for it (`needs_reauth`) through its type's own flow (a sign-in with the same account, finish with `completeChannelConnection`; the embedded flow; or the form's new key or password, reconnected at once), and a `disconnected` one by connecting its account again, which reopens the same channel (a different account is a channel of its own).","operationId":"reconnectChannel","parameters":[{"name":"channelId","required":true,"in":"path","description":"The channel id, or the web chat widget id.","schema":{"type":"string","format":"uuid","description":"The channel id, or the web chat widget id."}},{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}},{"name":"Idempotency-Key","in":"header","description":"A unique key for this operation (e.g. a UUID, 1 to 255 visible characters), kept 24 hours: repeating the request with the same key returns the first answer (`Idempotent-Replayed: true`) instead of doing it again. Errors: `API-8109` (400) a key that is not valid, `API-8108` (409, retryable) the first request with this key is still running, `API-8107` (422) the key was used for a different request; `API-8118` (409) the first request created something whose secret is shown only once, so its answer is not repeated. An answer with `shown_once` repeats its secret within 10 minutes, then `API-8118`.","required":false,"schema":{"type":"string","minLength":1,"maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StartChannelConnection"}}}},"responses":{"200":{"description":"The next step.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChannelConnectionStart"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `AUTH-1003`: your seat was deactivated (view only). `AUTH-1004`: all seats are inactive because the seat charge was not paid (view only). `AUTH-1002`: your role lacks the `channels.manage` permission. `API-8102`: the API key or app lacks the `channels:write` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in. `API-8148`: not available to test keys (API test mode).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"`SPC-6211`: no channel with this id in the organization.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"description":"`API-8001`: some fields are missing or not valid. `details.fields` lists each invalid field with its own code (e.g. `API-8002` required, `API-8012` wrong format). `SPC-6214`: the adapter is not connected this way (Rabt’s own channels), or a form connection has no completion. The channel's own codes, as its own routes answer them: the provider's refusal, an account connected elsewhere, a state unknown or used, permissions missing.","headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["channels:write"]},{"oauth2":["channels:write"]}],"summary":"Reconnect a channel","tags":["channels"]}},"/v1/channels/{channelId}/imports":{"get":{"description":"The first imports of the channel’s history, newest first: state, items stored of how many (known, estimated or unknown), the limit the provider states and why one paused or stopped. `import.progressed` webhooks follow them.","operationId":"listChannelImports","parameters":[{"name":"channelId","required":true,"in":"path","description":"The channel id, or the web chat widget id.","schema":{"type":"string","format":"uuid","description":"The channel id, or the web chat widget id."}},{"name":"Rabt-Organization","in":"header","description":"The organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (`API-8155`); it must be one of the credential's (`API-8105`).","required":false,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"The imports.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConnectionImportList"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"`AUTH-1041`: no organization was named (send its id in the `Rabt-Organization` header). `API-8155`: the personal key or app acts in several organizations and the request named none.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"`AUTH-1001`: not signed in, or the session has ended. `API-8101`: the API key or access token is not valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"`AUTH-1040`: you are not a member of the organization named. `AUTH-1002`: your role lacks the `channels.manage` permission. `API-8102`: the API key or app lacks the `channels:read` scope. `API-8105`: the `Rabt-Organization` header names an organization the API key or app does not act in.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"`SPC-6211`: no channel with this id in the organization.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"security":[{"session":[],"organization":[]},{"apiKey":["channels:read"]},{"oauth2":["channels:read"]}],"summary":"A channel's history imports","tags":["channels"]}},"/v1/errors/{code}":{"get":{"description":"What an error code means: its texts in Arabic and English (title, cause, what to do), HTTP status, whether it is retryable, and the provider codes that map to it. Every error Rabt returns has a code (`code` in problem+json) documented here.","operationId":"getErrorCode","parameters":[{"name":"code","required":true,"in":"path","description":"The error code, e.g. `WA-2047`.","schema":{"type":"string","pattern":"^([A-Z]{1,5})-(\\d{4})$","description":"An error code: module letters, a hyphen and 4 digits.","example":"WA-2047"}}],"responses":{"200":{"description":"The error code.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorCode"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"404":{"description":"`API-8021`: the catalog has no such code.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Problem"}},"summary":"Get an error code","tags":["errors"]}}},"info":{"title":"Rabt API","description":"The public REST API of Rabt (rabt.systems): the Rabt apps use the same API.\n\n- **Versions** are in the path (`/v1`); breaking changes only come in a new version.\n- **JSON** in UTF-8; times in ISO 8601, UTC.\n- **Errors** are RFC 9457 problem details (`application/problem+json`) with a stable `code`, documented at `docs_url` and by `GET /v1/errors/{code}`, and a `reference` unique to the occurrence: quote it to Rabt support. Texts follow `Accept-Language` (`ar`, the default, or `en`).\n- **Rate limits** apply per client address to every request, then per API key and per organization, per signed-in account outside an organization, or per client address without any of them, and are returned in the `RateLimit` and `RateLimit-Policy` headers. Sending and checking sign-in codes have limits of their own (per email or phone, per network).\n- **Signing in** is by a one-time code sent by email or SMS; the session is an `HttpOnly`, `Secure`, `SameSite=Strict` cookie. Requests that change something with the cookie, and sign-in requests, must come from a Rabt web page (their `Origin`), or they are refused (`AUTH-1014`).\n- **Organizations**: a request made in an organization names it with the `Rabt-Organization` header (its id). Permissions are checked on every request against your membership there: your role (`AUTH-1002`), and your seat (an inactive seat can only view: `AUTH-1003`, `AUTH-1004`).\n- **Integrations** call the same routes with `Authorization: Bearer <credential>`: an API key of the organization (`rbk_…`) or an OAuth access token (`rbat_…`, authorization code with PKCE; metadata at `/.well-known/oauth-authorization-server`). An organization key acts for its own organization with its scopes alone, whatever becomes of the member who created it (never on owner-only routes). A personal key or app acts as its member with exactly their current permissions (no scope choice), in every organization they are a member of, now and later (each request names one in `Rabt-Organization`, optional when they have only one: `API-8155` without it, `API-8105` for another); routes without a scope are refused to credentials (`API-8103`), a missing scope is `API-8102`. Changes appear in the audit log under the key or app.\n- **Test mode:** a test API key (`rbk_test_…`, `mode: \"test\"` when it is created) runs every endpoint on the organization's separate test space (`GET /v1/test-mode`): messages on every channel are simulated (sent, then delivered, with deterministic provider ids and no provider call), nothing reaches customers, the wallet is never charged (a paid action that is not simulated is `WAL-1306`), outbound webhooks are delivered with `mode: \"test\"`, SMS campaigns are simulated while WhatsApp, email and voice campaigns cannot be launched, and members, channels, integrations and voice cannot be changed (`API-8148`). Every answer to a credential carries `Rabt-Mode: live` or `test`; every answer names the release that wrote it in `Rabt-Release`. `POST /v1/test-mode/clear` clears the test data; live data is never touched.\n- **Idempotency**: operations that create or send accept an `Idempotency-Key` header; repeating the request with the same key returns the first answer (`Idempotent-Replayed: true`).\n- **MCP**: the same capabilities are tools and resources of the MCP server at `/mcp` (Streamable HTTP), with personal credentials only (an OAuth access token, or a member's personal key from `createAccountApiKey`; an organization key is refused with `API-8154`); **webhooks** send the public events to your endpoints, signed per Standard Webhooks.","version":"1.0.0","contact":{}},"tags":[{"name":"organizations","description":"Your organizations, creating one, switching the active one, its settings and ownership."},{"name":"members","description":"The members of the organization: roles, seats, removal."},{"name":"photos","description":"Profile photos and organization logos: upload, replace, remove, and the images themselves."},{"name":"roles","description":"Roles and their permissions."},{"name":"invitations","description":"Inviting people, and answering an invitation."},{"name":"audit","description":"The audit log of the organization."},{"name":"errors","description":"Rabt's error codes explained, and the organization's error log."},{"name":"billing","description":"Seats and their billing: the subscription, the seat log, the price of a seat; the monthly invoices, their credit and debit notes and the billing profile."},{"name":"wallet","description":"The prepaid wallet's balance and transactions, the public price list, price quotes, card top-ups, auto top-up and receipt vouchers."},{"name":"contacts","description":"Contacts: their details, companies, notes, merges and history."},{"name":"companies","description":"Companies: their email domains, notes and merges."},{"name":"crm-settings","description":"The settings of the CRM."},{"name":"segments","description":"Segments: saved filters of contacts or companies, and what they list now."},{"name":"imports-exports","description":"CSV imports of contacts (checked row by row before they start), CSV exports of contacts and companies with their progress and error files, and export files of any whole list (CSV or NDJSON, a link or parts)."},{"name":"tickets","description":"Tickets: the ticket log, the timeline, replies and notes, files, assignment, moving to a space, merging and the ticket settings."},{"name":"ticket-exports","description":"Ticket export: whole tickets, oldest change first, in the import’s own shape, to leave Rabt or keep another system in step."},{"name":"ticket-imports","description":"Ticket migration from other help desks, CSV files and call logs: the structure tickets are imported into, import batches (sample and full), members, contacts and source ids mapped first, then tickets with their whole history. Free; nothing is sent to customers."},{"name":"bulk-create","description":"Bulk create: up to 200 contacts, companies, tickets or settings rows per call, as objects or as a table of columns and rows, each item answered on its own; a dry run writes nothing. Nothing is sent to customers."},{"name":"replies","description":"Canned replies (the organization’s, the spaces’ and your own)."},{"name":"spaces","description":"Department spaces: their members and channels, email addresses and voice numbers."},{"name":"routing","description":"Routing: every connected address, account, phone number, channel and chat widget with its one destination (the All space, a space or a member) and its tickets of the last 24 hours."},{"name":"availability","description":"Members' availability and its log, who is available now, and the limits of open tickets for the automatic distribution."},{"name":"ai","description":"The AI agent: its knowledge (Markdown blocks at every level: organization, channel, private/public, address), the AI switches of every level, what it receives for a ticket, the switch that stops it everywhere, the log of its replies, and the questions it could not answer (grouped, with Add to knowledge)."},{"name":"chat","description":"Internal chat: your rooms (space groups, All, private groups, direct messages), messages with mentions, ticket cards, quotes, reactions, edits and pins, read positions, search, files, Ask the team, and the rooms’ incoming webhooks with the public post through their secret URL."},{"name":"search","description":"Universal search: one query over the tickets, messages, internal notes, contacts, companies, their notes and your chat messages you may see."},{"name":"abuse-protection","description":"Inbound abuse protection: the block list (phone numbers, email addresses, handles and web chat networks), blocking or unblocking a contact, and the quarantined senders to release or block."},{"name":"channels","description":"Connected channels: email addresses connected by forwarding, with replies through your own SMTP server (the forwarding check and the sender domain checks); Google Workspace / Gmail mailboxes connected by signing in with Google (their send-as addresses and sync); Zoho Mail mailboxes connected by signing in with Zoho (their addresses and the Inbox read every minute); TikTok business accounts (direct messages and comments), their reply rules and comment actions; App Store channels connected with an App Store Connect API key, with their apps; Google Play channels connected with a service account key, with their apps and how current their reviews are; Google Maps reviews connected by signing in with Google (the business locations each channel carries); a connected Zid store’s product questions, product reviews and customer-portal tickets (made with its Zid integration: the Zid integration’s page, never connected on their own); Facebook Pages connected through Facebook Login for Business (their webhook subscription); Instagram professional accounts connected through Facebook Login or Instagram Login; web forms that create tickets from any website; what each channel supports; the status of Meta data deletion requests."},{"name":"reviews","description":"Store reviews (App Store, Google Play, Google Maps, and a Zid store’s product questions and reviews): each review is a ticket; read a review with its rating, app or location and version, and its public reply with the reply's state on the store; delete a reply (not on Google Play: its replies are deleted in Play Console)."},{"name":"integrations","description":"Integrations: stores connected by signing in to their platform (Salla, Zid, Shopify), their status and syncs, a contact's customer records and orders in them, and the order lookup."},{"name":"embed","description":"Rabt inside your own system: its switch, the host pages that may frame it, the embed secret your server signs launch tokens with, and the frame's own session routes."},{"name":"campaigns","description":"Campaigns: WhatsApp, email, SMS and voice campaigns to contacts or segments, their sources, review, launch, pause, resume and cancel, their recipients and results, notification calls and the public opt-out page."},{"name":"sms","description":"SMS: sender names and their documents, opt-outs, the SMS settings, messages and previews."},{"name":"voice","description":"Voice: phone numbers (bought or your own), the voice settings and AI agent, calls with their transfer, transcript, recording and voicemail, softphone credentials and devices, SIP details and voice provider connections."},{"name":"notifications","description":"Your notifications and their preferences, and the browsers that receive push notifications (with a session)."},{"name":"webchat","description":"Website chat widgets: the name, appearance and pre-chat form, the embed snippet, and identity verification of signed-in users."},{"name":"webhooks","description":"Webhook endpoints, the public event types, and the delivery log."},{"name":"api-keys","description":"The organization's API keys, live and test, and the members' personal keys acting in it (managed with a session)."},{"name":"test-mode","description":"API test mode: the organization's separate test space for test keys, and clearing its data."},{"name":"oauth-apps","description":"OAuth apps registered by the organization (managed with a session)."},{"name":"trusted-issuer","description":"The identity provider whose identity assertions connect members' MCP clients without a consent screen (enterprise-managed connections)."},{"name":"installed-apps","description":"Apps and AI assistants members connected to act in the organization (managed with a session)."},{"name":"security","description":"The organization's security, for its owner (`security:read`): the sensitive-access log, the rule-based security alerts and the audit log's integrity."}],"servers":[{"url":"https://api.rabt.systems"}],"components":{"securitySchemes":{"session":{"type":"apiKey","in":"cookie","name":"__Secure-rabt.session_token","description":"The sign-in session cookie set by `POST /v1/auth/sign-in` (the one sign-in field: an email address or a phone number), `/v1/auth/sign-in/email` or `/v1/auth/sign-in/phone` (`rabt.session_token` in local development over HTTP)."},"organization":{"type":"apiKey","in":"header","name":"Rabt-Organization","description":"The id of the organization the request acts in (the active organization), with the session of one of its members."},"apiKey":{"scheme":"bearer","bearerFormat":"JWT","type":"http","description":"An API key of the organization (`rbk_…`, or `rbk_test_…` for a test key working on the test space), created by a member with `api.manage`; it acts as that member, limited to its scopes. Each operation names the scope it needs."},"oauth2":{"type":"oauth2","flows":{"authorizationCode":{"authorizationUrl":"https://api.rabt.systems/v1/oauth/authorize","tokenUrl":"https://api.rabt.systems/v1/oauth/token","refreshUrl":"https://api.rabt.systems/v1/oauth/token","scopes":{"organization:read":"Read the organization's settings (name, language, time zone, country), the CRM settings and the email signatures.","organization:write":"Change the organization's settings, the CRM settings, the tickets' classification lists and tags, and the email signatures.","members:read":"Read the members, the roles and their permissions, and the invitations.","members:write":"Invite people, change members' roles and seats, and remove members (only within the permissions of the member who granted access).","contacts:read":"Read and search the contacts, their notes, their merge history and a contact's communication history.","contacts:write":"Create, edit and delete contacts, their phone numbers, email addresses, company links and notes, and merge or unmerge contacts.","segments:read":"Read the segments (saved filters of contacts and companies) and how many records each lists.","segments:write":"Create, change and delete segments.","imports_exports:read":"Read the CSV imports and exports of contacts and companies, their progress and errors, and download exported files.","imports_exports:write":"Import contacts from CSV files and export contacts and companies to CSV files.","security:read":"Read the organization's sensitive-access log (recordings played, exports, bulk reads of contacts), its security alerts and the integrity of its audit log (the owner only).","companies:read":"Read and search the companies, their notes and their merge history.","companies:write":"Create, edit and delete companies, their email domains and notes, and merge or unmerge companies.","tickets:read":"Read the tickets the member may see, their timelines (messages, internal notes, files), the store reviews they hold with their public replies, and the classification lists and tags with the ticket counts by each.","tickets:write":"Start, edit (with their note, classifications and tags), pick up, close, assign and merge tickets, reply to customers (on WhatsApp also with templates, locations, contact cards, reactions and the typing indicator; and to store reviews), delete a public reply to a store review, add internal notes and files, and retry failed messages.","replies:read":"Read the canned replies (the organization's, the spaces' and the connected member's own).","replies:write":"Create, change and delete canned replies (only within the permissions of the member who granted access).","audit:read":"Read the audit log.","erasure:read":"Read the requests to erase contacts' personal data: their state, dates, failures and counts of what they erased.","erasure:write":"Ask to erase a contact's personal data (it goes to the trash for the organization's restore window, then its personal data is erased for good) and retry an erasure that stopped.","error_log:read":"Read the organization's error log (every recorded error with its code and reference).","error_log:write":"Escalate an error a member saw to the Rabt team (by its reference).","billing:read":"Read the seats and their billing (the subscription, the seat pricing model, the seat log), price one more seat, and read the monthly invoices (with their PDF and CSV), their credit and debit notes and the billing profile.","billing:write":"Save the billing profile copied onto invoices, and choose the seat pricing model before the first seat payment.","wallet:read":"Read the prepaid wallet's balance and its transactions, the top-ups, the saved card, the auto top-up settings and the receipt vouchers.","wallet:write":"Top up the wallet with a saved card (3-D Secure in the app when the bank asks), choose the default card, delete a card and change the auto top-up settings.","pricing:read":"Get price quotes for usage (messages, calls, AI) at the current prices.","notifications:read":"Read your notifications and your notification preferences.","notifications:write":"Mark your notifications as read and change your notification preferences.","chat:read":"Read the connected member's internal chat rooms, their members, messages, pinned messages, files and read positions, and search their messages.","chat:write":"Post, edit, delete, react to and pin messages in the connected member's rooms, send files, create and manage private groups, start direct messages, and set their read positions and notifications.","search:read":"Search everything the connected member may see in one query: tickets, messages and internal notes, contacts, companies and their notes, and their chat rooms. Each kind of result also needs its own module's read scope.","spaces:read":"Read the spaces, their members and channels, who is available, the availability log, the routing limits and the routing of every connected item (its destination and its tickets of the last 24 hours).","spaces:write":"Create, change and archive spaces, manage their members and channels, set the routing limits, set the destination of every connected address, account, phone number, channel and widget, and set the connected member's own availability.","ai:read":"Read the AI agent's Markdown blocks of every level (organization, channel, private/public and address), the AI switches of every level and which apply to a channel, and what the AI agent receives for a ticket on a channel.","ai:write":"Add, edit, reorder, switch off and archive the AI agent's blocks, and set the AI switches of every level.","channels:read":"Read the channels: the web chat widgets with their settings, embed snippet and status, the email channels with their status and settings (never their credentials), inbound address and sender domain checks, the Microsoft 365 mailboxes with their addresses and receiving state, and the WhatsApp numbers with their status, quality, messaging limit, health, templates and the account events Meta reported, the App Store channels with their status, key IDs (never the private key) and apps, the Google Maps review channels with their status, locations and the business locations their Google account can connect, and the Google Play channels with their status, service account, key id (never the key), apps and how current their reviews are.","channels:write":"Create, change, switch off and remove web chat widgets and rotate a widget's identity-verification secret; connect, change, reconnect and disconnect email channels, send forwarding check messages and run the sender domain checks; connect Microsoft 365 mailboxes, manage their addresses, check sending from them, sync and disconnect them; connect WhatsApp numbers with Embedded Signup, rename, register, check health, ask for the WhatsApp Business app history, create, edit and sync templates, and disconnect; connect, rename, reconnect and disconnect App Store channels and refresh their apps; connect, rename, reconnect and disconnect Google Maps review channels, choose their locations and read their reviews again; connect, rename, change the package names of, reconnect or check again, read now and disconnect Google Play channels and refresh their apps.","sms:read":"Read SMS: the sender names with their registration status, documents and complaints, the opt-out list, the SMS settings, and every SMS sent with its delivery status.","sms:write":"Request sender names and upload their registration documents, choose the default sender name, add and lift opt-outs, change the SMS settings, send SMS (service messages and one-time codes, paid from the wallet) and report one-time codes as used.","campaigns:read":"Read the campaigns on WhatsApp, SMS and voice with their results, their review before launch (recipients, estimated cost, compliance checks), their recipients with each one’s status, listen to a voice campaign’s audio, and read the sender health of each WhatsApp QR number and mailbox (trust level, allowance and use today, reply rate, the measurement days).","campaigns:write":"Create, change and remove draft campaigns, add a voice campaign’s recording, create its speech (paid from the wallet), and launch (past the sender’s allowance only with the risk accepted), pause, resume and cancel campaigns (they spend from the wallet).","voice:read":"Read the phone numbers with their settings and destinations, the numbers available to pick, the voice settings, the calls with their recordings and voicemail, and your registered devices.","voice:write":"Pick, change and release phone numbers, change the voice settings, place notification calls (never a call a member talks on), and transfer and end calls.","integrations:read":"Read the connected stores and systems with their status and sync runs (never their credentials), a contact's customer records and orders in them, and look up orders by number, phone or email.","integrations:write":"Connect stores and systems by signing in to their platform, reconnect and disconnect them, and ask for a sync of their customers and orders.","abuse:read":"Read the block list (phone numbers, email addresses, handles and web chat networks), contacts' blocks, the quarantined senders and the Spam list.","abuse:write":"Add to and remove from the block list, block or unblock a contact, release or block quarantined senders, and add to and remove from the Spam list.","webhooks:read":"Read the webhook endpoints, the event types and the delivery log.","webhooks:write":"Create, change and delete webhook endpoints, rotate their secrets, redeliver events and send test events.","credentials:read":"Read the organization's API keys and OAuth apps, and the personal keys and connected apps acting in it.","credentials:write":"Create, change, rotate and revoke the organization's API keys and OAuth apps, and revoke personal keys and connected apps acting in it; every new secret opens only in the app.","test_mode:read":"Read the organization's API test mode: its current test space and when its test data was last cleared.","test_mode:write":"Clear the organization's API test data (live data is never touched)."}}},"description":"OAuth 2.1 authorization code with PKCE (S256). Access tokens (`rbat_…`) last an hour and are issued for one resource (this API, or the MCP server at `/mcp`); refresh tokens rotate on every use."}},"schemas":{"AddChatGroupMembers":{"type":"object","properties":{"member_ids":{"minItems":1,"maxItems":500,"type":"array","items":{"type":"string","format":"uuid"}}},"required":["member_ids"],"additionalProperties":false},"AddedCustomerRoute":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"kind":{"type":"string","enum":["email","phone","domain","contact","company"]},"value":{"description":"The email address, number (E.164) or domain; null for a contact or company.","type":["string","null"]},"contact":{"anyOf":[{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false},{"type":"null"}]},"company":{"anyOf":[{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false},{"type":"null"}]},"created_at":{"type":"string","format":"date-time"},"moved_tickets":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"How many of the customer's open and in-progress tickets move there now (closed ones never do); `0` when none."}},"required":["id","kind","value","contact","company","created_at","moved_tickets"],"additionalProperties":false,"description":"A customer routed to a space: their new tickets go there before their channel's destination, and their open and in-progress tickets move there now (`ticket.moved`)."},"AddedSpamEntry":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"kind":{"type":"string","enum":["email","domain","phone","handle"],"description":"`email`, `domain` (matches email senders only), `phone` (E.164) or `handle` (on `channel_type`)."},"channel_type":{"anyOf":[{"type":"string","enum":["whatsapp","facebook","instagram","x","tiktok","email","voice","sms","webchat","webform","app_store","google_business","google_play","whatsapp_web","youtube","salla_reviews","zid_questions","zid_reviews","zid_portal"]},{"type":"null"}]},"value":{"type":"string","description":"As it is matched (lower case, E.164)."},"created_by_membership_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"created_at":{"type":"string","format":"date-time"},"removed_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"removed_by_membership_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"moved_tickets":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"The open and in-progress tickets of matching senders that move to Spam, in one background step."}},"required":["id","kind","channel_type","value","created_by_membership_id","created_at","removed_at","removed_by_membership_id","moved_tickets"],"additionalProperties":false},"AddMicrosoftAddress":{"type":"object","properties":{"address":{"type":"string","maxLength":254},"display_name":{"anyOf":[{"type":"string","minLength":1,"maxLength":200},{"type":"null"}]}},"required":["address"],"additionalProperties":false},"AddOwnPhoneNumber":{"type":"object","properties":{"e164":{"type":"string","minLength":1,"maxLength":40,"description":"Your number in E.164 (`+9661…`), or as written in your organization’s country (`011…`): stored in E.164."},"name":{"default":null,"anyOf":[{"type":"string","minLength":1,"maxLength":100},{"type":"null"}]},"lines":{"default":1,"description":"The calls the number carries at once under your provider package (1 by default): a call beyond them is refused.","type":"integer","minimum":1,"maximum":10000},"provider_connection_id":{"description":"An existing provider connection of yours (or give `connection`).","type":"string","format":"uuid"},"connection":{"description":"The provider’s data instead of `provider_connection_id`: a connection is created, or one with the same provider data is reused.","type":"object","properties":{"name":{"default":null,"anyOf":[{"type":"string","minLength":1,"maxLength":100},{"type":"null"}],"description":"What you call the connection; null shows its addresses."},"authentication":{"default":"registration","type":"string","enum":["address","registration"],"description":"How your provider and Rabt recognise each other: `registration` (default: Rabt registers each number’s account to the provider’s registrar, so Rabt needs no fixed address with the provider) or `address` (the provider’s addresses, or your organization’s SIP credentials): a new connection by address, or switching one to it, is made by the Rabt team on request (`VOI-4576`)."},"registrar":{"default":null,"anyOf":[{"type":"string","maxLength":253,"pattern":"^(([a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?\\.)+[a-z]{2,63}|([0-9]{1,3}\\.){3}[0-9]{1,3})$"},{"type":"null"}],"description":"The provider’s registrar (host name or IPv4 address) for `registration`, reached on the connection’s port and transport; null for `address`. The accounts are registered in `from_domain`, else Rabt’s Saudi SIP domain, and its calls may name an account by its username."},"addresses":{"description":"The provider’s public IPv4 addresses or ranges (/24 or narrower), signaling and media in one list. Outbound calls go to its single addresses, in any order: the one that answers takes the call, the others on failure. Empty when the provider authenticates with your organization’s SIP credentials instead.","maxItems":16,"type":"array","items":{"anyOf":[{"type":"string","format":"ipv4"},{"type":"string","format":"cidrv4","pattern":"^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\\/([0-9]|[1-2][0-9]|3[0-2])$"}]}},"transport":{"default":"udp","type":"string","enum":["udp","tcp","tls"],"description":"The signaling transport to the provider: `udp` (default), `tcp` or `tls`."},"port":{"type":"integer","minimum":1,"maximum":65535,"description":"The provider’s SIP port (default 5060, 5061 for `tls`)."},"codecs":{"default":["PCMA","PCMU"],"minItems":1,"maxItems":3,"type":"array","items":{"type":"string","enum":["PCMA","PCMU","G722"]},"description":"The codecs offered to the provider, in order (default `PCMA`, `PCMU`)."},"international_prefix":{"default":"00","type":"string","pattern":"^[0-9]{2,4}$","description":"The international prefix read on numbers the provider sends nationally (default `00`). Rabt sends every number in E.164."},"country":{"default":"SA","type":"string","pattern":"^[A-Z]{2}$","description":"The country of national numbers (default `SA`)."},"from_domain":{"default":null,"anyOf":[{"type":"string","minLength":4,"maxLength":253,"pattern":"^([a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?\\.)+[a-z]{2,63}$"},{"type":"null"}],"description":"Only if your provider requires its own domain in the From header; null uses Rabt’s Saudi SIP domain."},"max_channels":{"default":30,"type":"integer","minimum":1,"maximum":10000,"description":"The concurrent calls your provider allows on this connection (default 30)."},"outbound_username":{"default":null,"anyOf":[{"type":"string","pattern":"^[\\x21-\\x7e]{1,128}$"},{"type":"null"}],"description":"The username Rabt gives when your provider asks it to authenticate on outgoing calls; null when it does not."},"outbound_password":{"type":"string","pattern":"^[\\x21-\\x7e]{1,128}$","description":"The password for `outbound_username` (stored encrypted, never shown again)."}},"additionalProperties":false},"registration":{"description":"The account Rabt registers for this number, required on a connection that authenticates by registration (several numbers may share one username).","$ref":"#/components/schemas/VoiceRegistrationCredentials"}},"required":["e164"],"additionalProperties":false},"AddSpaceCustomer":{"type":"object","properties":{"value":{"type":"string","minLength":1,"maxLength":320,"description":"An email address (`ali@company.com`), a mobile number (Saudi unless it starts with `+` or `00`; WhatsApp and calls from it too) or an email domain (`@company.com`). Never a name. Public email domains are refused (`SPC-6216`); anything else unreadable is `SPC-6217`."}},"required":["value"],"additionalProperties":false},"AddTicketClassificationOption":{"type":"object","properties":{"name":{"type":"string","maxLength":200,"description":"Up to 50 characters, trimmed with spaces collapsed (`TKT-6239`); unique ignoring case and Arabic spelling."}},"required":["name"],"additionalProperties":false},"AiAgentSwitch":{"type":"object","properties":{"stopped":{"type":"boolean","description":"The AI agent is stopped everywhere in the organization: it replies nowhere, whatever the level switches say."},"changed_by_membership_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"changed_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]}},"required":["stopped","changed_by_membership_id","changed_at"],"additionalProperties":false,"description":"The organization's AI agent kill switch."},"AiBlock":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"level":{"$ref":"#/components/schemas/AiLevel"},"channel_type":{"anyOf":[{"$ref":"#/components/schemas/AiChannelType"},{"type":"null"}]},"channel_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"kind":{"anyOf":[{"$ref":"#/components/schemas/AiKind"},{"type":"null"}]},"channel_address_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"phone_number_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"title":{"type":"string"},"content_markdown":{"type":"string"},"always_include":{"type":"boolean"},"internal":{"type":"boolean","description":"Guidance for the AI agent only, never revealed to a customer (OP16)."},"active":{"type":"boolean"},"sort_order":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"updated_by_membership_id":{"type":"string","format":"uuid"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"archived_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"embedding_error":{"anyOf":[{"type":"object","properties":{"code":{"type":"string","description":"The error code (error catalog)."},"reference":{"type":"string","description":"The error reference, for support."},"failed_at":{"type":"string","format":"date-time"}},"required":["code","reference","failed_at"],"additionalProperties":false},{"type":"null"}],"description":"The last failure to embed the block (large block sets only): it is sent whole until a run succeeds. Try again with `POST /v1/ai/knowledge/embed`. Null when none."},"notices":{"description":"Warnings only (the block is saved and sent as written): fix them by editing or archiving one of the blocks. Empty when none.","type":"array","items":{"type":"object","properties":{"code":{"type":"string","enum":["duplicate_title","repeated_paragraph"],"description":"`duplicate_title`: another live block of the same level has this title; `repeated_paragraph`: a paragraph of this block is already in a wider level it inherits (`block_id`)."},"block_id":{"type":"string","format":"uuid","description":"The other block."}},"required":["code","block_id"],"additionalProperties":false}}},"required":["id","level","channel_type","channel_id","kind","channel_address_id","phone_number_id","title","content_markdown","always_include","internal","active","sort_order","updated_by_membership_id","created_at","updated_at","archived_at","embedding_error"],"additionalProperties":false},"AiBlockFile":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"block_id":{"type":"string","format":"uuid"},"file_name":{"type":"string"},"mime_type":{"type":"string"},"size":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"upload_status":{"type":"string","enum":["pending","stored"]},"scan_status":{"$ref":"#/components/schemas/ScanStatus"},"scan_error":{"anyOf":[{"$ref":"#/components/schemas/ScanError"},{"type":"null"}],"description":"The recorded error of a quarantined file or a failed scan; null otherwise."},"uploaded_by_membership_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"created_at":{"type":"string","format":"date-time"}},"required":["id","block_id","file_name","mime_type","size","upload_status","scan_status","scan_error","uploaded_by_membership_id","created_at"],"additionalProperties":false,"description":"A file of a knowledge block. The AI agent may send it once it is stored and `clean`: as a file where the channel takes it, else as a link."},"AiBlockFileDownload":{"type":"object","properties":{"url":{"type":"string"},"expires_at":{"type":"string","format":"date-time"}},"required":["url","expires_at"],"additionalProperties":false,"description":"A download link valid for 5 minutes."},"AiBlockFileList":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/AiBlockFile"}}},"required":["data"],"additionalProperties":false},"AiBlockFileUpload":{"type":"object","properties":{"file":{"$ref":"#/components/schemas/AiBlockFile"},"upload":{"anyOf":[{"type":"object","properties":{"method":{"type":"string","enum":["PUT"]},"url":{"type":"string"},"headers":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}},"expires_at":{"type":"string","format":"date-time"}},"required":["method","url","headers","expires_at"],"additionalProperties":false},{"type":"null"}],"description":"The request that uploads the file (valid 15 minutes), then complete it; null when the organization already holds this file (the `sha256` given matched): it is stored already."}},"required":["file","upload"],"additionalProperties":false},"AiBlockFileUploadRequest":{"type":"object","properties":{"file_name":{"type":"string","minLength":1,"maxLength":255},"mime_type":{"type":"string","maxLength":255,"pattern":"^[a-z0-9!#$&^_.+-]+\\/[a-z0-9!#$&^_.+-]+$"},"size":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Bytes."},"sha256":{"description":"The file's SHA-256 (hex). When the organization already holds this exact file, it is reused: the response has no upload and the file is already stored.","type":"string","pattern":"^[0-9a-f]{64}$"}},"required":["file_name","mime_type","size"],"additionalProperties":false,"description":"A file for the AI agent to send: image/jpeg, image/png, image/webp, application/pdf, application/msword, application/vnd.openxmlformats-officedocument.wordprocessingml.document, application/vnd.ms-excel, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet, application/vnd.ms-powerpoint, application/vnd.openxmlformats-officedocument.presentationml.presentation, text/plain, video/mp4, video/3gpp; at most 100 MB, 10 files a block."},"AiBlockList":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/AiBlock"}}},"required":["data"],"additionalProperties":false},"AiChannelType":{"type":"string","enum":["whatsapp","facebook","instagram","x","tiktok","email","voice","sms","webchat","webform","app_store","google_business","google_play","whatsapp_web","youtube","salla_reviews","zid_questions","zid_reviews","zid_portal"],"description":"A channel type (`webchat`: every web chat widget)."},"AiEmbeddingRequest":{"type":"object","properties":{"requested_at":{"type":"string","format":"date-time","description":"When preparing the blocks was asked for; the worker runs it shortly after."}},"required":["requested_at"],"additionalProperties":false},"AiInteraction":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"ticket_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"ticket_number":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}],"description":"The ticket number (#1283)."},"channel_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"description":"The ticket's channel or web chat widget: where the turn happened."},"channel_address_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"description":"The ticket's address on its channel, if any."},"contact_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"description":"The ticket's customer."},"contact_name":{"description":"The customer's stored name; null when none or erased.","type":["string","null"]},"call_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"feature":{"type":"string","enum":["auto_reply"]},"trigger_message_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"description":"The customer message it answered."},"reply_message_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"description":"Its reply in the thread (sender `bot`)."},"reply_text":{"description":"The text of its reply, if it sent one.","type":["string","null"]},"outcome":{"$ref":"#/components/schemas/AiInteractionOutcome"},"model":{"type":"null","deprecated":true,"description":"Always null: the model is not shown (owner decision; kept until the next API version)."},"input_tokens":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"deprecated":true,"description":"Always 0: usage is not shown in tokens (kept until the next API version)."},"output_tokens":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"deprecated":true,"description":"Always 0: usage is not shown in tokens (kept until the next API version)."},"cached_tokens":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"deprecated":true,"description":"Always 0: usage is not shown in tokens (kept until the next API version)."},"tools_called":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"arguments":{"anyOf":[{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},{"type":"null"}]},"accepted":{"type":"boolean"},"error_code":{"type":["string","null"]}},"required":["name","arguments","accepted","error_code"],"additionalProperties":false},"description":"The actions it asked for (`hand_off_to_human`, the lookup) and whether Rabt carried them out."},"block_ids":{"type":"array","items":{"type":"string","format":"uuid"},"description":"The knowledge blocks it read, from the organization down."},"knowledge_mode":{"anyOf":[{"type":"string","enum":["full","retrieval"]},{"type":"null"}]},"handed_off":{"type":"boolean"},"handoff_reason":{"anyOf":[{"type":"string","enum":["instructions","customer_asked","negative_sentiment","no_answer","customer_stuck"]},{"type":"null"}],"description":"`customer_asked`: the customer explicitly asked for a person; `instructions`: a case the organization's instructions name; the AI agent makes only these two, the others are older turns'."},"skip_reason":{"description":"`skipped` only: `encrypted`, `unproven_sender` (an email the contact did not prove), `member_address` (an email thread a member answers from their own address) or `sender_limit` (the sender used up their AI answers of the hour).","anyOf":[{"type":"string","enum":["encrypted","unproven_sender","member_address","sender_limit"]},{"type":"null"}]},"response_ids":{"type":"array","items":{"type":"string"},"deprecated":true,"description":"Always empty: internal ids are not shown (kept until the next API version)."},"charged_minor":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Halalas charged to the wallet for the turn."},"error":{"anyOf":[{"$ref":"#/components/schemas/AttachedError"},{"type":"null"}]},"created_at":{"type":"string","format":"date-time"}},"required":["id","ticket_id","ticket_number","channel_id","channel_address_id","contact_id","contact_name","call_id","feature","trigger_message_id","reply_message_id","reply_text","outcome","model","input_tokens","output_tokens","cached_tokens","tools_called","block_ids","knowledge_mode","handed_off","handoff_reason","response_ids","charged_minor","error","created_at"],"additionalProperties":false,"description":"One turn of the AI agent in a conversation (docs/15 AiInteraction)."},"AiInteractionOutcome":{"type":"string","enum":["replied","handed_off","failed","discarded","skipped"],"description":"`replied`: it answered the customer and kept the conversation; `handed_off`: it gave the conversation to the members (`handoff_reason`), when the customer asked for a person or in a case the organization's instructions name, its last sentence (`reply_text`, ending with a team member will contact them); `failed`: it failed and the conversation went to the members (`error`); `discarded`: its answer came after a member took over or the customer wrote again, and was not sent; `skipped`: it left that one message to the members and stays on (`skip_reason`)."},"AiInteractionPage":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/AiInteraction"},"description":"Newest first."},"next_cursor":{"type":["string","null"]},"total":{"type":"integer","minimum":0,"maximum":10000,"description":"How many rows the list has with these filters, counted up to 10000."},"total_capped":{"type":"boolean","description":"The list has more than 10000 rows (`total` is 10000)."}},"required":["data","next_cursor","total","total_capped"],"additionalProperties":false},"AiKind":{"type":"string","enum":["private","public"],"description":"Private (direct messages) or public (comments, reviews)."},"AiKnowledgePreview":{"type":"object","properties":{"mode":{"type":"string","enum":["full","retrieval"],"description":"`full`: every block is sent; `retrieval`: the blocks are large, so only the parts relevant to the message are sent, plus the blocks marked `whole`."},"bytes":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"The UTF-8 size of the blocks."},"limit_bytes":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Above this size, blocks are sent as relevant parts."},"embedding_model":{"type":"string"},"blocks":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"level":{"$ref":"#/components/schemas/AiLevel"},"channel_type":{"anyOf":[{"$ref":"#/components/schemas/AiChannelType"},{"type":"null"}]},"channel_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"kind":{"anyOf":[{"$ref":"#/components/schemas/AiKind"},{"type":"null"}]},"channel_address_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"phone_number_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"title":{"type":"string"},"content_markdown":{"type":"string"},"always_include":{"type":"boolean"},"internal":{"type":"boolean","description":"Guidance for the AI agent only, never revealed to a customer (OP16)."},"active":{"type":"boolean"},"sort_order":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"updated_by_membership_id":{"type":"string","format":"uuid"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"archived_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"embedding_error":{"anyOf":[{"type":"object","properties":{"code":{"type":"string","description":"The error code (error catalog)."},"reference":{"type":"string","description":"The error reference, for support."},"failed_at":{"type":"string","format":"date-time"}},"required":["code","reference","failed_at"],"additionalProperties":false},{"type":"null"}],"description":"The last failure to embed the block (large block sets only): it is sent whole until a run succeeds. Try again with `POST /v1/ai/knowledge/embed`. Null when none."},"notices":{"description":"Warnings only (the block is saved and sent as written): fix them by editing or archiving one of the blocks. Empty when none.","type":"array","items":{"type":"object","properties":{"code":{"type":"string","enum":["duplicate_title","repeated_paragraph"],"description":"`duplicate_title`: another live block of the same level has this title; `repeated_paragraph`: a paragraph of this block is already in a wider level it inherits (`block_id`)."},"block_id":{"type":"string","format":"uuid","description":"The other block."}},"required":["code","block_id"],"additionalProperties":false}},"delivery":{"type":"string","enum":["full","chunks","whole","pending"],"description":"`full`: sent whole (small set); `chunks`: its relevant parts; `whole`: sent whole (\"always include\"); `pending`: sent whole because its parts are not prepared yet, or preparing them failed (`embedding_error`)."}},"required":["id","level","channel_type","channel_id","kind","channel_address_id","phone_number_id","title","content_markdown","always_include","internal","active","sort_order","updated_by_membership_id","created_at","updated_at","archived_at","embedding_error","delivery"],"additionalProperties":false}},"settings":{"$ref":"#/components/schemas/EffectiveAiSettings"}},"required":["mode","bytes","limit_bytes","embedding_model","blocks","settings"],"additionalProperties":false},"AiLevel":{"type":"string","enum":["organization","channel_type","channel","kind","address"],"description":"The level, from the widest (docs: organization → channel → account → account side): `organization` (the base rules); `channel_type` (every connection of a channel type, e.g. all of X); an account, as each channel's `ai_accounts` in the levels says: `channel` (the connection itself: an X, Facebook, Instagram, TikTok or WhatsApp account, a web chat widget) or `address` (an address, app, location or phone number of the connection: email, calls, reviews); `kind` (the private or public side of a two-sided account). The connection level of a channel whose accounts are its addresses no longer exists: `channel` there is refused (`AI-5037`). `list_ai_levels` (`GET /v1/ai/levels`) gives the channels, addresses and numbers."},"AiLevels":{"type":"object","properties":{"channels":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"type":{"type":"string","description":"The channel type, or `webchat`."},"name":{"type":"string"},"status":{"type":"string"},"provider":{"description":"Its provider (an email channel: `google`, `microsoft`, `zoho` or `imap`); null on a web chat widget.","type":["string","null"]},"kinds":{"type":"array","items":{"type":"string","enum":["private","public"]},"description":"The conversation sides it has. A `kind` level exists only on a channel with both; a one-sided channel’s account is that side (`AI-5035`)."},"ai_replies":{"type":"boolean","description":"The AI agent replies on it; when false its switches do nothing and its blocks serve the voice AI agent only (calls)."},"ai_accounts":{"anyOf":[{"type":"string","enum":["connection","number","address"]},{"type":"null"}],"description":"What an account is on it: `connection` (the connection itself, level `channel`), `number` (the connection, a phone number: level `channel`), `address` (each of its addresses and phone numbers, level `address`); null when the AI agent has no levels on it."},"addresses":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"kind":{"type":"string","description":"`email`, `account`, `app` or `location`."},"address":{"type":"string"},"display_name":{"type":["string","null"]}},"required":["id","kind","address","display_name"],"additionalProperties":false}},"phone_numbers":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"e164":{"type":"string"},"name":{"type":["string","null"]},"ai_agent_enabled":{"type":"boolean","description":"The voice AI agent answers its calls: its own value, else the voice level's."}},"required":["id","e164","name","ai_agent_enabled"],"additionalProperties":false},"description":"Its numbers that are not released: the address level of a call (`phone_number_id`)."}},"required":["id","type","name","status","provider","kinds","ai_replies","ai_accounts","addresses","phone_numbers"],"additionalProperties":false}},"counts":{"type":"array","items":{"type":"object","properties":{"level":{"$ref":"#/components/schemas/AiLevel"},"channel_type":{"anyOf":[{"$ref":"#/components/schemas/AiChannelType"},{"type":"null"}]},"channel_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"kind":{"anyOf":[{"$ref":"#/components/schemas/AiKind"},{"type":"null"}]},"channel_address_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"phone_number_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"blocks":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"active_blocks":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"has_settings":{"type":"boolean"}},"required":["level","channel_type","channel_id","kind","channel_address_id","phone_number_id","blocks","active_blocks","has_settings"],"additionalProperties":false}}},"required":["channels","counts"],"additionalProperties":false},"AiSettings":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"level":{"$ref":"#/components/schemas/AiLevel"},"channel_type":{"anyOf":[{"$ref":"#/components/schemas/AiChannelType"},{"type":"null"}]},"channel_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"kind":{"anyOf":[{"$ref":"#/components/schemas/AiKind"},{"type":"null"}]},"channel_address_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"phone_number_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"enabled":{"type":"boolean","description":"The AI agent replies at this level."},"updated_by_membership_id":{"type":"string","format":"uuid"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}},"required":["id","level","channel_type","channel_id","kind","channel_address_id","phone_number_id","enabled","updated_by_membership_id","created_at","updated_at"],"additionalProperties":false},"AiSettingsList":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/AiSettings"}}},"required":["data"],"additionalProperties":false},"ApiKey":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"mode":{"$ref":"#/components/schemas/ApiMode"},"prefix":{"type":"string","description":"The first characters of the key, to recognize it."},"scopes":{"type":"array","items":{"$ref":"#/components/schemas/Scope"}},"status":{"type":"string","enum":["active","expired","revoked"]},"member":{"type":"object","properties":{"membership_id":{"type":"string","format":"uuid"},"name":{"type":"string"}},"required":["membership_id","name"],"additionalProperties":false,"description":"The member who created the key. An organization key acts for the organization with its scopes alone (it keeps working when they leave, change role or lose their seat); a personal key acts as them, never more than they can."},"expires_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"When the key stops working (`API-8149` after it); null: until it is revoked."},"last_used_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"last_used_ip":{"description":"The address the key was last used from.","type":["string","null"]},"rotated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"revoked_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"created_at":{"type":"string","format":"date-time"}},"required":["id","name","mode","prefix","scopes","status","member","expires_at","last_used_at","last_used_ip","rotated_at","revoked_at","created_at"],"additionalProperties":false,"description":"An API key (never the key itself, shown once)."},"ApiKeyList":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/ApiKey"}}},"required":["data"],"additionalProperties":false},"ApiMode":{"type":"string","enum":["live","test"],"description":"Live data, or the organization's API test space (docs: \"Test mode\")."},"ApprovalViewLink":{"type":"object","properties":{"url":{"type":"string","format":"uri","description":"Opens the approval once in Rabt's app, for the owner signed in, with a code entered in the last 10 minutes."},"expires_at":{"type":"string","format":"date-time"}},"required":["url","expires_at"],"additionalProperties":false},"AppStoreChannel":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"issuer_id":{"type":"string"},"key_id":{"type":"string"},"status":{"type":"string","enum":["pending","active","needs_reauth","disconnected"],"description":"`active`, `needs_reauth` (Apple refused the key: reconnect with a new key) or `disconnected`."},"status_changed_at":{"type":"string","format":"date-time"},"last_error":{"anyOf":[{"type":"object","properties":{"code":{"type":"string","description":"The catalog code, e.g. `APS-3701` or `GBP-3806`."},"reference":{"type":"string","description":"The error log reference."},"retryable":{"type":"boolean"},"provider":{"anyOf":[{"type":"object","properties":{"name":{"type":"string"},"code":{"type":["string","null"]},"message":{"type":["string","null"]}},"required":["name","code","message"],"additionalProperties":false},{"type":"null"}]},"occurred_at":{"type":"string"},"params":{"description":"The values the catalog’s texts name, e.g. `{ \"service\": \"WhatsApp\" }`.","anyOf":[{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}},{"type":"null"}]}},"required":["code","reference","retryable","provider","occurred_at"],"additionalProperties":false,"description":"An error kept on the item it stopped (docs/23)."},{"type":"null"}]},"apps":{"type":"array","items":{"type":"object","properties":{"address_id":{"type":"string","format":"uuid","description":"The app’s channel address: assign it to a space (`POST /v1/spaces/{space_id}/channels` with `channel_address_id`) to route its reviews."},"app_id":{"type":"string","description":"Apple’s app id."},"name":{"type":"string"},"bundle_id":{"type":["string","null"]},"sku":{"type":["string","null"]},"polled_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"polled_ok_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"last_poll_error":{"anyOf":[{"type":"object","properties":{"code":{"type":"string","description":"The catalog code, e.g. `APS-3701` or `GBP-3806`."},"reference":{"type":"string","description":"The error log reference."},"retryable":{"type":"boolean"},"provider":{"anyOf":[{"type":"object","properties":{"name":{"type":"string"},"code":{"type":["string","null"]},"message":{"type":["string","null"]}},"required":["name","code","message"],"additionalProperties":false},{"type":"null"}]},"occurred_at":{"type":"string"},"params":{"description":"The values the catalog’s texts name, e.g. `{ \"service\": \"WhatsApp\" }`.","anyOf":[{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}},{"type":"null"}]}},"required":["code","reference","retryable","provider","occurred_at"],"additionalProperties":false,"description":"An error kept on the item it stopped (docs/23)."},{"type":"null"}]}},"required":["address_id","app_id","name","bundle_id","sku","polled_at","polled_ok_at","last_poll_error"],"additionalProperties":false}},"reply_rules":{"$ref":"#/components/schemas/ReviewReplyRules"},"last_inbound_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"connected_at":{"type":"string","format":"date-time"},"disconnected_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]}},"required":["id","name","issuer_id","key_id","status","status_changed_at","last_error","apps","reply_rules","last_inbound_at","connected_at","disconnected_at"],"additionalProperties":false},"AppStoreChannelList":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/AppStoreChannel"}}},"required":["data"],"additionalProperties":false},"AskTheTeam":{"type":"object","properties":{"ticket_id":{"type":"string","format":"uuid","description":"The ticket to ask about (attached as a card)."},"room_id":{"description":"One of your rooms, e.g. a space group.","type":"string","format":"uuid"},"membership_id":{"description":"Or a colleague: the direct message with them.","type":"string","format":"uuid"},"body":{"default":"","type":"string","maxLength":10000},"client_message_id":{"type":"string","minLength":1,"maxLength":100}},"required":["ticket_id"],"additionalProperties":false},"AskTheTeamResult":{"type":"object","properties":{"room":{"$ref":"#/components/schemas/ChatRoom"},"message":{"$ref":"#/components/schemas/ChatMessage"}},"required":["room","message"],"additionalProperties":false},"AssignPhoneNumber":{"type":"object","properties":{"inventory_id":{"type":"string","format":"uuid","description":"The id of an available number (listAvailable)."}},"required":["inventory_id"],"additionalProperties":false},"AssignSpaceChannel":{"type":"object","properties":{"channel_id":{"description":"A connected channel (a WhatsApp number, a page, an account, a widget).","type":"string","format":"uuid"},"channel_address_id":{"description":"An email address (an alias of a mailbox).","type":"string","format":"uuid"},"phone_number_id":{"description":"A phone number (voice; SMS never creates tickets): its id, or the number in E.164.","anyOf":[{"type":"string","format":"uuid"},{"type":"string","pattern":"^[+][1-9][0-9]{1,14}$"}]}},"additionalProperties":false,"description":"Exactly one channel, email address or phone number; each belongs to one space at a time. A two-sided account (Facebook, Instagram, X, TikTok) is assigned on both sides, its private messages and its public replies."},"AssignTicket":{"type":"object","properties":{"membership_id":{"type":"string","format":"uuid","description":"The member to assign."}},"required":["membership_id"],"additionalProperties":false},"AttachedError":{"type":"object","properties":{"code":{"type":"string"},"reference":{"type":"string"},"retryable":{"type":"boolean"},"provider":{"type":"object","properties":{"name":{"type":"string"},"code":{"type":"string"},"message":{"type":"string"}},"required":["name"],"additionalProperties":false},"occurred_at":{"type":"string","format":"date-time"},"params":{"description":"The values the catalog’s texts name, e.g. `{ \"service\": \"WhatsApp\" }`.","type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}}},"required":["code","reference","retryable","occurred_at"],"additionalProperties":false,"description":"Why an item failed (docs/23): the catalog code, reference and the provider’s own error."},"Attachment":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"ticket_id":{"type":"string","format":"uuid"},"message_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"file_name":{"type":"string"},"mime_type":{"type":"string"},"size":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"upload_status":{"type":"string","enum":["pending","stored"]},"scan_status":{"$ref":"#/components/schemas/ScanStatus"},"scan_detail":{"anyOf":[{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},{"type":"null"}],"description":"A quarantined file's `signature`, and the recorded error's `code`, `reference` and `release` (also in `scan_error`)."},"scan_error":{"anyOf":[{"$ref":"#/components/schemas/ScanError"},{"type":"null"}],"description":"The recorded error of a quarantined file (TKT-6113) or a failed scan (TKT-6190), shown in place of the file; null otherwise."},"media":{"$ref":"#/components/schemas/AttachmentMedia"},"created_at":{"type":"string","format":"date-time"}},"required":["id","ticket_id","message_id","file_name","mime_type","size","upload_status","scan_status","scan_detail","scan_error","media","created_at"],"additionalProperties":false},"AttachmentDownload":{"type":"object","properties":{"url":{"type":"string"},"expires_at":{"type":"string","format":"date-time"},"use":{"description":"How to use the link: exactly as given, before `expires_at`.","type":"string"}},"required":["url","expires_at"],"additionalProperties":false,"description":"A download link valid for 5 minutes, to be used exactly as given (its signature covers the whole address)."},"AttachmentMedia":{"type":"object","properties":{"delivery":{"anyOf":[{"$ref":"#/components/schemas/AttachmentRendition"},{"type":"null"}],"description":"The file's copy for the ticket's channel (a member's file not sent yet); null for a customer's file, a channel without provider limits or a file uploaded before media processing."},"preview":{"anyOf":[{"$ref":"#/components/schemas/AttachmentRendition"},{"type":"null"}]}},"required":["delivery","preview"],"additionalProperties":false,"description":"Media processing after the malware scan (OP11): the copy that fits the ticket's channel and the preview."},"AttachmentRendition":{"type":"object","properties":{"profile":{"type":"string","description":"The channel profile the copy is for (`whatsapp`, `facebook`, `instagram`, `x`, `x:public`, `tiktok`, `tiktok:public`, `email`, `email:microsoft`), or `preview`."},"status":{"type":"string","enum":["pending","ready","unfit","failed"],"description":"`pending` (being prepared: a reply with it is refused with `TKT-6173` until then), `ready`, `unfit` (cannot fit the channel: refused with its code) or `failed` (can be tried again)."},"converted":{"type":"boolean","description":"Whether a converted copy is sent instead of the original (kept unchanged)."},"mime_type":{"type":["string","null"]},"size":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"file_name":{"type":["string","null"]},"width":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"height":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"duration_ms":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"waveform":{"anyOf":[{"type":"array","items":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},{"type":"null"}],"description":"Audio: 64 peak levels from 0 to 100 over its duration."},"pages":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}],"description":"PDF: its page count."},"has_image":{"type":"boolean","description":"Preview: whether its image can be fetched (`getAttachmentPreview`)."},"steps":{"type":"array","items":{"type":"string"},"description":"What the conversion did, in order."},"error":{"anyOf":[{"$ref":"#/components/schemas/MediaError"},{"type":"null"}]},"processed_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]}},"required":["profile","status","converted","mime_type","size","file_name","width","height","duration_ms","waveform","pages","has_image","steps","error","processed_at"],"additionalProperties":false},"AttachmentUpload":{"type":"object","properties":{"attachment":{"$ref":"#/components/schemas/Attachment"},"upload":{"anyOf":[{"type":"object","properties":{"method":{"type":"string","enum":["PUT"]},"url":{"type":"string"},"headers":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}},"expires_at":{"type":"string","format":"date-time"}},"required":["method","url","headers","expires_at"],"additionalProperties":false},{"type":"null"}],"description":"The request that uploads the file; null when the organization already holds this file (the `sha256` given matched): it is stored already and there is nothing to upload or complete."}},"required":["attachment","upload"],"additionalProperties":false,"description":"Upload the file with exactly this request (the size is part of its signature), then complete it; with no request (`upload` null) the organization already held the file and it is stored."},"AuditEntry":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"action":{"type":"string","example":"membership.role_changed"},"actor":{"anyOf":[{"type":"object","properties":{"membership_id":{"type":"string","format":"uuid"},"name":{"type":"string"}},"required":["membership_id","name"],"additionalProperties":false},{"type":"null"}],"description":"Null for actions of the system, of someone not a member, or of an organization key (named in `via`: the key itself acted for the organization)."},"via":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["api_key","oauth_app"]},"id":{"type":"string","format":"uuid","description":"The API key, or the installed app (its grant)."},"name":{"type":"string"}},"required":["kind","id","name"],"additionalProperties":false},{"type":"null"}],"description":"The API key or OAuth app the member acted through (docs/16), or with `actor` null the organization key that acted; null for a session."},"target_type":{"type":["string","null"]},"target_id":{"type":["string","null"]},"before":{"description":"The state before (JSON), when it applies."},"after":{"description":"The state after (JSON), when it applies."},"reason":{"type":["string","null"]},"ip":{"type":["string","null"]},"created_at":{"type":"string","format":"date-time"},"names":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":["string","null"]},"description":"The names of the items the entry refers to, by id: its target and the members, spaces, addresses, channels, numbers and other items whose ids are in `before` and `after`. Null: the item was removed or no longer exists. An id not listed is of a kind that has no name.","example":{"01a11643-6f4e-7c3a-9b1d-2f0a5e8c7d64":"Mustafa Alattas"}}},"required":["id","action","actor","via","target_type","target_id","before","after","reason","ip","created_at","names"],"additionalProperties":false},"AuditIntegrity":{"type":"object","properties":{"status":{"type":"string","enum":["intact","broken","not_verified"],"description":"`intact`: the last daily verification found every entry as it was sealed; `broken`: see `broken`; `not_verified`: not verified yet."},"links":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Entries and re-seals in the chain."},"sealed_through":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"Entries up to this time are sealed (new ones within the hour)."},"verified_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"broken":{"anyOf":[{"type":"object","properties":{"at":{"type":"string","format":"date-time"},"reason":{"type":"string","enum":["link_changed","link_missing","entry_changed","entry_missing","entry_unsealed","reseal_unauthorized","chain_reset","sealed_late"]},"seq":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]},"audit_log_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]}},"required":["at","reason","seq","audit_log_id"],"additionalProperties":false},{"type":"null"}],"description":"The first break the verification found."}},"required":["status","links","sealed_through","verified_at","broken"],"additionalProperties":false,"description":"The tamper-evident audit log's state."},"AuditLogPage":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/AuditEntry"},"description":"Newest first."},"next_cursor":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"description":"Pass as `cursor` for older entries; null on the last page."},"total":{"type":"integer","minimum":0,"maximum":10000,"description":"How many rows the list has with these filters, counted up to 10000."},"total_capped":{"type":"boolean","description":"The list has more than 10000 rows (`total` is 10000)."}},"required":["data","next_cursor","total","total_capped"],"additionalProperties":false,"description":"A page of the audit log (docs/08)."},"AutoTopUp":{"type":"object","properties":{"enabled":{"type":"boolean"},"threshold":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"amount":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"max_per_day":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"max_per_month":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"failures":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Failed tries in a row."},"retry_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"disabled":{"anyOf":[{"type":"object","properties":{"at":{"type":"string","format":"date-time"},"code":{"type":"string"}},"required":["at","code"],"additionalProperties":false},{"type":"null"}],"description":"Turned off after repeated failures, until the card is updated (WAL-1212)."},"saved_card":{"anyOf":[{"$ref":"#/components/schemas/SavedCard"},{"type":"null"}]},"today":{"type":"integer","minimum":0,"maximum":9007199254740991},"this_month":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["enabled","threshold","amount","max_per_day","max_per_month","failures","retry_at","disabled","saved_card","today","this_month"],"additionalProperties":false,"description":"Auto top-up settings and state (docs/10)."},"AutoTopUpUpdate":{"type":"object","properties":{"enabled":{"type":"boolean"},"threshold":{"anyOf":[{"type":"integer","minimum":1,"maximum":9007199254740991},{"type":"null"}],"description":"Top up when the total balance falls below this (halalas)."},"amount":{"anyOf":[{"type":"integer","minimum":5000,"maximum":999999999999999,"description":"Halalas (SAR minor units), at least 5000 (SAR 50). Rabt sets no maximum: the schema's maximum is only the largest amount the payment provider can be sent exactly. The card's bank or the payment provider may refuse an amount above its own limits (`WAL-1204`, `WAL-1203`, or `WAL-1999` with the provider's own code and message).","example":50000},{"type":"null"}],"description":"How much each auto top-up adds (halalas)."},"max_per_day":{"anyOf":[{"type":"integer","minimum":1,"maximum":100},{"type":"null"}],"description":"Optional cap: successful auto top-ups per day (Asia/Riyadh)."},"max_per_month":{"anyOf":[{"type":"integer","minimum":1,"maximum":1000},{"type":"null"}],"description":"Optional cap: successful auto top-ups per month (Asia/Riyadh)."}},"required":["enabled","threshold","amount","max_per_day","max_per_month"],"additionalProperties":false,"description":"Turning it on needs a threshold, an amount and a saved card."},"Availability":{"type":"string","enum":["available","unavailable"],"description":"Two statuses only (docs/17)."},"AvailabilityLog":{"type":"object","properties":{"membership_id":{"type":"string","format":"uuid"},"from":{"type":"string","format":"date-time"},"to":{"type":"string","format":"date-time"},"time_zone":{"type":"string"},"periods":{"type":"array","items":{"type":"object","properties":{"status":{"$ref":"#/components/schemas/Availability"},"from":{"type":"string","format":"date-time"},"to":{"type":"string","format":"date-time"},"source":{"anyOf":[{"type":"string","enum":["manual","auto_disconnect","auto_reconnect","joined","manager"]},{"type":"null"}]},"by_membership_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"description":"The manager who stopped or resumed the member (`manager`); null otherwise."}},"required":["status","from","to","source","by_membership_id"],"additionalProperties":false}},"days":{"type":"array","items":{"type":"object","properties":{"date":{"type":"string","description":"The local date (YYYY-MM-DD)."},"available_seconds":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["date","available_seconds"],"additionalProperties":false}},"total_available_seconds":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["membership_id","from","to","time_zone","periods","days","total_available_seconds"],"additionalProperties":false},"AvailabilityTotals":{"type":"object","properties":{"from_date":{"type":"string"},"to_date":{"type":"string"},"from":{"type":"string","format":"date-time","description":"When the first date starts."},"to":{"type":"string","format":"date-time","description":"When the last date ends."},"time_zone":{"type":"string"},"data":{"type":"array","items":{"type":"object","properties":{"membership_id":{"type":"string","format":"uuid"},"days":{"type":"array","items":{"type":"object","properties":{"date":{"type":"string","description":"The local date (YYYY-MM-DD)."},"available_seconds":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["date","available_seconds"],"additionalProperties":false}},"total_available_seconds":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["membership_id","days","total_available_seconds"],"additionalProperties":false},"description":"Every member with `members.view_availability`, otherwise yours only; in the order they joined."}},"required":["from_date","to_date","from","to","time_zone","data"],"additionalProperties":false},"AvailableNumberList":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"e164":{"type":"string","description":"E.164, e.g. `+966112345678`."},"type":{"type":"string","enum":["geographic","unified_9200","toll_free_800","mobile"]},"monthly_price":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}],"description":"The monthly rental in halalas; null when it has no price yet."},"price_error":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"reference":{"type":"string"}},"required":["code","reference"],"additionalProperties":false},{"type":"null"}],"description":"Why there is no price (`WAL-1101`, `WAL-1102`)."}},"required":["id","e164","type","monthly_price","price_error"],"additionalProperties":false}}},"required":["data"],"additionalProperties":false},"BeginWhatsappSignup":{"type":"object","properties":{"coexistence":{"default":false,"description":"Onboard a number that stays on the WhatsApp Business app (coexistence): its chats are imported and messages sent from the app appear in Rabt.","type":"boolean"}},"additionalProperties":false},"BeginXConnect":{"type":"object","properties":{"channel_id":{"description":"Reconnect this channel (after X refused its tokens: `needs_reauth`); omit to connect a new account.","anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]}},"additionalProperties":false},"BilingualText":{"type":"object","properties":{"ar":{"type":"string"},"en":{"type":"string"}},"required":["ar","en"],"additionalProperties":false,"description":"A text in Arabic and English."},"BillingParty":{"type":"object","properties":{"organization_name":{"type":"string"},"legal_name":{"type":"string"},"vat_number":{"type":["string","null"]},"cr_number":{"type":["string","null"]},"national_address":{"anyOf":[{"$ref":"#/components/schemas/NationalAddressView"},{"type":"null"}]},"email":{"type":["string","null"]}},"required":["organization_name","legal_name","vat_number","cr_number","national_address","email"],"additionalProperties":false,"description":"A seller or buyer as copied onto a billing document when it was issued."},"BillingProfile":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"legal_name":{"type":"string"},"vat_number":{"type":["string","null"]},"cr_number":{"type":["string","null"]},"national_address":{"anyOf":[{"$ref":"#/components/schemas/NationalAddressView"},{"type":"null"}]},"billing_email":{"type":["string","null"]},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}},"required":["id","legal_name","vat_number","cr_number","national_address","billing_email","created_at","updated_at"],"additionalProperties":false,"description":"The organization's billing profile (docs/10)."},"BillingProfileInput":{"type":"object","properties":{"legal_name":{"type":"string","minLength":1,"maxLength":200},"vat_number":{"default":null,"description":"The VAT registration number: 15 digits, starting and ending with 3.","anyOf":[{"type":"string","pattern":"^3\\d{13}3$"},{"type":"null"}]},"cr_number":{"default":null,"description":"The commercial registration number: 10 digits.","anyOf":[{"type":"string","pattern":"^\\d{10}$"},{"type":"null"}]},"national_address":{"default":null,"anyOf":[{"$ref":"#/components/schemas/NationalAddress"},{"type":"null"}]},"billing_email":{"default":null,"description":"Receives each invoice: Wafeq’s PDF once issued, else a link to its page (a billing document, not a notification).","anyOf":[{"type":"string","maxLength":254,"format":"email"},{"type":"null"}]}},"required":["legal_name"],"additionalProperties":false,"description":"The whole billing profile: every field is replaced (omitted optional fields become null)."},"BillingProfileResponse":{"type":"object","properties":{"billing_profile":{"anyOf":[{"$ref":"#/components/schemas/BillingProfile"},{"type":"null"}]}},"required":["billing_profile"],"additionalProperties":false,"description":"Null until the profile is first saved."},"BlockedSender":{"type":"object","properties":{"quarantine":{"$ref":"#/components/schemas/SenderQuarantine"},"blocks":{"type":"array","items":{"$ref":"#/components/schemas/SenderBlock"}}},"required":["quarantine","blocks"],"additionalProperties":false},"BulkAddClassificationOptions":{"type":"object","properties":{"items":{"description":"Up to 200 items, one object each.","type":"array","items":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"columns":{"description":"Field names of the table form; blank cells are left out.","minItems":1,"maxItems":50,"type":"array","items":{"type":"string","minLength":1,"maxLength":100}},"rows":{"description":"One array of cells per item, in the order of `columns`.","type":"array","items":{"maxItems":50,"type":"array","items":{"anyOf":[{"type":"string","maxLength":10000},{"type":"number"},{"type":"boolean"},{"type":"null"}]}}},"dry_run":{"description":"Validate and match every item, write nothing.","type":"boolean"}},"additionalProperties":false,"description":"Send `items` (objects) or `columns` with `rows`, not both. Each item is validated on its own: a failed item never blocks the others."},"BulkAddSpaceMembers":{"type":"object","properties":{"items":{"description":"Up to 200 items, one object each.","type":"array","items":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"columns":{"description":"Field names of the table form; blank cells are left out.","minItems":1,"maxItems":50,"type":"array","items":{"type":"string","minLength":1,"maxLength":100}},"rows":{"description":"One array of cells per item, in the order of `columns`.","type":"array","items":{"maxItems":50,"type":"array","items":{"anyOf":[{"type":"string","maxLength":10000},{"type":"number"},{"type":"boolean"},{"type":"null"}]}}},"dry_run":{"description":"Validate and match every item, write nothing.","type":"boolean"}},"additionalProperties":false,"description":"Send `items` (objects) or `columns` with `rows`, not both. Each item is validated on its own: a failed item never blocks the others."},"BulkAssignTickets":{"type":"object","properties":{"ticket_ids":{"description":"Up to 500; or `filter`.","minItems":1,"maxItems":500,"type":"array","items":{"type":"string","format":"uuid"}},"filter":{"description":"Instead of `ticket_ids`: every ticket matching it (one condition at least). A call runs 20 s at most, then `next_cursor`.","$ref":"#/components/schemas/TicketFilter"},"cursor":{"description":"With `filter`: the previous `next_cursor`.","type":"string","format":"uuid"},"max":{"default":1000,"description":"With `filter`: the most tickets a call looks at (default 1000).","type":"integer","minimum":1,"maximum":1000},"dry_run":{"default":false,"description":"`true`: changes nothing and answers `matched`, `would_change`, `unchanged` and 5 sample tickets.","type":"boolean"},"membership_id":{"description":"The member to assign.","type":"string","format":"uuid"},"assignee":{"description":"Instead of `membership_id`: email or name.","type":"string","minLength":1,"maxLength":200}},"additionalProperties":false},"BulkChangeTicketStatus":{"type":"object","properties":{"status":{"type":"string","enum":["open","in_progress","closed"],"description":"`in_progress`: pick it up (unassigned: it becomes yours). `closed`: close it. `open`: return an in-progress ticket to open (its assignee kept), or reopen a closed one (it keeps its assignee if still active and available, otherwise it waits in its space queue)."},"ticket_ids":{"description":"Up to 500; or `filter`.","minItems":1,"maxItems":500,"type":"array","items":{"type":"string","format":"uuid"}},"filter":{"description":"Instead of `ticket_ids`: every ticket matching it (one condition at least). A call runs 20 s at most, then `next_cursor`.","$ref":"#/components/schemas/TicketFilter"},"cursor":{"description":"With `filter`: the previous `next_cursor`.","type":"string","format":"uuid"},"max":{"default":1000,"description":"With `filter`: the most tickets a call looks at (default 1000).","type":"integer","minimum":1,"maximum":1000},"dry_run":{"default":false,"description":"`true`: changes nothing and answers `matched`, `would_change`, `unchanged` and 5 sample tickets.","type":"boolean"}},"required":["status"],"additionalProperties":false},"BulkCreateCannedReplies":{"type":"object","properties":{"items":{"description":"Up to 200 items, one object each.","type":"array","items":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"columns":{"description":"Field names of the table form; blank cells are left out.","minItems":1,"maxItems":50,"type":"array","items":{"type":"string","minLength":1,"maxLength":100}},"rows":{"description":"One array of cells per item, in the order of `columns`.","type":"array","items":{"maxItems":50,"type":"array","items":{"anyOf":[{"type":"string","maxLength":10000},{"type":"number"},{"type":"boolean"},{"type":"null"}]}}},"dry_run":{"description":"Validate and match every item, write nothing.","type":"boolean"}},"additionalProperties":false,"description":"Send `items` (objects) or `columns` with `rows`, not both. Each item is validated on its own: a failed item never blocks the others."},"BulkCreateCompanies":{"type":"object","properties":{"items":{"description":"Up to 200 items, one object each.","type":"array","items":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"columns":{"description":"Field names of the table form; blank cells are left out.","minItems":1,"maxItems":50,"type":"array","items":{"type":"string","minLength":1,"maxLength":100}},"rows":{"description":"One array of cells per item, in the order of `columns`.","type":"array","items":{"maxItems":50,"type":"array","items":{"anyOf":[{"type":"string","maxLength":10000},{"type":"number"},{"type":"boolean"},{"type":"null"}]}}},"dry_run":{"description":"Validate and match every item, write nothing.","type":"boolean"}},"additionalProperties":false,"description":"Send `items` (objects) or `columns` with `rows`, not both. Each item is validated on its own: a failed item never blocks the others."},"BulkCreateContacts":{"type":"object","properties":{"items":{"description":"Up to 200 items, one object each.","type":"array","items":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"columns":{"description":"Field names of the table form; blank cells are left out.","minItems":1,"maxItems":50,"type":"array","items":{"type":"string","minLength":1,"maxLength":100}},"rows":{"description":"One array of cells per item, in the order of `columns`.","type":"array","items":{"maxItems":50,"type":"array","items":{"anyOf":[{"type":"string","maxLength":10000},{"type":"number"},{"type":"boolean"},{"type":"null"}]}}},"dry_run":{"description":"Validate and match every item, write nothing.","type":"boolean"}},"additionalProperties":false,"description":"Send `items` (objects) or `columns` with `rows`, not both. Each item is validated on its own: a failed item never blocks the others."},"BulkCreateResult":{"type":"object","properties":{"dry_run":{"type":"boolean"},"summary":{"type":"object","properties":{"requested":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"created":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"existing":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"failed":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["requested","created","existing","failed"],"additionalProperties":false},"results":{"type":"array","items":{"type":"object","properties":{"index":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"The item’s position in the call, from 0."},"id":{"type":["string","null"]},"status":{"type":"string","enum":["created","existing","failed"]},"code":{"description":"The error code of a failed item.","type":"string"},"message":{"type":"string"}},"required":["index","id","status"],"additionalProperties":false}}},"required":["dry_run","summary","results"],"additionalProperties":false},"BulkCreateTags":{"type":"object","properties":{"items":{"description":"Up to 200 items, one object each.","type":"array","items":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"columns":{"description":"Field names of the table form; blank cells are left out.","minItems":1,"maxItems":50,"type":"array","items":{"type":"string","minLength":1,"maxLength":100}},"rows":{"description":"One array of cells per item, in the order of `columns`.","type":"array","items":{"maxItems":50,"type":"array","items":{"anyOf":[{"type":"string","maxLength":10000},{"type":"number"},{"type":"boolean"},{"type":"null"}]}}},"dry_run":{"description":"Validate and match every item, write nothing.","type":"boolean"}},"additionalProperties":false,"description":"Send `items` (objects) or `columns` with `rows`, not both. Each item is validated on its own: a failed item never blocks the others."},"BulkCreateTickets":{"type":"object","properties":{"items":{"description":"Up to 200 items, one object each.","type":"array","items":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"columns":{"description":"Field names of the table form; blank cells are left out.","minItems":1,"maxItems":50,"type":"array","items":{"type":"string","minLength":1,"maxLength":100}},"rows":{"description":"One array of cells per item, in the order of `columns`.","type":"array","items":{"maxItems":50,"type":"array","items":{"anyOf":[{"type":"string","maxLength":10000},{"type":"number"},{"type":"boolean"},{"type":"null"}]}}},"dry_run":{"description":"Validate and match every item, write nothing.","type":"boolean"}},"additionalProperties":false,"description":"Send `items` (objects) or `columns` with `rows`, not both. Each item is validated on its own: a failed item never blocks the others."},"BulkMoveTickets":{"type":"object","properties":{"ticket_ids":{"description":"Up to 500; or `filter`.","minItems":1,"maxItems":500,"type":"array","items":{"type":"string","format":"uuid"}},"filter":{"description":"Instead of `ticket_ids`: every ticket matching it (one condition at least). A call runs 20 s at most, then `next_cursor`.","$ref":"#/components/schemas/TicketFilter"},"cursor":{"description":"With `filter`: the previous `next_cursor`.","type":"string","format":"uuid"},"max":{"default":1000,"description":"With `filter`: the most tickets a call looks at (default 1000).","type":"integer","minimum":1,"maximum":1000},"dry_run":{"default":false,"description":"`true`: changes nothing and answers `matched`, `would_change`, `unchanged` and 5 sample tickets.","type":"boolean"},"space_id":{"description":"The department space to move to.","type":"string","format":"uuid"},"space":{"description":"Instead of `space_id`: its name.","type":"string","minLength":1,"maxLength":200}},"additionalProperties":false},"BulkSetTicketPriority":{"type":"object","properties":{"ticket_ids":{"description":"Up to 500; or `filter`.","minItems":1,"maxItems":500,"type":"array","items":{"type":"string","format":"uuid"}},"filter":{"description":"Instead of `ticket_ids`: every ticket matching it (one condition at least). A call runs 20 s at most, then `next_cursor`.","$ref":"#/components/schemas/TicketFilter"},"cursor":{"description":"With `filter`: the previous `next_cursor`.","type":"string","format":"uuid"},"max":{"default":1000,"description":"With `filter`: the most tickets a call looks at (default 1000).","type":"integer","minimum":1,"maximum":1000},"dry_run":{"default":false,"description":"`true`: changes nothing and answers `matched`, `would_change`, `unchanged` and 5 sample tickets.","type":"boolean"},"priority":{"deprecated":true,"description":"Deprecated: accepted and ignored; every ticket keeps its priority.","$ref":"#/components/schemas/TicketPriority"}},"required":["priority"],"additionalProperties":false},"BulkTagTickets":{"type":"object","properties":{"ticket_ids":{"description":"Up to 500; or `filter`.","minItems":1,"maxItems":500,"type":"array","items":{"type":"string","format":"uuid"}},"filter":{"description":"Instead of `ticket_ids`: every ticket matching it (one condition at least). A call runs 20 s at most, then `next_cursor`.","$ref":"#/components/schemas/TicketFilter"},"cursor":{"description":"With `filter`: the previous `next_cursor`.","type":"string","format":"uuid"},"max":{"default":1000,"description":"With `filter`: the most tickets a call looks at (default 1000).","type":"integer","minimum":1,"maximum":1000},"dry_run":{"default":false,"description":"`true`: changes nothing and answers `matched`, `would_change`, `unchanged` and 5 sample tickets.","type":"boolean"},"add":{"default":[],"description":"Tags to add (made on first use).","maxItems":20,"type":"array","items":{"type":"string","minLength":1,"maxLength":100}},"remove":{"default":[],"description":"Tags to remove.","maxItems":20,"type":"array","items":{"type":"string","minLength":1,"maxLength":100}}},"additionalProperties":false},"BulkTicketStatusResult":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Ticket"},"description":"With `ticket_ids`: the tickets changed. With `filter`: empty."},"failed":{"type":"array","items":{"type":"object","properties":{"ticket_id":{"type":"string","format":"uuid"},"error":{"$ref":"#/components/schemas/AttachedError"}},"required":["ticket_id","error"],"additionalProperties":false},"description":"The tickets left as they were, each with its error (the first 100): `TKT-6101` not found or not yours to see, `TKT-6102` closed, `TKT-6103` a change the state machine refuses."},"changed_count":{"description":"The tickets changed by this call.","type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"failed_count":{"description":"The tickets refused by this call.","type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"next_cursor":{"description":"With `filter`: null once every matching ticket was read; else send it as `cursor` (with a new idempotency key) to continue.","anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"batch_id":{"description":"The batch to `undo_batch` within 24 hours; null when nothing was changed (or a dry run).","anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"dry_run":{"type":"boolean"},"matched":{"description":"The tickets this call looked at.","type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"changed":{"description":"The tickets changed (a dry run: 0).","type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"would_change":{"description":"A dry run: the tickets it would change.","type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"unchanged":{"description":"The tickets already in the target state.","type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"sample":{"description":"A dry run: the first tickets it would change.","type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"number":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"status":{"type":"string","enum":["open","in_progress","closed"]},"assignee_membership_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"space_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]}},"required":["id","number","status","assignee_membership_id","space_id"],"additionalProperties":false}},"capped":{"description":"`max` stopped the call before the last ticket.","type":"boolean"}},"required":["data","failed"],"additionalProperties":false},"Call":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"direction":{"type":"string","enum":["inbound","outbound"]},"status":{"type":"string","enum":["connecting","ringing","answered","transferring","voicemail_recording","completed","voicemail","missed","rejected","no_answer","busy","failed","abandoned"]},"phone_number_id":{"type":"string","format":"uuid"},"from_number":{"description":"Null when the caller withheld it.","type":["string","null"]},"to_number":{"type":"string"},"contact_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"ticket_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"space_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"membership_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"description":"The member on the call."},"notification":{"anyOf":[{"type":"object","properties":{"mode":{"type":"string","enum":["message","agent"]},"voice":{"type":"string","enum":["female","male"]}},"required":["mode","voice"],"additionalProperties":false},{"type":"null"}],"description":"A notification call’s mode and voice; null for any other call."},"started_at":{"type":"string","format":"date-time"},"answered_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"ended_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"duration_sec":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}],"description":"Talk time, from the answer."},"end_reason":{"anyOf":[{"type":"string","enum":["caller","callee","member","balance","timeout","rejected","error","system"]},{"type":"null"}]},"sip_code":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"billed_minutes":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"charged_amount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Halalas charged for the call."},"charge_exemption":{"anyOf":[{"type":"string","enum":["own_number"]},{"type":"null"}],"description":"Why the call carries no Rabt charge: own_number, a call on the organization’s own number through its own SIP provider (its minutes are counted at amount 0). Null when the call is charged."},"recording":{"anyOf":[{"type":"object","properties":{"status":{"type":"string","enum":["recording","uploading","stored","failed","erased"]}},"required":["status"],"additionalProperties":false},{"type":"null"}],"description":"Play it with `getCallRecording` once `stored`."},"voicemail":{"anyOf":[{"type":"object","properties":{"status":{"type":"string","enum":["recording","uploading","stored","failed","erased"]},"duration_sec":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]}},"required":["status","duration_sec"],"additionalProperties":false},{"type":"null"}]},"error":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"reference":{"type":"string"},"retryable":{"type":"boolean"},"provider":{"anyOf":[{"type":"object","properties":{"name":{"type":"string"},"code":{"type":["string","null"]},"message":{"type":["string","null"]}},"required":["name","code","message"],"additionalProperties":false},{"type":"null"}]},"occurred_at":{"type":"string"}},"required":["code","reference","retryable","provider","occurred_at"],"additionalProperties":false,"description":"What went wrong (catalog code and reference, docs/23)."},{"type":"null"}]},"quality":{"type":"object","properties":{"post_dial_delay_ms":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"mos":{"description":"Mean opinion score, 1 to 5.","type":["number","null"]},"jitter_ms":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"packet_loss_permille":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"rtt_ms":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]}},"required":["post_dial_delay_ms","mos","jitter_ms","packet_loss_permille","rtt_ms"],"additionalProperties":false},"legs":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"kind":{"type":"string","enum":["member","customer","agent"]},"membership_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"status":{"type":"string","enum":["waking","ringing","answered","ended","no_answer","busy","declined","unreachable","failed","canceled"]},"transfer":{"type":"boolean"},"push_sent_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"When a sleeping mobile app was woken with a push for this leg."},"started_at":{"type":"string","format":"date-time"},"answered_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"ended_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"error":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"reference":{"type":"string"},"retryable":{"type":"boolean"},"provider":{"anyOf":[{"type":"object","properties":{"name":{"type":"string"},"code":{"type":["string","null"]},"message":{"type":["string","null"]}},"required":["name","code","message"],"additionalProperties":false},{"type":"null"}]},"occurred_at":{"type":"string"}},"required":["code","reference","retryable","provider","occurred_at"],"additionalProperties":false,"description":"What went wrong (catalog code and reference, docs/23)."},{"type":"null"}]}},"required":["id","kind","membership_id","status","transfer","push_sent_at","started_at","answered_at","ended_at","error"],"additionalProperties":false}},"ai":{"anyOf":[{"type":"object","properties":{"status":{"type":"string","enum":["bridging","active","ended"]},"outcome":{"anyOf":[{"type":"string","enum":["handed_off","taken_over","stopped","balance","failed","caller_left"]},{"type":"null"}],"description":"How its part ended: `handed_off` to a human, `taken_over` by a member, `stopped` (switch), `balance` (wallet), `failed`, `caller_left`."},"handoff_reason":{"anyOf":[{"type":"string","enum":["instructions","customer_asked","negative_sentiment","no_answer","customer_stuck"]},{"type":"null"}]},"taken_over_by_membership_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"model":{"type":"null","deprecated":true,"description":"Always null: the model is not shown (owner decision; kept until the next API version)."},"tools_called":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"at":{"type":"string"},"ok":{"type":"boolean"}},"required":["name","at","ok"],"additionalProperties":false}},"billed_minutes":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"charged_amount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Halalas charged for the agent’s minutes."},"answered_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"ended_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"error":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"reference":{"type":"string"},"retryable":{"type":"boolean"},"provider":{"anyOf":[{"type":"object","properties":{"name":{"type":"string"},"code":{"type":["string","null"]},"message":{"type":["string","null"]}},"required":["name","code","message"],"additionalProperties":false},{"type":"null"}]},"occurred_at":{"type":"string"}},"required":["code","reference","retryable","provider","occurred_at"],"additionalProperties":false,"description":"What went wrong (catalog code and reference, docs/23)."},{"type":"null"}]}},"required":["status","outcome","handoff_reason","taken_over_by_membership_id","model","tools_called","billed_minutes","charged_amount","answered_at","ended_at","error"],"additionalProperties":false},{"type":"null"}],"description":"The voice AI agent’s part of the call (docs/15), or null when it did not answer it. Its transcript: `getCallTranscript`."}},"required":["id","direction","status","phone_number_id","from_number","to_number","contact_id","ticket_id","space_id","membership_id","notification","started_at","answered_at","ended_at","duration_sec","end_reason","sip_code","billed_minutes","charged_amount","charge_exemption","recording","voicemail","error","quality","legs","ai"],"additionalProperties":false},"CallMediaLink":{"type":"object","properties":{"url":{"type":"string","format":"uri","description":"A short-lived download link (WAV)."},"expires_at":{"type":"string","format":"date-time"}},"required":["url","expires_at"],"additionalProperties":false},"CallPage":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Call"}},"next_cursor":{"description":"Older calls; null at the end.","type":["string","null"]}},"required":["data","next_cursor"],"additionalProperties":false},"CallReport":{"type":"object","properties":{"from":{"type":"string","format":"date-time"},"to":{"type":"string","format":"date-time"},"interval":{"type":"string","enum":["none","day","week","month"]},"group_by":{"type":"string"},"rows":{"type":"array","items":{"type":"object","properties":{"bucket":{"description":"The first date (YYYY-MM-DD, UTC) of the day, week or month; null without `interval`.","type":["string","null"]},"key":{"description":"The group’s key; null: the none bucket (no space, no member…), `group_by` none, or `other`.","type":["string","null"]},"name":{"description":"The space’s, member’s or campaign’s name; null otherwise.","type":["string","null"]},"other":{"type":"boolean","description":"The sum of the smaller groups of this bucket."},"calls":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Calls started."},"answered":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Calls answered."},"duration_seconds":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Seconds from answer to end, summed."},"billed_minutes":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Minutes charged, summed."},"charged_amount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Halalas charged for the calls."}},"required":["bucket","key","name","other","calls","answered","duration_seconds","billed_minutes","charged_amount"],"additionalProperties":false}}},"required":["from","to","interval","group_by","rows"],"additionalProperties":false,"description":"The calls aggregate of a period. Rows: without `interval` one row per group (the 100 largest, the rest in one `other: true` row); with `interval` (`day`, `week` from Monday, `month`; UTC; `bucket` is its first date) every bucket, zeros included, or with `group_by` the 10 largest groups' rows of each bucket plus one `other: true` row summing the rest. Every metric adds up across rows."},"CallTranscript":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"seq":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"The segment’s place in the call (1, 2, …)."},"speaker":{"type":"string","enum":["caller","agent"]},"text":{"type":"string"},"spoken_at":{"type":"string","format":"date-time"}},"required":["seq","speaker","text","spoken_at"],"additionalProperties":false}},"next_after_seq":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}],"description":"Pass it as `after_seq` for the next page; null at the end."}},"required":["data","next_after_seq"],"additionalProperties":false},"Campaign":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"channel_type":{"type":"string","enum":["whatsapp","sms","voice","email","whatsapp_web"]},"channel_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"channel_address_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"description":"Email: the connected address it sends from (its mailbox is `channel_id`)."},"phone_number_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"sender_name_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"segment_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"content":{"$ref":"#/components/schemas/CampaignContent"},"variables":{"type":"boolean","description":"Its texts’ variables `{{name}}`, `{{first_name}}`, `{{phone}}` are filled per recipient from the CRM (a campaign built in Rabt’s apps); false for a campaign created through the API or MCP: its content is final as sent, the same for every recipient (`{{…}}` stays as written)."},"scheduled_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"status":{"type":"string","enum":["draft","scheduled","sending","paused","paused_no_balance","completed","cancelled"],"description":"`draft`, `scheduled`, `sending`, `paused` (`pause_reason`), `paused_no_balance` (resumes after a top-up), `completed` or `cancelled`."},"status_changed_at":{"type":"string","format":"date-time"},"pause_reason":{"anyOf":[{"type":"string","enum":["member","sending_hours","channel"]},{"type":"null"}]},"resume_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"error":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"reference":{"type":"string"},"retryable":{"type":"boolean"},"provider":{"anyOf":[{"type":"object","properties":{"name":{"type":"string"},"code":{"type":["string","null"]},"message":{"type":["string","null"]}},"required":["name","code","message"],"additionalProperties":false},{"type":"null"}]},"occurred_at":{"type":"string"}},"required":["code","reference","retryable","provider","occurred_at"],"additionalProperties":false},{"type":"null"}],"description":"What went wrong: the catalog code and reference (docs/23)."},"estimate":{"anyOf":[{"$ref":"#/components/schemas/CampaignEstimate"},{"type":"null"}]},"launched_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"launched_by_membership_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"started_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"completed_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"cancelled_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"created_by_membership_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"results":{"$ref":"#/components/schemas/CampaignResults"}},"required":["id","name","channel_type","channel_id","channel_address_id","phone_number_id","sender_name_id","segment_id","content","variables","scheduled_at","status","status_changed_at","pause_reason","resume_at","error","estimate","launched_at","launched_by_membership_id","started_at","completed_at","cancelled_at","created_by_membership_id","created_at","updated_at","results"],"additionalProperties":false},"CampaignAudioLink":{"type":"object","properties":{"url":{"type":"string"},"expires_at":{"type":"string","format":"date-time"}},"required":["url","expires_at"],"additionalProperties":false},"CampaignContent":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["whatsapp"]},"template_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"components":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string","enum":["header","body","button"]},"index":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"sub_type":{"anyOf":[{"type":"string","enum":["quick_reply","url","copy_code"]},{"type":"null"}]},"parameters":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string"},"value":{"type":"string"},"name":{"type":["string","null"]},"currency":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"amount_1000":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["code","amount_1000"],"additionalProperties":false},{"type":"null"}]}},"required":["type","value","name","currency"],"additionalProperties":false}}},"required":["type","index","sub_type","parameters"],"additionalProperties":false}}},"required":["type","template_id","components"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["sms"]},"text":{"type":"string"}},"required":["type","text"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["whatsapp_web"]},"text":{"type":"string","description":"The text; with `media`, its caption."},"media":{"description":"The file sent with the text (always present, null when none): `requestCampaignMediaUpload`, then `completeCampaignMediaUpload`.","anyOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["image","video","audio","document"]},"file_name":{"type":"string"},"mime_type":{"type":"string"},"size_bytes":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"state":{"type":"string","enum":["uploading","scanning","ready","infected","failed"],"description":"`uploading` until `completeCampaignMediaUpload`; a document is then `scanning` (the malware scan runs in the background: read the draft again) and an image, video or audio is scanned at once. Only a `ready` file launches; `infected` (`TKT-6194`) or `failed` (the scan did not answer, `TKT-6195`: complete the upload again) is refused at review and launch."},"error_code":{"description":"The catalog code of an `infected` or `failed` scan (always present).","type":["string","null"]}},"required":["kind","file_name","mime_type","size_bytes","state"],"additionalProperties":false},{"type":"null"}]}},"required":["type","text"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["email"]},"subject":{"type":"string"},"body":{"type":"string"}},"required":["type","subject","body"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["voice"]},"audio":{"anyOf":[{"type":"object","properties":{"source":{"type":"string","enum":["recording","speech"]},"duration_sec":{"type":"number"},"size_bytes":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"text":{"type":["string","null"]},"voice":{"anyOf":[{"type":"string","enum":["female","male"]},{"type":"null"}]},"created_at":{"type":"string"}},"required":["source","duration_sec","size_bytes","text","voice","created_at"],"additionalProperties":false},{"type":"null"}],"description":"The message played: the speech of its text (`recording`: a file uploaded before recordings stopped being taken); listen through `getCampaignAudioLink`."},"speech_text":{"type":["string","null"]},"speech_status":{"type":"string","enum":["ready","creating","failed","none"],"description":"The speech of its current text and voice: `ready` (in `audio`), `creating` (being made: `getCampaignSpeechStream` plays it meanwhile), `failed` (`speech_error`; create it again) or `none`."},"speech_error":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"reference":{"type":"string"},"retryable":{"type":"boolean"},"provider":{"anyOf":[{"type":"object","properties":{"name":{"type":"string"},"code":{"type":["string","null"]},"message":{"type":["string","null"]}},"required":["name","code","message"],"additionalProperties":false},{"type":"null"}]},"occurred_at":{"type":"string"}},"required":["code","reference","retryable","provider","occurred_at"],"additionalProperties":false},{"type":"null"}],"description":"What stopped the speech being made (`speech_status` `failed`)."},"voice":{"anyOf":[{"type":"string","enum":["female","male"]},{"type":"null"}],"description":"The campaign’s voice; null until chosen (the review asks for it)."},"mode":{"type":"string","enum":["message","agent"],"description":"`message` plays the audio; `agent` has the voice AI agent talk."},"agent_instructions":{"type":["string","null"]}},"required":["type","audio","speech_text","speech_status","speech_error","voice","mode","agent_instructions"],"additionalProperties":false}],"description":"What the campaign sends on its channel."},"CampaignEmailContentInput":{"type":"object","properties":{"subject":{"description":"The subject. Final as sent: a campaign created through the API or MCP takes no variables, so `{{…}}` stays as written and every recipient gets the same content (the variables `{{name}}`, `{{first_name}}`, `{{phone}}` are filled only in campaigns built in Rabt’s apps).","type":"string","maxLength":998},"body":{"description":"The body in Markdown (CommonMark, the reply composer’s formatting), sent wrapped in the address’s email layout and signature. Final as sent: a campaign created through the API or MCP takes no variables, so `{{…}}` stays as written and every recipient gets the same content (the variables `{{name}}`, `{{first_name}}`, `{{phone}}` are filled only in campaigns built in Rabt’s apps).","type":"string","maxLength":20000}},"additionalProperties":false,"description":"An email campaign’s content."},"CampaignEstimate":{"type":"object","properties":{"recipients":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"excluded":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"total_minor":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"The estimated cost in halalas."},"currency":{"type":"string","enum":["SAR"]},"fingerprint":{"description":"Send it back as `confirmed_fingerprint` when launching.","type":["string","null"]},"at":{"type":"string"}},"required":["recipients","excluded","total_minor","currency","fingerprint","at"],"additionalProperties":false,"description":"The estimated cost, priced from the rate card; nothing is reserved."},"CampaignMediaUpload":{"type":"object","properties":{"campaign":{"$ref":"#/components/schemas/Campaign"},"upload":{"type":"object","properties":{"method":{"type":"string","enum":["PUT"]},"url":{"type":"string"},"headers":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}},"expires_at":{"type":"string","format":"date-time"}},"required":["method","url","headers","expires_at"],"additionalProperties":false}},"required":["campaign","upload"],"additionalProperties":false,"description":"Upload the file with exactly this request (valid 15 minutes; the size is part of its signature), then call `completeCampaignMediaUpload`, which scans it for malware (`TKT-6194`)."},"CampaignPage":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Campaign"}},"next_cursor":{"type":["string","null"]},"total":{"type":"integer","minimum":0,"maximum":10000,"description":"How many rows the list has with these filters, counted up to 10000."},"total_capped":{"type":"boolean","description":"The list has more than 10000 rows (`total` is 10000)."}},"required":["data","next_cursor","total","total_capped"],"additionalProperties":false},"CampaignRecipient":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"campaign_id":{"type":"string","format":"uuid"},"contact_id":{"type":"string","format":"uuid"},"address":{"description":"The phone (E.164) or WhatsApp id it is sent to.","type":["string","null"]},"country":{"type":["string","null"]},"position":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Its place in the sending order."},"status":{"type":"string","enum":["pending","excluded","sending","sent","delivered","read","failed","replied","opted_out"]},"status_changed_at":{"type":"string","format":"date-time"},"exclusion_reason":{"anyOf":[{"type":"string","enum":["opted_out","no_address","duplicate","suppressed","destination_not_allowed","recent_campaign"]},{"type":"null"}]},"sms_message_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"call_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"reply_ticket_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"description":"The ticket their reply opened."},"cost_minor":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"error":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"reference":{"type":"string"},"retryable":{"type":"boolean"},"provider":{"anyOf":[{"type":"object","properties":{"name":{"type":"string"},"code":{"type":["string","null"]},"message":{"type":["string","null"]}},"required":["name","code","message"],"additionalProperties":false},{"type":"null"}]},"occurred_at":{"type":"string"}},"required":["code","reference","retryable","provider","occurred_at"],"additionalProperties":false},{"type":"null"}],"description":"What went wrong: the catalog code and reference (docs/23)."},"sent_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"delivered_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"read_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"failed_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"replied_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"opted_out_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]}},"required":["id","campaign_id","contact_id","address","country","position","status","status_changed_at","exclusion_reason","sms_message_id","call_id","reply_ticket_id","cost_minor","error","sent_at","delivered_at","read_at","failed_at","replied_at","opted_out_at"],"additionalProperties":false},"CampaignRecipientPage":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/CampaignRecipient"}},"next_cursor":{"type":["string","null"]},"total":{"type":"integer","minimum":0,"maximum":10000,"description":"How many rows the list has with these filters, counted up to 10000."},"total_capped":{"type":"boolean","description":"The list has more than 10000 rows (`total` is 10000)."}},"required":["data","next_cursor","total","total_capped"],"additionalProperties":false},"CampaignReport":{"type":"object","properties":{"from":{"type":"string","format":"date-time"},"to":{"type":"string","format":"date-time"},"interval":{"type":"string","enum":["none","day","week","month"]},"group_by":{"type":"string"},"rows":{"type":"array","items":{"type":"object","properties":{"bucket":{"description":"The first date (YYYY-MM-DD, UTC) of the day, week or month; null without `interval`.","type":["string","null"]},"key":{"description":"The group’s key; null: the none bucket (no space, no member…), `group_by` none, or `other`.","type":["string","null"]},"name":{"description":"The space’s, member’s or campaign’s name; null otherwise.","type":["string","null"]},"other":{"type":"boolean","description":"The sum of the smaller groups of this bucket."},"sent":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Recipients sent to."},"delivered":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Recipients delivered."},"read":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Recipients who read it."},"failed":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Of them, failed to send (messages) or failed sends (campaigns)."},"replied":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Recipients who replied."},"opted_out":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Recipients who opted out."},"cost_minor":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Halalas the sends cost."}},"required":["bucket","key","name","other","sent","delivered","read","failed","replied","opted_out","cost_minor"],"additionalProperties":false}}},"required":["from","to","interval","group_by","rows"],"additionalProperties":false,"description":"The campaigns aggregate of a period. Rows: without `interval` one row per group (the 100 largest, the rest in one `other: true` row); with `interval` (`day`, `week` from Monday, `month`; UTC; `bucket` is its first date) every bucket, zeros included, or with `group_by` the 10 largest groups' rows of each bucket plus one `other: true` row summing the rest. Every metric adds up across rows."},"CampaignResults":{"type":"object","properties":{"targeted":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"excluded":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"pending":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"sending":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"sent":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"delivered":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"read":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"failed":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"replied":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"opted_out":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"SMS: recipients who used the opt-out link."},"answered":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"cost_minor":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"What it cost so far, in halalas."}},"required":["targeted","excluded","pending","sending","sent","delivered","read","failed","replied","opted_out","answered","cost_minor"],"additionalProperties":false},"CampaignReview":{"type":"object","properties":{"campaign_id":{"type":"string","format":"uuid"},"recipients":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Contacts it would send to."},"excluded":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"exclusions":{"type":"object","properties":{"opted_out":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"no_address":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"duplicate":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"suppressed":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"destination_not_allowed":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"recent_campaign":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["opted_out","no_address","duplicate","suppressed","destination_not_allowed"],"additionalProperties":false,"description":"Contacts left out, by reason."},"estimate":{"$ref":"#/components/schemas/CampaignEstimate"},"checks":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string","enum":["audience","opt_out_option","sending_hours","classification","content","channel","agent"]},"ok":{"type":"boolean"},"code":{"description":"The catalog code of a failed check or a warning (`CAMP-6314`: waits).","type":["string","null"]},"params":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}}},"required":["key","ok","code","params"],"additionalProperties":false},"description":"The compliance checks (docs/14)."},"starts_at":{"type":"string","format":"date-time","description":"When sending would start: now, its time, or the next allowed sending hour."},"ready":{"type":"boolean","description":"Every check passed: it can be launched."},"sender":{"description":"The WhatsApp QR number or mailbox it sends from, with its allowance today (sender trust); null for other channels.","anyOf":[{"type":"object","properties":{"channel_id":{"type":"string","format":"uuid"},"name":{"type":"string"},"mode":{"type":"string","enum":["measure","enforce"],"description":"`measure`: nothing is held back yet (the default); `enforce`: the allowance holds."},"state":{"type":"string","enum":["normal","frozen","paused"]},"allowance_today":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Messages (emails) the sender may send today."},"left_today":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"recipients":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"over":{"type":"boolean","description":"More recipients than its allowance left today: the launch asks `risk_accepted`."},"outer_limit":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"A day, launched past the allowance."}},"required":["channel_id","name","mode","state","allowance_today","left_today","recipients","over","outer_limit"],"additionalProperties":false},{"type":"null"}]}},"required":["campaign_id","recipients","excluded","exclusions","estimate","checks","starts_at","ready"],"additionalProperties":false},"CampaignSmsContentInput":{"type":"object","properties":{"text":{"description":"The SMS text. Final as sent: a campaign created through the API or MCP takes no variables, so `{{…}}` stays as written and every recipient gets the same content (the variables `{{name}}`, `{{first_name}}`, `{{phone}}` are filled only in campaigns built in Rabt’s apps).","type":"string","maxLength":1000}},"additionalProperties":false,"description":"An SMS campaign’s content."},"CampaignSources":{"type":"object","properties":{"whatsapp":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"The channel id (`channel_id` of a campaign)."},"name":{"type":"string"},"phone_number":{"type":"string"},"templates":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"The `template_id` of a campaign’s content."},"name":{"type":"string"},"language":{"type":"string"},"parameter_format":{"type":"string","description":"`positional` or `named`."},"components":{"type":"array","items":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"description":"The template’s components as Meta holds them."},"quality_score":{"type":["string","null"]},"pause_count":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["id","name","language","parameter_format","components","quality_score","pause_count"],"additionalProperties":false},"description":"Its approved marketing templates."}},"required":["id","name","phone_number","templates"],"additionalProperties":false},"description":"The active WhatsApp numbers."},"sms":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false},"description":"The approved promotional sender names (`-AD`) not suspended."},"whatsapp_web":{"description":"The WhatsApp (QR) numbers that can send; always sent.","type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"phone_number":{"type":["string","null"]}},"required":["id","name","phone_number"],"additionalProperties":false}},"email":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"The `channel_address_id` of an email campaign."},"address":{"type":"string"},"display_name":{"type":["string","null"]},"channel_id":{"type":"string","format":"uuid"},"provider":{"type":"string","description":"`microsoft`, `google`, `zoho` or `smtp`."}},"required":["id","address","display_name","channel_id","provider"],"additionalProperties":false},"description":"The connected email addresses that can send: their mailbox active, Gmail and Zoho Mail aliases verified for sending."},"voice":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"e164":{"type":"string"},"name":{"type":["string","null"]}},"required":["id","e164","name"],"additionalProperties":false},"description":"The active phone numbers."}},"required":["whatsapp","sms","email","voice"],"additionalProperties":false},"CampaignVoiceContentInput":{"type":"object","properties":{"speech_text":{"description":"The message (text only, spoken with text to speech: `createCampaignSpeech`); changing it drops speech made from another text.","anyOf":[{"type":"string","maxLength":4096},{"type":"null"}]},"voice":{"description":"The campaign’s voice, `female` or `male` (required to launch): the speech of its text and its AI call; changing it drops speech made with the other.","type":"string","enum":["female","male"]},"mode":{"description":"Who talks when the customer answers: `message` (default: the speech of `speech_text` plays once and the call ends) or `agent` (the organization’s voice AI agent talks with the customer, following `agent_instructions`, and hands the call to the number’s members when needed).","type":"string","enum":["message","agent"]},"agent_instructions":{"description":"An AI call’s instructions (Markdown): what the voice AI agent says and asks on the call. It also answers from the AI knowledge of the number’s levels.","anyOf":[{"type":"string","maxLength":2000},{"type":"null"}]}},"additionalProperties":false,"description":"A voice campaign’s content."},"CampaignWhatsappContentInput":{"type":"object","properties":{"template_id":{"description":"An approved marketing template of the campaign’s WhatsApp number.","anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"components":{"description":"The values of the template’s parameters, per component. Final as sent: a campaign created through the API or MCP takes no variables, so `{{…}}` stays as written and every recipient gets the same content (the variables `{{name}}`, `{{first_name}}`, `{{phone}}` are filled only in campaigns built in Rabt’s apps).","maxItems":10,"type":"array","items":{"type":"object","properties":{"type":{"type":"string","enum":["header","body","button"]},"sub_type":{"type":"string","enum":["quick_reply","url","copy_code"]},"index":{"type":"integer","minimum":0,"maximum":9},"parameters":{"maxItems":20,"type":"array","items":{"type":"object","properties":{"type":{"type":"string","enum":["text","currency","date_time","image","video","document","payload","coupon_code"]},"value":{"type":"string","minLength":1,"maxLength":2000},"name":{"type":"string","pattern":"^[a-z0-9_]{1,100}$"},"currency":{"type":"object","properties":{"code":{"type":"string","pattern":"^[A-Z]{3}$"},"amount_1000":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["code","amount_1000"],"additionalProperties":false}},"required":["type","value"],"additionalProperties":false}}},"required":["type","parameters"],"additionalProperties":false}}},"additionalProperties":false,"description":"A WhatsApp campaign’s content."},"CampaignWhatsappWebContentInput":{"type":"object","properties":{"text":{"description":"The message text, sent from the linked number at any time (no template); with a file, its caption. Final as sent: a campaign created through the API or MCP takes no variables, so `{{…}}` stays as written and every recipient gets the same content (the variables `{{name}}`, `{{first_name}}`, `{{phone}}` are filled only in campaigns built in Rabt’s apps).","type":"string","maxLength":65536},"media":{"description":"null removes the file (a file is added with `requestCampaignMediaUpload`).","type":"null"}},"additionalProperties":false,"description":"A WhatsApp (QR) campaign’s content."},"CannedReply":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"scope":{"$ref":"#/components/schemas/CannedReplyScope"},"space_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"description":"The space of a space reply."},"owner_membership_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"description":"The member of a personal reply."},"title":{"type":"string"},"body":{"type":"string","description":"The text inserted in the composer."},"editable":{"type":"boolean","description":"You may change or delete it."},"created_by_membership_id":{"type":"string","format":"uuid"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}},"required":["id","scope","space_id","owner_membership_id","title","body","editable","created_by_membership_id","created_at","updated_at"],"additionalProperties":false,"description":"A canned reply (docs/06)."},"CannedReplyPage":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/CannedReply"}},"next_cursor":{"type":["string","null"]},"total":{"type":"integer","minimum":0,"maximum":10000,"description":"How many rows the list has with these filters, counted up to 10000."},"total_capped":{"type":"boolean","description":"The list has more than 10000 rows (`total` is 10000)."}},"required":["data","next_cursor","total","total_capped"],"additionalProperties":false,"description":"Canned replies by title."},"CannedReplyScope":{"type":"string","enum":["organization","space","personal"],"description":"`organization` (every member uses it; `settings.manage` manages it), `space` (the members of a department space; `space_replies.manage` in the space, or `settings.manage`), `personal` (only its owner)."},"CardSetup":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"status":{"type":"string","enum":["pending","requires_action","succeeded","failed"],"description":"`requires_action`: send the member to `action_url` (3-D Secure). `succeeded`: Tap saved the card (`saved_card_id`) with its payment agreement."},"amount":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Halalas authorized to check the card; Tap releases them, nothing is charged."},"currency":{"type":"string","enum":["SAR"]},"action_url":{"type":["string","null"]},"saved_card_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"error":{"anyOf":[{"$ref":"#/components/schemas/TopUpError"},{"type":"null"}]},"created_at":{"type":"string","format":"date-time"},"completed_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]}},"required":["id","status","amount","currency","action_url","saved_card_id","error","created_at","completed_at"],"additionalProperties":false,"description":"One Add card (docs/10 \"Saved cards\")."},"ChangedCustomerDestination":{"type":"object","properties":{"destination":{"$ref":"#/components/schemas/RoutingDestination"},"moved_tickets":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"How many of the customer's open and in-progress tickets move there now (closed ones never do); `0` when none."}},"required":["destination","moved_tickets"],"additionalProperties":false,"description":"A contact's or company's destination just set: its new tickets go there before their channel's destination, and its open and in-progress tickets move there now (`ticket.moved`); `all` moves nothing."},"ChangeTicketStatus":{"type":"object","properties":{"status":{"type":"string","enum":["open","in_progress","closed"],"description":"`in_progress`: pick it up (unassigned: it becomes yours). `closed`: close it. `open`: return an in-progress ticket to open (its assignee kept), or reopen a closed one (it keeps its assignee if still active and available, otherwise it waits in its space queue)."}},"required":["status"],"additionalProperties":false},"ChannelAdapterKey":{"type":"string","enum":["whatsapp","facebook","instagram","x","tiktok","email_microsoft","email_google","email_zoho","email_smtp","webchat","webform","google_business","sms","voice","app_store","google_play","whatsapp_web","youtube","salla_reviews","zid_questions","zid_reviews","zid_portal"],"description":"The channel adapter (`GET /v1/channels/capabilities` lists the channel types): `whatsapp`, `facebook`, `instagram`, `x`, `tiktok`, `email_microsoft`, `email_google`, `email_zoho`, `email_smtp`, `google_business`, `app_store`, `google_play`."},"ChannelCapabilities":{"type":"object","properties":{"channel_type":{"type":"string","enum":["whatsapp","facebook","instagram","x","tiktok","email","voice","sms","webchat","webform","app_store","google_business","google_play","whatsapp_web","youtube","salla_reviews","zid_questions","zid_reviews","zid_portal"]},"kinds":{"type":"array","items":{"type":"string","enum":["private","public"]}},"composer":{"type":"string","enum":["chat","email","none"]},"send":{"type":"object","properties":{"text":{"type":"boolean"},"media":{"type":"array","items":{"type":"string","enum":["image","video","audio","document","sticker","gif"]}},"location":{"type":"boolean"},"contacts":{"description":"Contact cards can be sent (`type: contacts`); always present.","type":["boolean","null"]},"poll":{"description":"Polls can be sent (`type: poll`); always present.","type":["boolean","null"]},"poll_limits":{"description":"A poll’s sizes where `poll` is true, else null; always present.","anyOf":[{"type":"object","properties":{"min_options":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"max_options":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"option":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Longest option, in characters."},"question":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Longest question, in characters."}},"required":["min_options","max_options","option","question"],"additionalProperties":false},{"type":"null"}]},"share":{"description":"One of the account’s own posts can be shared in a direct conversation (`POST /v1/tickets/{ticketId}/channel-messages` `type: post_share`, from `GET /v1/tickets/{ticketId}/shareable-media`); always present.","type":["boolean","null"]},"heart":{"description":"The platform’s heart sticker can be sent (`POST /v1/tickets/{ticketId}/channel-messages` `type: heart`); always present.","type":["boolean","null"]},"interactive":{"type":"boolean","description":"Reply buttons, a list, a web-address button and a location request (`POST /v1/tickets/{ticketId}/channel-messages`; what may go now: `GET /v1/tickets/{ticketId}/composer`)."},"reaction":{"type":"boolean","description":"The business can react to a customer's message, change the reaction and remove it (`POST /v1/tickets/{id}/messages/{message_id}/reaction`)."},"quote":{"type":"boolean","description":"A reply can quote a specific earlier message (`reply_to_message_id` is sent to the channel)."},"template":{"type":"boolean"},"email":{"type":"boolean"}},"required":["text","media","location","interactive","reaction","quote","template","email"],"additionalProperties":false},"max_text_length":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"max_attachment_bytes":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"reply_window":{"anyOf":[{"type":"object","properties":{"hours":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"outside":{"type":"string","enum":["template","human_agent_tag","none"]}},"required":["hours","outside"],"additionalProperties":false},{"type":"null"}]},"public_actions":{"type":"array","items":{"type":"string","enum":["reply","private_reply","hide","unhide","delete","like","unlike"]}},"statuses":{"type":"array","items":{"type":"string","enum":["sent","delivered","read","played","failed"]},"description":"The delivery statuses the channel reports. `played`: the customer played a voice note (the message is `read`, with the time it was played)."},"conversations":{"type":"object","properties":{"private":{"anyOf":[{"$ref":"#/components/schemas/ChannelConversationCapabilities"},{"type":"null"}]},"public":{"anyOf":[{"$ref":"#/components/schemas/ChannelConversationCapabilities"},{"type":"null"}]}},"required":["private","public"],"additionalProperties":false,"description":"Per conversation kind the channel serves (null: not served): how members write and what one reply may carry."},"window":{"anyOf":[{"type":"object","properties":{"hours":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Free replies within this many hours."},"free_entry_hours":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}],"description":"A conversation from a free entry point (an ad, a Page button) stays open this long."},"tag":{"anyOf":[{"type":"object","properties":{"hours":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"human_only":{"type":"boolean","enum":[true]}},"required":["hours","human_only"],"additionalProperties":false},{"type":"null"}],"description":"A member’s reply may still go out with the human-agent tag this long."},"budget":{"anyOf":[{"type":"object","properties":{"max_messages":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"exceeded":{"type":"string","description":"A catalog error code (docs/23), e.g. `TT-3023`."}},"required":["max_messages","exceeded"],"additionalProperties":false},{"type":"null"}],"description":"Business messages allowed until the customer writes again."},"outside":{"type":"string","enum":["template","human_agent_tag","none"]},"enforced":{"type":"string","enum":["queue","channel"]},"codes":{"type":"object","properties":{"closed":{"type":"string","description":"A catalog error code (docs/23), e.g. `TT-3023`."},"automatic_closed":{"type":"string","description":"A catalog error code (docs/23), e.g. `TT-3023`."}},"required":["closed","automatic_closed"],"additionalProperties":false}},"required":["hours","free_entry_hours","tag","budget","outside","enforced","codes"],"additionalProperties":false},{"type":"null"}],"description":"The reply window of private conversations; null: always open."},"private_reply":{"anyOf":[{"type":"object","properties":{"within_hours":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"per_comment":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"text_only":{"type":"boolean"},"codes":{"type":"object","properties":{"already_sent":{"type":"string","description":"A catalog error code (docs/23), e.g. `TT-3023`."},"expired":{"type":"string","description":"A catalog error code (docs/23), e.g. `TT-3023`."},"not_a_comment":{"type":"string","description":"A catalog error code (docs/23), e.g. `TT-3023`."},"text_only":{"type":"string","description":"A catalog error code (docs/23), e.g. `TT-3023`."}},"required":["already_sent","expired","not_a_comment","text_only"],"additionalProperties":false}},"required":["within_hours","per_comment","text_only","codes"],"additionalProperties":false},{"type":"null"}],"description":"The private message a public comment may be answered with; null: none."},"thread_context":{"anyOf":[{"type":"object","properties":{"max_items":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["max_items"],"additionalProperties":false},{"type":"null"}],"description":"A public ticket keeps the post and replies it answers, read once when it is created (GET /v1/tickets/{ticket_id}/context); null: none."},"private_conversation":{"anyOf":[{"type":"object","properties":{"via":{"type":"string","enum":["private_reply","direct_message"]}},"required":["via"],"additionalProperties":false},{"type":"null"}],"description":"A public ticket can move to a private conversation with its author (POST /v1/tickets/{ticket_id}/private-conversation): the private reply to the comment, or a direct message; null: none."},"actions":{"type":"object","properties":{"reaction":{"type":"object","properties":{"send":{"type":"boolean"},"receive":{"type":"boolean"}},"required":["send","receive"],"additionalProperties":false},"typing":{"type":"object","properties":{"send":{"type":"boolean","description":"The customer sees that a member is typing (`POST /v1/tickets/{ticketId}/typing`, or the member’s typing in the ticket’s realtime room)."},"with_read":{"type":"boolean","description":"The typing signal also marks the customer’s message read."},"from_room":{"description":"A member’s typing in the ticket’s realtime room reaches the customer on its own: a client that signals there calls no typing route. Always sent.","type":["boolean","null"]}},"required":["send","with_read"],"additionalProperties":false},"mark_read":{"type":"boolean","description":"The customer sees their message read once a member opened it."},"edits":{"type":"object","properties":{"receive":{"type":"boolean","description":"The customer's edits arrive and replace the message's content; earlier versions are kept."},"new_id":{"type":"boolean","description":"An edit arrives under a new provider id (an edited X post, an App Store review); it stays the same message."},"own":{"description":"The organization edits the text of its own sent message on the platform (`POST /v1/tickets/{ticketId}/messages/{messageId}/edit`); always sent.","type":"boolean"},"own_window_minutes":{"description":"How long after sending the organization may still edit its message; null when it cannot edit. Always sent.","anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]}},"required":["receive","new_id"],"additionalProperties":false},"deletes":{"type":"object","properties":{"receive":{"type":"boolean","description":"The customer's deletions arrive (a message unsent, a comment removed); Rabt keeps the message, marked."},"own":{"type":"object","properties":{"private":{"type":"array","items":{"type":"string","enum":["for_me","for_everyone"]},"description":"Who no longer sees the message once deleted there: `for_me` (only the business) or `for_everyone`."},"public":{"type":"array","items":{"type":"string","enum":["for_me","for_everyone"]},"description":"Who no longer sees the message once deleted there: `for_me` (only the business) or `for_everyone`."}},"required":["private","public"],"additionalProperties":false,"description":"The business may delete its own sent messages there, per kind (`POST /v1/tickets/{ticketId}/messages/{messageId}/delete` for `for_everyone`)."}},"required":["receive","own"],"additionalProperties":false},"media_retry":{"description":"A customer’s file that could not be downloaded can be downloaded again while the platform keeps it (`POST /v1/tickets/{ticketId}/messages/{messageId}/media-download`); null: never. Always sent.","anyOf":[{"type":"object","properties":{"kept_hours":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}],"description":"The platform keeps a received file this long after its message; null: it documents no limit."}},"required":["kept_hours"],"additionalProperties":false},{"type":"null"}]}},"required":["reaction","typing","mark_read","edits","deletes"],"additionalProperties":false},"identity":{"type":"string","enum":["phone","phone_or_platform_id","email","visitor","platform_id"],"description":"What identifies the customer on the channel (docs/12 \"Identity keys\")."},"starts_with":{"type":"string","enum":["any","template","customer"],"description":"How a ticket a member starts begins: any message, an approved template, or only the customer can start one."},"ai_replies":{"type":"boolean","description":"The AI agent may reply on this channel."},"exclusive_account":{"type":"boolean","description":"A connected account may be live in one organization only."},"block_by_handle":{"type":"boolean","description":"The block list can refuse a sender of this channel by their handle (`kind: handle`, `channel_type`)."},"profile_photo":{"type":"boolean","description":"The channel gives the customer’s profile photo: Rabt copies it as the contact’s photo (`photo_url`), refreshed at most daily on their messages (docs/12 \"Contact photo\")."},"phone_addressed":{"type":"boolean","description":"Both sides are phone numbers (E.164). Every phone-addressed channel whose own number is the same number shares one ticket per customer number: a phone thread (the ticket’s `phone_thread` and `channels`; docs/13)."},"end_to_end":{"description":"The channel carries end-to-end encrypted conversations (a WhatsApp (QR) phone); null: none. Always sent.","anyOf":[{"type":"object","properties":{"source_ref_prefix":{"type":"string","description":"A ticket whose `source_ref` starts with this prefix is end-to-end encrypted: Rabt holds its messages only as the linked phone gives them."}},"required":["source_ref_prefix"],"additionalProperties":false},{"type":"null"}]},"group_chats":{"description":"A ticket can be a group chat: each message names its sender, a sender who writes becomes a contact, the AI agent never answers, and `GET /v1/tickets/{ticketId}/group-participants` lists the participants.","type":["boolean","null"]},"replies_by_email":{"type":"boolean","description":"The channel carries no replies but its customer always gives an email address (a web form): the ticket is answered by email from one of the organization’s addresses (the ticket’s `channels`, docs/13); without a connected email channel the composer says email is not set up (`SYS-1001`)."},"replies_via":{"description":"Where replies go when the conversation’s own channel takes none (composer `none`): `contact_channels` (calls) — the ticket’s `channels` after its own, the same number’s channels first, then those the contact wrote on last, then email; a reply naming no `channel_id` takes the first; with none, notes only (`TKT-6119`). Null: none. Always sent.","anyOf":[{"type":"string","enum":["contact_channels"]},{"type":"null"}]},"threading":{"type":"string","enum":["thread","conversation","contact"],"description":"How an inbound message finds its ticket. `conversation`: the contact’s open ticket on the channel, else their newest one reopens. `thread` (email): only the ticket of the message’s own thread (In-Reply-To and References, the provider’s thread) within the address of ours it came to; anything else opens a ticket. `contact` (voice): the caller’s only open or in-progress ticket on any channel; with two or more a new ticket; with none their newest ticket reopens within 7 days of its close, else a new ticket (docs/13)."},"public_tickets":{"description":"How a customer’s public items (comments, replies, mentions) become tickets. `conversation`: one ticket per customer per public conversation. `item` (X): each customer item is its own ticket carrying the thread’s context, linked to the customer’s previous ticket of the conversation and never reopening it; a member’s reply closes it (docs/13).","type":"string","enum":["conversation","item"]},"max_poll_gap_hours":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}],"description":"The longest gap between two reads of the provider before data is lost (Google Play: 168, the 7 days of reviews its API lists); null when reading late loses nothing. The capacity alarm of Rabt watches a channel not read for half of it."},"catch_up":{"description":"Whether what arrived while the account was disconnected comes in after it is connected again (its reads go on from where they stopped and its history imports run once); false when the provider keeps nothing to read again (WhatsApp, calls) or each read is billed (X), and the channel then shows that time as not recovered (`unrecovered_gap`).","type":"boolean"}},"required":["channel_type","kinds","composer","send","max_text_length","max_attachment_bytes","reply_window","public_actions","statuses","conversations","window","private_reply","thread_context","private_conversation","actions","identity","starts_with","ai_replies","exclusive_account","block_by_handle","profile_photo","phone_addressed","replies_by_email","threading","max_poll_gap_hours"],"additionalProperties":false,"description":"What a channel supports (its capability matrix in docs/channels): the composer offers only this."},"ChannelCapabilitiesList":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/ChannelCapabilities"}}},"required":["data"],"additionalProperties":false},"ChannelConnectionResult":{"type":"object","properties":{"channels":{"type":"array","items":{"$ref":"#/components/schemas/ConnectedChannel"},"description":"The channels connected or reconnected (a Meta login may connect several)."},"refused":{"type":"array","items":{"type":"object","properties":{"external_account_id":{"type":"string"},"name":{"type":"string"},"error":{"type":"object","properties":{"code":{"type":"string"},"reference":{"type":"string"}},"required":["code","reference"],"additionalProperties":false}},"required":["external_account_id","name","error"],"additionalProperties":false},"description":"Accounts the sign-in named that could not be connected, and why."}},"required":["channels","refused"],"additionalProperties":false},"ChannelConnectionStart":{"oneOf":[{"type":"object","properties":{"next":{"type":"string","enum":["redirect"]},"authorization_url":{"type":"string","format":"uri","description":"The provider's sign-in page."},"expires_at":{"type":"string","format":"date-time"}},"required":["next","authorization_url","expires_at"],"additionalProperties":false},{"type":"object","properties":{"next":{"type":"string","enum":["embedded"]},"client_config":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":["string","number","boolean"]},"description":"The configuration the browser runs the provider's own flow with."}},"required":["next","client_config"],"additionalProperties":false},{"type":"object","properties":{"next":{"type":"string","enum":["connected"]},"channels":{"type":"array","items":{"$ref":"#/components/schemas/ConnectedChannel"}}},"required":["next","channels"],"additionalProperties":false}],"description":"`redirect`: send the member to the sign-in page; the provider sends them back to the app, which finishes with `completeChannelConnection`. `embedded`: run the provider’s flow with `client_config`, then finish the same way. `connected`: a form connection, connected at once."},"ChannelConversationCapabilities":{"type":"object","properties":{"composer":{"type":"string","enum":["chat","email","review","comment","none"],"description":"How members write: `chat` (Enter sends), `email` (Send button, subject, recipients), `review` (the one public reply of a store review), `comment` (a public comment reply) or `none`."},"text":{"type":"object","properties":{"max":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}],"description":"Longest text of one reply; null: no limit."},"unit":{"type":"string","enum":["code_points","utf8_bytes","x_weight","sms_parts"],"description":"How the channel counts it: Unicode code points, UTF-8 bytes, X’s weighted count or SMS parts."}},"required":["max","unit"],"additionalProperties":false},"caption_max":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}],"description":"Longest caption under a file, in the same unit; null: the text limit."},"media":{"type":"array","items":{"type":"object","properties":{"kind":{"type":"string","enum":["image","video","audio","document","sticker","gif"]},"max_bytes":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}],"description":"Largest file of this kind; null: none documented for it."},"mime_types":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"description":"Accepted file types; null: the provider names no list."},"caption":{"type":"boolean","description":"A caption may go with a file of this kind."}},"required":["kind","max_bytes","mime_types","caption"],"additionalProperties":false}},"max_attachments":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}],"description":"Files in one reply; null: no limit besides the API’s."},"max_total_bytes":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}],"description":"Largest total of a reply’s files (an email’s size); null: none."},"voice_note":{"type":"boolean","description":"A browser recording may go as a voice note."},"fixed_subject":{"type":"boolean","description":"Every message carries the ticket’s subject as it is (email): a ticket started here needs one (`TKT-6226`), and it no longer changes once the ticket has a message here (`TKT-6225`)."},"limit_codes":{"anyOf":[{"type":"object","properties":{"text":{"type":"string","description":"A catalog error code (docs/23), e.g. `TT-3023`."},"attachments":{"type":"string","description":"A catalog error code (docs/23), e.g. `TT-3023`."}},"required":["text","attachments"],"additionalProperties":false},{"type":"null"}],"description":"The codes of a reply refused before it is queued for breaking these limits; null where the channel’s sender checks them."},"album":{"description":"Images (and videos) of one reply go as one album, up to `max_items`, beyond `max_attachments`; null: no album. Always sent.","anyOf":[{"type":"object","properties":{"kinds":{"type":"array","items":{"type":"string","enum":["image","video"]}},"max_items":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["kinds","max_items"],"additionalProperties":false},{"type":"null"}]},"preparation":{"description":"How a member’s files are prepared for this conversation; null: they go as they are, or none are sent. Always sent.","anyOf":[{"$ref":"#/components/schemas/ChannelMediaPreparation"},{"type":"null"}]}},"required":["composer","text","caption_max","media","max_attachments","max_total_bytes","voice_note","fixed_subject","limit_codes"],"additionalProperties":false},"ChannelError":{"type":"object","properties":{"code":{"type":"string"},"reference":{"type":"string"},"retryable":{"type":"boolean"},"provider":{"anyOf":[{"type":"object","properties":{"name":{"type":"string"},"code":{"type":["string","null"]},"message":{"type":["string","null"]}},"required":["name","code","message"],"additionalProperties":false},{"type":"null"}]},"occurred_at":{"type":"string"},"params":{"description":"The values the catalog’s texts name, e.g. `{ \"service\": \"WhatsApp\" }`.","anyOf":[{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}},{"type":"null"}]}},"required":["code","reference","retryable","provider","occurred_at"],"additionalProperties":false,"description":"Why the channel stopped working (docs/23)."},"ChannelMediaPreparation":{"type":"object","properties":{"id":{"type":"string","description":"The prepared copy’s name (`whatsapp`, `x:public`, `email:microsoft`…)."},"image":{"anyOf":[{"type":"object","properties":{"accept":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"string","enum":["any"]}],"description":"The file types taken as they are, or `any` type of the kind."},"max_bytes":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"max_bytes_by_type":{"anyOf":[{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},{"type":"null"}]},"stickers":{"anyOf":[{"type":"object","properties":{"accept":{"type":"array","items":{"type":"string"}},"max_bytes":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["accept","max_bytes"],"additionalProperties":false},{"type":"null"}]}},"required":["accept","max_bytes","max_bytes_by_type","stickers"],"additionalProperties":false},{"type":"null"}]},"video":{"anyOf":[{"type":"object","properties":{"accept":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"string","enum":["any"]}],"description":"The file types taken as they are, or `any` type of the kind."},"max_bytes":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"max_duration_ms":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"max_width":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"max_height":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"codecs":{"anyOf":[{"type":"object","properties":{"video":{"type":"array","items":{"type":"string"}},"audio":{"type":"array","items":{"type":"string"}}},"required":["video","audio"],"additionalProperties":false},{"type":"null"}],"description":"Codecs required (FFmpeg names); null: any codec of the types."}},"required":["accept","max_bytes","max_duration_ms","max_width","max_height","codecs"],"additionalProperties":false},{"type":"null"}]},"audio":{"anyOf":[{"type":"object","properties":{"accept":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"string","enum":["any"]}],"description":"The file types taken as they are, or `any` type of the kind."},"max_bytes":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"codecs_by_type":{"anyOf":[{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"array","items":{"type":"string"}}},{"type":"null"}]},"target":{"type":"string","enum":["ogg_opus","m4a_aac"]}},"required":["accept","max_bytes","codecs_by_type","target"],"additionalProperties":false},{"type":"null"}]},"document":{"anyOf":[{"type":"object","properties":{"accept":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"string","enum":["any"]}],"description":"The file types taken as they are, or `any` type of the kind."},"max_bytes":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["accept","max_bytes"],"additionalProperties":false},{"type":"null"}]}},"required":["id","image","video","audio","document"],"additionalProperties":false,"description":"How a member’s file is prepared before it goes out: a file of a kind with no rule (null) is refused (`TKT-6170`); one that does not fit is converted, or refused with `TKT-6171`, `TKT-6172`, `TKT-6175` or `TKT-6178`."},"ChannelStatus":{"type":"string","enum":["pending","active","needs_reauth","disconnected"],"description":"`pending` (an email forwarding channel until its forwarding is verified), `active`, `needs_reauth` (the provider refused the credentials: reconnect), `disconnected`."},"ChannelTemplateList":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/WhatsappTemplate"}}},"required":["data"],"additionalProperties":false},"ChannelType":{"type":"string","enum":["whatsapp","facebook","instagram","x","tiktok","email","voice","sms","webchat","webform","app_store","google_business","google_play","whatsapp_web","youtube","salla_reviews","zid_questions","zid_reviews","zid_portal"],"description":"A channel type (docs/02)."},"ChatAttachment":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"room_id":{"type":"string","format":"uuid"},"message_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"file_name":{"type":"string"},"mime_type":{"type":"string"},"size":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"upload_status":{"type":"string","enum":["pending","stored"]},"scan_status":{"$ref":"#/components/schemas/ScanStatus"},"scan_signature":{"description":"The malware a quarantined file was found with; null otherwise.","type":["string","null"]},"scan_error":{"anyOf":[{"$ref":"#/components/schemas/ScanError"},{"type":"null"}],"description":"The recorded error of a quarantined file (TKT-6113) or a failed scan (TKT-6190), shown in place of the file; null otherwise."},"created_at":{"type":"string","format":"date-time"}},"required":["id","room_id","message_id","file_name","mime_type","size","upload_status","scan_status","scan_signature","scan_error","created_at"],"additionalProperties":false},"ChatAttachmentDownload":{"type":"object","properties":{"url":{"type":"string"},"expires_at":{"type":"string","format":"date-time"},"use":{"description":"How to use the link: exactly as given, before `expires_at`.","type":"string"}},"required":["url","expires_at"],"additionalProperties":false,"description":"A download link valid for 5 minutes, to be used exactly as given (its signature covers the whole address)."},"ChatAttachmentUpload":{"type":"object","properties":{"attachment":{"$ref":"#/components/schemas/ChatAttachment"},"upload":{"anyOf":[{"type":"object","properties":{"method":{"type":"string","enum":["PUT"]},"url":{"type":"string"},"headers":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}},"expires_at":{"type":"string","format":"date-time"}},"required":["method","url","headers","expires_at"],"additionalProperties":false},{"type":"null"}],"description":"The request that uploads the file; null when the organization already holds this file (the `sha256` given matched): it is stored already and there is nothing to upload or complete."}},"required":["attachment","upload"],"additionalProperties":false,"description":"Upload the file with this request (valid 15 minutes), then complete the upload. A lost upload is renewed with a new request."},"ChatImportAnswer":{"type":"object","properties":{"organization":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false},"room_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"description":"The room; null in a dry run for a direct message not started yet."},"validate_only":{"type":"boolean"},"results":{"type":"array","items":{"type":"object","properties":{"source_id":{"type":"string"},"status":{"type":"string","enum":["created","unchanged","valid","invalid"]},"message_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"error":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"params":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":["string","number"]}},"path":{"type":"string"}},"required":["code","params","path"],"additionalProperties":false},{"type":"null"}]}},"required":["source_id","status","message_id","error"],"additionalProperties":false}},"counts":{"type":"object","properties":{"created":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"unchanged":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"valid":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"invalid":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["created","unchanged","valid","invalid"],"additionalProperties":false}},"required":["organization","room_id","validate_only","results","counts"],"additionalProperties":false},"ChatImportInput":{"type":"object","properties":{"source":{"type":"string","enum":["slack","microsoft_teams","google_chat","discord","mattermost","rocket_chat","zoho_cliq","telegram","whatsapp","other"]},"room_id":{"description":"The room (a group, a space group or All).","type":"string","format":"uuid"},"direct_member_ids":{"description":"Or the direct message of two members, started when needed.","type":"array","prefixItems":[{"type":"string","format":"uuid"},{"type":"string","format":"uuid"}],"items":false,"minItems":2,"maxItems":2},"validate_only":{"default":false,"description":"A dry run: checks, writes nothing.","type":"boolean"},"messages":{"minItems":1,"maxItems":200,"type":"array","items":{"type":"object","properties":{"source_id":{"type":"string","minLength":1,"maxLength":200,"description":"The message’s id in the source, unique in the room (Slack: channel id and `ts`)."},"author":{"anyOf":[{"type":"object","properties":{"member_id":{"type":"string","format":"uuid"}},"required":["member_id"],"additionalProperties":false},{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":100}},"required":["name"],"additionalProperties":false}],"description":"A member (matched by email), or the name the source showed for someone who is not a member (shown as a former member; never an account)."},"created_at":{"type":"string","format":"date-time","description":"The original time."},"body":{"default":"","description":"Markdown; mentions as `<@membership-id>`; an edited message’s latest text. A longer message is split into several.","type":"string","maxLength":10000},"edited_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"reply_to_source_id":{"description":"The source id of the message this one replies to, imported before or earlier in this call (a thread reply: the thread’s first message).","anyOf":[{"type":"string","minLength":1,"maxLength":200},{"type":"null"}]},"reactions":{"default":[],"maxItems":50,"type":"array","items":{"type":"object","properties":{"emoji":{"type":"string","minLength":1,"maxLength":32},"member_ids":{"maxItems":500,"type":"array","items":{"type":"string","format":"uuid"}}},"required":["emoji","member_ids"],"additionalProperties":false}},"pinned":{"default":false,"type":"boolean"},"pinned_by_member_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"attachment_ids":{"default":[],"description":"Files you uploaded to this room (`requestChatUpload`), not sent yet.","maxItems":20,"type":"array","items":{"type":"string","format":"uuid"}}},"required":["source_id","author","created_at"],"additionalProperties":false}}},"required":["source","messages"],"additionalProperties":false},"ChatIncomingWebhook":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"room_id":{"type":"string","format":"uuid"},"name":{"type":"string"},"icon":{"type":["string","null"]},"url_hint":{"type":"string","description":"The last characters of its URL."},"created_by":{"$ref":"#/components/schemas/ChatPerson"},"created_at":{"type":"string","format":"date-time"},"url_regenerated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"last_posted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]}},"required":["id","room_id","name","icon","url_hint","created_by","created_at","url_regenerated_at","last_posted_at"],"additionalProperties":false},"ChatIncomingWebhookList":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/ChatIncomingWebhook"}}},"required":["data"],"additionalProperties":false},"ChatIncomingWebhookWithUrl":{"type":"object","properties":{"webhook":{"$ref":"#/components/schemas/ChatIncomingWebhook"},"url":{"type":"string","format":"uri","description":"The secret URL to POST messages to (native `{ text }` or a Slack incoming-webhook payload), returned once: keep it like a password. A new URL ends this one."},"github_url":{"description":"The URL for a GitHub repository's or organization's webhook (`application/json`), returned once.","type":"string","format":"uri"},"github_secret":{"description":"The secret for that GitHub webhook's Secret field, returned once: GitHub signs each delivery with it (`X-Hub-Signature-256`). A new URL replaces it.","type":"string"}},"required":["webhook","url"],"additionalProperties":false},"ChatMessage":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"room_id":{"type":"string","format":"uuid"},"seq":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"The message number in its room (cursors)."},"author":{"description":"Who wrote it. For an imported message of someone who is not a member: the name the source showed, `removed` true, and `membership_id` the message’s own id (never a member’s).","$ref":"#/components/schemas/ChatPerson"},"imported":{"description":"The chat app it was imported from; null for a message written in Rabt.","anyOf":[{"type":"object","properties":{"source":{"type":"string","enum":["slack","microsoft_teams","google_chat","discord","mattermost","rocket_chat","zoho_cliq","telegram","whatsapp","other"]},"author_name":{"description":"The source’s name of an author who is not a member.","type":["string","null"]},"imported_at":{"type":"string","format":"date-time"}},"required":["source","author_name","imported_at"],"additionalProperties":false},{"type":"null"}]},"service":{"description":"The service of an incoming webhook's message, null for a member's. Its `author` is then the service under its name, `membership_id` the hook's id.","anyOf":[{"$ref":"#/components/schemas/ChatServiceSender"},{"type":"null"}]},"client_message_id":{"type":["string","null"]},"body_markdown":{"description":"Null when deleted.","type":["string","null"]},"mentions":{"type":"array","items":{"$ref":"#/components/schemas/ChatPerson"}},"mentions_all":{"type":"boolean"},"tickets":{"type":"array","items":{"$ref":"#/components/schemas/ChatTicketCard"}},"quote":{"anyOf":[{"type":"object","properties":{"message_id":{"type":"string","format":"uuid"},"seq":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"author":{"$ref":"#/components/schemas/ChatPerson"},"excerpt":{"type":["string","null"]},"deleted":{"type":"boolean"}},"required":["message_id","seq","author","excerpt","deleted"],"additionalProperties":false},{"type":"null"}]},"reactions":{"type":"array","items":{"type":"object","properties":{"emoji":{"type":"string"},"count":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"membership_ids":{"type":"array","items":{"type":"string","format":"uuid"}},"members":{"description":"Who reacted with it, in the order they did, with their names.","type":"array","items":{"type":"object","properties":{"membership_id":{"type":"string","format":"uuid"},"name":{"type":"string"}},"required":["membership_id","name"],"additionalProperties":false}},"mine":{"type":"boolean"}},"required":["emoji","count","membership_ids","mine"],"additionalProperties":false}},"attachments":{"type":"array","items":{"$ref":"#/components/schemas/ChatAttachment"}},"edited_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"deleted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"pinned_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"pinned_by":{"anyOf":[{"$ref":"#/components/schemas/ChatPerson"},{"type":"null"}]},"created_at":{"type":"string","format":"date-time"}},"required":["id","room_id","seq","author","client_message_id","body_markdown","mentions","mentions_all","tickets","quote","reactions","attachments","edited_at","deleted_at","pinned_at","pinned_by","created_at"],"additionalProperties":false},"ChatMessageEditList":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"previous_body":{"type":"string"},"edited_at":{"type":"string","format":"date-time"}},"required":["previous_body","edited_at"],"additionalProperties":false}}},"required":["data"],"additionalProperties":false,"description":"Earlier texts, newest first."},"ChatMessageList":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/ChatMessage"}}},"required":["data"],"additionalProperties":false},"ChatMessagePage":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/ChatMessage"},"description":"Oldest first."},"has_older":{"type":"boolean"},"has_newer":{"type":"boolean"}},"required":["data","has_older","has_newer"],"additionalProperties":false},"ChatNotifySetting":{"type":"string","enum":["all","mentions","mute"],"description":"All messages, mentions only, or mute."},"ChatPerson":{"type":"object","properties":{"membership_id":{"type":"string","format":"uuid"},"name":{"type":"string"},"availability":{"type":"string","enum":["available","unavailable"],"description":"Presence in chat is the availability (docs/20)."},"avatar_url":{"description":"Their profile photo, when they set one (else show the initials).","type":["string","null"]},"removed":{"type":"boolean","description":"They left the organization."}},"required":["membership_id","name","availability","avatar_url","removed"],"additionalProperties":false},"ChatReactionInput":{"type":"object","properties":{"emoji":{"type":"string","minLength":1,"maxLength":32}},"required":["emoji"],"additionalProperties":false},"ChatRoom":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"type":{"type":"string","enum":["space","all","group","direct"]},"name":{"description":"A space group or private group name; null for All and direct messages.","type":["string","null"]},"space_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"direct_with":{"anyOf":[{"$ref":"#/components/schemas/ChatPerson"},{"type":"null"}]},"member_count":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"last_message_seq":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"last_message_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"archived_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"Archived rooms are read-only."},"created_at":{"type":"string","format":"date-time"},"role":{"type":"string","enum":["member","manager"]},"notify":{"$ref":"#/components/schemas/ChatNotifySetting"},"last_read_seq":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"unread_count":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Unread messages of others (at most 100)."},"unread_mention_count":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"can_manage":{"type":"boolean"},"last_message":{"description":"The room's newest message (its list row); null before the first.","anyOf":[{"type":"object","properties":{"preview":{"description":"The start of its text as plain text (at most 140 characters, mentions as names); null when deleted or without text.","type":["string","null"]},"content_type":{"type":"string","enum":["text","image","video","audio","file","deleted"],"description":"`text`, the kind of its first file (`image`, `video`, `audio`, `file`), or `deleted`."},"sender_id":{"type":"string","format":"uuid","description":"Its author (membership id); an incoming webhook's id or an imported message's own id when no member wrote it."},"sender_name":{"type":"string"},"created_at":{"type":"string","format":"date-time"}},"required":["preview","content_type","sender_id","sender_name","created_at"],"additionalProperties":false},{"type":"null"}]},"can_manage_webhooks":{"description":"You may manage the room's incoming webhooks: a private group's creator, or `spaces.manage` for any group and All; never a direct message.","type":"boolean"},"avatar_url":{"description":"The room's picture (a square WebP image, `…/256.webp`; `64.webp` beside it); null: show the room's initial. A direct message shows `direct_with.avatar_url`.","type":["string","null"]},"can_set_avatar":{"description":"You may set or remove the room's picture: a private group's creator, or `spaces.manage` for any group and All; never a direct message.","type":"boolean"}},"required":["id","type","name","space_id","direct_with","member_count","last_message_seq","last_message_at","archived_at","created_at","role","notify","last_read_seq","unread_count","unread_mention_count","can_manage"],"additionalProperties":false},"ChatRoomList":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/ChatRoom"}}},"required":["data"],"additionalProperties":false},"ChatRoomMember":{"type":"object","properties":{"membership_id":{"type":"string","format":"uuid"},"name":{"type":"string"},"availability":{"type":"string","enum":["available","unavailable"],"description":"Presence in chat is the availability (docs/20)."},"avatar_url":{"description":"Their profile photo, when they set one (else show the initials).","type":["string","null"]},"removed":{"type":"boolean","description":"They left the organization."},"role":{"type":"string","enum":["member","manager"]},"joined_at":{"type":"string","format":"date-time"}},"required":["membership_id","name","availability","avatar_url","removed","role","joined_at"],"additionalProperties":false},"ChatRoomMemberList":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/ChatRoomMember"}}},"required":["data"],"additionalProperties":false},"ChatSearchPage":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"message_id":{"type":"string","format":"uuid"},"room_id":{"type":"string","format":"uuid"},"seq":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"author":{"$ref":"#/components/schemas/ChatPerson"},"excerpt":{"type":"string"},"created_at":{"type":"string","format":"date-time"}},"required":["message_id","room_id","seq","author","excerpt","created_at"],"additionalProperties":false}},"next_cursor":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]}},"required":["data","next_cursor"],"additionalProperties":false},"ChatServiceSender":{"type":"object","properties":{"incoming_webhook_id":{"type":"string","format":"uuid"},"name":{"type":"string","description":"The service name the message was posted under."},"icon":{"description":"An emoji; null shows the initial.","type":["string","null"]}},"required":["incoming_webhook_id","name","icon"],"additionalProperties":false},"ChatTicketCard":{"anyOf":[{"type":"object","properties":{"number":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"accessible":{"type":"boolean","enum":[true]},"ticket_id":{"type":"string","format":"uuid"},"subject":{"type":["string","null"]},"status":{"$ref":"#/components/schemas/TicketStatus"},"channel_type":{"$ref":"#/components/schemas/ChannelType"},"contact_name":{"type":["string","null"]},"assignee_membership_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]}},"required":["number","accessible","ticket_id","subject","status","channel_type","contact_name","assignee_membership_id"],"additionalProperties":false},{"type":"object","properties":{"number":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"accessible":{"type":"boolean","enum":[false]}},"required":["number","accessible"],"additionalProperties":false}],"description":"A ticket card, per viewer: the number only when you cannot see the ticket."},"ChatTyping":{"type":"object","properties":{"active":{"type":"boolean","description":"True while typing; false when stopped."}},"required":["active"],"additionalProperties":false},"CheckEmbed":{"type":"object","properties":{"host_origin":{"type":"string","maxLength":300,"description":"The origin of the page that will frame Rabt (`https://crm.example.com`).","example":"https://crm.example.com"},"launch_token":{"description":"A launch token your server just signed, to check it too (it is not used up: try it again).","type":"string","minLength":1,"maxLength":4096}},"required":["host_origin"],"additionalProperties":false},"ChoosePricingModel":{"type":"object","properties":{"model":{"type":"string","enum":["per_member","all_employees"],"description":"`per_member`: any number of members at the seat price. `all_employees`: a lower seat price, on the commitment to license every employee of the organization."},"commitment_accepted":{"description":"`all_employees` only: the organization accepts the commitment (`commitment.text` of the pricing model): that all employees of the organization are registered in Rabt, and that Rabt may ask for proof of this.","type":"boolean"},"commitment_version":{"description":"`all_employees` only: the `commitment.version` accepted, as read from the pricing model (an older wording is refused with WAL-1407).","type":"string","minLength":1,"maxLength":100},"commitment_locale":{"description":"The language the commitment was shown in, recorded with its text; default: the language of the request.","type":"string","enum":["ar","en"]}},"required":["model"],"additionalProperties":false,"description":"The pricing model chosen."},"ClaimIntegrationInstall":{"type":"object","properties":{"adapter":{"type":"string","minLength":1,"maxLength":32,"description":"The platform the store installed Rabt’s app from: `salla`."},"install":{"type":"string","format":"uuid","description":"The `install` of the welcome email’s link (its fragment)."},"token":{"type":"string","minLength":1,"maxLength":64,"description":"The `token` parameter of the welcome email’s link."}},"required":["adapter","install","token"],"additionalProperties":false},"ClaimSsoDomain":{"type":"object","properties":{"domain":{"type":"string","minLength":3,"maxLength":253,"description":"e.g. example.com"}},"required":["domain"],"additionalProperties":false},"CommentAction":{"type":"object","properties":{"action":{"type":"string","enum":["hide","unhide","delete","like","unlike"]}},"required":["action"],"additionalProperties":false,"description":"`hide` or `unhide` the comment on Facebook or Instagram, `delete` it there (Rabt keeps its copy in the ticket), or `like` it as the Page and `unlike` it again (Facebook only: Instagram has no like, `IG-2027`). Instagram allows no hide or delete of a live video’s comment (`IG-2032`)."},"CommentState":{"type":"object","properties":{"message_id":{"type":"string","format":"uuid"},"ticket_id":{"type":"string","format":"uuid"},"hidden":{"type":"boolean"},"deleted":{"type":"boolean"},"liked":{"type":"boolean"}},"required":["message_id","ticket_id","hidden","deleted","liked"],"additionalProperties":false,"description":"The comment’s state on Facebook or Instagram as Rabt last saw it."},"CommunicationHistory":{"type":"object","properties":{"data":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["ticket"]},"occurred_at":{"type":"string","format":"date-time"},"ticket":{"$ref":"#/components/schemas/HistoryTicket"},"activity":{"anyOf":[{"type":"object","properties":{"messages":{"type":"integer","minimum":0,"maximum":9007199254740991},"calls":{"type":"integer","minimum":0,"maximum":9007199254740991},"last_at":{"type":"string","format":"date-time"},"preview":{"description":"For a ticket without a subject: its first message’s text on one line, at most 140 characters (cut with “…”); null for a ticket with a subject or without a text message.","type":["string","null"]}},"required":["messages","calls","last_at","preview"],"additionalProperties":false},{"type":"null"}],"description":"The ticket's messages and calls and its latest activity; null for a ticket you cannot see."}},"required":["type","occurred_at","ticket","activity"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["call"]},"occurred_at":{"type":"string","format":"date-time"},"ticket":{"$ref":"#/components/schemas/HistoryTicket"},"call":{"anyOf":[{"type":"object","properties":{"direction":{"type":"string","enum":["inbound","outbound"]},"duration_sec":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"answered":{"type":["boolean","null"]}},"required":["direction","duration_sec","answered"],"additionalProperties":false},{"type":"null"}]}},"required":["type","occurred_at","ticket","call"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["campaign_message"]},"id":{"type":"string","format":"uuid"},"occurred_at":{"type":"string","format":"date-time"},"channel_type":{"$ref":"#/components/schemas/ChannelType"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"description":"What the entry shows: `campaign_id`, `campaign_name`, `status`, `reply_ticket_id`."}},"required":["type","id","occurred_at","channel_type","details"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["notification_call"]},"id":{"type":"string","format":"uuid","description":"The call."},"occurred_at":{"type":"string","format":"date-time"},"channel_type":{"$ref":"#/components/schemas/ChannelType"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"description":"What the entry shows: `call_id`, `mode`, `status`, `duration_sec`."}},"required":["type","id","occurred_at","channel_type","details"],"additionalProperties":false}]}},"next_cursor":{"type":["string","null"]},"total":{"type":"integer","minimum":0,"maximum":10000,"description":"How many rows the list has with these filters, counted up to 10000."},"total_capped":{"type":"boolean","description":"The list has more than 10000 rows (`total` is 10000)."}},"required":["data","next_cursor","total","total_capped"],"additionalProperties":false,"description":"Newest first (docs/13 side panel)."},"Company":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"logo_url":{"type":["string","null"]},"phone":{"type":["string","null"]},"website":{"type":["string","null"]},"address":{"anyOf":[{"$ref":"#/components/schemas/CompanyAddressDocument"},{"type":"null"}]},"industry":{"type":["string","null"]},"owner_membership_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"source":{"type":"string","enum":["member","automatic"],"description":"How the company came to be: `member` (the app, the API, MCP, an import) or `automatic` (created by Rabt from the email domain two contacts share; editable and mergeable like any company)."},"domains":{"type":"array","items":{"$ref":"#/components/schemas/CompanyDomain"}},"contact_count":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"also_known_as":{"type":"array","items":{"type":"string"},"description":"The names of the companies merged into it, other than its own."},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"activity":{"description":"Lists only (`GET /v1/companies`, `search_companies`): its communication counts; the history itself: `get_contact_history` of its contacts.","type":"object","properties":{"open_tickets":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Its tickets not closed (open or in progress) you may see."},"closed_tickets":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Its closed tickets you may see."},"notes":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Its internal notes."}},"required":["open_tickets","closed_tickets","notes"],"additionalProperties":false}},"required":["id","name","logo_url","phone","website","address","industry","owner_membership_id","source","domains","contact_count","also_known_as","created_at","updated_at"],"additionalProperties":false,"description":"A company (docs/12). The id of a merged company gives the company it was merged into."},"CompanyAddress":{"type":"object","properties":{"line1":{"type":"string","maxLength":200},"line2":{"type":"string","maxLength":200},"city":{"type":"string","maxLength":100},"region":{"type":"string","maxLength":100},"postal_code":{"type":"string","maxLength":20},"country":{"description":"ISO 3166-1 alpha-2.","type":"string","pattern":"^[A-Z]{2}$"}},"additionalProperties":false},"CompanyAddressDocument":{"type":"object","properties":{"line1":{"type":"string"},"line2":{"type":"string"},"city":{"type":"string"},"region":{"type":"string"},"postal_code":{"type":"string"},"country":{"type":"string"}},"additionalProperties":false},"CompanyDomain":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"domain":{"type":"string"}},"required":["id","domain"],"additionalProperties":false},"CompanyDomainInput":{"type":"object","properties":{"domain":{"type":"string","maxLength":260,"description":"An email domain of the company, e.g. `acme.com` (never a public email provider)."}},"required":["domain"],"additionalProperties":false},"CompanyMergeResult":{"type":"object","properties":{"merge":{"$ref":"#/components/schemas/Merge"},"company":{"$ref":"#/components/schemas/Company"}},"required":["merge","company"],"additionalProperties":false},"CompanyPage":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Company"}},"next_cursor":{"description":"Pass as `cursor`; null on the last page.","type":["string","null"]},"total":{"type":"integer","minimum":0,"maximum":10000,"description":"How many rows the list has with these filters, counted up to 10000."},"total_capped":{"type":"boolean","description":"The list has more than 10000 rows (`total` is 10000)."}},"required":["data","next_cursor","total","total_capped"],"additionalProperties":false},"CompleteChannelConnection":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"description":"Everything the provider sent back, as it came: the callback's query parameters (`state`, `code`, or `error` and `error_description`), or the embedded flow's result."},"CompleteFacebookConnect":{"type":"object","properties":{"state":{"type":"string","minLength":1,"maxLength":256},"code":{"type":"string","minLength":1,"maxLength":2048},"error":{"type":"string","maxLength":200},"error_reason":{"type":"string","maxLength":200},"error_description":{"type":"string","maxLength":1000}},"required":["state"],"additionalProperties":false,"description":"What Facebook sent back to the callback page, as received: `state` with `code`, or `error`, `error_reason` and `error_description` when the person cancelled."},"CompleteGmailConnection":{"anyOf":[{"type":"object","properties":{"state":{"type":"string","minLength":1,"maxLength":300,"description":"The `state` Google sent back."},"code":{"type":"string","minLength":1,"maxLength":2048,"description":"The `code` Google sent back."},"scope":{"type":"string","maxLength":4000}},"required":["state","code"],"additionalProperties":false},{"type":"object","properties":{"state":{"type":"string","minLength":1,"maxLength":300},"error":{"type":"string","minLength":1,"maxLength":200,"description":"Google’s `error`, e.g. `access_denied` when the member declined."},"error_description":{"type":"string","maxLength":2000}},"required":["state","error"],"additionalProperties":false}],"description":"What Google sent the member back with to the redirect URI (query parameters `state` and `code`, or `state` and `error`)."},"CompleteGoogleBusinessConnection":{"anyOf":[{"type":"object","properties":{"state":{"type":"string","minLength":1,"maxLength":300,"description":"The `state` Google sent back."},"code":{"type":"string","minLength":1,"maxLength":2048,"description":"The `code` Google sent back."},"scope":{"type":"string","maxLength":4000}},"required":["state","code"],"additionalProperties":false},{"type":"object","properties":{"state":{"type":"string","minLength":1,"maxLength":300},"error":{"type":"string","minLength":1,"maxLength":200,"description":"Google’s `error`, e.g. `access_denied` when the member declined."},"error_description":{"type":"string","maxLength":2000}},"required":["state","error"],"additionalProperties":false}],"description":"What Google sent the member back with to the redirect URI (query parameters `state` and `code`, or `state` and `error`)."},"CompleteGooglePlayConnection":{"anyOf":[{"type":"object","properties":{"state":{"type":"string","minLength":1,"maxLength":300,"description":"The `state` Google sent back."},"code":{"type":"string","minLength":1,"maxLength":2048,"description":"The `code` Google sent back."},"scope":{"type":"string","maxLength":4000}},"required":["state","code"],"additionalProperties":false},{"type":"object","properties":{"state":{"type":"string","minLength":1,"maxLength":300},"error":{"type":"string","minLength":1,"maxLength":200,"description":"Google’s `error`, e.g. `access_denied` when the member declined."},"error_description":{"type":"string","maxLength":2000}},"required":["state","error"],"additionalProperties":false}],"description":"What Google sent the member back with to the redirect URI (query parameters `state` and `code`, or `state` and `error`)."},"CompleteInstagramConnect":{"type":"object","properties":{"state":{"type":"string","minLength":1,"maxLength":256},"code":{"type":"string","minLength":1,"maxLength":2048},"error":{"type":"string","maxLength":200},"error_reason":{"type":"string","maxLength":200},"error_description":{"type":"string","maxLength":1000}},"required":["state"],"additionalProperties":false,"description":"What Meta sent back to the callback page, as received: `state` with `code`, or `error`, `error_reason` and `error_description` when the person cancelled."},"CompleteIntegrationConnection":{"type":"object","properties":{"state":{"type":"string","minLength":1,"maxLength":300,"description":"The `state` the platform sent back."}},"required":["state"],"additionalProperties":{"type":"string","maxLength":4096},"description":"Every query parameter the platform sent the member back with to the redirect URI, as received (`state` and `code`, plus what the platform signs, e.g. Shopify’s `shop`, `timestamp` and `hmac`; or `state` and `error` when the owner declined)."},"CompleteRecordConnectorSignIn":{"type":"object","properties":{"state":{"type":"string","minLength":1,"maxLength":300,"description":"The `state` the system sent back."}},"required":["state"],"additionalProperties":{"type":"string","maxLength":4096},"description":"Every query parameter the system sent the member back with (`state` and `code`, or `state` and `error`)."},"CompleteTikTokConnect":{"type":"object","properties":{"state":{"type":"string","minLength":16,"maxLength":256,"description":"The `state` TikTok sent back."},"code":{"description":"The `code` TikTok sent back.","type":"string","minLength":1,"maxLength":2000},"error":{"description":"TikTok’s `error` when declined.","type":"string","maxLength":200},"error_description":{"type":"string","maxLength":2000}},"required":["state"],"additionalProperties":false},"CompleteTikTokLoginKitConnect":{"$ref":"#/components/schemas/CompleteTikTokConnect"},"CompleteXConnect":{"type":"object","properties":{"state":{"type":"string","minLength":1,"maxLength":500},"code":{"type":"string","minLength":1,"maxLength":2000},"error":{"type":"string","minLength":1,"maxLength":200},"error_description":{"type":"string","maxLength":2000}},"required":["state"],"additionalProperties":false,"description":"X's answer on the callback, as it came: `state` with `code` (the member approved; the code is valid 30 seconds) or `error` (the member declined: X-3011). Only the member who started the connection can finish it."},"CompleteYouTubeConnect":{"type":"object","properties":{"state":{"type":"string","minLength":16,"maxLength":300,"description":"The `state` Google sent back."},"code":{"description":"The `code` Google sent back.","type":"string","minLength":1,"maxLength":2048},"scope":{"description":"The scopes Google granted.","type":"string","maxLength":4000},"error":{"description":"Google’s `error` when declined.","type":"string","minLength":1,"maxLength":200},"error_description":{"type":"string","maxLength":2000}},"required":["state"],"additionalProperties":false},"CompleteZohoMailConnection":{"anyOf":[{"type":"object","properties":{"state":{"type":"string","minLength":1,"maxLength":300,"description":"The `state` Zoho sent back."},"code":{"type":"string","minLength":1,"maxLength":4000,"description":"The `code` Zoho sent back."},"location":{"description":"Zoho’s `location` (the data centre, e.g. `sa`, `us`, `eu`).","type":"string","maxLength":20},"accounts-server":{"description":"Zoho’s `accounts-server` (the data centre’s Zoho Accounts address).","type":"string","maxLength":200}},"required":["state","code"],"additionalProperties":false},{"type":"object","properties":{"state":{"type":"string","minLength":1,"maxLength":300},"error":{"type":"string","minLength":1,"maxLength":200,"description":"Zoho’s `error`, e.g. `access_denied` when the member declined."},"error_description":{"type":"string","maxLength":2000},"location":{"description":"Zoho’s `location` (the data centre, e.g. `sa`, `us`, `eu`).","type":"string","maxLength":20},"accounts-server":{"description":"Zoho’s `accounts-server` (the data centre’s Zoho Accounts address).","type":"string","maxLength":200}},"required":["state","error"],"additionalProperties":false}],"description":"What Zoho sent the member back with to the redirect URI (query parameters `state`, `code`, `location` and `accounts-server`, or `state` and `error`)."},"ConnectAppStoreChannel":{"type":"object","properties":{"name":{"description":"What members call the channel; default \"App Store\".","anyOf":[{"type":"string","minLength":1,"maxLength":200},{"type":"null"}]},"issuer_id":{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$","description":"The issuer ID of your App Store Connect team (Users and Access › Integrations), e.g. `57246542-96fe-1a63-e053-0824d011072a`."},"key_id":{"type":"string","pattern":"^[A-Z0-9]{10}$","description":"The ID of a team API key with the Customer Support or Admin role, e.g. `2X9R4HXF34`."},"private_key":{"type":"string","minLength":1,"maxLength":4096,"description":"The text of the key’s `.p8` file (`-----BEGIN PRIVATE KEY-----` …). Kept in the token vault, never returned."}},"required":["issuer_id","key_id","private_key"],"additionalProperties":false},"ConnectedChannel":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"source":{"type":"string","enum":["channel","widget"]},"type":{"$ref":"#/components/schemas/ChannelType"},"provider":{"type":"string"},"name":{"type":"string"},"status":{"$ref":"#/components/schemas/ConnectedChannelStatus"},"status_changed_at":{"type":"string","format":"date-time"},"last_error":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"reference":{"type":"string"},"occurred_at":{"type":"string","format":"date-time"}},"required":["code","reference","occurred_at"],"additionalProperties":false},{"type":"null"}],"description":"Why it needs a reconnection or failed its last check (docs/23)."},"paused_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"paused_reason":{"anyOf":[{"type":"string","enum":["balance","provider_account"]},{"type":"null"}],"description":"Why it is paused: `balance` (its paid sources at zero balance, X) or `provider_account` (the provider restricted the account, e.g. a WhatsApp number; the error is `last_error`); null when not paused."},"phone_number":{"description":"The number it is (E.164), if any.","type":["string","null"]},"addresses":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"kind":{"type":"string","enum":["email","account","app","location"]},"address":{"type":"string"},"display_name":{"description":"The sender name, or its name.","type":["string","null"]},"is_default_from":{"type":"boolean"}},"required":["id","kind","address","display_name","is_default_from"],"additionalProperties":false}},"ai_switch_kinds":{"type":"array","items":{"type":"string","enum":["private","public"]},"description":"The AI auto-reply switches that apply to it: private conversations, public comments, both, or none (docs/15)."},"last_inbound_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"connected_at":{"type":"string","format":"date-time"},"disconnected_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"unrecovered_gap":{"description":"The last time the account was away (disconnected, then connected again) when its provider keeps nothing to read again (the capability `catch_up` false: WhatsApp, X, calls): what arrived between `from` and `until` is not in Rabt. Null otherwise.","anyOf":[{"type":"object","properties":{"from":{"type":"string","format":"date-time"},"until":{"type":"string","format":"date-time"}},"required":["from","until"],"additionalProperties":false},{"type":"null"}]}},"required":["id","source","type","provider","name","status","status_changed_at","last_error","paused_at","paused_reason","phone_number","addresses","ai_switch_kinds","last_inbound_at","connected_at","disconnected_at"],"additionalProperties":false},"ConnectedChannelList":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/ConnectedChannel"}}},"required":["data"],"additionalProperties":false},"ConnectedChannelStatus":{"type":"string","enum":["pending","active","needs_reauth","disconnected","disabled"],"description":"`pending` (connected, not yet proven), `active`, `needs_reauth` (reconnect), `disconnected` (connecting the account again reopens the channel); a widget is `active` or `disabled`."},"ConnectedChannelTypeList":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/ChannelType"}}},"required":["data"],"additionalProperties":false},"ConnectEmailChannel":{"type":"object","properties":{"address":{"type":"string","maxLength":254,"description":"The address that forwards to Rabt."},"display_name":{"anyOf":[{"type":"string","minLength":1,"maxLength":200},{"type":"null"}],"description":"The sender name replies carry, e.g. \"Acme Support\"."},"smtp_host":{"type":"string","minLength":1,"maxLength":253,"description":"The SMTP server's host name, e.g. `smtp.yourprovider.com`."},"smtp_port":{"type":"integer","minimum":1,"maximum":65535,"description":"The SMTP port: 587 (STARTTLS), 465 (TLS), 25 or 2525."},"smtp_security":{"$ref":"#/components/schemas/SmtpSecurity"},"smtp_username":{"type":"string","minLength":1,"maxLength":320},"smtp_password":{"type":"string","minLength":1,"maxLength":1024,"description":"Kept in the token vault, never returned."},"imap_host":{"anyOf":[{"type":"string","minLength":1,"maxLength":253,"description":"The mailbox's IMAP server, e.g. `imap.yourprovider.com`: Rabt then reads the inbox directly (no forwarding needed) with `imap_username` and `imap_password`, else the SMTP account, and imports its last 90 days. Leave it out to receive by forwarding only."},{"type":"null"}]},"imap_port":{"type":"integer","minimum":1,"maximum":65535,"description":"The IMAP port: 993 (TLS, the default) or 143 (STARTTLS)."},"imap_security":{"$ref":"#/components/schemas/SmtpSecurity"},"imap_username":{"anyOf":[{"type":"string","minLength":1,"maxLength":320,"description":"The IMAP login's user name when it is not the SMTP account's. Send it with `imap_password`, both or neither."},{"type":"null"}]},"imap_password":{"anyOf":[{"type":"string","minLength":1,"maxLength":1024,"description":"The IMAP login's password, kept in the token vault, never returned. Send it with `imap_username`, both or neither."},{"type":"null"}]}},"required":["address","smtp_host","smtp_port","smtp_security","smtp_username","smtp_password"],"additionalProperties":false},"ConnectGooglePlayChannel":{"type":"object","properties":{"name":{"description":"What members call the channel; default \"Google Play\".","anyOf":[{"type":"string","minLength":1,"maxLength":200},{"type":"null"}]},"service_account_key":{"type":"string","minLength":1,"maxLength":16384,"description":"The text of the service account’s JSON key file (Google Cloud › IAM & Admin › Service accounts › Keys › Create new key › JSON). Kept in the token vault, never returned."},"package_names":{"maxItems":100,"type":"array","items":{"type":"string","maxLength":200,"pattern":"^[A-Za-z][A-Za-z0-9_]*(\\.[A-Za-z][A-Za-z0-9_]*)+$","description":"A package name, e.g. `com.example.app`."},"description":"Apps to add by package name, besides the ones Google’s Reporting API lists for the service account (for when that API is not enabled)."}},"required":["service_account_key"],"additionalProperties":false},"ConnectionImport":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"channel_id":{"type":"string","format":"uuid"},"kind":{"type":"string","description":"What is imported, e.g. `messages` or `reviews`."},"state":{"type":"string","enum":["running","paused","capped","declined","not_possible","done"],"description":"`running`, `paused` until `resumes_at`, or ended: `done`, `capped` at the limit the provider sets, `declined` at the provider, `not_possible`."},"done":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Items stored so far."},"total":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"total_kind":{"type":"string","enum":["known","estimated","unknown"]},"limit_code":{"description":"The limit the provider sets on this import, as a catalog code stating it.","type":["string","null"]},"resumes_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"error":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"reference":{"type":"string"},"occurred_at":{"type":"string","format":"date-time"}},"required":["code","reference","occurred_at"],"additionalProperties":false},{"type":"null"}],"description":"Why it paused or stopped (docs/23)."},"created_at":{"type":"string","format":"date-time"},"finished_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]}},"required":["id","channel_id","kind","state","done","total","total_kind","limit_code","resumes_at","error","created_at","finished_at"],"additionalProperties":false},"ConnectionImportList":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/ConnectionImport"}}},"required":["data"],"additionalProperties":false},"ConnectWhatsappChannel":{"type":"object","properties":{"state":{"type":"string","minLength":20,"maxLength":2048,"description":"The `state` of the signup you began."},"code":{"type":"string","minLength":10,"maxLength":2048,"description":"The code Embedded Signup returned (`FB.login`), valid for 30 seconds."},"waba_id":{"type":"string","pattern":"^\\d{1,32}$","description":"The WhatsApp Business Account id the flow returned."},"phone_number_id":{"type":"string","pattern":"^\\d{1,32}$","description":"The phone number id the flow returned."},"business_id":{"anyOf":[{"type":"string","pattern":"^\\d{1,32}$"},{"type":"null"}]},"coexistence":{"type":"boolean"},"pin":{"description":"The number's two-step verification PIN, if it has one; otherwise Rabt sets a random one (kept in the token vault). When Meta refuses it (another PIN, `WA-2071`), the number is connected unregistered and its PIN is sent to `registerWhatsappNumber`.","anyOf":[{"type":"string","pattern":"^\\d{6}$"},{"type":"null"}]}},"required":["state","code","waba_id","phone_number_id"],"additionalProperties":false},"Contact":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"description":"The stored name: written by a member when `name_by_member`, else saved automatically. Show `display_name`.","type":["string","null"]},"name_by_member":{"type":"boolean"},"display_name":{"description":"The name shown everywhere (docs/12 \"Display name\"): a member's name, else the most recently updated connected system's name, else the most recently seen channel profile name, else the saved name, else the formatted primary phone number or email address. Null only for an erased contact or one with nothing.","type":["string","null"]},"display_name_source":{"anyOf":[{"type":"string","enum":["member","system","channel","saved","phone","email"]},{"type":"null"}]},"names":{"type":"array","items":{"$ref":"#/components/schemas/ContactName"},"description":"Every name the contact is known by, in precedence order."},"avatar_url":{"description":"The photo a member set.","type":["string","null"]},"photo_url":{"description":"The photo to show: `avatar_url`, else the newest channel profile photo Rabt copied (an identity’s `photo_url`); null: show the initials.","type":["string","null"]},"primary_phone":{"type":["string","null"]},"primary_email":{"type":["string","null"]},"phones":{"type":"array","items":{"$ref":"#/components/schemas/ContactPhone"}},"emails":{"type":"array","items":{"$ref":"#/components/schemas/ContactEmail"}},"identities":{"type":"array","items":{"$ref":"#/components/schemas/ContactIdentity"}},"companies":{"type":"array","items":{"$ref":"#/components/schemas/ContactCompanyRef"}},"last_activity_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"last_channel_type":{"anyOf":[{"$ref":"#/components/schemas/ChannelType"},{"type":"null"}]},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"deleted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"When it went to the trash (deleted, or its erasure requested: see `GET /v1/contact-erasures?contact_id=`); null while it is live."},"erased_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"When its personal data was erased; null when it was not."},"activity":{"description":"Lists only (`GET /v1/contacts`, `search_contacts`): its communication counts; the history itself: `get_contact_history`.","type":"object","properties":{"open_tickets":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Its tickets not closed (open or in progress) you may see."},"closed_tickets":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Its closed tickets you may see."},"notes":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Its internal notes."}},"required":["open_tickets","closed_tickets","notes"],"additionalProperties":false}},"required":["id","name","name_by_member","display_name","display_name_source","names","avatar_url","photo_url","primary_phone","primary_email","phones","emails","identities","companies","last_activity_at","last_channel_type","created_at","updated_at","deleted_at","erased_at"],"additionalProperties":false,"description":"A contact (docs/12). The id of a merged contact gives the contact it was merged into; a contact in the trash is read too (`deleted_at`)."},"ContactCompanyLink":{"type":"object","properties":{"job_title":{"description":"The job title at the company.","anyOf":[{"type":"string","maxLength":100},{"type":"null"}]},"is_primary":{"description":"The contact's primary company.","type":"boolean"}},"additionalProperties":false},"ContactCompanyRef":{"type":"object","properties":{"company_id":{"type":"string","format":"uuid"},"company_name":{"type":"string"},"job_title":{"type":["string","null"]},"is_primary":{"type":"boolean"}},"required":["company_id","company_name","job_title","is_primary"],"additionalProperties":false},"ContactDataExport":{"type":"object","properties":{"format":{"type":"string","enum":["rabt.contact_export"]},"version":{"type":"number","enum":[1]},"generated_at":{"type":"string","format":"date-time"},"organization":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":["string","null"]}},"required":["id","name"],"additionalProperties":false},"contact":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"description":"The contact: name, avatar, custom fields with their labels, tags, activity and times (a contact in the trash has `deleted_at`)."},"identities":{"type":"array","items":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"description":"How the contact appears on each channel."},"phones":{"type":"array","items":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"description":"Phone numbers (E.164), removed ones with `deleted_at`."},"emails":{"type":"array","items":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"description":"Email addresses, removed ones with `deleted_at`."},"companies":{"type":"array","items":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"description":"The companies the contact works at."},"notes":{"type":"array","items":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"description":"Members’ notes on the contact."},"merged_contacts":{"type":"array","items":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"description":"Contacts merged into this one."},"tickets":{"type":"array","items":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"description":"The contact’s tickets."},"messages":{"type":"array","items":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"description":"Every message of those tickets and every message the contact sent, oldest first, each with its attachments (`download`: the API path of the file), its earlier versions when the customer edited it on the channel (`earlier_versions`, oldest first, each with the time it was replaced: `replaced_at`) and when it was deleted at the provider (`deleted_at_provider`, `deleted_at_provider_scope`)."},"calls":{"type":"array","items":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"description":"The contact’s calls; `recording.download` and `voicemail.download` are the API paths that play them."},"web_chat_sessions":{"type":"array","items":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"description":"The contact’s web chat sessions and what they gave in them."},"consents":{"type":"array","items":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"description":"Always empty: Rabt keeps no consent records. The field stays so clients of the release before keep reading the export."},"campaign_messages":{"type":"array","items":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"description":"The campaign messages sent to the contact, with their outcome."},"reactions":{"type":"array","items":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"description":"The contact’s reactions to messages."}},"required":["format","version","generated_at","organization","contact","identities","phones","emails","companies","notes","merged_contacts","tickets","messages","calls","web_chat_sessions","consents","campaign_messages","reactions"],"additionalProperties":false},"ContactDetailUpdate":{"type":"object","properties":{"label":{"description":"A label such as \"mobile\" or \"work\".","anyOf":[{"type":"string","maxLength":50},{"type":"null"}]},"is_primary":{"type":"boolean"}},"additionalProperties":false},"ContactEmail":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"value":{"type":"string"},"label":{"type":["string","null"]},"is_primary":{"type":"boolean"}},"required":["id","value","label","is_primary"],"additionalProperties":false},"ContactEmailInput":{"type":"object","properties":{"value":{"type":"string","maxLength":320,"description":"An email address."},"label":{"description":"A label such as \"mobile\" or \"work\".","anyOf":[{"type":"string","maxLength":50},{"type":"null"}]},"is_primary":{"type":"boolean"}},"required":["value"],"additionalProperties":false},"ContactErasure":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"contact_id":{"type":"string","format":"uuid"},"trash_entry_id":{"type":"string","format":"uuid","description":"The contact’s entry in the trash."},"organization_deletion_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"status":{"$ref":"#/components/schemas/ContactErasureStatus"},"reason":{"type":"string","description":"Why; the contact’s own values in it are erased."},"requested_by_membership_id":{"type":"string","format":"uuid"},"requested_at":{"type":"string","format":"date-time"},"erase_after":{"type":"string","format":"date-time","description":"The end of the restore window."},"step":{"description":"The last step the job finished.","type":["string","null"]},"started_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"erased_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"withdrawn_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"withdrawn_reason":{"anyOf":[{"type":"string","enum":["restored","organization_deletion_withdrawn"]},{"type":"null"}]},"failure":{"anyOf":[{"$ref":"#/components/schemas/ErasureFailure"},{"type":"null"}]},"summary":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"number"},"description":"How many records of each kind the erasure changed."}},"required":["id","contact_id","trash_entry_id","organization_deletion_id","status","reason","requested_by_membership_id","requested_at","erase_after","step","started_at","erased_at","withdrawn_at","withdrawn_reason","failure","summary"],"additionalProperties":false},"ContactErasurePage":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/ContactErasure"}},"next_cursor":{"type":["string","null"]}},"required":["data","next_cursor"],"additionalProperties":false},"ContactErasureStatus":{"type":"string","enum":["scheduled","erasing","erased","withdrawn","failed"],"description":"`scheduled`: in the trash until `erase_after` (a restore before withdraws it); `erasing`: the job is erasing it; `erased`: done, for good; `withdrawn`: the contact came back inside the window, nothing was erased; `failed`: stopped at a step (`failure`), retried with POST …/retry."},"ContactExternalRecords":{"type":"object","properties":{"contact_id":{"type":"string","format":"uuid"},"groups":{"type":"array","items":{"type":"object","properties":{"source":{"type":"string"},"source_label":{"description":"The source named in both languages: the connected integration’s brand, a REST connector’s saved name, or the name registered for a push-API source (`PUT /v1/integrations/record-labels/source/{key}`); null when none (show `source` as written).","anyOf":[{"$ref":"#/components/schemas/ExternalRecordLabel"},{"type":"null"}]},"type":{"type":"string"},"type_label":{"description":"The record type named in both languages: the name registered for it (`PUT /v1/integrations/record-labels/type/{key}`), else Rabt’s own (customer, order, invoice, credit note and the other types integrations write); null when none (show `type` as written).","anyOf":[{"$ref":"#/components/schemas/ExternalRecordLabel"},{"type":"null"}]},"records":{"type":"array","items":{"$ref":"#/components/schemas/ExternalRecord"}}},"required":["source","type","records"],"additionalProperties":false}}},"required":["contact_id","groups"],"additionalProperties":false},"ContactIdentity":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"channel_type":{"$ref":"#/components/schemas/ChannelType"},"channel_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"external_id":{"type":"string","description":"The identity key on the channel: E.164, a WhatsApp business-scoped user id, an address, or the platform's id."},"display_name":{"type":["string","null"]},"username":{"type":["string","null"]},"verified":{"type":"boolean"},"photo_url":{"description":"Rabt's copy of the profile photo this channel gives (256 px WebP, refreshed at most daily on the customer's messages); null when the channel gives none (docs/12 \"Contact photo\").","type":["string","null"]},"first_seen_at":{"type":"string","format":"date-time"},"last_seen_at":{"type":"string","format":"date-time"}},"required":["id","channel_type","channel_id","external_id","display_name","username","verified","photo_url","first_seen_at","last_seen_at"],"additionalProperties":false},"ContactMergeResult":{"type":"object","properties":{"merge":{"$ref":"#/components/schemas/Merge"},"contact":{"$ref":"#/components/schemas/Contact"}},"required":["merge","contact"],"additionalProperties":false},"ContactName":{"type":"object","properties":{"name":{"type":"string"},"source":{"$ref":"#/components/schemas/ContactNameSource"},"system":{"description":"For `system`: the connected store's platform, or the push source.","type":["string","null"]},"channel_type":{"anyOf":[{"$ref":"#/components/schemas/ChannelType"},{"type":"null"}],"description":"For `channel`."},"seen_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]}},"required":["name","source","system","channel_type","seen_at"],"additionalProperties":false},"ContactNameSource":{"type":"string","enum":["member","system","channel","saved","merged"],"description":"Where a name comes from: `member` (written by a member; always wins), `system` (a connected store or system's customer record), `channel` (a channel profile), `saved` (saved automatically when the contact was created), `merged` (the name of a contact merged into this one; never the display name)."},"ContactNote":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"author_membership_id":{"type":"string","format":"uuid"},"body":{"type":"string"},"mentioned_membership_ids":{"type":"array","items":{"type":"string","format":"uuid"}},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"edited_at":{"description":"The latest edit; null: never edited.","anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"edited_by_membership_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"revision_count":{"description":"The versions kept, the original text included.","type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["id","author_membership_id","body","mentioned_membership_ids","created_at","updated_at"],"additionalProperties":false,"description":"An internal note on a contact."},"ContactNotePage":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/ContactNote"},"description":"Newest first."},"next_cursor":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"total":{"type":"integer","minimum":0,"maximum":10000,"description":"How many rows the list has with these filters, counted up to 10000."},"total_capped":{"type":"boolean","description":"The list has more than 10000 rows (`total` is 10000)."}},"required":["data","next_cursor","total","total_capped"],"additionalProperties":false},"ContactPage":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Contact"},"description":"Best match first, then newest first."},"next_cursor":{"description":"Pass as `cursor`; null on the last page.","type":["string","null"]},"total":{"type":"integer","minimum":0,"maximum":10000,"description":"How many rows the list has with these filters, counted up to 10000."},"total_capped":{"type":"boolean","description":"The list has more than 10000 rows (`total` is 10000)."}},"required":["data","next_cursor","total","total_capped"],"additionalProperties":false},"ContactPhone":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"value":{"type":"string"},"label":{"type":["string","null"]},"is_primary":{"type":"boolean"}},"required":["id","value","label","is_primary"],"additionalProperties":false,"description":"A phone number (E.164)."},"ContactPhoneInput":{"type":"object","properties":{"value":{"type":"string","maxLength":40,"description":"A phone number: international (`+966…`, `00966…`) or local to the organization's default country (`05…`). Read as E.164.","example":"+966 50 123 4567"},"label":{"description":"A label such as \"mobile\" or \"work\".","anyOf":[{"type":"string","maxLength":50},{"type":"null"}]},"is_primary":{"type":"boolean"}},"required":["value"],"additionalProperties":false},"ContactReport":{"type":"object","properties":{"from":{"type":"string","format":"date-time"},"to":{"type":"string","format":"date-time"},"interval":{"type":"string","enum":["none","day","week","month"]},"group_by":{"type":"string"},"rows":{"type":"array","items":{"type":"object","properties":{"bucket":{"description":"The first date (YYYY-MM-DD, UTC) of the day, week or month; null without `interval`.","type":["string","null"]},"key":{"description":"The group’s key; null: the none bucket (no space, no member…), `group_by` none, or `other`.","type":["string","null"]},"name":{"description":"The space’s, member’s or campaign’s name; null otherwise.","type":["string","null"]},"other":{"type":"boolean","description":"The sum of the smaller groups of this bucket."},"created":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Live contacts created (not deleted or merged)."}},"required":["bucket","key","name","other","created"],"additionalProperties":false}}},"required":["from","to","interval","group_by","rows"],"additionalProperties":false,"description":"The contacts aggregate of a period. Rows: without `interval` one row per group (the 100 largest, the rest in one `other: true` row); with `interval` (`day`, `week` from Monday, `month`; UTC; `bucket` is its first date) every bucket, zeros included, or with `group_by` the 10 largest groups' rows of each bucket plus one `other: true` row summing the rest. Every metric adds up across rows."},"ContactStoreRecords":{"type":"object","properties":{"contact_id":{"type":"string","format":"uuid"},"customers":{"type":"array","items":{"$ref":"#/components/schemas/StoreCustomer"}},"orders":{"type":"array","items":{"$ref":"#/components/schemas/StoreOrder"},"description":"The latest orders, newest first."}},"required":["contact_id","customers","orders"],"additionalProperties":false},"ConversationExport":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"The entry of the sensitive-access log."},"ticket_id":{"type":"string","format":"uuid"},"ticket_number":{"type":"integer","minimum":1,"maximum":9007199254740991},"format":{"type":"string","enum":["print"]},"recorded_at":{"type":"string","format":"date-time"}},"required":["id","ticket_id","ticket_number","format","recorded_at"],"additionalProperties":false,"description":"A ticket's conversation exported (printed or saved as PDF), as recorded."},"ConversationExportInput":{"type":"object","properties":{"format":{"type":"string","enum":["print"],"description":"`print`: printed, or saved as PDF from the system print dialog."}},"required":["format"],"additionalProperties":false},"CreateAiBlock":{"type":"object","properties":{"level":{"$ref":"#/components/schemas/AiLevel"},"channel_type":{"description":"For `channel_type` only.","anyOf":[{"$ref":"#/components/schemas/AiChannelType"},{"type":"null"}]},"channel_id":{"description":"The channel (or web chat widget): for `channel` and `kind`, and for `address` with a phone number.","anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"kind":{"description":"For `kind` only.","anyOf":[{"$ref":"#/components/schemas/AiKind"},{"type":"null"}]},"channel_address_id":{"description":"For `address`: an email address, app or location of the channel.","anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"phone_number_id":{"anyOf":[{"description":"For `address`: a phone number of the channel (instead of an address): its id, or the number in E.164.","anyOf":[{"type":"string","format":"uuid"},{"type":"string","pattern":"^[+][1-9][0-9]{1,14}$"}]},{"type":"null"}]},"title":{"type":"string","minLength":1,"maxLength":200},"content_markdown":{"type":"string","maxLength":50000,"description":"Markdown: knowledge (facts, prices, policies) or instructions."},"always_include":{"description":"Always sent in full, even when the blocks are large and only relevant parts are sent (default false).","type":"boolean"},"internal":{"description":"Guidance for the AI agent only (default false): it follows the block but never quotes or reveals it to a customer; a reply that repeats it is refused and the conversation goes to a member.","type":"boolean"},"active":{"description":"Sent to the AI agent (default true).","type":"boolean"},"sort_order":{"type":"integer","minimum":0,"maximum":100000,"description":"The block's place in its level, lowest first."}},"required":["level","title","content_markdown"],"additionalProperties":false},"CreateApiKey":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":100},"mode":{"description":"`live` (default) or `test`: a test key (`rbk_test_…`) works on the organization's separate test space, where messages are simulated, nothing reaches customers or providers, the wallet is never charged and webhooks are marked `test`.","$ref":"#/components/schemas/ApiMode"},"scopes":{"minItems":1,"maxItems":70,"type":"array","items":{"$ref":"#/components/schemas/Scope"}},"expires_at":{"description":"When the key stops working; absent or null: until it is revoked.","anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]}},"required":["name","scopes"],"additionalProperties":false},"CreateCampaign":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":120},"channel_type":{"type":"string","enum":["whatsapp","sms","voice","email","whatsapp_web"]},"segment_id":{"description":"The audience: a segment of contacts (docs/14).","anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"channel_id":{"description":"WhatsApp: the channel of the WhatsApp number it sends from.","anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"channel_address_id":{"description":"Email: one of the organization’s connected email addresses it sends from (`listCampaignSources`), through that mailbox’s own provider.","anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"phone_number_id":{"anyOf":[{"description":"Voice: the number it calls from (its id, or the number in E.164: its active number with it).","anyOf":[{"type":"string","format":"uuid"},{"type":"string","pattern":"^[+][1-9][0-9]{1,14}$"}]},{"type":"null"}]},"sender_name_id":{"description":"SMS: an approved promotional sender name (ending in `-AD`).","anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"scheduled_at":{"description":"When to send (in the future, `CAMP-6309`); null sends at launch. KSA sending hours still apply.","anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"content":{"anyOf":[{"$ref":"#/components/schemas/CampaignWhatsappContentInput"},{"$ref":"#/components/schemas/CampaignSmsContentInput"},{"$ref":"#/components/schemas/CampaignWhatsappWebContentInput"},{"$ref":"#/components/schemas/CampaignEmailContentInput"},{"$ref":"#/components/schemas/CampaignVoiceContentInput"}],"description":"The content of the campaign’s channel (the fields of another channel are refused with `API-8001`)."},"client_key":{"type":"string","pattern":"^[A-Za-z0-9._~-]{1,100}$","description":"Your key for this campaign (letters, digits, `. _ ~ -`, up to 100): creating again with it returns the campaign it made."}},"required":["name","channel_type"],"additionalProperties":false},"CreateCannedReply":{"type":"object","properties":{"scope":{"$ref":"#/components/schemas/CannedReplyScope"},"space_id":{"description":"Required for a space reply.","type":"string","format":"uuid"},"title":{"type":"string","minLength":1,"maxLength":120},"body":{"type":"string","minLength":1,"maxLength":10000}},"required":["scope","title","body"],"additionalProperties":false},"CreateChatGroup":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":100},"member_ids":{"default":[],"description":"The members invited with you (you are added as its manager).","maxItems":500,"type":"array","items":{"type":"string","format":"uuid"}}},"required":["name"],"additionalProperties":false},"CreateChatIncomingWebhook":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":160,"description":"How the service appears in the room (1 to 80 characters, one line)."},"icon":{"description":"One emoji shown as its picture; absent or null shows its initial.","anyOf":[{"type":"string","minLength":1,"maxLength":32},{"type":"null"}]}},"required":["name"],"additionalProperties":false},"CreateCompany":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200},"logo_url":{"anyOf":[{"type":"string","maxLength":2048,"format":"uri","description":"An https URL.","example":"https://cdn.example.com/avatar.png"},{"type":"null"}]},"phone":{"description":"The company's phone number, read as E.164 like contacts' numbers.","anyOf":[{"type":"string","maxLength":40},{"type":"null"}]},"website":{"anyOf":[{"type":"string","maxLength":2048,"format":"uri","description":"The website, http or https.","example":"https://acme.sa"},{"type":"null"}]},"address":{"anyOf":[{"$ref":"#/components/schemas/CompanyAddress"},{"type":"null"}]},"industry":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}]},"owner_membership_id":{"description":"The account owner: the member responsible for this company.","anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"domains":{"maxItems":20,"type":"array","items":{"type":"string","maxLength":260,"description":"An email domain of the company, e.g. `acme.com` (never a public email provider)."}}},"required":["name"],"additionalProperties":false},"CreateContact":{"type":"object","properties":{"name":{"anyOf":[{"type":"string","minLength":1,"maxLength":200},{"type":"null"}]},"avatar_url":{"anyOf":[{"type":"string","maxLength":2048,"format":"uri","description":"An https URL.","example":"https://cdn.example.com/avatar.png"},{"type":"null"}]},"phones":{"maxItems":20,"type":"array","items":{"$ref":"#/components/schemas/ContactPhoneInput"}},"emails":{"maxItems":20,"type":"array","items":{"$ref":"#/components/schemas/ContactEmailInput"}},"if_exists":{"description":"When a phone number or email address already belongs to a contact: `refuse` (the default) answers CRM-6003/CRM-6004 with `existing_contact_id`; `return` answers that contact, unchanged (200 instead of 201), when every such value belongs to it. A duplicate is never created and contacts are never merged.","type":"string","enum":["refuse","return"]}},"additionalProperties":false,"description":"A new contact needs at least a name, a phone number or an email address."},"CreateExport":{"type":"object","properties":{"entity":{"$ref":"#/components/schemas/CrmListEntity"},"segment_id":{"description":"Export what this segment lists.","type":"string","format":"uuid"},"filter":{"description":"Export what this filter lists (not with `segment_id`).","$ref":"#/components/schemas/SegmentFilter"}},"required":["entity"],"additionalProperties":false,"description":"Without `segment_id` or `filter`, every live record of the entity."},"CreateImport":{"type":"object","properties":{"file_name":{"type":"string","minLength":1,"maxLength":255,"description":"The file name (no folders).","example":"contacts.csv"},"content":{"description":"The CSV file as text (UTF-8, comma-separated, header row first; at most 10 MB and 50,000 rows). Columns: `name`, `phone`, `email` (several separated by `;`, the first one primary) and `company` (a company name: linked, or created when none has it). Columns an export writes (`id`, `channels`, `last_activity_at`, `created_at`) and the `tags` and `custom.<key>` columns of earlier files are read past. Send this or `content_base64`.","type":"string","minLength":1},"content_base64":{"description":"The file's bytes in base64: an Excel workbook (.xlsx; its first sheet is read, with the same columns) or a UTF-8 CSV. Send this or `content`.","type":"string","minLength":1,"maxLength":13981016,"format":"base64","contentEncoding":"base64","pattern":"^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$"}},"required":["file_name"],"additionalProperties":false},"CreateInvitation":{"type":"object","properties":{"identifier":{"description":"An email address or a phone number, detected from the text: a first digit, `+` or `(` starts a phone number (international form with `+` or `00` and the calling code, or a Saudi number such as `05` followed by 8 digits; read as E.164) unless a letter or `@` follows; anything else is an email address (read lower-cased). Arabic-Indic digits are accepted.","type":"string","maxLength":254},"email":{"description":"An email address (or use `identifier`).","format":"email","type":"string","maxLength":320},"phone":{"description":"A phone number (or use `identifier`).","type":"string","maxLength":32},"name":{"type":"string","minLength":1,"maxLength":100,"description":"The invited person's name: their name in this organization once they accept (suggested for their account)."},"job_title":{"type":"string","minLength":1,"maxLength":100,"description":"The invited person's job title in this organization (email signatures), given to them when they accept."},"role_id":{"type":"string","format":"uuid","description":"The role the person gets (not the Owner role)."}},"required":["role_id"],"additionalProperties":false,"description":"Exactly one of `identifier` (an email address or a phone number, read like the sign-in field), `email` and `phone` (`AUTH-1059` otherwise)."},"CreateNote":{"type":"object","properties":{"body":{"type":"string","minLength":1,"maxLength":10000},"mentioned_membership_ids":{"maxItems":50,"type":"array","items":{"type":"string","format":"uuid"},"description":"The members (membership ids) mentioned in the note."}},"required":["body"],"additionalProperties":false},"CreateOAuthApp":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":100},"description":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}]},"homepage_url":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}]},"redirect_uris":{"minItems":1,"maxItems":10,"type":"array","items":{"type":"string","minLength":1,"maxLength":2000},"description":"Exact redirect URIs: https, http on a loopback address (any port), or a reverse domain name scheme of a native app."},"client_type":{"type":"string","enum":["public","confidential"],"description":"`public`: an app that cannot keep a secret (native, browser, MCP client), PKCE only. `confidential`: a server app with a secret."}},"required":["name","redirect_uris","client_type"],"additionalProperties":false},"CreateRecordConnector":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200},"source":{"type":"string","pattern":"^[a-z0-9][a-z0-9_.-]{0,62}$","description":"The `source` of the records it writes."},"record_type":{"type":"string","pattern":"^[a-z0-9][a-z0-9_.-]{0,62}$","description":"The `type` of the records it writes."},"config":{"$ref":"#/components/schemas/RecordConnectorConfig"},"secrets":{"$ref":"#/components/schemas/RecordConnectorSecrets"},"sync_interval_minutes":{"description":"Minutes between scheduled runs (15 to 10080, default 60).","type":"integer","minimum":15,"maximum":10080}},"required":["name","source","record_type","config"],"additionalProperties":false},"CreateSegment":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":120},"entity":{"$ref":"#/components/schemas/CrmListEntity"},"filter":{"$ref":"#/components/schemas/SegmentFilter"}},"required":["name","entity","filter"],"additionalProperties":false},"CreateSegmentImport":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":120,"description":"The new segment’s name (unique)."},"file_name":{"type":"string","minLength":1,"maxLength":255,"description":"The file name (no folders).","example":"contacts.csv"},"content":{"description":"The CSV file as text (UTF-8, comma-separated, header row first; at most 10 MB and 50,000 rows). Columns: `name`, `phone`, `email` (several separated by `;`, the first one primary) and `company` (a company name: linked, or created when none has it). Columns an export writes (`id`, `channels`, `last_activity_at`, `created_at`) and the `tags` and `custom.<key>` columns of earlier files are read past. Send this or `content_base64`.","type":"string","minLength":1},"content_base64":{"description":"The file's bytes in base64: an Excel workbook (.xlsx; its first sheet is read, with the same columns) or a UTF-8 CSV. Send this or `content`.","type":"string","minLength":1,"maxLength":13981016,"format":"base64","contentEncoding":"base64","pattern":"^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$"}},"required":["name","file_name"],"additionalProperties":false},"CreateSenderBlock":{"type":"object","properties":{"kind":{"type":"string","enum":["phone","email","handle","ip"],"description":"`phone` (a number; local numbers are read in the organization’s country), `email`, `handle` (an id or user name on `channel_type`), or `ip` (an address or network such as `203.0.113.0/24`, for the web chat)."},"value":{"type":"string","minLength":1,"maxLength":320},"channel_type":{"description":"Required for a `handle`: its channel.","type":"string","enum":["facebook","instagram","x","tiktok","youtube"]},"note":{"type":"string","maxLength":500}},"required":["kind","value"],"additionalProperties":false},"CreateSmsOptOut":{"type":"object","properties":{"phone":{"type":"string","pattern":"^\\+[1-9]\\d{6,14}$","description":"A mobile number in E.164, e.g. `+966500000000`."},"source":{"description":"`recipient_request` (the recipient asked, by any channel), `member` (the default for members) or `api`.","type":"string","enum":["recipient_request","member","api"]},"note":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}]}},"required":["phone"],"additionalProperties":false},"CreateSpace":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":100},"description":{"type":"string","maxLength":2000,"description":"What the space handles; the AI agent routes by name and description."},"returning_customer_days":{"type":"integer","minimum":1,"maximum":365,"description":"A returning customer goes to the member of their last ticket within these days (default 30)."},"no_agent_message":{"anyOf":[{"type":"string","maxLength":4000},{"type":"null"}],"description":"The automatic reply when a ticket enters the queue and nobody is available; null or empty: none."}},"required":["name"],"additionalProperties":false},"CreateSpamEntry":{"type":"object","properties":{"value":{"type":"string","minLength":1,"maxLength":320,"description":"An email address, an email domain (`@company.com` or `company.com`; never a public provider’s), or a phone number (local numbers are read in the organization’s country); with `channel_type`, a handle (an id or user name) on that channel."},"channel_type":{"description":"For a handle: its channel. On `whatsapp` only the business-scoped user id of a customer with no number (`SA.1350018230495`; also read without `channel_type`); `voice`, `sms` and a number on `whatsapp` are refused (`TKT-6230`): those senders go on the list by number, which covers their WhatsApp messages and calls.","type":"string","enum":["whatsapp","facebook","instagram","x","tiktok","email","voice","sms","webchat","webform","app_store","google_business","google_play","whatsapp_web","youtube","salla_reviews","zid_questions","zid_reviews","zid_portal"]}},"required":["value"],"additionalProperties":false},"CreateTicket":{"type":"object","properties":{"contact_id":{"type":"string","format":"uuid"},"channel_type":{"$ref":"#/components/schemas/ChannelType"},"channel_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"channel_address_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"phone_number_id":{"anyOf":[{"description":"The phone number it is on (voice; id or E.164); with the channel and address, it picks the space.","anyOf":[{"type":"string","format":"uuid"},{"type":"string","pattern":"^[+][1-9][0-9]{1,14}$"}]},{"type":"null"}]},"subject":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}]},"note":{"deprecated":true,"description":"Deprecated: the apps no longer show the ticket's free-text note; use an internal note (`POST /v1/tickets/{ticketId}/messages` with `mode: note`) or the customer's notes. Still accepted and returned (free text up to 100 characters; empty or null clears it).","anyOf":[{"type":"string","maxLength":100},{"type":"null"}]},"type":{"deprecated":true,"description":"Deprecated: use `note`. Taken as `note` when `note` is left out.","anyOf":[{"type":"string","maxLength":100},{"type":"null"}]},"priority":{"deprecated":true,"description":"Deprecated: accepted and ignored (no built-in priority; set a classification option instead, `classifications`). The ticket keeps the priority it has.","type":"string","enum":["low","normal","high"]},"recipient":{"description":"Whom it goes to (a start option, `GET /v1/tickets/start-options`): one of the contact’s email addresses (email), phone numbers (WhatsApp, SMS, voice) or channel identities (other channels). Replies go there until the customer writes from elsewhere; `TKT-6140` when it is not the contact’s or not on this channel.","anyOf":[{"type":"object","properties":{"email":{"type":"string","maxLength":320,"format":"email"}},"required":["email"],"additionalProperties":false},{"type":"object","properties":{"phone":{"type":"string","pattern":"^\\+[1-9]\\d{6,14}$"}},"required":["phone"],"additionalProperties":false},{"type":"object","properties":{"identity_id":{"type":"string","format":"uuid"}},"required":["identity_id"],"additionalProperties":false}]},"first_message":{"$ref":"#/components/schemas/FirstMessage"}},"required":["contact_id","channel_type","first_message"],"additionalProperties":false,"description":"A ticket a member starts for a contact on a channel, with its first reply or internal note (required: without it nothing is created)."},"CreateTicketClassificationList":{"type":"object","properties":{"name":{"type":"string","maxLength":200,"description":"Up to 50 characters, trimmed with spaces collapsed (`TKT-6239`); unique ignoring case and Arabic spelling."},"options":{"description":"Its first options, in order (up to 100: `TKT-6238`; each name once: `TKT-6236`).","maxItems":200,"type":"array","items":{"type":"string","maxLength":200,"description":"Up to 50 characters, trimmed with spaces collapsed (`TKT-6239`); unique ignoring case and Arabic spelling."}}},"required":["name"],"additionalProperties":false},"CreateTicketTag":{"type":"object","properties":{"name":{"type":"string","maxLength":200,"description":"Up to 50 characters, trimmed with spaces collapsed (`TKT-6239`); unique ignoring case and Arabic spelling."}},"required":["name"],"additionalProperties":false},"CreateTopUp":{"type":"object","properties":{"amount":{"type":"integer","minimum":5000,"maximum":999999999999999,"description":"Halalas (SAR minor units), at least 5000 (SAR 50). Rabt sets no maximum: the schema's maximum is only the largest amount the payment provider can be sent exactly. The card's bank or the payment provider may refuse an amount above its own limits (`WAL-1204`, `WAL-1203`, or `WAL-1999` with the provider's own code and message).","example":50000},"payment":{"oneOf":[{"$ref":"#/components/schemas/TopUpCardToken"},{"$ref":"#/components/schemas/TopUpSavedCard"}],"description":"How the top-up is paid."}},"required":["amount","payment"],"additionalProperties":false},"CreateVoiceProviderConnection":{"type":"object","properties":{"name":{"default":null,"anyOf":[{"type":"string","minLength":1,"maxLength":100},{"type":"null"}],"description":"What you call the connection; null shows its addresses."},"authentication":{"default":"registration","type":"string","enum":["address","registration"],"description":"How your provider and Rabt recognise each other: `registration` (default: Rabt registers each number’s account to the provider’s registrar, so Rabt needs no fixed address with the provider) or `address` (the provider’s addresses, or your organization’s SIP credentials): a new connection by address, or switching one to it, is made by the Rabt team on request (`VOI-4576`)."},"registrar":{"default":null,"anyOf":[{"type":"string","maxLength":253,"pattern":"^(([a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?\\.)+[a-z]{2,63}|([0-9]{1,3}\\.){3}[0-9]{1,3})$"},{"type":"null"}],"description":"The provider’s registrar (host name or IPv4 address) for `registration`, reached on the connection’s port and transport; null for `address`. The accounts are registered in `from_domain`, else Rabt’s Saudi SIP domain, and its calls may name an account by its username."},"addresses":{"description":"The provider’s public IPv4 addresses or ranges (/24 or narrower), signaling and media in one list. Outbound calls go to its single addresses, in any order: the one that answers takes the call, the others on failure. Empty when the provider authenticates with your organization’s SIP credentials instead.","maxItems":16,"type":"array","items":{"anyOf":[{"type":"string","format":"ipv4"},{"type":"string","format":"cidrv4","pattern":"^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\\/([0-9]|[1-2][0-9]|3[0-2])$"}]}},"transport":{"default":"udp","type":"string","enum":["udp","tcp","tls"],"description":"The signaling transport to the provider: `udp` (default), `tcp` or `tls`."},"port":{"type":"integer","minimum":1,"maximum":65535,"description":"The provider’s SIP port (default 5060, 5061 for `tls`)."},"codecs":{"default":["PCMA","PCMU"],"minItems":1,"maxItems":3,"type":"array","items":{"type":"string","enum":["PCMA","PCMU","G722"]},"description":"The codecs offered to the provider, in order (default `PCMA`, `PCMU`)."},"international_prefix":{"default":"00","type":"string","pattern":"^[0-9]{2,4}$","description":"The international prefix read on numbers the provider sends nationally (default `00`). Rabt sends every number in E.164."},"country":{"default":"SA","type":"string","pattern":"^[A-Z]{2}$","description":"The country of national numbers (default `SA`)."},"from_domain":{"default":null,"anyOf":[{"type":"string","minLength":4,"maxLength":253,"pattern":"^([a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?\\.)+[a-z]{2,63}$"},{"type":"null"}],"description":"Only if your provider requires its own domain in the From header; null uses Rabt’s Saudi SIP domain."},"max_channels":{"default":30,"type":"integer","minimum":1,"maximum":10000,"description":"The concurrent calls your provider allows on this connection (default 30)."},"outbound_username":{"default":null,"anyOf":[{"type":"string","pattern":"^[\\x21-\\x7e]{1,128}$"},{"type":"null"}],"description":"The username Rabt gives when your provider asks it to authenticate on outgoing calls; null when it does not."},"outbound_password":{"type":"string","pattern":"^[\\x21-\\x7e]{1,128}$","description":"The password for `outbound_username` (stored encrypted, never shown again)."}},"additionalProperties":false},"CreateWebchatWidget":{"type":"object","properties":{"name":{"description":"The name visitors see in the widget header and members see in Rabt. Left out: the organization’s name, numbered after the first.","type":"string","minLength":1,"maxLength":100},"header_color":{"type":"string","enum":["sidebar","teal","plum","sand"]},"pre_chat":{"type":"object","properties":{"enabled":{"description":"The pre-chat form: on, a visitor gives a name and an email or a mobile number before chatting.","type":"boolean"},"name":{"deprecated":true,"description":"Deprecated: accepted and ignored.","type":"string","enum":["hidden","optional","required"]},"email":{"deprecated":true,"description":"Deprecated: accepted and ignored.","type":"string","enum":["hidden","optional","required"]},"phone":{"deprecated":true,"description":"Deprecated: accepted and ignored.","type":"string","enum":["hidden","optional","required"]}},"additionalProperties":false},"privacy_policy_url":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"description":"Your privacy policy page (https), linked in the widget before a conversation starts (docs/08, PDPL); `null` or empty links the Rabt privacy policy. `WEB-4021` for an address that is not https."},"greeting":{"deprecated":true,"description":"Deprecated: accepted and ignored. The widget greets every visitor with a fixed text in their language.","type":"object","properties":{"ar":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}]},"en":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}]}},"additionalProperties":false},"business_name":{"deprecated":true,"description":"Deprecated: accepted and ignored. The widget has one name, `name`, which visitors see.","anyOf":[{"type":"string","maxLength":100},{"type":"null"}]},"allowed_domains":{"deprecated":true,"description":"Deprecated: accepted and ignored. A widget loads on any website.","maxItems":50,"type":"array","items":{"type":"string","maxLength":300}},"default_locale":{"deprecated":true,"description":"Deprecated: accepted and ignored. The widget follows the visitor’s browser language.","type":"string","enum":["ar","en"]},"position":{"deprecated":true,"description":"Deprecated: accepted and ignored. Bottom-left in Arabic, bottom-right in English.","type":"string","enum":["left","right"]}},"additionalProperties":false},"CreateWebForm":{"type":"object","properties":{"name":{"description":"What members recognize it by; default «نموذج الموقع» (or \"Web form\", the organization’s language), numbered when taken.","type":"string","minLength":1,"maxLength":200}},"additionalProperties":false},"CreateWebhookEndpoint":{"type":"object","properties":{"url":{"type":"string","minLength":1,"maxLength":2000,"description":"A public https address."},"description":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}]},"event_types":{"minItems":1,"maxItems":1000,"type":"array","items":{"type":"string","minLength":1,"maxLength":100}},"secret":{"description":"Your own signing secret (Standard Webhooks: `whsec_` and 24 to 64 random bytes in base64); never returned. Leave it out and Rabt generates one, returned once.","type":"string","maxLength":200}},"required":["url","event_types"],"additionalProperties":false},"CreateWhatsappTemplate":{"type":"object","properties":{"name":{"type":"string","pattern":"^[a-z0-9_]{1,512}$"},"language":{"type":"string","pattern":"^[a-z]{2,3}(_[A-Za-z]{2,4})?$"},"category":{"type":"string","enum":["marketing","utility","authentication"]},"parameter_format":{"default":"positional","type":"string","enum":["positional","named"]},"components":{"minItems":1,"maxItems":10,"type":"array","items":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["HEADER"]},"format":{"type":"string","enum":["TEXT","IMAGE","VIDEO","DOCUMENT","LOCATION"]},"text":{"type":"string","maxLength":60},"example":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["type","format"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["BODY"]},"text":{"type":"string","maxLength":1024},"add_security_recommendation":{"type":"boolean"},"example":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["FOOTER"]},"text":{"type":"string","maxLength":60},"code_expiration_minutes":{"type":"integer","minimum":1,"maximum":90}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["BUTTONS"]},"buttons":{"minItems":1,"maxItems":10,"type":"array","items":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["QUICK_REPLY"]},"text":{"type":"string","minLength":1,"maxLength":25}},"required":["type","text"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["URL"]},"text":{"type":"string","minLength":1,"maxLength":25},"url":{"type":"string","maxLength":2000,"pattern":"^https:\\/\\/"},"example":{"maxItems":1,"type":"array","items":{"type":"string","maxLength":2000}}},"required":["type","text","url"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["PHONE_NUMBER"]},"text":{"type":"string","minLength":1,"maxLength":25},"phone_number":{"type":"string","pattern":"^\\+?[1-9]\\d{6,14}$"}},"required":["type","text","phone_number"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["COPY_CODE"]},"example":{"type":"string","maxLength":15}},"required":["type","example"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["OTP"]},"otp_type":{"type":"string","enum":["COPY_CODE","ONE_TAP","ZERO_TAP"]},"text":{"type":"string","maxLength":25},"autofill_text":{"type":"string","maxLength":25},"package_name":{"type":"string","maxLength":200},"signature_hash":{"type":"string","maxLength":40}},"required":["type","otp_type"],"additionalProperties":false}]}}},"required":["type","buttons"],"additionalProperties":false}]}}},"required":["name","language","category","components"],"additionalProperties":false,"description":"A template in Meta's component format (HEADER, BODY, FOOTER, BUTTONS). Buttons: quick reply, URL, phone number, copy code, one-time password; interactive Flow and catalog buttons are not offered."},"CrmImportErrorPreview":{"type":"object","properties":{"header":{"type":"array","items":{"type":"string"}},"row_count":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Rows with errors, in all."},"groups":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"title":{"type":"string"},"row_count":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["code","title","row_count"],"additionalProperties":false},"description":"By reason, most rows first."},"rows":{"type":"array","items":{"type":"object","properties":{"row":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991,"description":"Row number (1: first after the header)."},"cells":{"type":"array","items":{"type":"string"},"description":"The row, by `header`."},"errors":{"type":"array","items":{"type":"object","properties":{"column":{"type":["string","null"]},"code":{"type":"string"},"message":{"type":"string"}},"required":["column","code","message"],"additionalProperties":false}}},"required":["row","cells","errors"],"additionalProperties":false},"description":"The first rows with errors."}},"required":["header","row_count","groups","rows"],"additionalProperties":false},"CrmListEntity":{"type":"string","enum":["contacts","companies"],"description":"What a segment or a transfer lists."},"CrmSettings":{"type":"object","properties":{"auto_link_companies_by_domain":{"type":"boolean","deprecated":true,"description":"Deprecated, always `true`: contacts are always linked to the company that owns their email domain, and the company of a domain two contacts share is created automatically.","enum":[true]},"erasure_window_days":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"The restore window of an erasure, in days (fixed): a contact whose personal data is to be erased stays in the trash this long, restorable, and the deletion of the organization waits this long."}},"required":["auto_link_companies_by_domain","erasure_window_days"],"additionalProperties":false},"CrmSettingsInput":{"type":"object","properties":{"auto_link_companies_by_domain":{"type":"boolean","deprecated":true,"description":"Deprecated: linking contacts to the company that owns their email domain, and creating the company of a domain two contacts share, always run. `true` is accepted and changes nothing; `false` is refused (`CRM-6059`)."}},"required":["auto_link_companies_by_domain"],"additionalProperties":false},"CrmTransfer":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"kind":{"type":"string","enum":["import","export"]},"entity":{"$ref":"#/components/schemas/CrmListEntity"},"status":{"type":"string","enum":["validating","validated","importing","exporting","completed","failed"],"description":"An import: `validating` (its rows are being checked), `validated` (checked: start it; with errors, choose `import_valid_rows` or fix the file), `importing`, `completed` or `failed`. An export: `exporting`, `completed` or `failed`."},"file_name":{"type":"string"},"filter":{"anyOf":[{"$ref":"#/components/schemas/SegmentFilter"},{"type":"null"}],"description":"An export's filter."},"segment_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"description":"The segment an import’s contacts join (a segment from a file: it runs at once, rows with errors left out)."},"total_rows":{"type":"integer","minimum":0,"maximum":9007199254740991},"processed_rows":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Progress of the current step."},"created_count":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Records created (after the check of an import: records it would create)."},"updated_count":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Contacts completed by an import, matched by phone or email (after the check: that it would update)."},"error_count":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Rows with errors (after the check: rows that would be set aside; after the import: rows left out). See `/errors` and `/error-preview`."},"failure":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"reference":{"type":["string","null"]}},"required":["code","reference"],"additionalProperties":false},{"type":"null"}],"description":"Why it failed: the error code and its reference."},"requested_by_membership_id":{"type":"string","format":"uuid"},"confirmed_by_membership_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"created_at":{"type":"string","format":"date-time"},"confirmed_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"finished_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]}},"required":["id","kind","entity","status","file_name","filter","segment_id","total_rows","processed_rows","created_count","updated_count","error_count","failure","requested_by_membership_id","confirmed_by_membership_id","created_at","confirmed_at","finished_at"],"additionalProperties":false,"description":"An import (CSV or Excel) or a CSV export (docs/12)."},"CrmTransferPage":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/CrmTransfer"},"description":"Newest first."},"next_cursor":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"description":"Pass as `cursor`; null on the last page."},"total":{"type":"integer","minimum":0,"maximum":10000,"description":"How many rows the list has with these filters, counted up to 10000."},"total_capped":{"type":"boolean","description":"The list has more than 10000 rows (`total` is 10000)."}},"required":["data","next_cursor","total","total_capped"],"additionalProperties":false},"CsvFile":{"type":"object","properties":{"file_name":{"type":"string"},"content_type":{"type":"string","enum":["text/csv; charset=utf-8"]},"content":{"type":"string","description":"The CSV file (UTF-8 with a byte order mark)."}},"required":["file_name","content_type","content"],"additionalProperties":false},"CustomerData":{"type":"object","properties":{"contact_id":{"type":"string","format":"uuid"},"header":{"type":"object","properties":{"names":{"type":"array","items":{"$ref":"#/components/schemas/CustomerDataValue"}},"phones":{"type":"array","items":{"$ref":"#/components/schemas/CustomerDataValue"}},"emails":{"type":"array","items":{"$ref":"#/components/schemas/CustomerDataValue"}},"addresses":{"type":"array","items":{"type":"object","properties":{"address":{"$ref":"#/components/schemas/RecordAddress"},"sources":{"type":"array","items":{"type":"string"}}},"required":["address","sources"],"additionalProperties":false}}},"required":["names","phones","emails","addresses"],"additionalProperties":false},"systems":{"type":"array","items":{"$ref":"#/components/schemas/CustomerDataSystem"}},"connected":{"type":"boolean","description":"The organization has a customer-data system (an integration not disconnected, a REST connector or pushed records), whether or not it has data of this contact."},"loaded_in_ms":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"How long the saved data took to load."},"budget_ms":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"The load budget (exceeding it is recorded)."}},"required":["contact_id","header","systems","connected","loaded_in_ms","budget_ms"],"additionalProperties":false},"CustomerDataRecord":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"source":{"type":"string"},"type":{"type":"string"},"external_id":{"type":"string"},"connector_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"description":"The connector that read it; null when pushed."},"kind":{"type":"string","enum":["customer","order","invoice","record"]},"integration_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"description":"The connected store or system it was read from (its `source` is `<adapter>.<integration id>`); null when pushed or read by a connector."},"presentment":{"anyOf":[{"$ref":"#/components/schemas/ExternalRecordMoney"},{"type":"null"}],"description":"The amount in the currency the customer paid in, when kept."},"masked":{"type":"boolean","description":"The system hides who the customer is (e.g. marketplace orders): it is never matched to a contact."},"merged_into_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"description":"The record its system merged it into (it is then deleted)."},"addresses":{"type":"array","items":{"$ref":"#/components/schemas/RecordAddress"}},"title":{"type":"string"},"status":{"type":["string","null"]},"status_label":{"description":"The status named in both languages, for a record a connected system wrote with a status its integration declares; null for a pushed or connector record or any other status (show `status` as written).","anyOf":[{"$ref":"#/components/schemas/ExternalRecordLabel"},{"type":"null"}]},"amount":{"anyOf":[{"$ref":"#/components/schemas/ExternalRecordMoney"},{"type":"null"}]},"starts_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"ends_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"url":{"type":["string","null"]},"fields":{"type":"array","items":{"$ref":"#/components/schemas/ExternalRecordField"}},"phones":{"type":"array","items":{"type":"string"},"description":"E.164."},"emails":{"type":"array","items":{"type":"string"}},"external_updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"synced_at":{"type":"string","format":"date-time"},"deleted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"Set when deleted (Rabt keeps the row)."},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"document":{"type":"boolean","description":"Its official document (the system’s PDF of an invoice, credit note or quote) can be downloaded now with `getRecordDocument`."},"payment":{"anyOf":[{"type":"string","enum":["paid","unpaid","overdue"]},{"type":"null"}],"description":"An invoice’s payment state from what is left to pay (its `balance` field) and its `due_date`; null for anything else."},"order":{"description":"A connected store’s order in full: its lines, shipments with their tracking events, and status history; null for any other record.","anyOf":[{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/StoreOrderItem"}},"shipments":{"type":"array","items":{"$ref":"#/components/schemas/StoreShipment"}},"history":{"type":"array","items":{"$ref":"#/components/schemas/StoreTimelineEntry"},"description":"Every change of the order’s status, newest first."}},"required":["items","shipments","history"],"additionalProperties":false},{"type":"null"}]}},"required":["id","source","type","external_id","connector_id","kind","integration_id","presentment","masked","merged_into_id","addresses","title","status","amount","starts_at","ends_at","url","fields","phones","emails","external_updated_at","synced_at","deleted_at","created_at","updated_at","document","payment"],"additionalProperties":false},"CustomerDataRefresh":{"type":"object","properties":{"outcomes":{"type":"array","items":{"type":"object","properties":{"integration_id":{"type":"string","format":"uuid"},"name":{"type":"string"},"adapter":{"type":"string"},"state":{"type":"string","enum":["fresh","refreshed","failed","not_supported"],"description":"`fresh`: nothing stale to re-read; `refreshed`: re-read now; `failed`: the system did not answer in time or refused (see `error`); `not_supported`: Rabt cannot re-read it (not working, or its platform cannot find a customer’s orders)."},"written":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Records the re-read wrote."},"error":{"anyOf":[{"$ref":"#/components/schemas/IntegrationError"},{"type":"null"}]}},"required":["integration_id","name","adapter","state","written","error"],"additionalProperties":false}},"data":{"$ref":"#/components/schemas/CustomerData"}},"required":["outcomes","data"],"additionalProperties":false},"CustomerDataSystem":{"type":"object","properties":{"source":{"type":"string","description":"The records’ source key (`<adapter>.<integration id>` for an integration)."},"integration_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"adapter":{"description":"The platform, e.g. `salla`.","type":["string","null"]},"name":{"type":"string","description":"The store’s name, or the source key."},"label":{"description":"The platform’s name (a brand).","type":["string","null"]},"synced_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"When its newest record of the contact was read."},"stale":{"type":"boolean","description":"Its newest record is older than 15 minutes: re-read by `refresh`."},"refreshable":{"type":"boolean","description":"Rabt can re-read this system now."},"records":{"type":"array","items":{"$ref":"#/components/schemas/CustomerDataRecord"},"description":"Newest first, at most 10; an order’s address only when it differs from the customer’s own."},"more":{"type":"boolean","description":"More records than shown."}},"required":["source","integration_id","adapter","name","label","synced_at","stale","refreshable","records","more"],"additionalProperties":false},"CustomerDataValue":{"type":"object","properties":{"value":{"type":"string"},"sources":{"type":"array","items":{"type":"string"},"description":"The `source` keys of the systems that give this value (shown when systems disagree)."}},"required":["value","sources"],"additionalProperties":false},"CustomerDestination":{"type":"object","properties":{"destination":{"$ref":"#/components/schemas/RoutingDestination"}},"required":["destination"],"additionalProperties":false,"description":"Where a contact's or company's new tickets go before their channel's destination: `all` (no route of its own: it follows its channel), one space or one member (while that member cannot take it, its channel's destination)."},"CustomerMessagesInbox":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"ticket":{"$ref":"#/components/schemas/Ticket"},"messages":{"type":"array","items":{"$ref":"#/components/schemas/Message"},"description":"What the customer wrote after the cursor, oldest first."}},"required":["ticket","messages"],"additionalProperties":false}},"next_cursor":{"type":"string","description":"Pass it as `cursor` to wait for the next ones."},"has_more":{"type":"boolean","description":"More follow: call again at once."}},"required":["data","next_cursor","has_more"],"additionalProperties":false},"CustomerRoute":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"kind":{"type":"string","enum":["email","phone","domain","contact","company"]},"value":{"description":"The email address, number (E.164) or domain; null for a contact or company.","type":["string","null"]},"contact":{"anyOf":[{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false},{"type":"null"}]},"company":{"anyOf":[{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false},{"type":"null"}]},"created_at":{"type":"string","format":"date-time"}},"required":["id","kind","value","contact","company","created_at"],"additionalProperties":false,"description":"A customer routed to a space: their new tickets go there before their channel's destination."},"CustomerRouteList":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/CustomerRoute"}}},"required":["data"],"additionalProperties":false},"CustomersListState":{"type":"object","properties":{"tab":{"type":"string","enum":["contacts","companies","segments"],"description":"The open tab."},"channel_type":{"description":"Contacts only: the channel the list is filtered by.","$ref":"#/components/schemas/ChannelType"},"segment_id":{"description":"The open segment.","type":"string","format":"uuid"}},"required":["tab"],"additionalProperties":false,"description":"How the member left the customers list: its tab, its filters, the open segment."},"DataExport":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"kind":{"type":"string","enum":["tickets","messages","contacts","companies","calls","campaign_recipients","wallet_transactions","audit_log"]},"format":{"type":"string","enum":["csv","ndjson"]},"from":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"to":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"campaign_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"status":{"type":"string","enum":["queued","running","completed","failed"],"description":"`queued` (waiting its turn), `running`, `completed` or `failed` (`failure`)."},"rows":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Rows written."},"size":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}],"description":"The file’s bytes, once completed."},"parts":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Its parts (read_data_export, `/parts/{part}`)."},"available":{"type":"boolean","description":"Completed and still kept: the file can be read."},"file_name":{"type":"string"},"failure":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"reference":{"type":["string","null"]}},"required":["code","reference"],"additionalProperties":false},{"type":"null"}],"description":"Why it failed: a catalog code and reference."},"created_at":{"type":"string","format":"date-time"},"started_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"completed_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"expires_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"When its file is removed."}},"required":["id","kind","format","from","to","campaign_id","status","rows","size","parts","available","file_name","failure","created_at","started_at","completed_at","expires_at"],"additionalProperties":false,"description":"An export file of a list."},"DataExportDownload":{"type":"object","properties":{"url":{"type":"string","format":"uri","description":"A signed link to the whole file."},"expires_at":{"type":"string","format":"date-time","description":"When the link stops working."},"file_name":{"type":"string"},"rows":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"size":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]}},"required":["url","expires_at","file_name","rows","size"],"additionalProperties":false,"description":"A short-lived link to an export file."},"DataExportPage":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/DataExport"}},"next_cursor":{"type":["string","null"]}},"required":["data","next_cursor"],"additionalProperties":false,"description":"Your export files, newest first."},"DataExportPart":{"type":"object","properties":{"export_id":{"type":"string","format":"uuid"},"part":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"parts":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"next_part":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}],"description":"The next part; null on the last."},"content_type":{"type":"string"},"content":{"type":"string","description":"Rows of the file, a longer row continued in the next part (a CSV’s header in part 1)."}},"required":["export_id","part","parts","next_part","content_type","content"],"additionalProperties":false,"description":"One part of an export file."},"Draft":{"type":"object","properties":{"mode":{"type":"string","enum":["reply","note"]},"body":{"type":"string"},"attachment_ids":{"type":"array","items":{"type":"string","format":"uuid"}},"mentioned_membership_ids":{"type":"array","items":{"type":"string","format":"uuid"}},"reply_to_message_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"base_message_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"recipients":{"anyOf":[{"$ref":"#/components/schemas/DraftRecipients"},{"type":"null"}]},"updated_at":{"type":"string","format":"date-time"}},"required":["mode","body","attachment_ids","mentioned_membership_ids","reply_to_message_id","base_message_id","recipients","updated_at"],"additionalProperties":false,"description":"Your draft on the ticket (kept on the server)."},"DraftInput":{"type":"object","properties":{"mode":{"type":"string","enum":["reply","note"]},"body":{"type":"string","maxLength":100000},"attachment_ids":{"default":[],"maxItems":50,"type":"array","items":{"type":"string","format":"uuid"},"description":"Uploaded files kept with the draft."},"mentioned_membership_ids":{"default":[],"maxItems":50,"type":"array","items":{"type":"string","format":"uuid"},"description":"Members mentioned in a note draft."},"reply_to_message_id":{"default":null,"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"base_message_id":{"default":null,"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"recipients":{"default":null,"description":"An email reply’s edited recipients; null keeps the reply’s defaults.","anyOf":[{"$ref":"#/components/schemas/DraftRecipients"},{"type":"null"}]}},"required":["mode","body"],"additionalProperties":false},"DraftRecipients":{"type":"object","properties":{"to":{"maxItems":100,"type":"array","items":{"type":"string","minLength":1,"maxLength":320}},"cc":{"anyOf":[{"maxItems":100,"type":"array","items":{"type":"string","minLength":1,"maxLength":320}},{"type":"null"}],"description":"Null: the Cc line is left closed."},"bcc":{"anyOf":[{"maxItems":100,"type":"array","items":{"type":"string","minLength":1,"maxLength":320}},{"type":"null"}],"description":"Null: the Bcc line is left closed."}},"required":["to","cc","bcc"],"additionalProperties":false,"description":"An email reply’s To, Cc and Bcc as you edited them in the composer; sending still takes them from `email` of `POST /v1/tickets/{ticketId}/messages`."},"DraftResult":{"type":"object","properties":{"draft":{"anyOf":[{"$ref":"#/components/schemas/Draft"},{"type":"null"}]}},"required":["draft"],"additionalProperties":false},"EditChatMessage":{"type":"object","properties":{"body":{"type":"string","maxLength":10000}},"required":["body"],"additionalProperties":false},"EditTicketMessage":{"type":"object","properties":{"text":{"type":"string","minLength":1,"maxLength":65536,"description":"The new text; the channel’s own limit applies."}},"required":["text"],"additionalProperties":false},"EditWhatsappTemplate":{"type":"object","properties":{"components":{"minItems":1,"maxItems":10,"type":"array","items":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["HEADER"]},"format":{"type":"string","enum":["TEXT","IMAGE","VIDEO","DOCUMENT","LOCATION"]},"text":{"type":"string","maxLength":60},"example":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["type","format"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["BODY"]},"text":{"type":"string","maxLength":1024},"add_security_recommendation":{"type":"boolean"},"example":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["FOOTER"]},"text":{"type":"string","maxLength":60},"code_expiration_minutes":{"type":"integer","minimum":1,"maximum":90}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["BUTTONS"]},"buttons":{"minItems":1,"maxItems":10,"type":"array","items":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["QUICK_REPLY"]},"text":{"type":"string","minLength":1,"maxLength":25}},"required":["type","text"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["URL"]},"text":{"type":"string","minLength":1,"maxLength":25},"url":{"type":"string","maxLength":2000,"pattern":"^https:\\/\\/"},"example":{"maxItems":1,"type":"array","items":{"type":"string","maxLength":2000}}},"required":["type","text","url"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["PHONE_NUMBER"]},"text":{"type":"string","minLength":1,"maxLength":25},"phone_number":{"type":"string","pattern":"^\\+?[1-9]\\d{6,14}$"}},"required":["type","text","phone_number"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["COPY_CODE"]},"example":{"type":"string","maxLength":15}},"required":["type","example"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["OTP"]},"otp_type":{"type":"string","enum":["COPY_CODE","ONE_TAP","ZERO_TAP"]},"text":{"type":"string","maxLength":25},"autofill_text":{"type":"string","maxLength":25},"package_name":{"type":"string","maxLength":200},"signature_hash":{"type":"string","maxLength":40}},"required":["type","otp_type"],"additionalProperties":false}]}}},"required":["type","buttons"],"additionalProperties":false}]}},"category":{"type":"string","enum":["marketing","utility","authentication"]}},"additionalProperties":false},"EditWhatsappWebMessage":{"type":"object","properties":{"text":{"type":"string","minLength":1,"maxLength":65536}},"required":["text"],"additionalProperties":false},"EffectiveAiSettings":{"type":"object","properties":{"enabled":{"type":"object","properties":{"value":{"type":"boolean"},"source":{"type":"string","enum":["organization","channel_type","channel","kind","address","default"],"description":"The level that decided it; `default` when no level set it."}},"required":["value","source"],"additionalProperties":false}},"required":["enabled"],"additionalProperties":false},"EInvoiceSubmission":{"type":"object","properties":{"provider":{"type":"string","description":"`wafeq`: issued in Wafeq (ORCH #36); `none`: kept in Rabt only."},"status":{"anyOf":[{"type":"string","enum":["pending","submitted","accepted","rejected"]},{"type":"null"}],"description":"`pending` (being sent), `submitted` (in Wafeq, its payment not recorded yet), `accepted` (issued final and recorded as paid), `rejected` (refused; the Rabt team retries it). Null with `none`."},"reference":{"description":"The invoice's id in Wafeq.","type":["string","null"]},"error_code":{"description":"The catalog code of the last failure to send it, or null.","type":["string","null"]},"error_reference":{"type":["string","null"]},"document_available":{"type":"boolean","description":"The official PDF can be downloaded (`GET /v1/billing/invoices/{invoice_id}/document`)."},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]}},"required":["provider","status","reference","error_code","error_reference","document_available","updated_at"],"additionalProperties":false,"description":"The invoice in the e-invoicing system."},"EmailAsset":{"type":"object","properties":{"url":{"type":"string","format":"uri","description":"The image’s public https address on Rabt."}},"required":["url"],"additionalProperties":false},"EmailAssetUpload":{"type":"object","properties":{"type":{"type":"string","enum":["image/gif","image/png","image/jpeg"]},"data":{"type":"string","maxLength":2796204,"format":"base64","contentEncoding":"base64","pattern":"^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$","description":"The image, base64: GIF, PNG, JPEG (a GIF keeps its animation), at most 2 MB. Rabt removes its metadata and keeps it at most 1200 px wide."}},"required":["type","data"],"additionalProperties":false},"EmailChannel":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"address":{"type":"string"},"address_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"description":"Its channel address (spaces take its tickets through it); null once disconnected."},"display_name":{"type":["string","null"]},"status":{"$ref":"#/components/schemas/ChannelStatus"},"status_changed_at":{"type":"string","format":"date-time"},"last_error":{"anyOf":[{"$ref":"#/components/schemas/ChannelError"},{"type":"null"}]},"inbound_address":{"description":"Where the mailbox forwards to; null when inbound email is not configured.","type":["string","null"]},"smtp":{"type":"object","properties":{"host":{"type":"string"},"port":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"security":{"$ref":"#/components/schemas/SmtpSecurity"},"username":{"type":"string"}},"required":["host","port","security","username"],"additionalProperties":false},"forwarding":{"type":"object","properties":{"verified_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"check_sent_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"A check message on its way back (sent, not received yet)."}},"required":["verified_at","check_sent_at"],"additionalProperties":false},"imap":{"anyOf":[{"type":"object","properties":{"host":{"type":"string"},"port":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"security":{"$ref":"#/components/schemas/SmtpSecurity"},"username":{"description":"The IMAP login's own user name; null: the SMTP account signs in.","type":["string","null"]},"read_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"The last good read of the inbox."},"read_error":{"anyOf":[{"$ref":"#/components/schemas/ChannelError"},{"type":"null"}],"description":"Why the last read failed (tried again every minute)."}},"required":["host","port","security","read_at","read_error"],"additionalProperties":false},{"type":"null"}],"description":"The IMAP server Rabt reads the inbox from, with the login it signs in with; null when mail arrives by forwarding only."},"last_inbound_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"domain_check":{"anyOf":[{"$ref":"#/components/schemas/SenderDomainCheck"},{"type":"null"}]},"connected_at":{"type":"string","format":"date-time"},"disconnected_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]}},"required":["id","name","address","address_id","display_name","status","status_changed_at","last_error","inbound_address","smtp","forwarding","imap","last_inbound_at","domain_check","connected_at","disconnected_at"],"additionalProperties":false},"EmailChannelList":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/EmailChannel"}}},"required":["data"],"additionalProperties":false},"EmailFrame":{"type":"object","properties":{"frame":{"description":"The sanitized layout, filled in with your values, with the signature right after its `{content}` slot: an email reply is sent as this HTML with the reply's HTML in the slot. Null: no layout applies (the reply is sent as its own HTML with the signature under it).","type":["string","null"]},"signature":{"description":"The signature’s HTML, filled in (null: none).","type":["string","null"]},"issues":{"type":"array","items":{"$ref":"#/components/schemas/EmailLayoutIssue"},"description":"Of a layout being written; of a stored one, its images that could not be shown copied."}},"required":["frame","signature","issues"],"additionalProperties":false},"EmailFrameRequest":{"type":"object","properties":{"space_id":{"description":"The ticket’s space, whose variables fill the layout (null: the All space). None with `address_id`: the space the address’s mail goes to, as for an email campaign from it.","anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"address_id":{"description":"The email address the reply leaves from: the reply carries its signature and is sent in its layout (none: no signature; the default).","anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"layout":{"description":"A layout being written (none: the address’s live one).","type":"string","maxLength":204800},"signature":{"description":"A signature being written; null: without one (none: the live one).","anyOf":[{"type":"string","maxLength":5000},{"type":"null"}]},"signature_image_position":{"description":"Where the image of a signature being written sits (default `inline`; `start` or `end`: beside the text).","type":"string","enum":["inline","start","end"]},"lines":{"description":"Marks each element of a layout being written with `data-line`.","type":"boolean"}},"additionalProperties":false},"EmailHtml":{"type":"object","properties":{"html":{"description":"The email's HTML as the customer has it, received or sent (clean it before showing it), or null when it has none.","type":["string","null"]}},"required":["html"],"additionalProperties":false},"EmailImages":{"type":"object","properties":{"images":{"type":"array","items":{"type":"object","properties":{"source":{"type":"string","description":"The image's `src` as the email's HTML has it (entities decoded)."},"kind":{"type":"string","enum":["remote","inline","tracker"],"description":"`remote`: an https image, shown through Rabt’s image proxy; `inline`: the email’s own file (`cid:`); `tracker`: a known open-tracking image, removed."},"url":{"description":"The address that shows the image; null for a tracker.","type":["string","null"]}},"required":["source","kind","url"],"additionalProperties":false}},"expires_at":{"type":"string","format":"date-time","description":"When the addresses stop working."}},"required":["images","expires_at"],"additionalProperties":false},"EmailLayout":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"description":"Its name; null: the default (`«الافتراضي»`, \"Default\").","type":["string","null"]},"is_default":{"type":"boolean","description":"The organization’s default: every address without a layout is sent in it. It is never deleted or renamed."},"address_ids":{"type":"array","items":{"type":"string","format":"uuid"},"description":"The live sending email addresses sent in it (empty for the default: it has every other address)."},"space_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"deprecated":true,"description":"Deprecated: the space a former space layout is for; such a layout is stored and never applied."},"address_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"deprecated":true,"description":"Deprecated: in `addresses` of the list and the answer of the address routes, the address it is the layout of; null otherwise."},"html":{"type":"string","description":"As stored: sanitized, its images on Rabt."},"updated_by_membership_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"updated_at":{"type":"string","format":"date-time"}},"required":["id","name","is_default","address_ids","space_id","address_id","html","updated_by_membership_id","updated_at"],"additionalProperties":false},"EmailLayoutAssign":{"type":"object","properties":{"layout_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"description":"The layout the address is sent in; null (or the default’s id): the default."}},"required":["layout_id"],"additionalProperties":false},"EmailLayoutCreate":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":100,"description":"The layout’s name, as the organization calls it."},"html":{"type":"string","minLength":1,"maxLength":204800,"description":"HTML that follows the layout rules (`GET /v1/email-layouts/spec`): tables with inline styles, one `{content}` slot where the reply goes, and the variables `{space.name}`, `{organization.name}`."},"address_ids":{"maxItems":500,"type":"array","items":{"type":"string","format":"uuid"},"description":"The sending email addresses sent in this layout (`sending_addresses` of the list). An address has one layout: one in another moves here."}},"required":["name","html"],"additionalProperties":false},"EmailLayoutInput":{"type":"object","properties":{"html":{"type":"string","minLength":1,"maxLength":204800,"description":"HTML that follows the layout rules (`GET /v1/email-layouts/spec`): tables with inline styles, one `{content}` slot where the reply goes, and the variables `{space.name}`, `{organization.name}`."}},"required":["html"],"additionalProperties":false},"EmailLayoutIssue":{"type":"object","properties":{"code":{"type":"string","description":"The catalog code: a rule’s (EM-3728 to EM-3749, EM-3752; EM-3750 a signature’s), EM-3744 or the error’s own for an image that could not be copied, EM-3751 for an animated image whose first frame is empty (a warning: saving is not refused), or the refusal’s when a draft’s images are not copied."},"field":{"type":"string","enum":["layout","signature"],"description":"What the issue is in: the layout, or the signature (EM-3750: a link or image address it may not have)."},"line":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}],"description":"The line of the HTML (null: the whole layout)."},"message":{"type":"string","description":"The issue, in the request’s language."},"reference":{"description":"The reference of the recorded error the issue comes from (an image that could not be copied, a refused copy), shown with its code and release; null for a rule’s issue.","type":["string","null"],"example":"ref_4bf92f3577b34da6a3ce929d0e0e4736"},"release":{"description":"The release of the Rabt service that recorded that error (with `reference`); null for a rule’s issue.","type":["string","null"],"example":"v1.4.2+a1b2c3d"}},"required":["code","field","line","message","reference","release"],"additionalProperties":false},"EmailLayoutList":{"type":"object","properties":{"default":{"anyOf":[{"$ref":"#/components/schemas/EmailLayout"},{"type":"null"}],"description":"The default, for every address without a layout; null: not written yet (those replies are sent without a layout)."},"layouts":{"type":"array","items":{"$ref":"#/components/schemas/EmailLayout"},"description":"The named layouts, oldest first, each with its addresses."},"sending_addresses":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"address":{"type":"string"},"layout_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"description":"The layout it is sent in (null: the default)."}},"required":["id","address","layout_id"],"additionalProperties":false},"description":"Every live sending email address of the organization, by address."},"organization":{"anyOf":[{"$ref":"#/components/schemas/EmailLayout"},{"type":"null"}],"deprecated":true,"description":"Deprecated: the default."},"spaces":{"type":"array","items":{"$ref":"#/components/schemas/EmailLayout"},"deprecated":true,"description":"Deprecated: the former space layouts, stored and never applied."},"addresses":{"type":"array","items":{"$ref":"#/components/schemas/EmailLayout"},"deprecated":true,"description":"Deprecated: each address sent in a named layout, as that layout with its `address_id`."},"address_spaces":{"type":"array","items":{"type":"object","properties":{"address_id":{"type":"string","format":"uuid"},"space_id":{"type":"string","format":"uuid"}},"required":["address_id","space_id"],"additionalProperties":false},"deprecated":true,"description":"Deprecated: the space each live sending email address’s mail goes to (it no longer chooses a layout)."}},"required":["default","layouts","sending_addresses","organization","spaces","addresses","address_spaces"],"additionalProperties":false},"EmailLayoutSpec":{"type":"object","properties":{"max_bytes":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"max_width_px":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"max_images":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"content_slot":{"type":"string"},"slot_containers":{"type":"array","items":{"type":"string"}},"variables":{"type":"array","items":{"type":"string"},"description":"A layout’s variables: the organization’s branding only, never a person."},"signature_variables":{"type":"array","items":{"type":"string"},"description":"A signature’s variables (the member’s name and job title among them)."},"allowed_tags":{"type":"array","items":{"type":"string"}},"allowed_attributes":{"type":"array","items":{"type":"string"}},"allowed_css_properties":{"type":"array","items":{"type":"string"}},"css_url_properties":{"type":"array","items":{"type":"string"}},"image_schemes":{"type":"array","items":{"type":"string"}},"image_types":{"type":"array","items":{"type":"string"}},"link_schemes":{"type":"array","items":{"type":"string"}},"signature_link_schemes":{"type":"array","items":{"type":"string"},"description":"The schemes a signature’s links may use (its images: image_schemes)."},"forbidden_tags":{"type":"array","items":{"type":"string"}},"forbidden_url_schemes":{"type":"array","items":{"type":"string"}},"forbidden_css":{"type":"array","items":{"type":"string"}},"directions":{"type":"array","items":{"type":"string"}},"recommended_font_stack":{"type":"string"},"rules":{"type":"array","items":{"type":"string"},"description":"The rules as plain English sentences."}},"required":["max_bytes","max_width_px","max_images","content_slot","slot_containers","variables","signature_variables","allowed_tags","allowed_attributes","allowed_css_properties","css_url_properties","image_schemes","image_types","link_schemes","signature_link_schemes","forbidden_tags","forbidden_url_schemes","forbidden_css","directions","recommended_font_stack","rules"],"additionalProperties":false},"EmailLayoutUpdate":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":100,"description":"The layout’s name, as the organization calls it."},"html":{"type":"string","minLength":1,"maxLength":204800,"description":"HTML that follows the layout rules (`GET /v1/email-layouts/spec`): tables with inline styles, one `{content}` slot where the reply goes, and the variables `{space.name}`, `{organization.name}`."},"address_ids":{"description":"Every sending email address sent in this layout: one in another moves here, one left out returns to the default. Not for the default (`EM-3755`).","maxItems":500,"type":"array","items":{"type":"string","format":"uuid"}}},"additionalProperties":false},"EmailRead":{"type":"object","properties":{"queued":{"type":"boolean","description":"Whether a read was queued now; false when one was asked for the organization within the last 10 seconds."}},"required":["queued"],"additionalProperties":false},"EmailSendingAddress":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"address":{"type":"string"},"display_name":{"type":["string","null"]}},"required":["id","address","display_name"],"additionalProperties":false},"EmailSignature":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"address_ids":{"type":"array","items":{"type":"string","format":"uuid"},"description":"The live sending email addresses that sign with it."},"address":{"anyOf":[{"$ref":"#/components/schemas/EmailSendingAddress"},{"type":"null"}],"deprecated":true,"description":"Deprecated: in `data` of the list and the answer of the address route, the address it signs; null otherwise."},"body":{"type":"string"},"image_position":{"type":"string","enum":["inline","start","end"],"description":"`inline`: the image stays where the text puts it. `start` or `end`: the text’s first image sits beside the rest of the text (the start or end of the line, by the text’s direction), in a table Rabt builds."},"updated_by_membership_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"updated_at":{"type":"string","format":"date-time"}},"required":["id","name","address_ids","address","body","updated_by_membership_id","updated_at"],"additionalProperties":false},"EmailSignatureAssign":{"type":"object","properties":{"signature_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"description":"The signature the address signs with; null: none."}},"required":["signature_id"],"additionalProperties":false},"EmailSignatureCreate":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":100,"description":"The signature’s name, as the organization calls it."},"body":{"type":"string","minLength":1,"maxLength":5000,"description":"CommonMark, as the email composer writes, with the variables `{member.name}`, `{member.title}`, `{space.name}` and `{organization.name}`."},"image_position":{"type":"string","enum":["inline","start","end"],"description":"`inline`: the image stays where the text puts it. `start` or `end`: the text’s first image sits beside the rest of the text (the start or end of the line, by the text’s direction), in a table Rabt builds."},"address_ids":{"maxItems":500,"type":"array","items":{"type":"string","format":"uuid"},"description":"The sending email addresses that sign with it (`sending_addresses` of the list). An address has one signature: one with another moves here."}},"required":["name","body"],"additionalProperties":false},"EmailSignatureInput":{"type":"object","properties":{"body":{"type":"string","minLength":1,"maxLength":5000,"description":"CommonMark, as the email composer writes, with the variables `{member.name}`, `{member.title}`, `{space.name}` and `{organization.name}`."}},"required":["body"],"additionalProperties":false},"EmailSignatureList":{"type":"object","properties":{"signatures":{"type":"array","items":{"$ref":"#/components/schemas/EmailSignature"},"description":"The named signatures, oldest first, each with its addresses."},"sending_addresses":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"address":{"type":"string"},"display_name":{"type":["string","null"]},"signature_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"description":"The signature it signs with (null: none)."}},"required":["id","address","display_name","signature_id"],"additionalProperties":false},"description":"Every live sending email address of the organization, by address."},"data":{"type":"array","items":{"$ref":"#/components/schemas/EmailSignature"},"deprecated":true,"description":"Deprecated: each address that signs with a signature, as that signature with its `address`."},"addresses":{"type":"array","items":{"$ref":"#/components/schemas/EmailSendingAddress"},"deprecated":true,"description":"Deprecated: `sending_addresses` without their signature."}},"required":["signatures","sending_addresses","data","addresses"],"additionalProperties":false},"EmailSignaturePreview":{"type":"object","properties":{"signature":{"description":"CommonMark, filled in (null: none).","type":["string","null"]},"html":{"description":"Its HTML as a reply carries it: images sized (width and height), a missing one left out, the image beside the text (a table) when `image_position` says so.","type":["string","null"]},"text":{"description":"How it reads in the reply (plain text).","type":["string","null"]},"image_position":{"description":"Where its image sits (null: the address has no signature).","anyOf":[{"type":"string","enum":["inline","start","end"],"description":"`inline`: the image stays where the text puts it. `start` or `end`: the text’s first image sits beside the rest of the text (the start or end of the line, by the text’s direction), in a table Rabt builds."},{"type":"null"}]}},"required":["signature","html","text"],"additionalProperties":false},"EmailSignatureUpdate":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":100,"description":"The signature’s name, as the organization calls it."},"body":{"type":"string","minLength":1,"maxLength":5000,"description":"CommonMark, as the email composer writes, with the variables `{member.name}`, `{member.title}`, `{space.name}` and `{organization.name}`."},"image_position":{"type":"string","enum":["inline","start","end"],"description":"`inline`: the image stays where the text puts it. `start` or `end`: the text’s first image sits beside the rest of the text (the start or end of the line, by the text’s direction), in a table Rabt builds."},"address_ids":{"description":"Every sending email address that signs with it: one with another moves here, one left out then signs with none.","maxItems":500,"type":"array","items":{"type":"string","format":"uuid"}}},"additionalProperties":false},"EmbedCheck":{"type":"object","properties":{"ok":{"type":"boolean","description":"The page would open Rabt now (for the token’s member)."},"problem":{"anyOf":[{"type":"string","enum":["off","origin_not_allowed","no_secret","token_refused","not_member","owner"]},{"type":"null"}],"description":"The first thing that stops it: `off` (turned off), `origin_not_allowed`, `no_secret` (issue one), `token_refused` (not signed with the current secret, expired, longer than 5 minutes, another organization, or `sub` not an email or E.164 number), `not_member` (no member has the email or phone), `owner` (the token names the owner, who signs in with a Rabt code instead); null when nothing."},"code":{"description":"The error code that names the problem with its fix (`rabt://guide/errors/{code}`).","type":["string","null"]}},"required":["ok","problem","code"],"additionalProperties":false},"EmbedSettings":{"type":"object","properties":{"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"description":"The settings’ id; null before the first change."},"enabled":{"type":"boolean","description":"Whether Rabt opens inside the organization’s own system."},"allowed_origins":{"type":"array","items":{"type":"string"},"description":"The host pages that may frame Rabt: exact origins (https; http only on `localhost`, `127.0.0.1`, `[::1]`)."},"secret_issued":{"type":"boolean","description":"Whether an embed secret was issued (launch tokens can be verified)."},"embed_url":{"type":"string","description":"The page the host frames (`<APP_URL>/embed/<organization id>`); `embed.js` builds the frame from it."},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]}},"required":["id","enabled","allowed_origins","secret_issued","embed_url","updated_at"],"additionalProperties":false},"EmbedSettingsWithSecret":{"type":"object","properties":{"embed":{"$ref":"#/components/schemas/EmbedSettings"},"embed_secret":{"type":"string","description":"The embed secret (`rbes_…`) just issued, shown only now. Your server signs each launch token with it (JWT HS256: `sub` the member’s email or E.164 mobile number, `org` the organization’s id, `iat`, `exp` at most 5 minutes later, a unique `jti`)."}},"required":["embed","embed_secret"],"additionalProperties":false},"EnableSallaReviewsChannel":{"type":"object","properties":{"integration_id":{"type":"string","format":"uuid","description":"The active Salla integration (`GET /v1/integrations`) whose store’s reviews the channel reads and answers. No new sign-in: the integration’s access is used."}},"required":["integration_id"],"additionalProperties":false},"ErasureFailure":{"type":"object","properties":{"code":{"type":"string","description":"The catalog code (CRM-6047, CRM-6052)."},"reference":{"type":"string","description":"The reference of the recorded error."},"release":{"type":"string","description":"The release that ran the step."},"at":{"type":"string","format":"date-time"}},"required":["code","reference","release","at"],"additionalProperties":false},"ErrorCode":{"type":"object","properties":{"code":{"type":"string","example":"WA-2047"},"module":{"type":"object","properties":{"prefix":{"type":"string","example":"WA"},"name":{"type":"string","example":"WhatsApp"}},"required":["prefix","name"],"additionalProperties":false},"http_status":{"type":"integer","minimum":400,"maximum":599,"description":"HTTP status of API responses with this error."},"retryable":{"type":"boolean","description":"Whether the failed action can succeed if tried again."},"fallback":{"type":"boolean","description":"True for the module's fallback code, used when a provider returns an error Rabt has no specific code for yet."},"params":{"type":"array","items":{"type":"string"},"description":"Names used in the texts as `{name}`: each occurrence fills them with its own details."},"text":{"type":"object","properties":{"ar":{"type":"object","properties":{"title":{"type":"string","description":"The reason, in one line."},"cause":{"type":"string","description":"The full explanation."},"fix":{"type":"string","description":"What to do next."},"title_without_params":{"description":"The title without its `{name}` fields, for a surface that holds only the code (a stored error): a written form where the title reads badly without them, else the title with them left out; the title itself when it has none. Always sent.","type":"string"}},"required":["title","cause","fix"],"additionalProperties":false},"en":{"type":"object","properties":{"title":{"type":"string","description":"The reason, in one line."},"cause":{"type":"string","description":"The full explanation."},"fix":{"type":"string","description":"What to do next."},"title_without_params":{"description":"The title without its `{name}` fields, for a surface that holds only the code (a stored error): a written form where the title reads badly without them, else the title with them left out; the title itself when it has none. Always sent.","type":"string"}},"required":["title","cause","fix"],"additionalProperties":false}},"required":["ar","en"],"additionalProperties":false,"description":"The texts in Arabic and English, with their `{name}` fields."},"provider_codes":{"type":"array","items":{"type":"object","properties":{"provider":{"type":"string","example":"meta"},"code":{"type":"string","example":"131047"},"subcode":{"type":["string","null"]},"operation":{"anyOf":[{"type":"string","enum":["send","inbound","import","refresh","moderate","delete"]},{"type":"null"}],"description":"The operation the mapping applies to (`send`, `inbound`, `import`, `refresh`, `moderate`, `delete`); null: any."},"outcome":{"type":"string","enum":["error","done"],"description":"`done`: for that operation the provider answer means the work is already done, so it is a success, not this error."}},"required":["provider","code","subcode","operation","outcome"],"additionalProperties":false},"description":"Provider error codes that map to this code (the provider's own code is shown with it)."},"docs_url":{"type":"string","format":"uri","description":"The public documentation page of the code."}},"required":["code","module","http_status","retryable","fallback","params","text","provider_codes","docs_url"],"additionalProperties":false,"description":"An error code of the Rabt error catalog."},"ErrorEscalation":{"type":"object","properties":{"reference":{"type":"string","pattern":"^ref_[0-9a-f]{32}$","description":"The reference the error showed.","example":"ref_4bf92f3577b34da6a3ce929d0e0e4736"}},"required":["reference"],"additionalProperties":false},"ErrorEscalationResult":{"type":"object","properties":{"reference":{"type":"string"},"escalated":{"type":"boolean","enum":[true]},"escalated_at":{"type":"string","format":"date-time","description":"When this member escalated it (the first time; pressing again changes nothing)."}},"required":["reference","escalated","escalated_at"],"additionalProperties":false},"ErrorLogEntry":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"reference":{"type":"string","description":"The reference shown with the error (the trace ID): several errors of one action share it.","example":"ref_4bf92f3577b34da6a3ce929d0e0e4736"},"code":{"type":"string","example":"WA-2047"},"title":{"type":"string","description":"The reason, in one line, in the request language."},"cause":{"type":"string","description":"The full explanation."},"fix":{"type":"string","description":"What to do."},"where":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","example":"ticket"},"id":{"type":"string"},"label":{"type":["string","null"]}},"required":["type","id","label"],"additionalProperties":false},{"type":"null"}],"description":"The affected item, when the error names one."},"provider":{"anyOf":[{"type":"object","properties":{"name":{"type":"string"},"code":{"type":"string"},"subcode":{"type":["string","null"]},"message":{"type":"string","description":"As received from the provider."},"http_status":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]}},"required":["name","code","subcode","message","http_status"],"additionalProperties":false},{"type":"null"}],"description":"The provider's own error, exactly as received (docs/23 rule 4)."},"http_status":{"type":"integer","minimum":400,"maximum":599},"retryable":{"type":"boolean","description":"Whether the failed action can succeed again."},"credential":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["organization_key","personal_key","oauth_app"]},"id":{"type":"string","format":"uuid","description":"The API key's id, or the app's grant id."}},"required":["kind","id"],"additionalProperties":false},{"type":"null"}],"description":"The API key or app of the request that failed (the request log)."},"place":{"description":"Where it happened, without ids: the API operation (`POST /v1/contacts`) or the job.","type":["string","null"]},"fields":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"code":{"type":"string"}},"required":["path","code"],"additionalProperties":false},"description":"The request's invalid fields: each one's path and code."},"member":{"anyOf":[{"type":"object","properties":{"membership_id":{"type":"string","format":"uuid"},"name":{"type":"string"}},"required":["membership_id","name"],"additionalProperties":false},{"type":"null"}],"description":"The member whose action failed; null for background work."},"occurred_at":{"type":"string","format":"date-time"},"release":{"description":"The release of the code that recorded it; null for older errors.","type":["string","null"],"example":"v1.4.2+a1b2c3d"},"fault":{"type":"object","properties":{"state":{"type":"string","enum":["new","in_progress","fixed","external","held"],"description":"The fault it belongs to, in plain categories: `new` (not looked at yet), `in_progress` (the Rabt team is on it), `fixed` (in `fixed_release`), `external` (a provider, the organization’s own account or the end customer), `held` (marked expected by the Rabt team)."},"fixed_release":{"description":"The release that fixed it.","type":["string","null"]},"plain_title":{"description":"The fault’s plain one-line title the Rabt team wrote, in the request language.","type":["string","null"]}},"required":["state","fixed_release","plain_title"],"additionalProperties":false,"description":"Only the state and the plain title: never the fault’s internals."},"escalated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"When the reading member escalated it; null when they did not."},"docs_url":{"type":"string","format":"uri","description":"The public documentation page of the code."}},"required":["id","reference","code","title","cause","fix","where","provider","http_status","retryable","credential","place","fields","member","occurred_at","release","fault","escalated_at","docs_url"],"additionalProperties":false,"description":"An error recorded for the organization (docs/23)."},"ErrorLogPage":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/ErrorLogEntry"},"description":"Newest first."},"next_cursor":{"description":"Pass as `cursor` for older entries; null on the last page.","type":["string","null"]},"total":{"type":"integer","minimum":0,"maximum":10000,"description":"How many rows the list has with these filters, counted up to 10000."},"total_capped":{"type":"boolean","description":"The list has more than 10000 rows (`total` is 10000)."}},"required":["data","next_cursor","total","total_capped"],"additionalProperties":false,"description":"A page of the organization's error log."},"ExternalRecord":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"source":{"type":"string"},"type":{"type":"string"},"external_id":{"type":"string"},"connector_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"description":"The connector that read it; null when pushed."},"kind":{"type":"string","enum":["customer","order","invoice","record"]},"integration_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"description":"The connected store or system it was read from (its `source` is `<adapter>.<integration id>`); null when pushed or read by a connector."},"presentment":{"anyOf":[{"$ref":"#/components/schemas/ExternalRecordMoney"},{"type":"null"}],"description":"The amount in the currency the customer paid in, when kept."},"masked":{"type":"boolean","description":"The system hides who the customer is (e.g. marketplace orders): it is never matched to a contact."},"merged_into_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"description":"The record its system merged it into (it is then deleted)."},"addresses":{"type":"array","items":{"$ref":"#/components/schemas/RecordAddress"}},"title":{"type":"string"},"status":{"type":["string","null"]},"status_label":{"description":"The status named in both languages, for a record a connected system wrote with a status its integration declares; null for a pushed or connector record or any other status (show `status` as written).","anyOf":[{"$ref":"#/components/schemas/ExternalRecordLabel"},{"type":"null"}]},"amount":{"anyOf":[{"$ref":"#/components/schemas/ExternalRecordMoney"},{"type":"null"}]},"starts_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"ends_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"url":{"type":["string","null"]},"fields":{"type":"array","items":{"$ref":"#/components/schemas/ExternalRecordField"}},"phones":{"type":"array","items":{"type":"string"},"description":"E.164."},"emails":{"type":"array","items":{"type":"string"}},"external_updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"synced_at":{"type":"string","format":"date-time"},"deleted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"Set when deleted (Rabt keeps the row)."},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}},"required":["id","source","type","external_id","connector_id","kind","integration_id","presentment","masked","merged_into_id","addresses","title","status","amount","starts_at","ends_at","url","fields","phones","emails","external_updated_at","synced_at","deleted_at","created_at","updated_at"],"additionalProperties":false},"ExternalRecordField":{"type":"object","properties":{"label":{"type":"string"},"value":{"type":"string"},"type":{"description":"The value’s type (absent: text): `number` (a JavaScript number), `money` (an integer of minor units of `currency`), `date` (ISO 8601), `bool` (`true` or `false`), `url`.","type":"string","enum":["text","number","money","date","bool","url"]},"currency":{"description":"ISO 4217, for `money`.","type":"string"}},"required":["label","value"],"additionalProperties":false},"ExternalRecordLabel":{"type":"object","properties":{"ar":{"type":"string","description":"The Arabic name (Modern Standard Arabic)."},"en":{"type":"string","description":"The English name."}},"required":["ar","en"],"additionalProperties":false,"description":"A name members read, in both languages (a brand is the same in both)."},"ExternalRecordMoney":{"type":"object","properties":{"amount_minor":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"In minor units of the currency."},"currency":{"type":"string","description":"ISO 4217."}},"required":["amount_minor","currency"],"additionalProperties":false},"ExternalRecordPage":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/ExternalRecord"}},"next_cursor":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"description":"Pass as `cursor` for the next page."}},"required":["data","next_cursor"],"additionalProperties":false},"FacebookChannel":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"page_id":{"type":"string"},"page_name":{"type":"string"},"category":{"type":["string","null"]},"status":{"type":"string","enum":["pending","active","needs_reauth","disconnected"],"description":"`pending` until the Page is subscribed to Rabt’s webhooks, `active`, `needs_reauth` (Meta refused the Page token: reconnect), `disconnected`."},"status_changed_at":{"type":"string","format":"date-time"},"last_error":{"anyOf":[{"$ref":"#/components/schemas/FacebookChannelError"},{"type":"null"}]},"scopes":{"type":"array","items":{"type":"string"},"description":"The permissions granted at Meta."},"connected_by_name":{"description":"Who connected it, by their Facebook name; null once Meta asked it erased.","type":["string","null"]},"connected_by_membership_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"subscribed_fields":{"type":"array","items":{"type":"string"}},"subscribed_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"policy_enforcement":{"anyOf":[{"type":"object","properties":{"action":{"type":"string"},"reason":{"type":["string","null"]},"at":{"type":"string","format":"date-time"}},"required":["action","reason","at"],"additionalProperties":false},{"type":"null"}],"description":"Meta’s last policy action on the Page (a block or warning)."},"last_inbound_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"api_version":{"type":["string","null"]},"connected_at":{"type":"string","format":"date-time"},"disconnected_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]}},"required":["id","name","page_id","page_name","category","status","status_changed_at","last_error","scopes","connected_by_name","connected_by_membership_id","subscribed_fields","subscribed_at","policy_enforcement","last_inbound_at","api_version","connected_at","disconnected_at"],"additionalProperties":false},"FacebookChannelError":{"type":"object","properties":{"code":{"type":"string"},"reference":{"type":"string"},"retryable":{"type":"boolean"},"provider":{"anyOf":[{"type":"object","properties":{"name":{"type":"string"},"code":{"type":["string","null"]},"message":{"type":["string","null"]}},"required":["name","code","message"],"additionalProperties":false},{"type":"null"}]},"occurred_at":{"type":"string"},"params":{"description":"The values the catalog’s texts name, e.g. `{ \"service\": \"WhatsApp\" }`.","anyOf":[{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}},{"type":"null"}]}},"required":["code","reference","retryable","provider","occurred_at"],"additionalProperties":false,"description":"Why the channel needs attention (docs/23)."},"FacebookChannelList":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/FacebookChannel"}}},"required":["data"],"additionalProperties":false},"FacebookConnectResult":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/FacebookChannel"},"description":"The Pages connected or reconnected, with the permissions granted."},"refused":{"type":"array","items":{"type":"object","properties":{"page_id":{"type":"string"},"page_name":{"type":"string"},"code":{"type":"string"},"reference":{"type":"string"}},"required":["page_id","page_name","code","reference"],"additionalProperties":false},"description":"Pages chosen but not connected (`FB-2005`: live in another organization)."}},"required":["data","refused"],"additionalProperties":false},"FacebookConnectStart":{"type":"object","properties":{"url":{"type":"string","format":"uri","description":"Facebook's login dialog: open it in the person's browser. Facebook sends them back to Rabt's callback page, which completes the connection."},"expires_at":{"type":"string","format":"date-time","description":"The flow must be completed before then."}},"required":["url","expires_at"],"additionalProperties":false},"FirstMessage":{"type":"object","properties":{"mode":{"type":"string","enum":["reply","note"],"description":"`reply`: to the customer on the ticket’s channel. `note`: an internal note."},"body":{"description":"The text (a WhatsApp template’s text is its own).","anyOf":[{"type":"string","maxLength":100000},{"type":"null"}]},"mentioned_membership_ids":{"maxItems":50,"type":"array","items":{"type":"string","format":"uuid"},"description":"Members mentioned in a note (@mentions)."},"attachment_ids":{"maxItems":50,"type":"array","items":{"type":"string","format":"uuid"},"description":"Files uploaded and scanned before the ticket exists (`POST /v1/attachments`, complete): one message, `body` its caption. Channel limits apply."},"client_key":{"description":"Your key for this start: sent again with it, the same ticket and message are answered (`duplicate: true`), never a second ticket.","type":"string","pattern":"^[A-Za-z0-9._~-]{1,100}$"},"email":{"description":"An email reply’s recipients (To, Cc, Bcc), signature and From address as the member set them (the email composer, C05); without them the reply answers the customer’s last email, keeps its Cc and carries the signature. Its subject is always the ticket’s, as it is (`PATCH /v1/tickets/{ticketId}` changes it). A call ticket answered by email (`channel_id` of an email channel in its `channels`) goes by default to the contact’s primary address; a call ticket without a subject takes the channel’s `email.subject`. Ignored on other channels.","type":"object","properties":{"to":{"minItems":1,"maxItems":100,"type":"array","items":{"type":"string","maxLength":254,"format":"email"}},"cc":{"maxItems":100,"type":"array","items":{"type":"string","maxLength":254,"format":"email"}},"bcc":{"description":"Blind copies: they receive the email, the others do not see them.","maxItems":100,"type":"array","items":{"type":"string","maxLength":254,"format":"email"}},"subject":{"description":"Deprecated: every email carries the ticket’s subject (`PATCH /v1/tickets/{ticketId}` changes it while the ticket has no email). The ticket’s own subject (trimmed) is ignored; any other answers `TKT-6225`.","deprecated":true,"type":"string","maxLength":998},"signature":{"description":"False leaves out the email signature Rabt adds under a member’s reply (`GET /v1/email-signatures/preview` shows it); by default the reply carries it.","type":"boolean"},"from_address_id":{"description":"The address an email reply leaves from (the composer’s From), by default the one marked `default`. One of the `from_addresses` of the reply’s channel in the ticket’s `channels` (on an email ticket, of its own channel: its own address and your addresses — routed to your spaces, to you, and to «الكل» when you see it — on any of the organization’s mailboxes; an address of another mailbox sends through it). An address routed to a member is that member’s alone. `TKT-6208` for an address not offered to you, or on a channel that is not email; `TKT-6227` when no address is offered to you.","type":"string","format":"uuid"}},"additionalProperties":false},"template":{"description":"A `reply` as an approved template, where `send.template`: the only way to open a conversation there (`TKT-6303` lists them). Listed by `GET /v1/channels/{channelId}/templates`; `TKT-6275` no templates, `WA-2109` unknown, `WA-2108` not approved.","type":"object","properties":{"template_id":{"type":"string","format":"uuid"},"components":{"default":[],"maxItems":12,"type":"array","items":{"type":"object","properties":{"type":{"type":"string","enum":["header","body","button"]},"sub_type":{"type":"string","enum":["quick_reply","url","copy_code"]},"index":{"type":"integer","minimum":0,"maximum":9},"parameters":{"maxItems":20,"type":"array","items":{"type":"object","properties":{"type":{"type":"string","enum":["text","currency","date_time","image","video","document","payload","coupon_code"]},"value":{"type":"string","minLength":1,"maxLength":2000},"name":{"type":"string","pattern":"^[a-z0-9_]{1,100}$"},"currency":{"type":"object","properties":{"code":{"type":"string","pattern":"^[A-Z]{3}$"},"amount_1000":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["code","amount_1000"],"additionalProperties":false}},"required":["type","value"],"additionalProperties":false}}},"required":["type","parameters"],"additionalProperties":false}}},"required":["template_id"],"additionalProperties":false},"whatsapp_template":{"description":"As `template`, on a WhatsApp number (`GET /v1/channels/whatsapp/{channelId}/start-templates`).","type":"object","properties":{"template_id":{"type":"string","format":"uuid"},"components":{"default":[],"maxItems":12,"type":"array","items":{"type":"object","properties":{"type":{"type":"string","enum":["header","body","button"]},"sub_type":{"type":"string","enum":["quick_reply","url","copy_code"]},"index":{"type":"integer","minimum":0,"maximum":9},"parameters":{"maxItems":20,"type":"array","items":{"type":"object","properties":{"type":{"type":"string","enum":["text","currency","date_time","image","video","document","payload","coupon_code"]},"value":{"type":"string","minLength":1,"maxLength":2000},"name":{"type":"string","pattern":"^[a-z0-9_]{1,100}$"},"currency":{"type":"object","properties":{"code":{"type":"string","pattern":"^[A-Z]{3}$"},"amount_1000":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["code","amount_1000"],"additionalProperties":false}},"required":["type","value"],"additionalProperties":false}}},"required":["type","parameters"],"additionalProperties":false}}},"required":["template_id"],"additionalProperties":false}},"required":["mode"],"additionalProperties":false,"description":"The reply or internal note a ticket starts with (it exists only with it): its text and files (`attachment_ids`) in one message."},"FullContext":{"type":"object","properties":{"data":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["ticket_start"]},"occurred_at":{"type":"string","format":"date-time"},"ticket":{"$ref":"#/components/schemas/HistoryTicket"}},"required":["type","occurred_at","ticket"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["message"]},"occurred_at":{"type":"string","format":"date-time"},"ticket":{"$ref":"#/components/schemas/HistoryTicket"},"message":{"$ref":"#/components/schemas/Message"}},"required":["type","occurred_at","ticket","message"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["campaign_message"]},"id":{"type":"string","format":"uuid"},"occurred_at":{"type":"string","format":"date-time"},"channel_type":{"$ref":"#/components/schemas/ChannelType"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"description":"What the entry shows: `campaign_id`, `campaign_name`, `status`, `reply_ticket_id`."}},"required":["type","id","occurred_at","channel_type","details"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["notification_call"]},"id":{"type":"string","format":"uuid","description":"The call."},"occurred_at":{"type":"string","format":"date-time"},"channel_type":{"$ref":"#/components/schemas/ChannelType"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"description":"What the entry shows: `call_id`, `mode`, `status`, `duration_sec`."}},"required":["type","id","occurred_at","channel_type","details"],"additionalProperties":false}]}},"next_cursor":{"description":"Older items; null at the start.","type":["string","null"]},"channels":{"description":"The channel accounts the messages you may see went through (a web chat widget has no id): on the first page only, empty after.","type":"array","items":{"type":"object","properties":{"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"channel_type":{"$ref":"#/components/schemas/ChannelType"},"name":{"type":["string","null"]}},"required":["id","channel_type","name"],"additionalProperties":false}}},"required":["data","next_cursor"],"additionalProperties":false,"description":"Every message, call, campaign message and (on request) internal note with the contact, across channels, tickets and merged identities: newest first (show them in time order). Each ticket starts with a divider; tickets you cannot access show only their divider's number, channel and date."},"GmailAuthorization":{"type":"object","properties":{"authorization_url":{"type":"string","format":"uri","description":"Where the member signs in with Google."},"state":{"type":"string","description":"The sign-in’s `state` (it starts with the organization id); Google sends it back with the code."},"expires_at":{"type":"string","format":"date-time","description":"The sign-in must be finished before this time."}},"required":["authorization_url","state","expires_at"],"additionalProperties":false},"GmailChannel":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"address":{"type":"string","description":"The mailbox (its primary address)."},"hosted_domain":{"description":"The Google Workspace domain; null for a consumer Gmail account.","type":["string","null"]},"status":{"type":"string","enum":["pending","active","needs_reauth","disconnected"],"description":"`active`, `needs_reauth` (Google refused the saved access: reconnect), or `disconnected`."},"status_changed_at":{"type":"string","format":"date-time"},"last_error":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"reference":{"type":"string"},"retryable":{"type":"boolean"},"provider":{"anyOf":[{"type":"object","properties":{"name":{"type":"string"},"code":{"type":["string","null"]},"message":{"type":["string","null"]}},"required":["name","code","message"],"additionalProperties":false},{"type":"null"}]},"occurred_at":{"type":"string"}},"required":["code","reference","retryable","provider","occurred_at"],"additionalProperties":false},{"type":"null"}]},"scopes":{"type":"array","items":{"type":"string"},"description":"The permissions Google granted."},"addresses":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"address":{"type":"string"},"display_name":{"type":["string","null"]},"is_default":{"type":"boolean"},"send_as_verified":{"type":"boolean","description":"Gmail may send as it (primary, or a verified “Send mail as”)."},"active":{"type":"boolean","description":"On: its mail makes tickets and it is offered as a From; off: stopped."}},"required":["id","address","display_name","is_default","send_as_verified","active"],"additionalProperties":false}},"watch":{"type":"object","properties":{"expires_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"renewed_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]}},"required":["expires_at","renewed_at"],"additionalProperties":false},"last_sync_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"last_full_sync_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"last_inbound_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"domain_check":{"anyOf":[{"type":"object","properties":{"domain":{"type":"string"},"checked_at":{"type":"string","format":"date-time"},"checks":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string","enum":["spf","dkim","dmarc","reverse_dns"]},"status":{"type":"string","enum":["pass","warning","fail","unknown"]},"finding":{"type":"string","enum":["spf_found","spf_missing","spf_multiple","spf_allows_all","dkim_aligned","dkim_unaligned","dkim_key_missing","dkim_not_signed","dkim_not_checked","dmarc_enforced","dmarc_monitor_only","dmarc_missing","reverse_dns_confirmed","reverse_dns_missing","reverse_dns_mismatch","lookup_failed"]},"name":{"type":"string"},"record":{"type":["string","null"]}},"required":["key","status","finding","name","record"],"additionalProperties":false}}},"required":["domain","checked_at","checks"],"additionalProperties":false},{"type":"null"}]},"sending":{"type":"object","properties":{"last_24_hours":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Replies sent from the channel in 24 hours."},"daily_limit":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Google’s daily sending limit per user."}},"required":["last_24_hours","daily_limit"],"additionalProperties":false},"connected_at":{"type":"string","format":"date-time"},"disconnected_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]}},"required":["id","name","address","hosted_domain","status","status_changed_at","last_error","scopes","addresses","watch","last_sync_at","last_full_sync_at","last_inbound_at","domain_check","sending","connected_at","disconnected_at"],"additionalProperties":false},"GmailChannelList":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/GmailChannel"}},"platform_configured":{"type":"boolean","description":"Whether Google is set up on this Rabt: false means a mailbox cannot be connected yet (the app hides \"Connect Gmail\"; starting one answers `SYS-1001`)."}},"required":["data","platform_configured"],"additionalProperties":false},"GoogleBusinessAuthorization":{"type":"object","properties":{"authorization_url":{"type":"string","format":"uri","description":"Where the member signs in with Google."},"state":{"type":"string","description":"The sign-in’s `state` (it starts with the organization id); Google sends it back with the code."},"expires_at":{"type":"string","format":"date-time","description":"The sign-in must be finished before this time."}},"required":["authorization_url","state","expires_at"],"additionalProperties":false},"GoogleBusinessAvailableLocations":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Google’s business account id."},"name":{"type":"string"},"type":{"description":"`PERSONAL`, `LOCATION_GROUP`, `USER_GROUP` or `ORGANIZATION`.","type":["string","null"]},"role":{"description":"The Google account’s role on it: `PRIMARY_OWNER`, `OWNER`, `MANAGER`, `SITE_MANAGER`.","type":["string","null"]},"locations":{"type":"array","items":{"type":"object","properties":{"location_id":{"type":"string"},"name":{"type":"string"},"address":{"type":["string","null"]},"place_id":{"type":["string","null"]},"maps_uri":{"type":["string","null"]},"selected":{"type":"boolean","description":"Chosen on this channel."},"other_channel_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"description":"Another channel of the organization carries it (it cannot be chosen)."}},"required":["location_id","name","address","place_id","maps_uri","selected","other_channel_id"],"additionalProperties":false}}},"required":["id","name","type","role","locations"],"additionalProperties":false}}},"required":["data"],"additionalProperties":false,"description":"The business accounts and locations the channel’s Google account manages."},"GoogleBusinessChannel":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"google_account":{"type":"string","description":"The Google account signed in with."},"status":{"type":"string","enum":["pending","active","needs_reauth","disconnected"],"description":"`active`, `needs_reauth` (Google refused the saved access: reconnect), or `disconnected`."},"status_changed_at":{"type":"string","format":"date-time"},"last_error":{"anyOf":[{"type":"object","properties":{"code":{"type":"string","description":"The catalog code, e.g. `APS-3701` or `GBP-3806`."},"reference":{"type":"string","description":"The error log reference."},"retryable":{"type":"boolean"},"provider":{"anyOf":[{"type":"object","properties":{"name":{"type":"string"},"code":{"type":["string","null"]},"message":{"type":["string","null"]}},"required":["name","code","message"],"additionalProperties":false},{"type":"null"}]},"occurred_at":{"type":"string"},"params":{"description":"The values the catalog’s texts name, e.g. `{ \"service\": \"WhatsApp\" }`.","anyOf":[{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}},{"type":"null"}]}},"required":["code","reference","retryable","provider","occurred_at"],"additionalProperties":false,"description":"An error kept on the item it stopped (docs/23)."},{"type":"null"}]},"scopes":{"type":"array","items":{"type":"string"},"description":"The permissions Google granted."},"api_version":{"type":["string","null"]},"accounts":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Google’s business account id (`accounts/{id}`)."},"name":{"type":"string"},"notifications":{"type":"string","enum":["on","off","failed","not_configured"],"description":"Real-time review notifications: `on` (to Rabt’s Pub/Sub topic), `failed` (Google refused; retried at every reconciliation), `not_configured` (Rabt has no topic: new reviews come with the reconciliation every few minutes), `off`."},"notifications_checked_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"notifications_error":{"anyOf":[{"type":"object","properties":{"code":{"type":"string","description":"The catalog code, e.g. `APS-3701` or `GBP-3806`."},"reference":{"type":"string","description":"The error log reference."},"retryable":{"type":"boolean"},"provider":{"anyOf":[{"type":"object","properties":{"name":{"type":"string"},"code":{"type":["string","null"]},"message":{"type":["string","null"]}},"required":["name","code","message"],"additionalProperties":false},{"type":"null"}]},"occurred_at":{"type":"string"},"params":{"description":"The values the catalog’s texts name, e.g. `{ \"service\": \"WhatsApp\" }`.","anyOf":[{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}},{"type":"null"}]}},"required":["code","reference","retryable","provider","occurred_at"],"additionalProperties":false,"description":"An error kept on the item it stopped (docs/23)."},{"type":"null"}]}},"required":["id","name","notifications","notifications_checked_at","notifications_error"],"additionalProperties":false},"description":"The business accounts of the chosen locations."},"locations":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"The location’s review source id."},"address_id":{"type":"string","format":"uuid","description":"The location’s channel address: assign it to a space (`POST /v1/spaces/{space_id}/channels` with `channel_address_id`) or route it on the address routing page (docs/17)."},"location_id":{"type":"string","description":"Google’s location id."},"name":{"type":"string"},"account_id":{"type":"string"},"account_name":{"type":["string","null"]},"address":{"type":["string","null"]},"place_id":{"type":["string","null"]},"maps_uri":{"type":["string","null"]},"read_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"The last reading of its reviews."},"read_ok_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"last_error":{"anyOf":[{"type":"object","properties":{"code":{"type":"string","description":"The catalog code, e.g. `APS-3701` or `GBP-3806`."},"reference":{"type":"string","description":"The error log reference."},"retryable":{"type":"boolean"},"provider":{"anyOf":[{"type":"object","properties":{"name":{"type":"string"},"code":{"type":["string","null"]},"message":{"type":["string","null"]}},"required":["name","code","message"],"additionalProperties":false},{"type":"null"}]},"occurred_at":{"type":"string"},"params":{"description":"The values the catalog’s texts name, e.g. `{ \"service\": \"WhatsApp\" }`.","anyOf":[{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}},{"type":"null"}]}},"required":["code","reference","retryable","provider","occurred_at"],"additionalProperties":false,"description":"An error kept on the item it stopped (docs/23)."},{"type":"null"}],"description":"Why the last reading failed; null after a good one."}},"required":["id","address_id","location_id","name","account_id","account_name","address","place_id","maps_uri","read_at","read_ok_at","last_error"],"additionalProperties":false},"description":"The chosen locations, by name."},"reply_rules":{"$ref":"#/components/schemas/ReviewReplyRules"},"last_inbound_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"last_reconcile_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"locations_changed_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"connected_at":{"type":"string","format":"date-time"},"disconnected_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]}},"required":["id","name","google_account","status","status_changed_at","last_error","scopes","api_version","accounts","locations","reply_rules","last_inbound_at","last_reconcile_at","locations_changed_at","connected_at","disconnected_at"],"additionalProperties":false},"GoogleBusinessChannelList":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/GoogleBusinessChannel"}}},"required":["data"],"additionalProperties":false},"GooglePlayAuthorization":{"type":"object","properties":{"authorization_url":{"type":"string","format":"uri","description":"Where the member signs in with Google."},"state":{"type":"string","description":"The sign-in’s `state` (it starts with the organization id); Google sends it back with the code."},"expires_at":{"type":"string","format":"date-time","description":"The sign-in must be finished before this time."}},"required":["authorization_url","state","expires_at"],"additionalProperties":false},"GooglePlayChannel":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"connected_with":{"type":"string","enum":["google_sign_in","service_account_key"],"description":"How the channel reaches Google: a member’s Google sign-in (one button), or a service account key."},"client_email":{"type":"string","description":"The account it reads with: the signed-in Google account’s email, or the service account’s address."},"project_id":{"description":"The service account’s Google Cloud project; null for a sign-in.","type":["string","null"]},"key_id":{"description":"The key’s id (`private_key_id`); null for a sign-in.","type":["string","null"]},"package_names":{"type":"array","items":{"type":"string"},"description":"Package names added by hand."},"status":{"type":"string","enum":["pending","active","needs_reauth","disconnected"],"description":"`active`, `needs_reauth` (Google refused the access, a permission or an API: check again or reconnect) or `disconnected`."},"status_changed_at":{"type":"string","format":"date-time"},"last_error":{"anyOf":[{"type":"object","properties":{"code":{"type":"string","description":"The catalog code, e.g. `APS-3701` or `GBP-3806`."},"reference":{"type":"string","description":"The error log reference."},"retryable":{"type":"boolean"},"provider":{"anyOf":[{"type":"object","properties":{"name":{"type":"string"},"code":{"type":["string","null"]},"message":{"type":["string","null"]}},"required":["name","code","message"],"additionalProperties":false},{"type":"null"}]},"occurred_at":{"type":"string"},"params":{"description":"The values the catalog’s texts name, e.g. `{ \"service\": \"WhatsApp\" }`.","anyOf":[{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}},{"type":"null"}]}},"required":["code","reference","retryable","provider","occurred_at"],"additionalProperties":false,"description":"An error kept on the item it stopped (docs/23)."},{"type":"null"}]},"apps":{"type":"array","items":{"type":"object","properties":{"address_id":{"type":"string","format":"uuid","description":"The app’s channel address: assign it to a space (`POST /v1/spaces/{space_id}/channels` with `channel_address_id`) to route its reviews."},"package_name":{"type":"string"},"name":{"type":"string"},"added_by_hand":{"type":"boolean"},"polled_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"polled_ok_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"last_poll_error":{"anyOf":[{"type":"object","properties":{"code":{"type":"string","description":"The catalog code, e.g. `APS-3701` or `GBP-3806`."},"reference":{"type":"string","description":"The error log reference."},"retryable":{"type":"boolean"},"provider":{"anyOf":[{"type":"object","properties":{"name":{"type":"string"},"code":{"type":["string","null"]},"message":{"type":["string","null"]}},"required":["name","code","message"],"additionalProperties":false},{"type":"null"}]},"occurred_at":{"type":"string"},"params":{"description":"The values the catalog’s texts name, e.g. `{ \"service\": \"WhatsApp\" }`.","anyOf":[{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}},{"type":"null"}]}},"required":["code","reference","retryable","provider","occurred_at"],"additionalProperties":false,"description":"An error kept on the item it stopped (docs/23)."},{"type":"null"}]},"covered_through":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"Every review written or changed up to this time was read."},"reviews_lost_after":{"type":"string","format":"date-time","description":"Google lists reviews for 7 days: reviews are missed unless polling reads the app again before this time."},"coverage":{"type":"string","enum":["current","delayed","stalled"],"description":"`current`; `delayed` (more than an hour behind); `stalled` (more than a day behind: alerted)."},"coverage_gap":{"anyOf":[{"type":"object","properties":{"from":{"type":"string","format":"date-time"},"until":{"type":"string","format":"date-time"},"detected_at":{"type":"string","format":"date-time"},"code":{"type":"string"},"reference":{"type":"string"}},"required":["from","until","detected_at","code","reference"],"additionalProperties":false,"description":"The last stretch polling did not read: reviews written or changed between `from` and `until` may be missing (see them in Play Console)."},{"type":"null"}]}},"required":["address_id","package_name","name","added_by_hand","polled_at","polled_ok_at","last_poll_error","covered_through","reviews_lost_after","coverage","coverage_gap"],"additionalProperties":false}},"reply_rules":{"$ref":"#/components/schemas/ReviewReplyRules"},"last_inbound_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"connected_at":{"type":"string","format":"date-time"},"disconnected_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]}},"required":["id","name","connected_with","client_email","project_id","key_id","package_names","status","status_changed_at","last_error","apps","reply_rules","last_inbound_at","connected_at","disconnected_at"],"additionalProperties":false},"GooglePlayChannelList":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/GooglePlayChannel"}}},"required":["data"],"additionalProperties":false},"HighlightedText":{"type":"object","properties":{"text":{"type":"string"},"highlights":{"type":"array","items":{"type":"object","properties":{"start":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Offset in UTF-16 code units (JavaScript string index)."},"length":{"type":"integer","minimum":1,"maximum":9007199254740991}},"required":["start","length"],"additionalProperties":false},"description":"The parts of `text` that matched."}},"required":["text","highlights"],"additionalProperties":false},"HistoryTicket":{"anyOf":[{"type":"object","properties":{"restricted":{"type":"boolean","enum":[false]},"id":{"type":"string","format":"uuid"},"number":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"channel_type":{"$ref":"#/components/schemas/ChannelType"},"subject":{"type":["string","null"]},"status":{"$ref":"#/components/schemas/TicketStatus"},"created_at":{"type":"string","format":"date-time"}},"required":["restricted","id","number","channel_type","subject","status","created_at"],"additionalProperties":false},{"type":"object","properties":{"restricted":{"type":"boolean","enum":[true]},"number":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"channel_type":{"$ref":"#/components/schemas/ChannelType"},"created_at":{"type":"string","format":"date-time"}},"required":["restricted","number","channel_type","created_at"],"additionalProperties":false}],"description":"A ticket of the history; in a space you cannot access: number, channel and date only."},"ImportTemplateFile":{"type":"object","properties":{"file_name":{"type":"string"},"content_type":{"type":"string","enum":["text/csv; charset=utf-8","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"]},"encoding":{"type":"string","enum":["utf-8","base64"],"description":"`utf-8`: `content` is the CSV text; `base64`: the workbook’s bytes."},"content":{"type":"string"}},"required":["file_name","content_type","encoding","content"],"additionalProperties":false},"ImportTicketContacts":{"type":"object","properties":{"source":{"$ref":"#/components/schemas/TicketImportSource"},"source_account":{"type":"string","minLength":1,"maxLength":100,"description":"The source’s account: its subdomain or workspace id, or for `csv` and `other` the label of the file or system. With `source` it scopes every source id: two accounts never share one."},"companies":{"default":[],"maxItems":100,"type":"array","items":{"type":"object","properties":{"external_id":{"type":"string","minLength":1,"maxLength":200},"name":{"type":"string","minLength":1,"maxLength":200},"domains":{"default":[],"description":"Its email domains: an existing company with one of them is matched.","maxItems":20,"type":"array","items":{"type":"string","minLength":1,"maxLength":253}}},"required":["external_id","name"],"additionalProperties":false}},"contacts":{"default":[],"maxItems":100,"type":"array","items":{"type":"object","properties":{"external_id":{"type":"string","minLength":1,"maxLength":200},"name":{"anyOf":[{"type":"string","minLength":1,"maxLength":200},{"type":"null"}]},"emails":{"default":[],"maxItems":20,"type":"array","items":{"type":"string","minLength":1,"maxLength":320}},"phones":{"default":[],"description":"Phone numbers (E.164, or local to the organization’s country). An invalid one, or one another contact has, is skipped and named in `skipped`.","maxItems":20,"type":"array","items":{"type":"string","minLength":1,"maxLength":40}},"company_external_id":{"description":"The company’s source id (imported in this call or before).","anyOf":[{"type":"string","minLength":1,"maxLength":200},{"type":"null"}]}},"required":["external_id"],"additionalProperties":false}}},"required":["source","source_account"],"additionalProperties":false},"ImportTicketMembers":{"type":"object","properties":{"source":{"$ref":"#/components/schemas/TicketImportSource"},"source_account":{"type":"string","minLength":1,"maxLength":100,"description":"The source’s account: its subdomain or workspace id, or for `csv` and `other` the label of the file or system. With `source` it scopes every source id: two accounts never share one."},"members":{"minItems":1,"maxItems":100,"type":"array","items":{"type":"object","properties":{"external_id":{"type":"string","minLength":1,"maxLength":200,"description":"The agent’s id in the source."},"name":{"type":"string","minLength":1,"maxLength":200},"email":{"type":"string","maxLength":320,"format":"email","description":"The member with this email is matched; otherwise an inactive imported member is created (no seat fee, no invitation, no sign-in)."},"role_id":{"description":"The role of a new member (default: Agent).","anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"job_title":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}]}},"required":["external_id","name","email"],"additionalProperties":false}}},"required":["source","source_account","members"],"additionalProperties":false},"ImportTickets":{"type":"object","properties":{"validate_only":{"default":false,"description":"Check every ticket as if imported (each issue with its field path, every unmapped value per kind) and write nothing.","type":"boolean"},"tickets":{"minItems":1,"type":"array","items":{"type":"object","properties":{"external_id":{"type":"string","minLength":1,"maxLength":200,"description":"The ticket’s id in the source."},"ticket_id":{"description":"This source’s ticket already in Rabt, to append to (`TKT-6256` for another’s).","anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"subject":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}]},"status":{"type":"string","enum":["open","in_progress","closed"]},"priority":{"default":"normal","type":"string","enum":["low","normal","high"]},"channel":{"anyOf":[{"type":"object","properties":{"id":{"type":"string","format":"uuid"}},"required":["id"],"additionalProperties":false},{"type":"object","properties":{"external_id":{"type":"string","minLength":1,"maxLength":200}},"required":["external_id"],"additionalProperties":false}],"description":"The connected channel the mapping chose (`{id}` or the `{external_id}` it was mapped by); its type is the ticket’s."},"source_channel":{"description":"The source’s own channel or address, kept in «تفاصيل الاستيراد».","anyOf":[{"type":"string","minLength":1,"maxLength":200},{"type":"null"}]},"space":{"anyOf":[{"anyOf":[{"type":"object","properties":{"id":{"type":"string","format":"uuid"}},"required":["id"],"additionalProperties":false},{"type":"object","properties":{"external_id":{"type":"string","minLength":1,"maxLength":200}},"required":["external_id"],"additionalProperties":false}]},{"type":"null"}]},"assignee":{"anyOf":[{"anyOf":[{"type":"object","properties":{"id":{"type":"string","format":"uuid"}},"required":["id"],"additionalProperties":false},{"type":"object","properties":{"external_id":{"type":"string","minLength":1,"maxLength":200}},"required":["external_id"],"additionalProperties":false}]},{"type":"null"}]},"requester":{"anyOf":[{"type":"object","properties":{"id":{"type":"string","format":"uuid"}},"required":["id"],"additionalProperties":false},{"type":"object","properties":{"external_id":{"type":"string","minLength":1,"maxLength":200}},"required":["external_id"],"additionalProperties":false}]},"created_at":{"type":"string","format":"date-time"},"updated_at":{"description":"The source’s last change: a later send with an older one changes nothing.","anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"closed_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"source_url":{"anyOf":[{"type":"string","maxLength":2048,"format":"uri"},{"type":"null"}]},"tags":{"default":[],"description":"Existing tags the mapping chose (an import never creates one).","maxItems":20,"type":"array","items":{"anyOf":[{"type":"object","properties":{"id":{"type":"string","format":"uuid"}},"required":["id"],"additionalProperties":false},{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200}},"required":["name"],"additionalProperties":false}]}},"classifications":{"default":[],"description":"Existing classification options the mapping chose (one per list).","maxItems":20,"type":"array","items":{"anyOf":[{"type":"object","properties":{"option_id":{"type":"string","format":"uuid"}},"required":["option_id"],"additionalProperties":false},{"type":"object","properties":{"list":{"type":"string","minLength":1,"maxLength":200},"option":{"type":"string","minLength":1,"maxLength":200}},"required":["list","option"],"additionalProperties":false}]}},"details":{"default":[],"description":"Every other source field, kept in «تفاصيل الاستيراد».","maxItems":100,"type":"array","items":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200},"value":{"type":"string","maxLength":5000}},"required":["name","value"],"additionalProperties":false}},"items":{"default":[],"description":"Its messages and internal notes, oldest first.","maxItems":4000,"type":"array","items":{"type":"object","properties":{"external_id":{"type":"string","minLength":1,"maxLength":200},"kind":{"type":"string","enum":["message","note"]},"direction":{"default":"inbound","description":"A message’s direction; a note is always the member’s.","type":"string","enum":["inbound","outbound"]},"author":{"description":"A member (notes, replies) or a contact (incoming messages; the requester when absent).","anyOf":[{"anyOf":[{"type":"object","properties":{"member":{"anyOf":[{"type":"object","properties":{"id":{"type":"string","format":"uuid"}},"required":["id"],"additionalProperties":false},{"type":"object","properties":{"external_id":{"type":"string","minLength":1,"maxLength":200}},"required":["external_id"],"additionalProperties":false}]}},"required":["member"],"additionalProperties":false},{"type":"object","properties":{"contact":{"anyOf":[{"type":"object","properties":{"id":{"type":"string","format":"uuid"}},"required":["id"],"additionalProperties":false},{"type":"object","properties":{"external_id":{"type":"string","minLength":1,"maxLength":200}},"required":["external_id"],"additionalProperties":false}]}},"required":["contact"],"additionalProperties":false}]},{"type":"null"}]},"body":{"anyOf":[{"type":"string","maxLength":524288},{"type":"null"}]},"body_format":{"default":"text","description":"`html`: an email’s HTML, kept as inbound email keeps it.","type":"string","enum":["text","html"]},"created_at":{"type":"string","format":"date-time"},"attachments":{"default":[],"description":"Each file by its address or its upload, never both.","maxItems":20,"type":"array","items":{"anyOf":[{"type":"object","properties":{"source_url":{"type":"string","maxLength":2048,"format":"uri","description":"A public https address Rabt fetches (redirects followed and checked; up to 100 MB). A failure keeps the item and shows on the batch with its code."},"file_name":{"type":"string","minLength":1,"maxLength":255},"mime_type":{"anyOf":[{"type":"string","minLength":1,"maxLength":255},{"type":"null"}]},"size_bytes":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"content_id":{"description":"The Content-ID an email HTML body’s `cid:` image points at.","anyOf":[{"type":"string","minLength":1,"maxLength":502},{"type":"null"}]}},"required":["source_url","file_name"],"additionalProperties":false},{"type":"object","properties":{"upload_id":{"type":"string","format":"uuid","description":"A file uploaded to this ticket and completed (`POST /v1/tickets/{id}/attachments`, then `POST /v1/attachments/{id}/complete`), used once: send the ticket first, then its items with uploaded files in a later call with `ticket_id`."},"content_id":{"description":"The Content-ID an email HTML body’s `cid:` image points at.","anyOf":[{"type":"string","minLength":1,"maxLength":502},{"type":"null"}]}},"required":["upload_id"],"additionalProperties":false}]}},"email":{"description":"An email message’s Message-ID, In-Reply-To and References: a customer’s later reply to the old thread joins this ticket.","anyOf":[{"type":"object","properties":{"message_id":{"type":"string","minLength":1,"maxLength":502},"in_reply_to":{"anyOf":[{"type":"string","minLength":1,"maxLength":502},{"type":"null"}]},"references":{"default":[],"maxItems":100,"type":"array","items":{"type":"string","minLength":1,"maxLength":502}}},"required":["message_id"],"additionalProperties":false},{"type":"null"}]}},"required":["external_id","kind","created_at"],"additionalProperties":false}}},"required":["external_id","status","channel","requester","created_at"],"additionalProperties":false},"description":"Up to 50 tickets (2000 messages and notes in all, 1048576 bytes) per call, each checked on its own: a ticket with an issue is answered in its result, the others are imported."}},"required":["tickets"],"additionalProperties":false},"InlineFileRequest":{"type":"object","properties":{"content_base64":{"type":"string","minLength":1,"maxLength":700000,"pattern":"^[A-Za-z0-9+/]+={0,2}$","description":"The file's bytes in base64 (standard alphabet), at most 700000 characters (about 500 KB); larger files: a signed upload or an address."},"file_name":{"type":"string","minLength":1,"maxLength":255,"description":"Its name."},"ticket_id":{"description":"The ticket it is for; none: for a ticket not started yet (the first message’s `attachment_ids`).","anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"mime_type":{"description":"Its type; default: the one its name suggests.","type":"string","maxLength":255,"pattern":"^[a-z0-9!#$&^_.+-]+\\/[a-z0-9!#$&^_.+-]+$"}},"required":["content_base64","file_name"],"additionalProperties":false},"InstagramChannel":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"account_id":{"type":"string","description":"The Instagram professional account id."},"username":{"type":"string"},"account_name":{"type":["string","null"]},"login":{"type":"string","enum":["facebook","instagram"],"description":"How it was connected: through its Facebook Page, or with Instagram Login."},"page_id":{"description":"Facebook Login: the linked Page.","type":["string","null"]},"page_name":{"type":["string","null"]},"status":{"type":"string","enum":["pending","active","needs_reauth","disconnected"],"description":"`pending` until the account is subscribed to Rabt’s webhooks, `active`, `needs_reauth` (Meta refused the token: reconnect), `disconnected`."},"status_changed_at":{"type":"string","format":"date-time"},"last_error":{"anyOf":[{"$ref":"#/components/schemas/InstagramChannelError"},{"type":"null"}]},"scopes":{"type":"array","items":{"type":"string"},"description":"The permissions granted at Meta."},"connected_by_name":{"description":"Who connected it, by their name at Meta; null once Meta asked it erased.","type":["string","null"]},"connected_by_membership_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"subscribed_fields":{"type":"array","items":{"type":"string"}},"subscribed_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"token_expires_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"Instagram Login: when the token expires (Rabt refreshes it 10 days ahead); null for a Page token, which does not expire."},"last_inbound_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"api_version":{"type":["string","null"]},"connected_at":{"type":"string","format":"date-time"},"disconnected_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]}},"required":["id","name","account_id","username","account_name","login","page_id","page_name","status","status_changed_at","last_error","scopes","connected_by_name","connected_by_membership_id","subscribed_fields","subscribed_at","token_expires_at","last_inbound_at","api_version","connected_at","disconnected_at"],"additionalProperties":false},"InstagramChannelError":{"type":"object","properties":{"code":{"type":"string"},"reference":{"type":"string"},"retryable":{"type":"boolean"},"provider":{"anyOf":[{"type":"object","properties":{"name":{"type":"string"},"code":{"type":["string","null"]},"message":{"type":["string","null"]}},"required":["name","code","message"],"additionalProperties":false},{"type":"null"}]},"occurred_at":{"type":"string"},"params":{"description":"The values the catalog’s texts name, e.g. `{ \"service\": \"WhatsApp\" }`.","anyOf":[{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}},{"type":"null"}]}},"required":["code","reference","retryable","provider","occurred_at"],"additionalProperties":false,"description":"Why the channel needs attention (docs/23)."},"InstagramChannelList":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/InstagramChannel"}},"logins":{"$ref":"#/components/schemas/InstagramLoginOptions"}},"required":["data","logins"],"additionalProperties":false},"InstagramConnectResult":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/InstagramChannel"},"description":"The accounts connected or reconnected, with the permissions granted."},"refused":{"type":"array","items":{"type":"object","properties":{"account_id":{"type":"string"},"username":{"type":"string"},"code":{"type":"string"},"reference":{"type":"string"}},"required":["account_id","username","code","reference"],"additionalProperties":false},"description":"Accounts not connected (`IG-2005`: live in another organization)."},"pages_without_account":{"type":"array","items":{"type":"object","properties":{"page_id":{"type":"string"},"page_name":{"type":"string"}},"required":["page_id","page_name"],"additionalProperties":false},"description":"Facebook Login: Pages chosen that are linked to no Instagram professional account."}},"required":["data","refused","pages_without_account"],"additionalProperties":false},"InstagramConnectStart":{"type":"object","properties":{"url":{"type":"string","format":"uri","description":"Meta's sign-in window (Facebook's or Instagram's): open it in the person's browser. Meta sends them back to Rabt's callback page, which completes the connection."},"expires_at":{"type":"string","format":"date-time","description":"The flow must be completed before then."}},"required":["url","expires_at"],"additionalProperties":false},"InstagramLoginOptions":{"type":"object","properties":{"facebook":{"type":"boolean","description":"Facebook Login is offered: the account is reached through the Facebook Page it is linked to."},"instagram":{"type":"boolean","description":"Instagram Login is offered: the professional account signs in itself, no Page needed."}},"required":["facebook","instagram"],"additionalProperties":false,"description":"The ways to connect this Rabt offers (both false: Instagram is not set up)."},"InstagramMedia":{"type":"object","properties":{"id":{"type":"string","description":"The Instagram media id (`media_id` of a post share)."},"caption":{"type":["string","null"]},"media_type":{"type":"string","description":"Meta’s `media_type`: IMAGE, VIDEO or CAROUSEL_ALBUM."},"media_product_type":{"description":"Meta’s `media_product_type`: FEED, REELS or STORY.","type":["string","null"]},"preview_url":{"description":"The image, or a video’s cover, on Instagram’s CDN (it expires).","type":["string","null"]},"permalink":{"type":["string","null"]},"posted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]}},"required":["id","caption","media_type","media_product_type","preview_url","permalink","posted_at"],"additionalProperties":false},"InstagramMediaList":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/InstagramMedia"}}},"required":["data"],"additionalProperties":false},"InstagramSentMessage":{"type":"object","properties":{"message_id":{"type":"string","format":"uuid"},"duplicate":{"type":"boolean","description":"The client key was used before: its message."}},"required":["message_id","duplicate"],"additionalProperties":false},"InstalledApp":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"client_id":{"type":"string"},"name":{"type":"string"},"kind":{"type":"string","enum":["registered","metadata_document"],"description":"`registered`: an app registered in Rabt. `metadata_document`: a client identified by its Client ID Metadata Document URL (MCP clients)."},"scopes":{"type":"array","items":{"$ref":"#/components/schemas/Scope"}},"resource":{"type":"string","description":"The REST API or the MCP server (RFC 8707)."},"status":{"type":"string","enum":["active","revoked"]},"member":{"type":"object","properties":{"membership_id":{"type":"string","format":"uuid"},"name":{"type":"string"}},"required":["membership_id","name"],"additionalProperties":false,"description":"The member who connected it: its tokens act as them."},"last_used_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"When one of its tokens was last used (to the minute)."},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"revoked_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]}},"required":["id","client_id","name","kind","scopes","resource","status","member","last_used_at","created_at","updated_at","revoked_at"],"additionalProperties":false,"description":"An OAuth app or AI assistant a member connected in this organization."},"InstalledAppList":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/InstalledApp"}}},"required":["data"],"additionalProperties":false},"Integration":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"adapter":{"type":"string","description":"`salla`, `zid`, `shopify`, `wafeq_accounting`, `zoho_books`, `zoho_crm`, `foodics` or `qoyod`."},"label":{"type":"string","description":"The platform’s name."},"name":{"type":"string","description":"The store’s name."},"external_account_id":{"type":"string","description":"The platform’s id of the store."},"status":{"type":"string","enum":["active","needs_reauth","disconnected"],"description":"`active`, `needs_reauth` (the platform refused the saved access: reconnect), or `disconnected`."},"status_changed_at":{"type":"string","format":"date-time"},"last_error":{"anyOf":[{"$ref":"#/components/schemas/IntegrationError"},{"type":"null"}]},"scopes":{"type":"array","items":{"type":"string"},"description":"The permissions the store granted."},"api_version":{"type":"string"},"configured":{"type":"boolean","description":"Whether its platform is set up on this Rabt (otherwise it waits: `SYS-1001`)."},"token_expires_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"webhooks":{"type":"object","properties":{"managed":{"type":"boolean","description":"Rabt creates the store’s webhook subscriptions (the platform needs it)."},"subscribed_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]}},"required":["managed","subscribed_at"],"additionalProperties":false},"last_synced_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"last_webhook_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"connection":{"type":"object","properties":{"health":{"type":"string","enum":["ok","pending","failing","needs_reauth","not_configured","disconnected"],"description":"Checked by each finished sync: `ok`, `pending` (not checked yet), `failing` (the platform failed the last checks; `last_error` says why and its class), `needs_reauth`, `not_configured` (`SYS-1001`) or `disconnected`."},"error_class":{"anyOf":[{"type":"string","enum":["rabt","provider","customer_account","end_customer","not_configured","expected"]},{"type":"null"}],"description":"Who acts while it is not working: `provider` (the platform is failing; Rabt checks again on its own), `customer_account` (the account at the platform: reconnect or fix it there), `not_configured`, `rabt`."},"checked_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"failing_since":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]}},"required":["health","error_class","checked_at","failing_since"],"additionalProperties":false},"reads_on_contact":{"description":"Never copied in bulk (Salla, Zid): a customer is read when they write in; no sync runs (`INT-7023`).","type":"boolean"},"latest_sync_run":{"anyOf":[{"$ref":"#/components/schemas/IntegrationSyncRun"},{"type":"null"}]},"connected_at":{"type":"string","format":"date-time"},"disconnected_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]}},"required":["id","adapter","label","name","external_account_id","status","status_changed_at","last_error","scopes","api_version","configured","token_expires_at","webhooks","last_synced_at","last_webhook_at","latest_sync_run","connected_at","disconnected_at"],"additionalProperties":false},"IntegrationAuthorization":{"type":"object","properties":{"authorization_url":{"type":"string","format":"uri","description":"Where the member signs in to the platform (`callback`), or the page that installs Rabt’s app in the store (`store_settings`)."},"state":{"type":"string","description":"The sign-in’s `state` (it starts with the organization id); the platform sends it back with the code."},"completion":{"type":"string","enum":["callback","store_settings"],"description":"How the sign-in finishes: the platform sends the member back to the callback page (`callback`), or the app is installed at `authorization_url` (`store_settings`, Salla): connected to this sign-in by itself when the installer’s email and phone are both the member’s verified ones, else once a member claims the store (its welcome email’s link, or Salla’s embedded page); the integration then appears with an `integration.connected` event."},"expires_at":{"type":"string","format":"date-time","description":"The sign-in must be finished before this time."}},"required":["authorization_url","state","completion","expires_at"],"additionalProperties":false},"IntegrationError":{"type":"object","properties":{"code":{"type":"string"},"reference":{"type":"string"},"retryable":{"type":"boolean"},"provider":{"anyOf":[{"type":"object","properties":{"name":{"type":"string"},"code":{"type":["string","null"]},"message":{"type":["string","null"]}},"required":["name","code","message"],"additionalProperties":false},{"type":"null"}]},"occurred_at":{"type":"string"},"params":{"description":"The values the catalog’s texts name, e.g. `{ \"service\": \"WhatsApp\" }`.","anyOf":[{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}},{"type":"null"}]}},"required":["code","reference","retryable","provider","occurred_at"],"additionalProperties":false},"IntegrationInstallClaim":{"type":"object","properties":{"adapter":{"type":"string","description":"The platform."},"integration_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"description":"The store’s integration when it is connected to this organization already (the link opened again); nothing is queued then."},"expires_at":{"type":"string","format":"date-time","description":"The store is connected before this time; the integration then appears with an `integration.connected` event. Otherwise the cause is in the error log."}},"required":["adapter","integration_id","expires_at"],"additionalProperties":false},"IntegrationList":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Integration"}}},"required":["data"],"additionalProperties":false},"IntegrationPlatform":{"type":"object","properties":{"adapter":{"type":"string","description":"`salla`, `zid`, `shopify`, `wafeq_accounting`, `zoho_books`, `zoho_crm`, `foodics` or `qoyod`."},"label":{"type":"string","description":"The platform’s name."},"configured":{"type":"boolean","description":"Whether it can be connected on this Rabt; connecting one that is not answers `SYS-1001`."},"account_hint":{"anyOf":[{"type":"string","enum":["none","shop_domain"]},{"type":"null"}],"description":"What the member types before signing in (`shop_domain`: the store’s address)."}},"required":["adapter","label","configured","account_hint"],"additionalProperties":false},"IntegrationPlatformList":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/IntegrationPlatform"}}},"required":["data"],"additionalProperties":false},"IntegrationSyncRun":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"trigger":{"type":"string","enum":["connect","reconnect","schedule","member"]},"status":{"type":"string","enum":["queued","running","succeeded","failed"],"description":"`queued`, `running`, `succeeded`, or `failed` with its `error` (a new sync tries again)."},"customers_synced":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"orders_synced":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"started_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"finished_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"error":{"anyOf":[{"$ref":"#/components/schemas/IntegrationError"},{"type":"null"}]},"created_at":{"type":"string","format":"date-time"}},"required":["id","trigger","status","customers_synced","orders_synced","started_at","finished_at","error","created_at"],"additionalProperties":false},"IntegrationSyncRunList":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/IntegrationSyncRun"}}},"required":["data"],"additionalProperties":false},"Invitation":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"email":{"type":["string","null"]},"phone":{"description":"E.164.","type":["string","null"]},"name":{"description":"The invited person's name (null on invitations sent before it).","type":["string","null"]},"job_title":{"description":"The invited person's job title, given to them when they accept (null on invitations sent before it).","type":["string","null"]},"role":{"$ref":"#/components/schemas/RoleRef"},"invited_by":{"type":"object","properties":{"membership_id":{"type":"string","format":"uuid"},"name":{"type":"string"}},"required":["membership_id","name"],"additionalProperties":false},"status":{"type":"string","enum":["pending","expired","accepted","declined","revoked"]},"expires_at":{"type":"string","format":"date-time"},"sent_at":{"type":"string","format":"date-time"},"created_at":{"type":"string","format":"date-time"},"accepted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"declined_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]}},"required":["id","email","phone","name","job_title","role","invited_by","status","expires_at","sent_at","created_at","accepted_at","declined_at"],"additionalProperties":false,"description":"An invitation to the organization."},"InvitationList":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Invitation"},"description":"Invitations not answered and not withdrawn, newest first."}},"required":["data"],"additionalProperties":false},"Invoice":{"type":"object","properties":{"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"state":{"type":"string","enum":["open","draft","finalized","empty"],"description":"`open`: the running month so far; `draft`: the month ended and is not closed yet; `finalized`: the tax invoice; `empty`: closed with nothing billed."},"number":{"type":["string","null"],"example":"RB-2026-000123"},"period_month":{"type":"string","example":"2026-09-01"},"period_start":{"type":"string","format":"date-time"},"period_end":{"type":"string","format":"date-time"},"totals":{"anyOf":[{"$ref":"#/components/schemas/InvoiceTotals"},{"type":"null"}]},"finalized_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"einvoice":{"anyOf":[{"$ref":"#/components/schemas/EInvoiceSubmission"},{"type":"null"}]},"email":{"anyOf":[{"type":"object","properties":{"status":{"type":"string","enum":["sent","failed"]},"sent_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"error_code":{"type":["string","null"]},"error_reference":{"type":["string","null"]}},"required":["status","sent_at","error_code","error_reference"],"additionalProperties":false},{"type":"null"}],"description":"The PDF sent to the billing email."},"sections":{"type":"array","items":{"$ref":"#/components/schemas/InvoiceSection"}},"seller":{"anyOf":[{"$ref":"#/components/schemas/BillingParty"},{"type":"null"}]},"buyer":{"anyOf":[{"$ref":"#/components/schemas/BillingParty"},{"type":"null"}]}},"required":["id","state","number","period_month","period_start","period_end","totals","finalized_at","einvoice","email","sections","seller","buyer"],"additionalProperties":false,"description":"A monthly invoice grouped per resource (docs/10); a draft or the running month is laid out live."},"InvoiceLine":{"type":"object","properties":{"metric":{"type":"string"},"item_key":{"description":"The rate-card item of a usage line (null for seats), from `metric` and `dimensions`: an AI line is its customer unit (`ai.reply`, `ai.call_minute`, `ai.campaign_voice`, `ai.knowledge`).","type":["string","null"]},"dimensions":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"},"description":"What the line is priced by (`category`, `route`…). An AI line has `use`: `reply` (automatic replies), `call_minute` (the AI agent on calls), `campaign_voice` (speech of call campaigns) or `knowledge` (preparing the AI knowledge); the model it was priced by is not shown (deprecated, no longer sent)."},"description":{"$ref":"#/components/schemas/BilingualText"},"quantity":{"type":"string","description":"Base units (messages, minutes, replies, seats), decimal text."},"unit":{"type":"string"},"unit_size":{"type":"integer","minimum":1,"maximum":9007199254740991,"description":"The unit price is for this many base units."},"unit_price":{"type":"integer","minimum":0,"maximum":9007199254740991},"amount":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["metric","item_key","dimensions","description","quantity","unit","unit_size","unit_price","amount"],"additionalProperties":false},"InvoiceList":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/InvoiceSummary"}},"next_cursor":{"type":["string","null"]},"total":{"type":"integer","minimum":0,"maximum":10000,"description":"How many rows the list has with these filters, counted up to 10000."},"total_capped":{"type":"boolean","description":"The list has more than 10000 rows (`total` is 10000)."}},"required":["data","next_cursor","total","total_capped"],"additionalProperties":false,"description":"Months that ended, newest first."},"InvoiceSection":{"type":"object","properties":{"resource_type":{"type":"string","enum":["seat","channel","channel_address","phone_number","sender_name","ai"]},"resource_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"service":{"type":["string","null"]},"label":{"type":"string"},"title":{"$ref":"#/components/schemas/BilingualText"},"subtotal":{"type":"integer","minimum":0,"maximum":9007199254740991},"lines":{"type":"array","items":{"$ref":"#/components/schemas/InvoiceLine"}}},"required":["resource_type","resource_id","service","label","title","subtotal","lines"],"additionalProperties":false},"InvoiceSummary":{"type":"object","properties":{"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"state":{"type":"string","enum":["open","draft","finalized","empty"],"description":"`open`: the running month so far; `draft`: the month ended and is not closed yet; `finalized`: the tax invoice; `empty`: closed with nothing billed."},"number":{"type":["string","null"],"example":"RB-2026-000123"},"period_month":{"type":"string","example":"2026-09-01"},"period_start":{"type":"string","format":"date-time"},"period_end":{"type":"string","format":"date-time"},"totals":{"anyOf":[{"$ref":"#/components/schemas/InvoiceTotals"},{"type":"null"}]},"finalized_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"einvoice":{"anyOf":[{"$ref":"#/components/schemas/EInvoiceSubmission"},{"type":"null"}]},"email":{"anyOf":[{"type":"object","properties":{"status":{"type":"string","enum":["sent","failed"]},"sent_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"error_code":{"type":["string","null"]},"error_reference":{"type":["string","null"]}},"required":["status","sent_at","error_code","error_reference"],"additionalProperties":false},{"type":"null"}],"description":"The PDF sent to the billing email."}},"required":["id","state","number","period_month","period_start","period_end","totals","finalized_at","einvoice","email"],"additionalProperties":false},"InvoiceTotals":{"type":"object","properties":{"subtotal":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Without VAT."},"tax":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"The VAT included in the total."},"total":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"What the wallet was charged, VAT included."},"vat_rate":{"type":"string","description":"The VAT rate, a percentage.","example":"15"}},"required":["subtotal","tax","total","vat_rate"],"additionalProperties":false},"IssuedApiKey":{"type":"object","properties":{"api_key":{"$ref":"#/components/schemas/ApiKey"},"key":{"description":"The key: send it as `Authorization: Bearer <key>`. Shown only now; Rabt keeps only its hash. Null when an API key or app made an organization key: it opens once in Rabt's app (`secret_view`).","type":["string","null"]},"shown_once":{"description":"True: the secret is in this answer, shown only now. A repeat with the same `Idempotency-Key` within 10 minutes answers it again; a later one is `API-8118` (rotate again for a new one).","type":"boolean"},"secret_view":{"anyOf":[{"$ref":"#/components/schemas/SecretViewLink"},{"type":"null"}],"description":"Made with an API key or app: the link that shows the key once in Rabt's app (the member, signed in, with a recent code). Null in the app."}},"required":["api_key","key","secret_view"],"additionalProperties":false},"IssuedInvitation":{"type":"object","properties":{"invitation":{"$ref":"#/components/schemas/Invitation"},"link":{"type":"string","format":"uri","description":"The link that accepts the invitation, shown once (only a hash of its token is kept); a new link replaces it when the invitation is sent again. Rabt has already sent the invitation (`sent_by`)."},"sent_by":{"type":"string","enum":["email","sms"],"description":"How Rabt sent it: `email` (the system email) or `sms` (one SMS from Rabt); both name who invited them and point to Rabt's site, where signing in with that email or phone shows the invitation."},"emailed":{"type":"boolean","description":"Whether Rabt emailed it (`sent_by` is `email`)."}},"required":["invitation","link","sent_by","emailed"],"additionalProperties":false},"LaunchCampaign":{"type":"object","properties":{"confirmed_fingerprint":{"description":"The `estimate.fingerprint` of the review you confirmed: `WAL-1113` when the prices changed since.","type":"string","minLength":1,"maxLength":200},"risk_accepted":{"description":"The risk box, when the review’s `sender.over` is true: «I understand that raising the limits may get my number banned by WhatsApp». True: this campaign alone sends past its sender’s allowance, up to `sender.outer_limit` a day (who, when, the allowance and the count are audited); asked at every launch. Enforcing, a launch over the allowance without it is refused with `CAMP-6340`. Never lifts the sending hours, stop requests, the suppression list or a provider’s limit.","type":"boolean"}},"additionalProperties":false},"LiftSmsOptOut":{"type":"object","properties":{"reason":{"type":"string","minLength":1,"maxLength":500,"description":"Why the number may get SMS again (the recipient asked)."}},"required":["reason"],"additionalProperties":false},"LinkPreviewResult":{"type":"object","properties":{"preview":{"anyOf":[{"type":"object","properties":{"url":{"type":"string","description":"The link."},"title":{"type":["string","null"]},"description":{"type":["string","null"]},"site_name":{"type":["string","null"]},"image_url":{"description":"A signed link (one hour) to the page’s image as Rabt keeps it; the site itself is never loaded by the reader.","type":["string","null"]},"source":{"type":"string","enum":["channel","fetched"],"description":"`channel`: the preview the channel sent; `fetched`: read by Rabt."},"fetched_at":{"type":"string","format":"date-time"}},"required":["url","title","description","site_name","image_url","source","fetched_at"],"additionalProperties":false},{"type":"null"}],"description":"Null when the message has no link, or its page could not be read (tried again after an hour)."}},"required":["preview"],"additionalProperties":false,"description":"The preview of a message’s first link: the page’s title, description, site name and image (docs/13, build section U)."},"LinkWhatsappWebNumber":{"type":"object","properties":{"method":{"default":"pairing","description":"`pairing` (an eight-character code typed on the phone: WhatsApp › Linked devices › Link with phone number) or `qr` (a QR code scanned on the phone; only for a signed-in member in the app, `API-8103` with an API key or OAuth token).","type":"string","enum":["qr","pairing"]},"phone_number":{"description":"The number being linked (E.164), required for `pairing` (`WAW-2507`).","type":"string","pattern":"^\\+[1-9]\\d{6,14}$"},"name":{"description":"What members call the channel; default the number. Ignored on a relink.","type":"string","minLength":1,"maxLength":200}},"additionalProperties":false},"LoopMessage":{"type":"object","properties":{"message":{"$ref":"#/components/schemas/Message"},"failure":{"anyOf":[{"$ref":"#/components/schemas/MessageFailure"},{"type":"null"}]}},"required":["message","failure"],"additionalProperties":false},"MapTicketImportRefs":{"type":"object","properties":{"source":{"$ref":"#/components/schemas/TicketImportSource"},"source_account":{"type":"string","minLength":1,"maxLength":100,"description":"The source’s account: its subdomain or workspace id, or for `csv` and `other` the label of the file or system. With `source` it scopes every source id: two accounts never share one."},"refs":{"minItems":1,"maxItems":100,"type":"array","items":{"type":"object","properties":{"entity":{"type":"string","enum":["space","member","channel","contact","company"]},"external_id":{"type":"string","minLength":1,"maxLength":200,"description":"The value’s id (or name) in the source."},"rabt_id":{"type":"string","format":"uuid","description":"The existing Rabt row it maps to."}},"required":["entity","external_id","rabt_id"],"additionalProperties":false}}},"required":["source","source_account","refs"],"additionalProperties":false},"MarkAllNotificationsRead":{"type":"object","properties":{"up_to_id":{"description":"The newest notification the member saw: it and older ones are marked read, newer ones stay unread. Left out: every notification up to now.","anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]}},"additionalProperties":false},"MarkChatRead":{"type":"object","properties":{"seq":{"description":"Read up to this message number; the room's last when absent.","type":"integer","minimum":0,"maximum":9007199254740991}},"additionalProperties":false},"MarkTicketRead":{"type":"object","properties":{"message_id":{"description":"Read through this item of the timeline; without it, through the newest item.","type":"string","format":"uuid"}},"additionalProperties":false},"MediaError":{"type":"object","properties":{"code":{"type":"string"},"reference":{"type":"string"},"release":{"type":["string","null"]},"retryable":{"type":"boolean"},"params":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":["string","number"]}},"occurred_at":{"type":"string","format":"date-time"}},"required":["code","reference","release","retryable","params","occurred_at"],"additionalProperties":false,"description":"Why a file cannot be sent on the channel or has no preview (docs/23): the catalog code (TKT-6170…6176, SYS-1001), reference, release and the parameters of its text."},"Member":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"The membership id."},"account":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string","description":"The member's name in this organization: the one its admins set, else the account's own."},"email":{"type":"string"},"avatar_url":{"type":["string","null"]}},"required":["id","name","email","avatar_url"],"additionalProperties":false},"role":{"$ref":"#/components/schemas/RoleRef"},"platform_role":{"anyOf":[{"$ref":"#/components/schemas/RoleRef"},{"type":"null"}]},"is_owner":{"type":"boolean"},"job_title":{"description":"The member's job title in this organization, set by its admins.","type":["string","null"]},"rings_calls":{"type":"boolean","description":"«رنين المكالمات»: incoming calls ring this member (on unless an admin turned it off)."},"seat_state":{"type":"string","enum":["active","inactive"]},"availability":{"type":"string","enum":["available","unavailable"]},"joined_at":{"type":"string","format":"date-time"}},"required":["id","account","role","platform_role","is_owner","job_title","rings_calls","seat_state","availability","joined_at"],"additionalProperties":false,"description":"A member of the organization."},"MemberList":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Member"},"description":"In the order they joined."}},"required":["data"],"additionalProperties":false},"MemberListView":{"type":"string","enum":["customers","tickets"],"description":"The list: `customers` or `tickets`."},"MemberListViewDocument":{"type":"object","properties":{"view":{"$ref":"#/components/schemas/MemberListView"},"state":{"anyOf":[{"anyOf":[{"$ref":"#/components/schemas/CustomersListState"},{"$ref":"#/components/schemas/TicketsListState"}]},{"type":"null"}],"description":"Null: the member has not changed this list; it opens as for everyone."},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]}},"required":["view","state","updated_at"],"additionalProperties":false},"MemberRoleChange":{"type":"object","properties":{"role_id":{"type":"string","format":"uuid"}},"required":["role_id"],"additionalProperties":false},"MemberSeatChange":{"type":"object","properties":{"seat_state":{"type":"string","enum":["active","inactive"]},"tickets_to":{"$ref":"#/components/schemas/TicketsTo"}},"required":["seat_state"],"additionalProperties":false},"MembershipContext":{"type":"object","properties":{"organization":{"$ref":"#/components/schemas/Organization"},"membership_id":{"type":"string","format":"uuid"},"photo_required":{"type":"boolean","description":"The organization requires a profile photo (`require_profile_photo`) and you have none: the app asks for one before anything else (`setAccountPhoto`)."},"role":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"is_owner":{"type":"boolean"}},"required":["id","name","is_owner"],"additionalProperties":false},"platform_role":{"anyOf":[{"$ref":"#/components/schemas/RoleRef"},{"type":"null"}],"description":"The platform role, in the platform organization only (docs/22)."},"is_owner":{"type":"boolean"},"seat_state":{"type":"string","enum":["active","inactive"],"description":"An inactive seat can view but not change anything (docs/18)."},"permissions":{"type":"array","items":{"$ref":"#/components/schemas/PermissionKey"},"description":"What the member may do; the owner has every key."},"platform_permissions":{"type":"array","items":{"$ref":"#/components/schemas/PlatformPermissionKey"}}},"required":["organization","membership_id","photo_required","role","platform_role","is_owner","seat_state","permissions","platform_permissions"],"additionalProperties":false,"description":"The active organization and what the signed-in member may do in it."},"MemberUpdate":{"type":"object","properties":{"name":{"description":"The member's name in this organization; null shows the account's own name again.","anyOf":[{"type":"string","minLength":1,"maxLength":100},{"type":"null"}]},"job_title":{"description":"The member's job title in this organization (email signatures); null clears it.","anyOf":[{"type":"string","maxLength":100},{"type":"null"}]},"rings_calls":{"description":"«رنين المكالمات»: incoming calls ring this member. Off: they are never rung and hear of calls by notifications on the ticket; a number whose members all have it off goes to voicemail.","type":"boolean"}},"additionalProperties":false,"description":"Fields left out stay as they are."},"Merge":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"primary_id":{"type":"string","format":"uuid"},"secondary_id":{"type":"string","format":"uuid"},"secondary_name":{"description":"The merged record’s name at the merge; a contact without one is named by its email address, else its phone number (E.164), else a channel handle; null when it has none.","type":["string","null"]},"moved":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"description":"How many records of each kind moved to the primary."},"merged_by_membership_id":{"type":"string","format":"uuid"},"merged_at":{"type":"string","format":"date-time"},"unmerged_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"unmerged_by_membership_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]}},"required":["id","primary_id","secondary_id","secondary_name","moved","merged_by_membership_id","merged_at","unmerged_at","unmerged_by_membership_id"],"additionalProperties":false,"description":"A merge of two contacts or companies; undone when unmerged."},"MergeCompanies":{"type":"object","properties":{"secondary_company_id":{"type":"string","format":"uuid","description":"The company merged into this one (it is kept, pointing to this one). This company keeps its values; its empty fields are filled from the secondary, whose name is listed under `also_known_as`."}},"required":["secondary_company_id"],"additionalProperties":false},"MergeContacts":{"type":"object","properties":{"secondary_contact_id":{"type":"string","format":"uuid","description":"The contact merged into this one (it is kept, pointing to this one). This contact keeps its values; its empty fields are filled from the secondary, whose name is listed under `names` (`merged`)."}},"required":["secondary_contact_id"],"additionalProperties":false},"MergeList":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Merge"},"description":"Newest first."}},"required":["data"],"additionalProperties":false},"MergeTickets":{"type":"object","properties":{"secondary_ticket_id":{"type":"string","format":"uuid","description":"The ticket merged into this one (its messages move here; it is closed)."}},"required":["secondary_ticket_id"],"additionalProperties":false},"MergeTicketTag":{"type":"object","properties":{"into_tag_id":{"type":"string","format":"uuid","description":"The live tag it goes into: its tickets take that one, and typing its name adds that one."}},"required":["into_tag_id"],"additionalProperties":false},"Message":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"url":{"type":"string","description":"The message in the app (a stable, copyable link)."},"ticket_id":{"type":"string","format":"uuid"},"original_ticket_id":{"type":"string","format":"uuid","description":"Where it was before a ticket merge."},"kind":{"type":"string","enum":["message","note","system","call"]},"direction":{"type":"string","enum":["inbound","outbound"]},"sender_type":{"type":"string","enum":["contact","member","bot","system"]},"sender_membership_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"sender_contact_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"channel_type":{"anyOf":[{"$ref":"#/components/schemas/ChannelType"},{"type":"null"}]},"channel_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"content_type":{"type":"string","enum":["text","image","video","audio","voice","document","sticker","location","contacts","template","event","call","gif","unsupported","encrypted"]},"body":{"type":["string","null"]},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"status":{"anyOf":[{"type":"string","enum":["received","queued","sending","sent","delivered","read","failed"]},{"type":"null"}],"description":"Messages to the customer: queued → sending → sent → delivered → read, or failed."},"is_internal_note":{"type":"boolean"},"mentioned_membership_ids":{"type":"array","items":{"type":"string","format":"uuid"}},"reply_to":{"anyOf":[{"type":"object","properties":{"message_id":{"type":"string","format":"uuid"},"sender_type":{"type":"string","enum":["contact","member","bot","system"]},"excerpt":{"type":["string","null"]}},"required":["message_id","sender_type","excerpt"],"additionalProperties":false},{"type":"null"}]},"attempt":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"error":{"anyOf":[{"$ref":"#/components/schemas/AttachedError"},{"type":"null"}]},"status_changed_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"sent_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"delivered_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"read_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"failed_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"occurred_at":{"type":"string","format":"date-time"},"attachments":{"type":"array","items":{"$ref":"#/components/schemas/Attachment"}},"reactions":{"type":"array","items":{"type":"object","properties":{"contact_id":{"type":"string","format":"uuid"},"emoji":{"type":"string"},"reacted_at":{"type":"string","format":"date-time"}},"required":["contact_id","emoji","reacted_at"],"additionalProperties":false},"description":"The customers’ live reactions (one per customer)."},"business_reaction":{"anyOf":[{"type":"object","properties":{"emoji":{"type":"string"},"membership_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"description":"The member who set it through Rabt; null when set in the channel’s app."},"reacted_at":{"type":"string","format":"date-time"}},"required":["emoji","membership_id","reacted_at"],"additionalProperties":false},{"type":"null"}],"description":"Your business’s live reaction to this customer message (one at a time); null when none."},"edited_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"When the customer last edited it on the channel; its earlier versions are at `GET /v1/messages/{messageId}/edits`. Null when never edited."},"provider_deleted":{"anyOf":[{"type":"object","properties":{"at":{"type":"string","format":"date-time"},"scope":{"type":"string","enum":["for_me","for_everyone"],"description":"Who no longer sees it on the channel: `for_everyone`, or `for_me` (removed for your business only)."}},"required":["at","scope"],"additionalProperties":false},{"type":"null"}],"description":"Deleted on the channel (the customer unsent or removed it, or it was deleted there); Rabt keeps it. Null when not."},"opened":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["opened","possibly_opened"],"description":"`opened`: the customer's mail app loaded the email's open indicator. `possibly_opened`: only Apple's privacy proxy did (Apple Mail loads every email's images on delivery), so the customer may not have opened it."},"at":{"type":"string","format":"date-time","description":"The first open of this kind."},"count":{"type":"integer","minimum":1,"maximum":100,"description":"Opens counted, up to 100."}},"required":["kind","at","count"],"additionalProperties":false},{"type":"null"}],"description":"An email reply’s open, as its open indicator reports it (never that it was read). Null while not opened, and for other messages."},"recipients":{"description":"Who opened an email reply, per recipient, when it was sent as a copy per recipient (customer SMTP channels). Null when it went as one copy (Gmail, Microsoft 365, Zoho Mail): those channels cannot tell who opened it, only that it was opened (`opened`).","anyOf":[{"type":"array","items":{"type":"object","properties":{"address":{"type":"string","description":"The recipient’s email address."},"role":{"type":"string","enum":["to","cc","bcc"]},"state":{"type":"string","enum":["opened","possibly_opened","not_opened","not_sent","unknown"],"description":"`opened` / `possibly_opened` as the message’s `opened`, for this recipient’s own copy; `not_opened`; `not_sent`: its copy failed (the others went); `unknown`: the server may have accepted it (a lost answer), so it was not sent again."},"at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"This recipient’s first open of its kind; null while not opened."},"count":{"type":"integer","minimum":0,"maximum":100,"description":"Opens counted, up to 100."},"error_code":{"description":"The catalog code of a failed copy; null otherwise.","type":["string","null"]}},"required":["address","role","state","at","count","error_code"],"additionalProperties":false}},{"type":"null"}]}},"required":["id","url","ticket_id","original_ticket_id","kind","direction","sender_type","sender_membership_id","sender_contact_id","channel_type","channel_id","content_type","body","metadata","status","is_internal_note","mentioned_membership_ids","reply_to","attempt","error","status_changed_at","sent_at","delivered_at","read_at","failed_at","occurred_at","attachments","reactions","business_reaction","edited_at","provider_deleted","opened"],"additionalProperties":false,"description":"An item of a ticket timeline (docs/13)."},"MessageEdit":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"message_id":{"type":"string","format":"uuid"},"content_type":{"type":"string","enum":["text","image","video","audio","voice","document","sticker","location","contacts","template","event","call","gif","unsupported","encrypted"]},"body":{"description":"What the message said before; null after the customer’s data was erased.","type":["string","null"]},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"replaced_at":{"type":"string","format":"date-time","description":"The channel’s time of the edit that replaced this version."},"recorded_at":{"type":"string","format":"date-time"}},"required":["id","message_id","content_type","body","metadata","replaced_at","recorded_at"],"additionalProperties":false,"description":"An earlier version of a message, before the customer edited it on the channel."},"MessageEditList":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/MessageEdit"},"description":"Oldest first."}},"required":["data"],"additionalProperties":false},"MessageFailure":{"type":"object","properties":{"code":{"type":"string"},"title":{"type":"string"},"fix":{"type":"string"}},"required":["code","title","fix"],"additionalProperties":false,"description":"Why the message failed, in plain words (its `error` holds the reference)."},"MessageLookup":{"type":"object","properties":{"message":{"$ref":"#/components/schemas/Message"},"ticket_number":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["message","ticket_number"],"additionalProperties":false,"description":"A message and the number of its current ticket."},"MessagePage":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Message"},"description":"Newest first (show them in time order)."},"next_cursor":{"description":"Older items; null at the start.","type":["string","null"]}},"required":["data","next_cursor"],"additionalProperties":false},"MessageReaction":{"type":"object","properties":{"emoji":{"anyOf":[{"type":"string","minLength":1,"maxLength":32},{"type":"null"}],"description":"One emoji to react with (sending another one changes the reaction), or null to remove the reaction of the Page or Instagram account.","example":"❤️"}},"required":["emoji"],"additionalProperties":false,"description":"The business’s reaction to a customer’s Messenger or Instagram message."},"MessageReport":{"type":"object","properties":{"from":{"type":"string","format":"date-time"},"to":{"type":"string","format":"date-time"},"interval":{"type":"string","enum":["none","day","week","month"]},"group_by":{"type":"string"},"rows":{"type":"array","items":{"type":"object","properties":{"bucket":{"description":"The first date (YYYY-MM-DD, UTC) of the day, week or month; null without `interval`.","type":["string","null"]},"key":{"description":"The group’s key; null: the none bucket (no space, no member…), `group_by` none, or `other`.","type":["string","null"]},"name":{"description":"The space’s, member’s or campaign’s name; null otherwise.","type":["string","null"]},"other":{"type":"boolean","description":"The sum of the smaller groups of this bucket."},"messages":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Customer and member messages (no notes, calls or events)."},"failed":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Of them, failed to send (messages) or failed sends (campaigns)."}},"required":["bucket","key","name","other","messages","failed"],"additionalProperties":false}}},"required":["from","to","interval","group_by","rows"],"additionalProperties":false,"description":"The messages aggregate of a period. Rows: without `interval` one row per group (the 100 largest, the rest in one `other: true` row); with `interval` (`day`, `week` from Monday, `month`; UTC; `bucket` is its first date) every bucket, zeros included, or with `group_by` the 10 largest groups' rows of each bucket plus one `other: true` row summing the rest. Every metric adds up across rows."},"MessageStatusWait":{"type":"object","properties":{"message":{"$ref":"#/components/schemas/Message"},"failure":{"anyOf":[{"$ref":"#/components/schemas/MessageFailure"},{"type":"null"}]},"changed":{"type":"boolean","description":"Whether its status differs from the one you had (false: time up)."}},"required":["message","failure","changed"],"additionalProperties":false},"MicrosoftAddress":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"address":{"type":"string"},"display_name":{"type":["string","null"]},"is_default":{"type":"boolean"},"manual":{"type":"boolean","description":"Added by a member (not listed by Microsoft)."},"send_as_verified":{"type":"boolean"},"active":{"type":"boolean","description":"On: its mail makes tickets and it is offered as a From; off: stopped."},"send_as":{"type":"object","properties":{"status":{"type":"string","enum":["unchecked","pending","verified","rewritten","refused","failed"],"description":"`verified`: mail leaves from the address; `rewritten`: Microsoft sends it from the primary address (the tenant needs SendFromAliasEnabled); `refused`: Microsoft refused to send from it (EM-3109: the account needs the Send As right); `failed`: the check could not be sent (see `error`; Rabt tries again); `pending`: a check message is on its way."},"sent_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"checked_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"error":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"reference":{"type":"string"},"occurred_at":{"type":"string","format":"date-time"}},"required":["code","reference","occurred_at"],"additionalProperties":false},{"type":"null"}],"description":"Why the last check could not be sent (`refused`, `failed`)."}},"required":["status","sent_at","checked_at","error"],"additionalProperties":false},"assigned_membership_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"space_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"description":"The space its tickets go to (C04)."},"space_assignment_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"description":"That assignment (`DELETE /v1/spaces/{space_id}/channels/{id}` releases it)."}},"required":["id","address","display_name","is_default","manual","send_as_verified","active","send_as","assigned_membership_id","space_id","space_assignment_id"],"additionalProperties":false},"MicrosoftChannel":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"provider":{"type":"string","enum":["microsoft"]},"mailbox":{"type":"object","properties":{"kind":{"type":"string","enum":["own","shared"]},"address":{"type":"string"},"display_name":{"type":["string","null"]},"signed_in_as":{"type":"string","description":"The account whose access Rabt uses."}},"required":["kind","address","display_name","signed_in_as"],"additionalProperties":false},"status":{"type":"string","enum":["pending","active","needs_reauth","disconnected"]},"status_changed_at":{"type":"string","format":"date-time"},"last_error":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"reference":{"type":"string"},"retryable":{"type":"boolean"},"provider":{"anyOf":[{"type":"object","properties":{"name":{"type":"string"},"code":{"type":["string","null"]},"message":{"type":["string","null"]}},"required":["name","code","message"],"additionalProperties":false},{"type":"null"}]},"occurred_at":{"type":"string"},"params":{"description":"The values the catalog’s texts name, e.g. `{ \"service\": \"WhatsApp\" }`.","anyOf":[{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}},{"type":"null"}]}},"required":["code","reference","retryable","provider","occurred_at"],"additionalProperties":false},{"type":"null"}]},"granted_scopes":{"type":"array","items":{"type":"string"}},"addresses":{"type":"array","items":{"$ref":"#/components/schemas/MicrosoftAddress"}},"receiving":{"type":"object","properties":{"subscribed":{"type":"boolean"},"subscription_expires_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"last_error":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"reference":{"type":"string"},"occurred_at":{"type":"string","format":"date-time"}},"required":["code","reference","occurred_at"],"additionalProperties":false},{"type":"null"}]},"last_sync_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"sync_requested_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"last_inbound_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]}},"required":["subscribed","subscription_expires_at","last_error","last_sync_at","sync_requested_at","last_inbound_at"],"additionalProperties":false},"send_limit":{"type":"object","properties":{"daily_recipients":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"recipients_last_24h":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"warning":{"type":"boolean","description":"At 80 % of Microsoft’s daily limit or more."}},"required":["daily_recipients","recipients_last_24h","warning"],"additionalProperties":false},"domain_check":{"anyOf":[{"$ref":"#/components/schemas/SenderDomainCheck"},{"type":"null"}]},"messages_missing_files":{"type":"array","items":{"type":"object","properties":{"message_id":{"type":"string","format":"uuid"},"ticket_id":{"type":"string","format":"uuid"},"ticket_number":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"subject":{"type":["string","null"]},"received_at":{"type":"string","format":"date-time"},"error":{"type":"object","properties":{"code":{"type":"string"},"reference":{"type":"string"},"retryable":{"type":"boolean"},"provider":{"anyOf":[{"type":"object","properties":{"name":{"type":"string"},"code":{"type":["string","null"]},"message":{"type":["string","null"]}},"required":["name","code","message"],"additionalProperties":false},{"type":"null"}]},"occurred_at":{"type":"string"},"params":{"description":"The values the catalog’s texts name, e.g. `{ \"service\": \"WhatsApp\" }`.","anyOf":[{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}},{"type":"null"}]}},"required":["code","reference","retryable","provider","occurred_at"],"additionalProperties":false,"description":"`EM-3128` with its reference."}},"required":["message_id","ticket_id","ticket_number","subject","received_at","error"],"additionalProperties":false},"description":"Customers’ messages whose files were not all downloaded (newest 20); `POST …/messages/{message_id}/download-files` downloads them again."},"connected_at":{"type":"string","format":"date-time"},"disconnected_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]}},"required":["id","name","provider","mailbox","status","status_changed_at","last_error","granted_scopes","addresses","receiving","send_limit","domain_check","messages_missing_files","connected_at","disconnected_at"],"additionalProperties":false},"MicrosoftChannelList":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/MicrosoftChannel"}}},"required":["data"],"additionalProperties":false},"MicrosoftConnect":{"type":"object","properties":{"kind":{"default":"own","description":"`own`: the mailbox of the account that signs in; `shared`: a shared mailbox that account has Full Access to.","type":"string","enum":["own","shared"]},"shared_address":{"default":null,"description":"The shared mailbox’s address, for `kind: shared`.","anyOf":[{"type":"string","maxLength":254},{"type":"null"}]},"channel_id":{"default":null,"description":"Reconnect this channel (its access ended: `needs_reauth`) instead of connecting a new mailbox. The same mailbox must sign in (EM-3129).","anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]}},"additionalProperties":false},"MicrosoftConnectStart":{"type":"object","properties":{"authorization_url":{"type":"string","format":"uri","description":"Microsoft’s sign-in page. Open it in the browser of the person who signs in; Microsoft returns to Rabt, which connects the mailbox and sends the browser to the email settings."},"expires_at":{"type":"string","format":"date-time","description":"The sign-in must finish before this time."}},"required":["authorization_url","expires_at"],"additionalProperties":false},"MicrosoftSetup":{"type":"object","properties":{"configured":{"type":"boolean","description":"Microsoft 365 is set up on this Rabt."},"redirect_uri":{"type":"string","description":"The redirect URI of Rabt’s Entra app."},"admin_consent_url":{"description":"Where a Microsoft 365 administrator approves Rabt for the whole organization (EM-3102).","type":["string","null"]}},"required":["configured","redirect_uri","admin_consent_url"],"additionalProperties":false},"ModerateTicketMessage":{"type":"object","properties":{"action":{"type":"string","enum":["hide","unhide","delete","like","unlike"],"description":"`hide`, `unhide`, `delete` (on the platform only: Rabt keeps its copy, marked), `like` or `unlike`, as the channel’s `public_actions` allow."}},"required":["action"],"additionalProperties":false},"ModerateXMessage":{"type":"object","properties":{"action":{"type":"string","enum":["hide","unhide","delete"],"description":"`hide` or `unhide` a customer's reply to the account's post; `delete` the account's own reply or direct message on X. The message stays in Rabt, marked."}},"required":["action"],"additionalProperties":false},"MoveTicket":{"type":"object","properties":{"space_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"description":"The department space. The ticket is handed over: its assignee is cleared and it waits in the space’s queue for the automatic distribution. Deprecated: `null` (All) is never a destination; refused with `SPC-6222`."}},"required":["space_id"],"additionalProperties":false},"NationalAddress":{"type":"object","properties":{"building_number":{"type":"string","pattern":"^\\d{4}$"},"street":{"type":"string","minLength":1,"maxLength":100},"district":{"type":"string","minLength":1,"maxLength":100},"city":{"type":"string","minLength":1,"maxLength":100},"postal_code":{"type":"string","pattern":"^\\d{5}$"},"additional_number":{"default":null,"anyOf":[{"type":"string","pattern":"^\\d{4}$"},{"type":"null"}]},"country_code":{"default":"SA","type":"string","pattern":"^[A-Z]{2}$"}},"required":["building_number","street","district","city","postal_code"],"additionalProperties":false,"description":"The Saudi national address: 4-digit building number, street, district, city, 5-digit postal code and the optional 4-digit additional number."},"NationalAddressView":{"type":"object","properties":{"building_number":{"type":"string"},"street":{"type":"string"},"district":{"type":"string"},"city":{"type":"string"},"postal_code":{"type":"string"},"additional_number":{"type":["string","null"]},"country_code":{"type":"string"}},"required":["building_number","street","district","city","postal_code","additional_number","country_code"],"additionalProperties":false},"Note":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"author_membership_id":{"type":"string","format":"uuid"},"body":{"type":"string"},"mentioned_membership_ids":{"type":"array","items":{"type":"string","format":"uuid"}},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}},"required":["id","author_membership_id","body","mentioned_membership_ids","created_at","updated_at"],"additionalProperties":false,"description":"An internal note."},"NoteHistory":{"type":"object","properties":{"note_id":{"type":"string","format":"uuid"},"data":{"type":"array","items":{"$ref":"#/components/schemas/NoteRevision"},"description":"Oldest first."},"deleted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"deleted_by_membership_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]}},"required":["note_id","data","deleted_at","deleted_by_membership_id"],"additionalProperties":false,"description":"A contact note's versions and its deletion."},"NotePage":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Note"},"description":"Newest first."},"next_cursor":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"total":{"type":"integer","minimum":0,"maximum":10000,"description":"How many rows the list has with these filters, counted up to 10000."},"total_capped":{"type":"boolean","description":"The list has more than 10000 rows (`total` is 10000)."}},"required":["data","next_cursor","total","total_capped"],"additionalProperties":false},"NoteRevision":{"type":"object","properties":{"revision":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"1 is the original text."},"body":{"type":"string"},"mentioned_membership_ids":{"type":"array","items":{"type":"string","format":"uuid"}},"edited_by_membership_id":{"type":"string","format":"uuid"},"edited_at":{"type":"string","format":"date-time"}},"required":["revision","body","mentioned_membership_ids","edited_by_membership_id","edited_at"],"additionalProperties":false,"description":"One kept version of a contact note."},"Notification":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"type":{"type":"string","description":"The notification type (`NotificationType`); a type added by a newer release may appear before clients know it."},"title":{"type":"string","description":"In the request's language."},"body":{"type":"string"},"link":{"type":"string","description":"The deep link in the organization app, e.g. `/billing`."},"tag":{"type":"string","description":"Notifications with the same tag replace each other on a device."},"urgency":{"type":"string","enum":["very-low","low","normal","high"],"description":"How urgent the type is (docs/21: `high` for incoming calls and assignments): high asks the device for attention (the desktop app flashes its taskbar button or bounces its Dock icon and plays the urgent sound)."},"data":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":["string","number","boolean","null"]},"description":"The facts behind the text (ids, names, amounts in halalas)."},"created_at":{"type":"string","format":"date-time"},"read_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]}},"required":["id","type","title","body","link","tag","urgency","data","created_at","read_at"],"additionalProperties":false,"description":"A notification of the member (docs/21)."},"NotificationCall":{"type":"object","properties":{"call_id":{"type":"string","format":"uuid","description":"The call (`GET /v1/calls/{callId}`, `call.ended`)."},"status":{"type":"string","description":"The call’s status now (`connecting` once placed)."},"contact_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"description":"The contact of the number called."},"replayed":{"type":"boolean","description":"The same idempotency key placed this call before; nothing new was placed."}},"required":["call_id","status","contact_id","replayed"],"additionalProperties":false},"NotificationPage":{"type":"object","properties":{"notifications":{"type":"array","items":{"$ref":"#/components/schemas/Notification"}},"next_cursor":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"unread_count":{"type":"integer","minimum":0,"maximum":9007199254740991},"total":{"type":"integer","minimum":0,"maximum":10000,"description":"How many rows the list has with these filters, counted up to 10000."},"total_capped":{"type":"boolean","description":"The list has more than 10000 rows (`total` is 10000)."}},"required":["notifications","next_cursor","unread_count","total","total_capped"],"additionalProperties":false},"NotificationsMarkedRead":{"type":"object","properties":{"marked":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Notifications marked read."}},"required":["marked"],"additionalProperties":false},"NotificationUnreadCount":{"type":"object","properties":{"unread_count":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["unread_count"],"additionalProperties":false},"OAuthApp":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"client_id":{"type":"string"},"name":{"type":"string"},"description":{"type":["string","null"]},"homepage_url":{"type":["string","null"]},"redirect_uris":{"type":"array","items":{"type":"string"}},"client_type":{"type":"string","enum":["public","confidential"]},"client_secret_hint":{"description":"The current secret's last 4 characters (`…abcd`), to recognize it; null without one or for one set before hints were kept.","type":["string","null"]},"client_secret_rotated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}},"required":["id","client_id","name","description","homepage_url","redirect_uris","client_type","created_at","updated_at"],"additionalProperties":false,"description":"An OAuth app registered by this organization."},"OAuthAppList":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/OAuthApp"}}},"required":["data"],"additionalProperties":false},"OpenDirectMessage":{"type":"object","properties":{"membership_id":{"type":"string","format":"uuid","description":"The colleague (membership id)."}},"required":["membership_id"],"additionalProperties":false},"OrderLookupResult":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/StoreOrder"}},"failures":{"type":"array","items":{"type":"object","properties":{"integration_id":{"type":"string","format":"uuid"},"adapter":{"type":"string"},"integration_name":{"type":"string"},"error":{"$ref":"#/components/schemas/IntegrationError"}},"required":["integration_id","adapter","integration_name","error"],"additionalProperties":false},"description":"The stores that could not answer, each with its error."}},"required":["data","failures"],"additionalProperties":false},"Organization":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"slug":{"type":"string"},"is_platform":{"type":"boolean","description":"The Rabt platform organization (docs/22)."},"default_locale":{"type":"string","enum":["ar","en"]},"timezone":{"type":"string"},"default_country":{"type":"string"},"billing_state":{"type":"string","enum":["trial","active","seats_inactive"]},"owner_account_id":{"type":"string","format":"uuid"},"logo_url":{"anyOf":[{"type":"string","format":"uri"},{"type":"null"}],"description":"The organization’s logo: a square WebP image (256 px); null shows its initials. Set with `PUT /v1/organization/logo`."},"created_at":{"type":"string","format":"date-time"}},"required":["id","name","slug","is_platform","default_locale","timezone","default_country","billing_state","owner_account_id","logo_url","created_at"],"additionalProperties":false,"description":"An organization."},"OrganizationDeletion":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"status":{"$ref":"#/components/schemas/ContactErasureStatus"},"reason":{"type":"string"},"requested_by_membership_id":{"type":"string","format":"uuid"},"requested_at":{"type":"string","format":"date-time"},"delete_after":{"type":"string","format":"date-time","description":"When the organization closes and its contacts are erased."},"withdrawn_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"withdrawn_by_membership_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"started_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"erased_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"failure":{"anyOf":[{"$ref":"#/components/schemas/ErasureFailure"},{"type":"null"}]},"contacts_total":{"type":"integer","minimum":0,"maximum":9007199254740991},"contacts_erased":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["id","status","reason","requested_by_membership_id","requested_at","delete_after","withdrawn_at","withdrawn_by_membership_id","started_at","erased_at","failure","contacts_total","contacts_erased"],"additionalProperties":false},"OrganizationDeletionState":{"type":"object","properties":{"deletion":{"anyOf":[{"$ref":"#/components/schemas/OrganizationDeletion"},{"type":"null"}],"description":"The latest deletion request; null: none was ever made."}},"required":["deletion"],"additionalProperties":false},"OrganizationSetup":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"description":"The parts the request may read (organization, members, roles, spaces with member_ids and channels, routing, channels, ai_settings, ai_agent, integrations, record_connectors, webhook_endpoints), each in brief; `not_shown` lists the others with what they need."},"OrganizationTicketTag":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}},"required":["id","name","created_at","updated_at"],"additionalProperties":false,"description":"A tag of the organization’s ticket tags."},"PageReaction":{"type":"object","properties":{"message_id":{"type":"string","format":"uuid"},"ticket_id":{"type":"string","format":"uuid"},"emoji":{"description":"Null when the business has no reaction.","type":["string","null"]},"by_membership_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"description":"The member who reacted."},"reacted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]}},"required":["message_id","ticket_id","emoji","by_membership_id","reacted_at"],"additionalProperties":false,"description":"The business’s reaction to the message as Rabt last set it."},"PendingApproval":{"type":"object","properties":{"status":{"type":"string","enum":["approval_required"]},"action":{"type":"string","enum":["transfer_ownership","request_organization_deletion"]},"organization":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false},"approval_view":{"$ref":"#/components/schemas/ApprovalViewLink"}},"required":["status","action","organization","approval_view"],"additionalProperties":false},"PermissionKey":{"type":"string","enum":["tickets.reply","tickets.assign","tickets.view_all","contacts.edit","contacts.merge","contacts.import_export","contacts.delete","campaigns.manage","campaigns.send","ai.manage","channels.manage","spaces.manage","members.manage","members.view_availability","billing.manage","settings.manage","space_replies.manage","api.manage","audit.view"],"description":"An organization permission key (docs/18)."},"PhoneNumber":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"e164":{"type":"string","description":"E.164, e.g. `+966112345678`."},"type":{"type":"string","enum":["geographic","unified_9200","toll_free_800","mobile"]},"name":{"type":["string","null"]},"status":{"type":"string","enum":["active","suspended","released"],"description":"`active`, `suspended` (calls refused, see `suspension_reason`) or `released`."},"suspension_reason":{"anyOf":[{"type":"string","enum":["rental_unpaid","platform"]},{"type":"null"}],"description":"`rental_unpaid` (works again after a top-up) or `platform` (the Rabt team)."},"suspended_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"destination":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["all"]}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["space"]},"space_id":{"type":"string","format":"uuid"},"space_name":{"type":"string"}},"required":["type","space_id","space_name"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["member"]},"membership_id":{"type":"string","format":"uuid"}},"required":["type","membership_id"],"additionalProperties":false}],"deprecated":true,"description":"Deprecated, read-only mirror of the number’s routing item (`getRoutingItem`, target `number`): `all` (no route), one `space` or one `member`."},"record_calls":{"type":"boolean"},"recording_notice":{"type":"boolean"},"voicemail_enabled":{"type":"boolean","deprecated":true,"description":"Deprecated, read-only: always true (voicemail is on for every number).","enum":[true]},"ring_timeout_sec":{"type":"number","deprecated":true,"description":"Deprecated, read-only: always 20 (each member rings that many seconds on every number).","enum":[20]},"queue_timeout_sec":{"type":"number","deprecated":true,"description":"Deprecated, read-only: always 90 (a caller waits that many seconds for a member on every number).","enum":[90]},"lines":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"The calls the number carries at once (inbound and outbound). A call beyond them is refused: inbound as busy, a member’s call with `VOI-4564`; a campaign dials only into free lines and keeps one free for inbound calls on a number of 3 lines or more."},"rental_paid_until":{"type":"string","format":"date-time","description":"The monthly rental is paid until then."},"assigned_at":{"type":"string","format":"date-time"},"released_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"channel_id":{"type":"string","format":"uuid","description":"The organization’s voice channel."},"provider_connection_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"description":"The provider connection of the organization’s own number (bring your own number: no rental); null for a Rabt number."},"ai_agent":{"$ref":"#/components/schemas/PhoneNumberAiAgent"},"last_inbound_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"When its last inbound call started; null when none came yet."}},"required":["id","e164","type","name","status","suspension_reason","suspended_at","destination","record_calls","recording_notice","voicemail_enabled","ring_timeout_sec","queue_timeout_sec","lines","rental_paid_until","assigned_at","released_at","channel_id","provider_connection_id","ai_agent","last_inbound_at"],"additionalProperties":false},"PhoneNumberAiAgent":{"type":"object","properties":{"enabled":{"type":"boolean","description":"The voice AI agent answers this number’s calls: its own value once set, until then the voice level’s (`/v1/voice/ai-agent`)."}},"required":["enabled"],"additionalProperties":false,"description":"The voice AI agent’s switch at this number’s level."},"PhoneNumberList":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/PhoneNumber"}}},"required":["data"],"additionalProperties":false},"PlaceNotificationCall":{"type":"object","properties":{"to":{"type":"string","pattern":"^[+][1-9][0-9]{1,14}$","description":"The number to call, E.164 (any number; no contact is needed beforehand)."},"phone_number_id":{"description":"The organization’s number it calls from: its id, or the number itself in E.164 (`+966920034134`, its active number with it; VOI-4578 otherwise).","anyOf":[{"type":"string","format":"uuid"},{"type":"string","pattern":"^[+][1-9][0-9]{1,14}$"}]},"voice":{"type":"string","enum":["female","male"],"description":"The voice of the message or of the AI call: `female` or `male`."},"mode":{"type":"string","enum":["message","agent"],"description":"`message`: `text` is spoken once and the call ends; `agent`: the voice AI agent talks, following `instructions`."},"text":{"description":"The message (`mode: message`), final as sent: no variables.","type":"string","minLength":1,"maxLength":4096},"instructions":{"description":"What the voice AI agent says and asks (`mode: agent`, Markdown), final as sent: no variables.","type":"string","minLength":1,"maxLength":2000}},"required":["to","phone_number_id","voice","mode"],"additionalProperties":false},"Plan":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"code":{"type":"string"},"version":{"type":"integer","minimum":1,"maximum":9007199254740991},"name":{"type":"string"},"seat_price":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"One seat for one calendar month, in halalas, VAT included."},"trial_months":{"type":"integer","minimum":1,"maximum":9007199254740991},"trial_member_limit":{"type":"integer","minimum":1,"maximum":9007199254740991}},"required":["id","code","version","name","seat_price","trial_months","trial_member_limit"],"additionalProperties":false,"description":"The seat price (docs/10 \"Plans are data\"): the latest version of the plan charged. No feature depends on it."},"PlatformPermissionKey":{"type":"string","enum":["platform.orgs.view","platform.orgs.manage","platform.pricing.manage","platform.billing.view","platform.numbers.manage","platform.ops.manage","platform.audit.view","platform.team.manage"],"description":"A platform permission key (docs/22), only in the Rabt platform organization."},"PostChatMessage":{"type":"object","properties":{"body":{"default":"","description":"Light Markdown. `<@membership-id>` mentions a member, `@all` everyone in the room, `#1291` references a ticket.","type":"string","maxLength":10000},"client_message_id":{"description":"Your id for this message: a retry with the same id never adds another.","type":"string","minLength":1,"maxLength":100},"quote_message_id":{"description":"A message of the room to quote.","type":"string","format":"uuid"},"ticket_ids":{"default":[],"description":"Tickets attached as cards (\"Ask the team\"); you must see each.","maxItems":50,"type":"array","items":{"type":"string","format":"uuid"}},"attachment_ids":{"default":[],"description":"Files you uploaded to this room and have not sent yet.","maxItems":20,"type":"array","items":{"type":"string","format":"uuid"}}},"additionalProperties":false},"PostWhatsappWebStatus":{"type":"object","properties":{"text":{"type":"string","minLength":1,"maxLength":700},"client_key":{"type":"string","pattern":"^[A-Za-z0-9._~-]{1,100}$","description":"The client’s key: a repeated request with the same key is done once."}},"required":["text","client_key"],"additionalProperties":false},"PreviewSms":{"type":"object","properties":{"to":{"anyOf":[{"type":"string","pattern":"^\\+[1-9]\\d{6,14}$","description":"A mobile number in E.164, e.g. `+966500000000`."},{"type":"null"}]},"body":{"type":"string","minLength":1,"maxLength":1600,"description":"The text: at most 10 parts (1,530 GSM-7 or 670 UCS-2 characters; Arabic is UCS-2). KSA rules apply: no phone numbers or WhatsApp links, links only to allowed domains."},"category":{"type":"string","enum":["service","otp"],"description":"`service` or `otp` (a one-time code: the text must state its purpose). Promotional SMS go through campaigns (`SMS-4038`)."},"sender_name_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]}},"required":["body"],"additionalProperties":false},"PriceList":{"type":"object","properties":{"currency":{"type":"string","enum":["SAR"]},"at":{"type":"string","format":"date-time","description":"The time the prices are in effect at (now)."},"seat":{"type":"object","properties":{"seat_price_minor":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Halalas (SAR minor units)."},{"type":"null"}],"description":"Per member: one seat for one calendar month, VAT included; null while no plan is published."},"all_employees_seat_price_minor":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Halalas (SAR minor units)."},{"type":"null"}],"description":"All employees (the organization licenses every employee): one seat for one calendar month, VAT included; null while not published."},"trial_months":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"trial_member_limit":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["seat_price_minor","all_employees_seat_price_minor","trial_months","trial_member_limit"],"additionalProperties":false},"rate_card":{"anyOf":[{"type":"object","properties":{"version":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"The published rate card version number."},"effective_from":{"type":"string","format":"date-time"},"items":{"type":"array","items":{"type":"object","properties":{"service":{"type":"string","enum":["whatsapp","x","sms","voice","ai","email"]},"metric":{"type":"string"},"dimensions":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}},"item_key":{"type":"string"},"unit":{"type":"string","enum":["message","request","event","segment","second","minute","month","token","character","quota_unit","halala"]},"unit_size":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"unit_price_minor":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Price of `unit_size` units, in halalas, VAT included."}},"required":["service","metric","dimensions","item_key","unit","unit_size","unit_price_minor"],"additionalProperties":false}}},"required":["version","effective_from","items"],"additionalProperties":false},{"type":"null"}],"description":"The rate card in effect; null while none is published. Its AI items are not listed: AI is priced in `ai_units`."},"ai_units":{"type":"array","items":{"type":"object","properties":{"unit":{"type":"string","enum":["reply","call_minute","campaign_voice"],"description":"An AI unit: `reply` (an automatic reply), `call_minute` (a minute of a call with the AI agent) or `campaign_voice` (a minute of voice in a call campaign)."},"per":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"The approximate price is for this many units (1,000)."},"approximate_price_minor":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Approximate price of `per` units in halalas, VAT included: the average of typical use at the rate card in effect. AI is charged by actual usage, so the invoice can differ."}},"required":["unit","per","approximate_price_minor"],"additionalProperties":false},"description":"The approximate price of each AI unit (automatic reply, call minute with the AI agent, voice minute in a call campaign); empty while no rate card is published."}},"required":["currency","at","seat","rate_card","ai_units"],"additionalProperties":false,"description":"The public price list (docs/10): the seat price and trial of new organizations, and the usage prices of the rate card in effect."},"PriceQuote":{"type":"object","properties":{"currency":{"type":"string","enum":["SAR"]},"at":{"type":"string","format":"date-time"},"lines":{"type":"array","items":{"type":"object","properties":{"service":{"type":"string","enum":["whatsapp","x","sms","voice","ai","email"]},"metric":{"type":"string"},"dimensions":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}},"item_key":{"type":"string"},"unit":{"type":"string","enum":["message","request","event","segment","second","minute","month","token","character","quota_unit","halala"]},"unit_size":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"quantity":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"unit_price_minor":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Price of `unit_size` units, in halalas."},"amount_minor":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Halalas (SAR minor units)."}},"required":["service","metric","dimensions","item_key","unit","unit_size","quantity","unit_price_minor","amount_minor"],"additionalProperties":false}},"ai_units":{"type":"array","items":{"type":"object","properties":{"unit":{"type":"string","enum":["reply","call_minute","campaign_voice"],"description":"An AI unit: `reply` (an automatic reply), `call_minute` (a minute of a call with the AI agent) or `campaign_voice` (a minute of voice in a call campaign)."},"quantity":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"per":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"The approximate price is for this many units (1,000)."},"approximate_price_minor":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Approximate price of `per` units in halalas, VAT included: the average of typical use at the rate card in effect. AI is charged by actual usage, so the invoice can differ."},"approximate_amount_minor":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Approximate amount of `quantity` units in halalas, VAT included."}},"required":["unit","quantity","per","approximate_price_minor","approximate_amount_minor"],"additionalProperties":false},"description":"The AI units asked for (`ai_unit` items), each at its approximate average: AI is charged by actual usage, so the invoice can differ."},"net_total_minor":{"description":"The lines plus the approximate amounts of `ai_units`, before VAT, in halalas.","type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"vat_minor":{"description":"The VAT added at the debit.","type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"vat_rate_bps":{"description":"The VAT rate used, in basis points.","type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"total_minor":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"What the wallet pays: `net_total_minor` plus `vat_minor`, in halalas."},"fingerprint":{"type":"string","description":"Equal for equal prices, whenever quoted."}},"required":["currency","at","lines","ai_units","total_minor","fingerprint"],"additionalProperties":false,"description":"A price quote at the current prices (docs/10)."},"PricingModel":{"type":"object","properties":{"model":{"type":"string","enum":["per_member","all_employees"],"description":"`per_member`: any number of members at the seat price. `all_employees`: a lower seat price, on the commitment to license every employee of the organization."},"prices":{"type":"object","properties":{"per_member":{"anyOf":[{"$ref":"#/components/schemas/Plan"},{"type":"null"}]},"all_employees":{"anyOf":[{"$ref":"#/components/schemas/Plan"},{"type":"null"}]}},"required":["per_member","all_employees"],"additionalProperties":false,"description":"Each model's seat price (the latest version of its plan), VAT included; null while one is not published."},"active_members":{"description":"The active members now. all_employees needs all_employees_min_members of them (WAL-1409); fewer pay the standard seat at the next seat charge.","type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"all_employees_min_members":{"description":"The fewest active members the all_employees model needs (2).","type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"owner_may_choose":{"type":"boolean","description":"True until the first seat payment: the organization may still choose. After it only the Rabt team switches the model (WAL-1406)."},"commitment":{"type":"object","properties":{"version":{"type":"string","description":"Send it as `commitment_version`."},"text":{"type":"object","properties":{"ar":{"type":"string"},"en":{"type":"string"}},"required":["ar","en"],"additionalProperties":false}},"required":["version","text"],"additionalProperties":false,"description":"The \"all employees\" commitment, as its checkbox shows it."},"acceptance":{"anyOf":[{"$ref":"#/components/schemas/PricingModelChange"},{"type":"null"}],"description":"The latest commitment accepted (who, when, the exact wording)."},"history":{"type":"array","items":{"$ref":"#/components/schemas/PricingModelChange"},"description":"Every change, newest first."}},"required":["model","prices","owner_may_choose","commitment","acceptance","history"],"additionalProperties":false,"description":"The organization's seat pricing model and both prices (docs/10). A change applies to seat charges from that moment on; charges already made never change."},"PricingModelChange":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"from":{"type":"string","enum":["per_member","all_employees"],"description":"`per_member`: any number of members at the seat price. `all_employees`: a lower seat price, on the commitment to license every employee of the organization."},"to":{"type":"string","enum":["per_member","all_employees"],"description":"`per_member`: any number of members at the seat price. `all_employees`: a lower seat price, on the commitment to license every employee of the organization."},"source":{"type":"string","enum":["owner","platform"],"description":"`owner`: the organization's choice before its first seat payment; `platform`: switched by the Rabt team."},"membership_id":{"type":"string","format":"uuid"},"member_name":{"description":"The member's name (null for the Rabt team in the organization's view).","type":["string","null"]},"reason":{"description":"The Rabt team's reason for a switch.","type":["string","null"]},"commitment":{"anyOf":[{"type":"object","properties":{"version":{"type":"string"},"locale":{"type":"string","enum":["ar","en"]},"text":{"type":"string","description":"The commitment as it was accepted."}},"required":["version","locale","text"],"additionalProperties":false},{"type":"null"}],"description":"The commitment accepted with an `all_employees` choice."},"created_at":{"type":"string","format":"date-time","description":"When it took effect."}},"required":["id","from","to","source","membership_id","member_name","reason","commitment","created_at"],"additionalProperties":false,"description":"A change of the seat pricing model."},"PrivateConversation":{"type":"object","properties":{"ticket":{"description":"The author’s private ticket on the same account, with its composer ready.","$ref":"#/components/schemas/Ticket"},"created":{"type":"boolean","description":"A new private ticket was started (else the author’s open one is used)."},"from_ticket_id":{"type":"string","format":"uuid","description":"The public ticket it was opened from."},"via":{"type":"string","enum":["private_reply","direct_message"],"description":"`private_reply`: the first reply goes as the one private reply to the comment (Facebook, Instagram); `direct_message`: a direct message (X)."}},"required":["ticket","created","from_ticket_id","via"],"additionalProperties":false},"PrivateConversationRequest":{"type":"object","properties":{"message_id":{"description":"The customer’s item whose author is written to; the newest customer item of the ticket when absent.","anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]}}},"ProblemDetails":{"type":"object","properties":{"type":{"type":"string","format":"uri","description":"The error code's documentation page."},"title":{"type":"string","description":"The reason, in one line."},"status":{"type":"integer","minimum":400,"maximum":599},"detail":{"type":"string","description":"The full cause."},"instance":{"type":"string","description":"This occurrence: the request path."},"code":{"type":"string","pattern":"^([A-Z]{1,5})-(\\d{4})$","description":"The stable error code, e.g. `API-8001`.","example":"API-8001"},"reference":{"type":"string","pattern":"^ref_[0-9a-f]{32}$","description":"Unique to this occurrence: the trace ID, which finds it in Rabt's logs, traces and error log.","example":"ref_4bf92f3577b34da6a3ce929d0e0e4736"},"details":{"type":"object","properties":{"fix":{"type":"string","description":"What to do next."},"occurred_at":{"type":"string","format":"date-time","description":"When it happened (UTC)."},"where":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","description":"Kind of the affected item, e.g. `ticket`, `message`."},"id":{"type":"string","description":"ID of the affected item."},"label":{"description":"What the user sees, e.g. \"Ticket #1283 · WhatsApp +966 55 000 3344\".","type":"string"}},"required":["type","id"],"additionalProperties":false,"description":"The item the error happened on."},{"type":"null"}]},"fields":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string","description":"Where the invalid value is: `body`, `query`, `path` or `header` (an MCP tool’s `arguments`), then the field, e.g. `body.contact.phones.0`."},"code":{"type":"string","description":"The field error's own code, e.g. `API-8002`."},"message":{"type":"string","description":"What is wrong, in the language of the response."},"params":{"description":"The values the field error names, e.g. `allowed`: the values the field accepts (comma-separated).","type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}}},"required":["path","code","message"],"additionalProperties":false},"description":"Invalid fields (validation errors), at most 100, each with its own code."}},"required":["fix","occurred_at","where","fields"],"additionalProperties":false},"provider":{"anyOf":[{"type":"object","properties":{"name":{"type":"string","description":"The provider, e.g. `Meta`."},"code":{"type":"string","description":"The provider's own error code, as received."},"subcode":{"type":["string","null"]},"message":{"type":"string","description":"The provider's message, as received."},"http_status":{"anyOf":[{"type":"integer","minimum":100,"maximum":599},{"type":"null"}]}},"required":["name","code","subcode","message","http_status"],"additionalProperties":false,"description":"The provider's own error, when a provider rejected the action."},{"type":"null"}]},"retryable":{"type":"boolean","description":"Whether trying again later can succeed."},"docs_url":{"type":"string","format":"uri","description":"The error code's documentation page."},"release":{"description":"The release of the Rabt service that answered: its version and the commit it was built from. Error screens show it with the code and the reference.","type":"string","pattern":"^v\\d+\\.\\d+\\.\\d+(?:-[0-9A-Za-z.-]+)?\\+(?:[0-9a-f]{7}|local)$","example":"v1.4.2+a1b2c3d"},"existing_contact_id":{"description":"CRM-6003 and CRM-6004: the contact that already has the phone number or email address (use it, or merge the two).","type":"string","format":"uuid"},"existing_contact_name":{"description":"CRM-6003 and CRM-6004: that contact’s display name.","type":["string","null"]},"count":{"description":"SPC-6224: how many open tickets must be given a destination (`tickets_to`).","type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["type","title","status","detail","instance","code","reference","details","provider","retryable","docs_url"],"additionalProperties":{},"description":"An error (RFC 9457 problem details), with the Rabt error code, the reference of this occurrence and what to do. Texts are in the language of `Accept-Language` (`ar` by default, or `en`)."},"ProfileImageUpload":{"type":"object","properties":{"type":{"type":"string","enum":["image/png","image/jpeg","image/webp"]},"data":{"type":"string","maxLength":2796204,"format":"base64","contentEncoding":"base64","pattern":"^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$","description":"The image, base64: PNG, JPEG or WebP, at most 2 MB. Rabt cuts it to the centred square, turns it upright, removes its metadata (EXIF, GPS) and keeps 64 and 256 px WebP copies; the file itself is not kept."}},"required":["type","data"],"additionalProperties":false},"PushExternalRecord":{"type":"object","properties":{"title":{"type":"string","minLength":1,"maxLength":300,"description":"What members read, e.g. “Wedding · 15 Oct · 200 guests” or “INV-1042”."},"status":{"description":"The system’s own status (e.g. `paid`, `confirmed`).","anyOf":[{"type":"string","minLength":1,"maxLength":100},{"type":"null"}]},"amount_minor":{"description":"In minor units of `currency` (both or neither).","anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"currency":{"description":"ISO 4217.","anyOf":[{"type":"string","pattern":"^[A-Z]{3}$"},{"type":"null"}]},"starts_at":{"description":"The record’s date: an invoice’s issue date, a booking’s or occasion’s start.","anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"ends_at":{"description":"Its end: a due date, a booking’s end, an expiry.","anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"url":{"description":"The record’s page in its system.","anyOf":[{"type":"string","maxLength":2048,"format":"uri"},{"type":"null"}]},"fields":{"description":"Up to 20 labelled key fields, in the order shown, each optionally typed (`number`, `money` with `currency` in minor units, `date`, `bool`, `url`; default text).","maxItems":20,"type":"array","items":{"type":"object","properties":{"label":{"type":"string","minLength":1,"maxLength":60},"value":{"type":"string","minLength":1,"maxLength":500},"type":{"type":"string","enum":["text","number","money","date","bool","url"]},"currency":{"type":"string","pattern":"^[A-Z]{3}$"}},"required":["label","value"],"additionalProperties":false}},"phones":{"description":"The customer’s phone numbers (E.164, or national numbers of the organization’s country): the record belongs to the contact with one of them.","maxItems":20,"type":"array","items":{"type":"string","minLength":3,"maxLength":40}},"emails":{"description":"The customer’s email addresses (matched in lower case).","maxItems":20,"type":"array","items":{"type":"string","maxLength":254,"format":"email"}},"updated_at":{"description":"When the system last changed it: an older version never overwrites a newer one.","anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"kind":{"description":"What it is to Rabt (default `record`): a `customer` (its details join the customer’s header in the side panel), an `order`, an `invoice`, or another record.","type":"string","enum":["customer","order","invoice","record"]},"presentment_amount_minor":{"description":"The amount in the currency the customer paid in, in its minor units (with `presentment_currency`).","anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"presentment_currency":{"description":"ISO 4217.","anyOf":[{"type":"string","pattern":"^[A-Z]{3}$"},{"type":"null"}]},"addresses":{"description":"Its addresses by role (customer, shipping, receiver, billing, pickup), kept apart; omitted: the stored ones stay.","maxItems":20,"type":"array","items":{"type":"object","properties":{"role":{"type":"string","enum":["customer","shipping","receiver","billing","pickup"]},"name":{"anyOf":[{"type":"string","minLength":1,"maxLength":200},{"type":"null"}]},"lines":{"maxItems":4,"type":"array","items":{"type":"string","minLength":1,"maxLength":200}},"city":{"anyOf":[{"type":"string","minLength":1,"maxLength":200},{"type":"null"}]},"region":{"anyOf":[{"type":"string","minLength":1,"maxLength":200},{"type":"null"}]},"postal_code":{"anyOf":[{"type":"string","minLength":1,"maxLength":40},{"type":"null"}]},"country":{"anyOf":[{"type":"string","pattern":"^[A-Z]{2}$"},{"type":"null"}]},"phone":{"anyOf":[{"type":"string","minLength":3,"maxLength":40},{"type":"null"}]}},"required":["role"],"additionalProperties":false}}},"required":["title"],"additionalProperties":false},"PutRecordLabelBody":{"type":"object","properties":{"name":{"type":"object","properties":{"ar":{"type":"string","minLength":1,"maxLength":100},"en":{"type":"string","minLength":1,"maxLength":100}},"required":["ar","en"],"additionalProperties":false}},"required":["name"],"additionalProperties":false,"description":"The name members read for the source or type, in both languages (1 to 100 characters each)."},"QuoteRequest":{"type":"object","properties":{"items":{"minItems":1,"maxItems":500,"type":"array","items":{"anyOf":[{"type":"object","properties":{"metric":{"type":"string","minLength":3,"maxLength":200,"description":"The usage metric, e.g. `x.dm_create` (rate cards, docs/10). AI token metrics (`ai.*`) are still accepted but deprecated: quote AI with `ai_unit`."},"quantity":{"type":"integer","minimum":1,"maximum":1000000000000},"dimensions":{"description":"The rate card dimensions, e.g. `{ \"category\": \"marketing\" }`.","type":"object","propertyNames":{"type":"string","minLength":1,"maxLength":64},"additionalProperties":{"type":"string","minLength":1,"maxLength":200}}},"required":["metric","quantity"],"additionalProperties":false},{"type":"object","properties":{"ai_unit":{"type":"string","enum":["reply","call_minute","campaign_voice"],"description":"An AI unit: `reply` (an automatic reply), `call_minute` (a minute of a call with the AI agent) or `campaign_voice` (a minute of voice in a call campaign)."},"quantity":{"type":"integer","minimum":1,"maximum":1000000000000}},"required":["ai_unit","quantity"],"additionalProperties":false}]}},"at":{"description":"When the usage happens (default now; a future time is an estimate).","type":"string","format":"date-time"}},"required":["items"],"additionalProperties":false},"ReactToTicketMessage":{"type":"object","properties":{"emoji":{"anyOf":[{"type":"string","minLength":1,"maxLength":16},{"type":"null"}],"description":"One emoji; another one changes the reaction, null removes it."},"client_key":{"description":"Your key for this change: a repeated request reacts once.","type":"string","pattern":"^[A-Za-z0-9._~-]{1,100}$"}},"required":["emoji"],"additionalProperties":false},"ReceiptVoucher":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"number":{"type":"string","example":"RC-2026-000123"},"issued_at":{"type":"string","format":"date-time"},"top_up_id":{"type":"string","format":"uuid"},"amount":{"type":"integer","minimum":0,"maximum":9007199254740991},"currency":{"type":"string","enum":["SAR"]},"payment_method":{"type":"object","properties":{"brand":{"type":"string","description":"The card brand, or `salla` for a top-up paid through Salla’s checkout."},"last4":{"type":"string","description":"The card’s last 4 digits; empty when paid through Salla (`brand` `salla`: Salla names no card)."}},"required":["brand","last4"],"additionalProperties":false},"gateway_charge_id":{"type":"string"},"balance_after":{"type":"integer","minimum":0,"maximum":9007199254740991},"organization":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"billing_profile":{"anyOf":[{"$ref":"#/components/schemas/BillingParty"},{"type":"null"}],"description":"The billing profile when the voucher was issued; null when there was none (and for vouchers issued before billing profiles existed)."}},"required":["id","name","billing_profile"],"additionalProperties":false}},"required":["id","number","issued_at","top_up_id","amount","currency","payment_method","gateway_charge_id","balance_after","organization"],"additionalProperties":false,"description":"The payment document of a top-up (not a tax invoice, docs/10)."},"ReceiptVoucherList":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/ReceiptVoucher"}},"next_cursor":{"type":["string","null"]},"total":{"type":"integer","minimum":0,"maximum":10000,"description":"How many rows the list has with these filters, counted up to 10000."},"total_capped":{"type":"boolean","description":"The list has more than 10000 rows (`total` is 10000)."}},"required":["data","next_cursor","total","total_capped"],"additionalProperties":false,"description":"Newest first."},"ReconnectAppStoreChannel":{"type":"object","properties":{"key_id":{"type":"string","pattern":"^[A-Z0-9]{10}$","description":"The ID of a team API key with the Customer Support or Admin role, e.g. `2X9R4HXF34`."},"private_key":{"type":"string","minLength":1,"maxLength":4096,"description":"The text of the key’s `.p8` file (`-----BEGIN PRIVATE KEY-----` …). Kept in the token vault, never returned."}},"required":["key_id","private_key"],"additionalProperties":false},"ReconnectEmailChannel":{"type":"object","properties":{"smtp_password":{"type":"string","minLength":1,"maxLength":1024,"description":"Kept in the token vault, never returned."},"smtp_username":{"type":"string","minLength":1,"maxLength":320},"imap_username":{"anyOf":[{"type":"string","minLength":1,"maxLength":320,"description":"The IMAP login's user name when it is not the SMTP account's. Send it with `imap_password`, both or neither."},{"type":"null"}]},"imap_password":{"anyOf":[{"type":"string","minLength":1,"maxLength":1024,"description":"The IMAP login's password, kept in the token vault, never returned. Send it with `imap_username`, both or neither."},{"type":"null"}]}},"required":["smtp_password"],"additionalProperties":false},"ReconnectGooglePlayChannel":{"type":"object","properties":{"service_account_key":{"description":"A new key of the same service account. Leave it out to check the saved key again after fixing a permission in Play Console or enabling an API in Google Cloud.","type":"string","minLength":1,"maxLength":16384}},"additionalProperties":false},"RecordAddress":{"type":"object","properties":{"role":{"type":"string","enum":["customer","shipping","receiver","billing","pickup"],"description":"The customer’s own address, an order’s shipping address, its receiver, the billing address, or a pickup branch. Kept apart by role, never merged."},"name":{"type":["string","null"]},"lines":{"type":"array","items":{"type":"string"}},"city":{"type":["string","null"]},"region":{"type":["string","null"]},"postal_code":{"type":["string","null"]},"country":{"description":"ISO 3166-1 alpha-2.","type":["string","null"]},"phone":{"description":"E.164.","type":["string","null"]}},"required":["role","name","lines","city","region","postal_code","country","phone"],"additionalProperties":false},"RecordConnector":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"source":{"type":"string"},"record_type":{"type":"string"},"config":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"description":"The settings as saved (`RecordConnectorConfig`)."},"secrets_saved":{"type":"object","properties":{"api_key":{"type":"boolean"},"password":{"type":"boolean"},"client_secret":{"type":"boolean"}},"required":["api_key","password","client_secret"],"additionalProperties":false,"description":"Which secrets are saved (never their values)."},"signed_in":{"type":"boolean","description":"The authorization code kind: whether a member signed in to the system."},"sync_interval_minutes":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"status":{"type":"string","enum":["active","needs_auth","removed"],"description":"`active`; `needs_auth` (credentials refused, or the authorization code kind waiting for a sign-in); `removed`."},"status_changed_at":{"type":"string","format":"date-time"},"last_error":{"anyOf":[{"$ref":"#/components/schemas/IntegrationError"},{"type":"null"}]},"last_synced_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"next_sync_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"latest_run":{"anyOf":[{"$ref":"#/components/schemas/RecordConnectorRun"},{"type":"null"}]},"records_count":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"The live records it wrote."},"created_at":{"type":"string","format":"date-time"},"removed_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]}},"required":["id","name","source","record_type","config","secrets_saved","signed_in","sync_interval_minutes","status","status_changed_at","last_error","last_synced_at","next_sync_at","latest_run","records_count","created_at","removed_at"],"additionalProperties":false},"RecordConnectorAuthorization":{"type":"object","properties":{"authorization_url":{"type":"string","format":"uri","description":"Where the member signs in to the system."},"state":{"type":"string"},"expires_at":{"type":"string","format":"date-time"}},"required":["authorization_url","state","expires_at"],"additionalProperties":false},"RecordConnectorConfig":{"type":"object","properties":{"base_url":{"type":"string","maxLength":2048,"format":"uri"},"list_path":{"type":"string","maxLength":500,"pattern":"^\\/[^\\s?#]*$"},"query":{"default":{},"type":"object","propertyNames":{"type":"string","pattern":"^[A-Za-z0-9_.[\\]-]{1,64}$"},"additionalProperties":{"type":"string","maxLength":500,"pattern":"^[^\\r\\n]*$"}},"headers":{"default":{},"type":"object","propertyNames":{"type":"string","pattern":"^[A-Za-z0-9][A-Za-z0-9-]{0,63}$"},"additionalProperties":{"type":"string","maxLength":500,"pattern":"^[^\\r\\n]*$"}},"items_path":{"default":"$","type":"string","minLength":1,"maxLength":300},"pagination":{"default":{"style":"none"},"oneOf":[{"type":"object","properties":{"style":{"type":"string","enum":["none"]}},"required":["style"],"additionalProperties":false},{"type":"object","properties":{"style":{"type":"string","enum":["page"]},"page_param":{"type":"string","pattern":"^[A-Za-z0-9_.[\\]-]{1,64}$"},"size_param":{"default":null,"anyOf":[{"type":"string","pattern":"^[A-Za-z0-9_.[\\]-]{1,64}$"},{"type":"null"}]},"first_page":{"default":1,"anyOf":[{"type":"number","enum":[0]},{"type":"number","enum":[1]}]},"page_size":{"default":100,"type":"integer","minimum":1,"maximum":500}},"required":["style","page_param"],"additionalProperties":false},{"type":"object","properties":{"style":{"type":"string","enum":["offset"]},"offset_param":{"type":"string","pattern":"^[A-Za-z0-9_.[\\]-]{1,64}$"},"limit_param":{"type":"string","pattern":"^[A-Za-z0-9_.[\\]-]{1,64}$"},"page_size":{"default":100,"type":"integer","minimum":1,"maximum":500}},"required":["style","offset_param","limit_param"],"additionalProperties":false},{"type":"object","properties":{"style":{"type":"string","enum":["cursor"]},"cursor_param":{"type":"string","pattern":"^[A-Za-z0-9_.[\\]-]{1,64}$"},"next_cursor_path":{"type":"string","minLength":1,"maxLength":300},"size_param":{"default":null,"anyOf":[{"type":"string","pattern":"^[A-Za-z0-9_.[\\]-]{1,64}$"},{"type":"null"}]},"page_size":{"default":100,"type":"integer","minimum":1,"maximum":500}},"required":["style","cursor_param","next_cursor_path"],"additionalProperties":false},{"type":"object","properties":{"style":{"type":"string","enum":["next_url"]},"next_url_path":{"default":null,"anyOf":[{"type":"string","minLength":1,"maxLength":300},{"type":"null"}]}},"required":["style"],"additionalProperties":false}]},"changed_since":{"default":null,"anyOf":[{"type":"object","properties":{"param":{"type":"string","pattern":"^[A-Za-z0-9_.[\\]-]{1,64}$"},"format":{"default":"iso8601","type":"string","enum":["iso8601","unix_seconds","unix_milliseconds"]}},"required":["param"],"additionalProperties":false},{"type":"null"}]},"auth":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["none"]}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["api_key"]},"header":{"default":"X-API-Key","type":"string","pattern":"^[A-Za-z0-9][A-Za-z0-9-]{0,63}$"},"prefix":{"default":"","type":"string","maxLength":20,"pattern":"^[^\\r\\n]*$"}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["basic"]},"username":{"type":"string","minLength":1,"maxLength":200}},"required":["kind","username"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["oauth_client_credentials"]},"token_url":{"type":"string","maxLength":2048,"format":"uri"},"client_id":{"type":"string","minLength":1,"maxLength":500},"scopes":{"default":[],"maxItems":30,"type":"array","items":{"type":"string","minLength":1,"maxLength":200}},"audience":{"default":null,"anyOf":[{"type":"string","maxLength":500},{"type":"null"}]},"client_auth":{"default":"basic","type":"string","enum":["basic","body"]}},"required":["kind","token_url","client_id"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["oauth_authorization_code"]},"authorize_url":{"type":"string","maxLength":2048,"format":"uri"},"token_url":{"type":"string","maxLength":2048,"format":"uri"},"client_id":{"type":"string","minLength":1,"maxLength":500},"scopes":{"default":[],"maxItems":30,"type":"array","items":{"type":"string","minLength":1,"maxLength":200}},"client_auth":{"default":"basic","type":"string","enum":["basic","body"]}},"required":["kind","authorize_url","token_url","client_id"],"additionalProperties":false}]},"mapping":{"type":"object","properties":{"external_id":{"type":"string","minLength":1,"maxLength":300},"title":{"type":"string","minLength":1,"maxLength":300},"status":{"default":null,"anyOf":[{"type":"string","minLength":1,"maxLength":300},{"type":"null"}]},"amount":{"default":null,"anyOf":[{"type":"string","minLength":1,"maxLength":300},{"type":"null"}]},"amount_unit":{"default":"major","type":"string","enum":["major","minor"]},"currency":{"default":null,"anyOf":[{"type":"string","minLength":1,"maxLength":300},{"type":"null"}]},"default_currency":{"default":null,"anyOf":[{"type":"string","pattern":"^[A-Z]{3}$"},{"type":"null"}]},"starts_at":{"default":null,"anyOf":[{"type":"string","minLength":1,"maxLength":300},{"type":"null"}]},"ends_at":{"default":null,"anyOf":[{"type":"string","minLength":1,"maxLength":300},{"type":"null"}]},"updated_at":{"default":null,"anyOf":[{"type":"string","minLength":1,"maxLength":300},{"type":"null"}]},"url":{"default":null,"anyOf":[{"type":"string","minLength":1,"maxLength":300},{"type":"null"}]},"phones":{"default":[],"maxItems":5,"type":"array","items":{"type":"string","minLength":1,"maxLength":300}},"emails":{"default":[],"maxItems":5,"type":"array","items":{"type":"string","minLength":1,"maxLength":300}},"fields":{"default":[],"maxItems":20,"type":"array","items":{"type":"object","properties":{"label":{"type":"string","minLength":1,"maxLength":60},"path":{"type":"string","minLength":1,"maxLength":300}},"required":["label","path"],"additionalProperties":false}}},"required":["external_id","title"],"additionalProperties":false}},"required":["base_url","list_path","auth","mapping"],"additionalProperties":false,"description":"Everything the connector reads with except its secrets: `base_url` (public HTTPS only), `list_path`, fixed `query` parameters and `headers`, `items_path` (JSON path to the list in the answer), `pagination` (`none`, `page`, `offset`, `cursor` or `next_url`), `changed_since` (the parameter and its format, or null), `auth` (`none`, `api_key`, `basic`, `oauth_client_credentials`, `oauth_authorization_code`) and `mapping` (JSON paths such as `$.id`, `$.customer.phone`)."},"RecordConnectorItemError":{"type":"object","properties":{"code":{"type":"string"},"page":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"item":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"external_id":{"type":["string","null"]},"field":{"type":"string"}},"required":["code","page","item","external_id","field"],"additionalProperties":false},"RecordConnectorList":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/RecordConnector"}}},"required":["data"],"additionalProperties":false},"RecordConnectorPreviewRecord":{"type":"object","properties":{"external_id":{"type":"string"},"title":{"type":"string"},"status":{"type":["string","null"]},"amount":{"anyOf":[{"$ref":"#/components/schemas/ExternalRecordMoney"},{"type":"null"}]},"starts_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"ends_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"url":{"type":["string","null"]},"fields":{"type":"array","items":{"$ref":"#/components/schemas/ExternalRecordField"}},"phones":{"type":"array","items":{"type":"string"}},"emails":{"type":"array","items":{"type":"string"}},"external_updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]}},"required":["external_id","title","status","amount","starts_at","ends_at","url","fields","phones","emails","external_updated_at"],"additionalProperties":false},"RecordConnectorRun":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"trigger":{"type":"string","enum":["created","changed","schedule","member"]},"status":{"type":"string","enum":["queued","running","succeeded","failed"],"description":"`queued`, `running`, `succeeded`, or `failed` with its `error` (the next run tries again)."},"pages_read":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"records_synced":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"records_skipped":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Items that could not be mapped; the first 20 are in `item_errors`."},"item_errors":{"type":"array","items":{"$ref":"#/components/schemas/RecordConnectorItemError"}},"started_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"finished_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"error":{"anyOf":[{"$ref":"#/components/schemas/IntegrationError"},{"type":"null"}]},"created_at":{"type":"string","format":"date-time"}},"required":["id","trigger","status","pages_read","records_synced","records_skipped","item_errors","started_at","finished_at","error","created_at"],"additionalProperties":false},"RecordConnectorRunList":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/RecordConnectorRun"}}},"required":["data"],"additionalProperties":false},"RecordConnectorSecrets":{"type":"object","properties":{"api_key":{"type":"string","minLength":1,"maxLength":4096,"pattern":"^[^\\r\\n]*$"},"password":{"type":"string","minLength":1,"maxLength":1024},"client_secret":{"type":"string","minLength":1,"maxLength":4096}},"additionalProperties":false,"description":"The secret the authentication needs: `api_key` (API key), `password` (Basic) or `client_secret` (OAuth). Kept only in Rabt’s token vault and never returned; leave out to keep the saved one."},"RecordConnectorTest":{"type":"object","properties":{"items_read":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Items on the first page."},"has_more":{"type":"boolean","description":"Whether the system has more pages."},"records":{"type":"array","items":{"$ref":"#/components/schemas/RecordConnectorPreviewRecord"},"description":"The first mapped records, as they would be written (nothing is saved)."},"item_errors":{"type":"array","items":{"$ref":"#/components/schemas/RecordConnectorItemError"}},"sample":{"description":"The first item as the system sent it, to write the mapping’s paths."}},"required":["items_read","has_more","records","item_errors","sample"],"additionalProperties":false},"RedeliveredFailedWebhooks":{"type":"object","properties":{"queued":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"The failed deliveries sent again."}},"required":["queued"],"additionalProperties":false},"RegisteredOAuthApp":{"type":"object","properties":{"app":{"$ref":"#/components/schemas/OAuthApp"},"client_secret":{"description":"Confidential apps: the secret, shown only now (`shown_once`). Null for public apps.","type":["string","null"]},"shown_once":{"description":"True: the secret is in this answer, shown only now. A repeat with the same `Idempotency-Key` within 10 minutes answers it again; a later one is `API-8118` (rotate again for a new one).","type":"boolean"},"secret_view":{"anyOf":[{"$ref":"#/components/schemas/SecretViewLink"},{"type":"null"}],"description":"A confidential app made with an API key or app: a fallback link that shows its secret once in Rabt's app (the member, signed in, with a recent code). Null otherwise."}},"required":["app","client_secret","secret_view"],"additionalProperties":false},"RegisteredRecordLabel":{"type":"object","properties":{"kind":{"type":"string","enum":["source","type"]},"key":{"type":"string","description":"The source or type key, as in the records."},"name":{"$ref":"#/components/schemas/ExternalRecordLabel"}},"required":["kind","key","name"],"additionalProperties":false},"RegisteredRecordLabelList":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/RegisteredRecordLabel"}}},"required":["data"],"additionalProperties":false},"RegisterWhatsappNumber":{"type":"object","properties":{"pin":{"description":"The number's two-step verification PIN (6 digits); the saved one when absent.","type":"string","pattern":"^\\d{6}$"}},"additionalProperties":false},"RenameChatGroup":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":100}},"required":["name"],"additionalProperties":false},"RenameTicketTag":{"type":"object","properties":{"name":{"type":"string","maxLength":200,"description":"Up to 50 characters, trimmed with spaces collapsed (`TKT-6239`); unique ignoring case and Arabic spelling."}},"required":["name"],"additionalProperties":false},"RenameWhatsappWebChannel":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200}},"required":["name"],"additionalProperties":false},"ReplyToReview":{"type":"object","properties":{"body":{"type":"string","minLength":1,"maxLength":10000,"description":"The public reply’s text: it replaces the published one. The store’s own limits apply (`reply_rules`)."},"client_key":{"description":"The client’s key: the same key never sends a second reply.","type":"string","pattern":"^[A-Za-z0-9._~-]{1,100}$"}},"required":["body"],"additionalProperties":false},"ReplyWatch":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"ticket_id":{"type":"string","format":"uuid"},"callback_url":{"type":["string","null"]},"status":{"type":"string","enum":["active","fired","cancelled","expired"],"description":"`fired`: ended by its reply; `cancelled`; `expired`."},"expires_at":{"type":"string","format":"date-time"},"last_message_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"description":"The newest customer reply it saw."},"created_at":{"type":"string","format":"date-time"},"ended_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]}},"required":["id","ticket_id","callback_url","status","expires_at","last_message_id","created_at","ended_at"],"additionalProperties":false},"ReplyWatchList":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/ReplyWatch"}}},"required":["data"],"additionalProperties":false},"ReplyWindow":{"anyOf":[{"type":"object","properties":{"hours":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Free replies this many hours after the customer wrote."},"human_agent_hours":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}],"description":"A member's reply may still go out with the platform's human agent tag this many hours after (Messenger: 168)."},"max_messages":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}],"description":"Business messages allowed in the window until the customer writes again (TikTok: 10; after the window TikTok allows 3 follow-ups more); null when not counted."},"outside":{"type":"string","enum":["human_agent_tag","template","none"],"description":"What may still go out after `open_until`: a member's reply with the human agent tag (Messenger, Instagram), an approved template (WhatsApp), or nothing (TikTok, apart from its 3 follow-up messages until the customer writes again: `TT-3036` after them)."},"open_until":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"human_agent_until":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]}},"required":["hours","human_agent_hours","max_messages","outside","open_until","human_agent_until"],"additionalProperties":false},{"type":"null"}],"description":"The platform's reply window of a private conversation (docs/24 #24), the same policy every send path enforces: free replies until `open_until`. After it, Messenger and Instagram: a member's reply goes out with the human agent tag until `human_agent_until` (`FB-2010`/`IG-2010` for automatic replies, `FB-2011`/`IG-2011` for members after); WhatsApp: templates only (`WA-2047`); TikTok: 3 follow-up messages until the customer writes again (`TT-3036` after them; `TT-3007` when the customer never wrote), and over `max_messages` in the window `TT-3008`. Null when the channel has none."},"ReplyWindowState":{"anyOf":[{"type":"object","properties":{"open":{"type":"boolean","description":"Whether a free reply may be sent now."},"open_until":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"messages_left":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"way_out":{"type":"string","enum":["human_agent_tag","template","none"],"description":"After the window: a member’s reply with the human agent tag (Messenger, Instagram), an approved template (`whatsapp_template`), or nothing until the customer writes again."}},"required":["open","open_until","messages_left","way_out"],"additionalProperties":false},{"type":"null"}],"description":"The reply window now (null: the channel has none)."},"RequestCampaignMediaUpload":{"type":"object","properties":{"file_name":{"type":"string","minLength":1,"maxLength":255},"mime_type":{"type":"string","minLength":1,"maxLength":255},"size_bytes":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991,"description":"The file’s size in bytes: part of the signed upload (a different size fails), at most 16 MB for an image, video or audio (WhatsApp’s limit); a document up to 100 MB."}},"required":["file_name","mime_type","size_bytes"],"additionalProperties":false},"RequestContactErasure":{"type":"object","properties":{"reason":{"type":"string","minLength":1,"maxLength":500,"description":"Why (1 to 500 characters), kept in the audit log. Do not write the person's details in it."},"confirm":{"type":"boolean","description":"Must be `true`: the contact goes to the trash now and, after the restore window, its personal data is erased for good.","enum":[true]}},"required":["reason","confirm"],"additionalProperties":false},"RequestOrganizationDeletion":{"type":"object","properties":{"reason":{"type":"string","minLength":1,"maxLength":500,"description":"Why (1 to 500 characters), kept in the audit log. Do not write the person's details in it."},"confirm_name":{"type":"string","minLength":1,"maxLength":200,"description":"The organization's name, typed exactly (`CRM-6051` otherwise)."}},"required":["reason","confirm_name"],"additionalProperties":false},"RequestSmsSenderName":{"type":"object","properties":{"name":{"type":"string","minLength":3,"maxLength":11,"description":"3 to 11 English letters or digits (space `.` `-` `_` `&` allowed), not only digits. A promotional name ends in `-AD`."},"classification":{"type":"string","enum":["service","promotional","awareness"],"description":"`service` (customer service and codes), `promotional` (campaigns, name ending in `-AD`) or `awareness`."},"purpose":{"type":"string","minLength":1,"maxLength":1000,"description":"What the name is for, for the registration with the operators."}},"required":["name","classification","purpose"],"additionalProperties":false},"ResolveTicketReferences":{"type":"object","properties":{"numbers":{"maxItems":50,"type":"array","items":{"type":"integer","minimum":1,"maximum":9007199254740991}},"text":{"description":"A text whose `#<number>` references are resolved (a note being shown).","type":"string","maxLength":20000}},"additionalProperties":false},"Review":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"channel_type":{"type":"string","description":"`app_store`, `google_play`, `google_business` or a Zid store’s `zid_questions` or `zid_reviews`."},"channel_id":{"type":"string","format":"uuid"},"external_id":{"type":"string","description":"The store’s review id."},"ticket_id":{"type":"string","format":"uuid","description":"The ticket the review lives in now."},"message_id":{"type":"string","format":"uuid","description":"The ticket message with its current content."},"app":{"anyOf":[{"type":"object","properties":{"address_id":{"type":"string","format":"uuid","description":"Its channel address: assign it to a space (`POST /v1/spaces/{space_id}/channels` with `channel_address_id`) to route its reviews."},"external_id":{"type":"string","description":"The store’s id (Apple’s app id, the Google Play package name, Google’s location id, the Zid store id)."},"name":{"type":"string"}},"required":["address_id","external_id","name"],"additionalProperties":false},{"type":"null"}],"description":"The app reviewed (app stores) or the Zid store; null for a location’s review."},"location":{"anyOf":[{"type":"object","properties":{"address_id":{"type":"string","format":"uuid","description":"Its channel address: assign it to a space (`POST /v1/spaces/{space_id}/channels` with `channel_address_id`) to route its reviews."},"external_id":{"type":"string","description":"The store’s id (Apple’s app id, the Google Play package name, Google’s location id, the Zid store id)."},"name":{"type":"string"}},"required":["address_id","external_id","name"],"additionalProperties":false},{"type":"null"}],"description":"The business location reviewed (Google Maps); null otherwise."},"rating":{"description":"The star rating, 1 to 5; absent for a Zid product question, which has none.","type":"integer","minimum":1,"maximum":5},"title":{"type":["string","null"]},"body":{"type":["string","null"]},"reviewer_name":{"description":"The author’s public name; null for an anonymous Google reviewer.","type":["string","null"]},"territory":{"description":"The store’s country or region (App Store: ISO 3166-1 alpha-3, e.g. `SAU`); null on Google Play.","type":["string","null"]},"app_version":{"description":"The app version reviewed, when the store ties the review to a version.","type":["string","null"]},"device":{"anyOf":[{"type":"object","properties":{"language":{"description":"The reviewer’s language, e.g. `ar`.","type":["string","null"]},"name":{"description":"The device, e.g. `Galaxy A52s 5G`.","type":["string","null"]},"manufacturer":{"type":["string","null"]},"android_version":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}],"description":"The Android API level."},"app_version_code":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]}},"required":["language","name","manufacturer","android_version","app_version_code"],"additionalProperties":false},{"type":"null"}],"description":"Google Play’s device facts of the review; null on other stores."},"reply_rules":{"$ref":"#/components/schemas/ReviewReplyRules"},"reviewed_at":{"type":"string","format":"date-time","description":"When the review was written (Google Play: when it was last changed)."},"content_changed_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"removed_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"When Rabt learned the store no longer has the review (its author deleted it, or the store removed it; its messages show `provider_deleted`); null while it is on the store. A removed review cannot be answered."},"reply":{"type":"object","properties":{"state":{"type":"string","enum":["none","pending","published","deleted","rejected"],"description":"`pending`: sent, waiting for the store to publish it (Apple; Google Maps while its moderation holds it); `published`; `deleted` by a member, or on the store (its console); `rejected`: the store’s moderation refused to publish it (`rejected_reason`). A new reply replaces a rejected one."},"author":{"anyOf":[{"type":"string","enum":["member","bot","external"]},{"type":"null"}],"description":"`member`, `bot` (the AI agent) or `external` (written on the store itself: App Store Connect, Play Console, Google Business Profile)."},"external_id":{"type":["string","null"]},"body":{"type":["string","null"]},"message_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"state_changed_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"rejected_reason":{"description":"Why the store refused to publish the reply (its policy, as the store names it: Google Business Profile `policyViolation`, e.g. `DANGEROUS`), while `state` is `rejected`; null otherwise.","type":["string","null"]},"checked_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"When Rabt last asked the store whether a `pending` reply is published."},"check_error":{"anyOf":[{"type":"object","properties":{"code":{"type":"string","description":"The catalog code, e.g. `APS-3701` or `GBP-3806`."},"reference":{"type":"string","description":"The error log reference."},"retryable":{"type":"boolean"},"provider":{"anyOf":[{"type":"object","properties":{"name":{"type":"string"},"code":{"type":["string","null"]},"message":{"type":["string","null"]}},"required":["name","code","message"],"additionalProperties":false},{"type":"null"}]},"occurred_at":{"type":"string"},"params":{"description":"The values the catalog’s texts name, e.g. `{ \"service\": \"WhatsApp\" }`.","anyOf":[{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}},{"type":"null"}]}},"required":["code","reference","retryable","provider","occurred_at"],"additionalProperties":false,"description":"An error kept on the item it stopped (docs/23)."},{"type":"null"}],"description":"Why that question failed (code and reference); Rabt asks again later. Null after a good answer."}},"required":["state","author","external_id","body","message_id","updated_at","state_changed_at","rejected_reason","checked_at","check_error"],"additionalProperties":false}},"required":["id","channel_type","channel_id","external_id","ticket_id","message_id","app","location","title","body","reviewer_name","territory","app_version","device","reply_rules","reviewed_at","content_changed_at","removed_at","reply"],"additionalProperties":false,"description":"A store review and its one public reply (docs/02 §8)."},"ReviewPage":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Review"},"description":"Newest written first."},"next_cursor":{"description":"The next page’s cursor; null on the last page. It never expires.","type":["string","null"]},"total":{"type":"integer","minimum":0,"maximum":10000,"description":"How many rows the list has with these filters, counted up to 10000."},"total_capped":{"type":"boolean","description":"The list has more than 10000 rows (`total` is 10000)."}},"required":["data","next_cursor","total","total_capped"],"additionalProperties":false},"ReviewReplyRules":{"type":"object","properties":{"max_length":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}],"description":"The longest reply in Unicode characters, shown with a counter in the composer (Google Play: 350); null when the store counts none (Apple documents no limit)."},"max_bytes":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}],"description":"The longest reply in UTF-8 bytes (Google Maps: 4,095; an Arabic letter takes two); null when the store counts none."},"moderated_by_store":{"type":"boolean","description":"The store reviews each reply before it appears (Apple: up to 24 hours, `pending` until then); false: published at once (Google Play, Google Maps)."},"deletable":{"type":"boolean","description":"A member may delete the published reply through Rabt (App Store, Google Maps); false: only in the store’s console (Google Play)."},"repliable":{"description":"Rabt can send a reply (`reply_to_review`); false: the store offers no reply API (Zid product reviews: reply in Zid, read back as `external`, INT-7212).","type":"boolean"}},"required":["max_length","max_bytes","moderated_by_store","deletable"],"additionalProperties":false,"description":"What the composer shows (docs/02 §8): one public text reply per review, a new one replaces it, no files; the AI agent never writes personal data and never replaces a person’s reply."},"ReviewVersion":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"review_id":{"type":"string","format":"uuid"},"message_id":{"type":"string","format":"uuid","description":"The ticket message that carried this version."},"rating":{"description":"The star rating, 1 to 5; absent for a Zid product question, which has none.","type":"integer","minimum":1,"maximum":5},"title":{"type":["string","null"]},"body":{"type":["string","null"]},"reviewer_name":{"type":["string","null"]},"reviewed_at":{"type":"string","format":"date-time","description":"The store’s time of this version."},"replaced_at":{"type":"string","format":"date-time","description":"When Rabt read the newer version that replaced it."}},"required":["id","review_id","message_id","title","body","reviewer_name","reviewed_at","replaced_at"],"additionalProperties":false},"ReviewVersionList":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/ReviewVersion"},"description":"Newest first."}},"required":["data"],"additionalProperties":false},"Role":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"permissions":{"type":"array","items":{"$ref":"#/components/schemas/PermissionKey"},"description":"The role's fixed permission keys (docs/18); nobody edits them."},"is_default":{"type":"boolean","description":"Owner, Admin, Supervisor or Agent (docs/18)."},"is_owner":{"type":"boolean","description":"The Owner role: every permission, never given."},"member_count":{"type":"integer","minimum":0,"maximum":9007199254740991},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}},"required":["id","name","permissions","is_default","is_owner","member_count","created_at","updated_at"],"additionalProperties":false,"description":"A role and its permissions (docs/18)."},"RoleList":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Role"},"description":"Owner and default roles first."}},"required":["data"],"additionalProperties":false},"RoleRef":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string","description":"The role's name as stored: a default role by its English name (`Owner`, `Admin`, `Supervisor`, `Agent`), which the apps show in the member's language (the glossary's words)."}},"required":["id","name"],"additionalProperties":false},"RotatedWebhookSecret":{"type":"object","properties":{"endpoint":{"$ref":"#/components/schemas/WebhookEndpoint"},"secret":{"description":"The signing secret (`whsec_…`), shown only now (`shown_once`): verify `webhook-signature` with it (Standard Webhooks). Null when you sent your own (never echoed back).","type":["string","null"]},"shown_once":{"description":"True: the secret is in this answer, shown only now. A repeat with the same `Idempotency-Key` within 10 minutes answers it again; a later one is `API-8118` (rotate again for a new one).","type":"boolean"},"note":{"type":"string","description":"Only the secret changed: the endpoint's `status` is as before. A disabled endpoint stays disabled until `update_webhook_endpoint` (`PATCH /v1/webhook-endpoints/{id}`) sets `enabled: true`."}},"required":["endpoint","secret","note"],"additionalProperties":false},"RotateWebhookSecret":{"type":"object","properties":{"secret":{"description":"Your own signing secret (Standard Webhooks: `whsec_` and 24 to 64 random bytes in base64); never returned. Leave it out and Rabt generates one, returned once.","type":"string","maxLength":200}},"additionalProperties":false},"RoutingDestination":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["all"]}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["space"]},"space_id":{"type":"string","format":"uuid"},"space_name":{"type":"string"}},"required":["type","space_id","space_name"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["member"]},"membership_id":{"type":"string","format":"uuid"},"member_name":{"type":"string"}},"required":["type","membership_id","member_name"],"additionalProperties":false}],"description":"Where new tickets go: one department space or one specific member (their My space); `all` only while the item has no destination yet (its tickets go to the member who connected the channel, else the owner, until one is set). Never several."},"RoutingItem":{"type":"object","properties":{"target":{"$ref":"#/components/schemas/RoutingTargetType"},"id":{"type":"string","format":"uuid"},"kind":{"type":"string","enum":["email","account","app","location","number","channel","widget"],"description":"How it is connected: an address of kind `email`, `account`, `app` or `location`; a phone `number`; a `channel` without addresses or numbers; a web chat `widget`."},"channel_id":{"type":"string","format":"uuid"},"channel_type":{"$ref":"#/components/schemas/ChannelType"},"provider":{"type":"string"},"channel_name":{"type":"string"},"channel_status":{"type":"string","description":"The channel’s status (`pending`, `active`, `needs_reauth`, `disabled`), the widget’s, or the phone number’s (`active`, `suspended`)."},"label":{"type":"string","description":"The address, or the channel’s or widget’s name."},"display_name":{"type":["string","null"]},"active":{"description":"An email address: whether it is on (a stopped address takes no mail and is never a From; switched with its mailbox’s address `PATCH`; the mailbox keeps one active address); null for every other item.","type":["boolean","null"]},"destination":{"description":"Its own destination; on a two-sided account its private side’s (`sides` gives both).","$ref":"#/components/schemas/RoutingDestination"},"effective":{"description":"Where its new tickets go now (a two-sided account’s private side’s): its own destination, else for an address its channel’s space (set on the Spaces page), else the member who connected the channel (else the owner). A phone number has no channel route: its own destination is where its calls go.","$ref":"#/components/schemas/RoutingDestination"},"routed_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"tickets_last_24h":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Tickets created through it in the last 24 hours (deleted tickets not counted)."},"sides":{"anyOf":[{"type":"array","items":{"$ref":"#/components/schemas/RoutingSideRoute"}},{"type":"null"}],"description":"A two-sided account’s sides, `private` then `public`, each with its own destination and tickets; null on an item with one side (its own destination is its side’s)."}},"required":["target","id","kind","channel_id","channel_type","provider","channel_name","channel_status","label","display_name","active","destination","effective","routed_at","tickets_last_24h","sides"],"additionalProperties":false},"RoutingItemPage":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/RoutingItem"}},"next_cursor":{"type":["string","null"]},"total":{"type":"integer","minimum":0,"maximum":10000,"description":"How many rows the list has with these filters, counted up to 10000."},"total_capped":{"type":"boolean","description":"The list has more than 10000 rows (`total` is 10000)."}},"required":["data","next_cursor","total","total_capped"],"additionalProperties":false},"RoutingSettings":{"type":"object","properties":{"max_open_tickets":{"type":"number","enum":[0,5,10,15,20,30,50,1000],"description":"The maximum of open tickets in department spaces per member, the same for every member (docs/17 step 5; 10 by default): one of 0 (automatic distribution paused), 5, 10, 15, 20, 30, 50 or 1000 (no limit); anything else is refused. Tickets in no department space (a member’s My space) never count."}},"required":["max_open_tickets"],"additionalProperties":false},"RoutingSide":{"type":"string","enum":["private","public"],"description":"A side of a two-sided account (Facebook, Instagram, X, TikTok): `private` its private messages, `public` its public replies (comments, mentions, replies)."},"RoutingSideRoute":{"type":"object","properties":{"kind":{"$ref":"#/components/schemas/RoutingSide"},"destination":{"$ref":"#/components/schemas/RoutingDestination"},"effective":{"description":"Where the side’s new tickets go now: its own destination, else for an address its channel’s space for that side, else the member who connected the channel (else the owner).","$ref":"#/components/schemas/RoutingDestination"},"routed_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"tickets_last_24h":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"The side’s tickets created in the last 24 hours (deleted tickets not counted)."}},"required":["kind","destination","effective","routed_at","tickets_last_24h"],"additionalProperties":false},"RoutingTargetType":{"type":"string","enum":["address","number","channel"],"description":"`address`: a channel address (an email address or alias, an account, an app, a location); `number`: a phone number; `channel`: a channel or web chat widget that carries neither (a WhatsApp number, an X account, a page, a widget)."},"SallaReviewsChannel":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"integration_id":{"type":"string","format":"uuid","description":"The Salla integration the channel uses."},"status":{"type":"string","enum":["pending","active","needs_reauth","disconnected"]},"status_changed_at":{"type":"string","format":"date-time"},"last_error":{"anyOf":[{"type":"object","properties":{"code":{"type":"string","description":"The catalog code, e.g. `APS-3701` or `GBP-3806`."},"reference":{"type":"string","description":"The error log reference."},"retryable":{"type":"boolean"},"provider":{"anyOf":[{"type":"object","properties":{"name":{"type":"string"},"code":{"type":["string","null"]},"message":{"type":["string","null"]}},"required":["name","code","message"],"additionalProperties":false},{"type":"null"}]},"occurred_at":{"type":"string"},"params":{"description":"The values the catalog’s texts name, e.g. `{ \"service\": \"WhatsApp\" }`.","anyOf":[{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}},{"type":"null"}]}},"required":["code","reference","retryable","provider","occurred_at"],"additionalProperties":false,"description":"An error kept on the item it stopped (docs/23)."},{"type":"null"}]},"stores":{"type":"array","items":{"type":"object","properties":{"address_id":{"type":"string","format":"uuid","description":"The store’s channel address: assign it to a space (`POST /v1/spaces/{space_id}/channels` with `channel_address_id`) to route its reviews."},"store_id":{"type":"string","description":"Salla’s store id."},"name":{"type":"string"},"polled_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"polled_ok_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"last_poll_error":{"anyOf":[{"type":"object","properties":{"code":{"type":"string","description":"The catalog code, e.g. `APS-3701` or `GBP-3806`."},"reference":{"type":"string","description":"The error log reference."},"retryable":{"type":"boolean"},"provider":{"anyOf":[{"type":"object","properties":{"name":{"type":"string"},"code":{"type":["string","null"]},"message":{"type":["string","null"]}},"required":["name","code","message"],"additionalProperties":false},{"type":"null"}]},"occurred_at":{"type":"string"},"params":{"description":"The values the catalog’s texts name, e.g. `{ \"service\": \"WhatsApp\" }`.","anyOf":[{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}},{"type":"null"}]}},"required":["code","reference","retryable","provider","occurred_at"],"additionalProperties":false,"description":"An error kept on the item it stopped (docs/23)."},{"type":"null"}]}},"required":["address_id","store_id","name","polled_at","polled_ok_at","last_poll_error"],"additionalProperties":false}},"reply_rules":{"$ref":"#/components/schemas/ReviewReplyRules"},"last_inbound_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"connected_at":{"type":"string","format":"date-time"},"disconnected_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]}},"required":["id","name","integration_id","status","status_changed_at","last_error","stores","reply_rules","last_inbound_at","connected_at","disconnected_at"],"additionalProperties":false},"SallaReviewsChannelList":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/SallaReviewsChannel"}}},"required":["data"],"additionalProperties":false},"SavedCard":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"brand":{"type":"string","example":"visa"},"last4":{"type":"string"},"expiry_month":{"type":"integer","minimum":1,"maximum":12},"expiry_year":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"is_default":{"type":"boolean","description":"The default card: auto top-up and quick top-ups use it."},"saved_at":{"type":"string","format":"date-time"}},"required":["id","brand","last4","expiry_month","expiry_year","is_default","saved_at"],"additionalProperties":false,"description":"A card saved at Tap: its brand, last 4 digits and expiry only."},"SavedCardList":{"type":"object","properties":{"cards":{"type":"array","items":{"$ref":"#/components/schemas/SavedCard"}}},"required":["cards"],"additionalProperties":false,"description":"The saved cards, the default first."},"SavedCardResponse":{"type":"object","properties":{"card":{"anyOf":[{"$ref":"#/components/schemas/SavedCard"},{"type":"null"}]}},"required":["card"],"additionalProperties":false},"SaveListViewRequest":{"type":"object","properties":{"state":{"anyOf":[{"$ref":"#/components/schemas/CustomersListState"},{"$ref":"#/components/schemas/TicketsListState"}],"description":"The state of the list named in the path: a customers state (`tab`) or a tickets state (`space`)."}},"required":["state"],"additionalProperties":false},"ScanError":{"type":"object","properties":{"code":{"type":"string","description":"The catalog code: TKT-6113 (malware) or TKT-6190."},"reference":{"type":"string","description":"The error reference (`ref_…`) in the error log."},"release":{"description":"The release that recorded it.","type":["string","null"]}},"required":["code","reference","release"],"additionalProperties":false},"ScanStatus":{"type":"string","enum":["pending","clean","infected","scan_failed","not_scanned"],"description":"The malware scan (ClamAV): `pending` until scanned (also while the scanner is down: the file waits and nothing is lost), `clean`, `infected` (quarantined: never served, never deleted), `scan_failed` (the scanner answered an error for the file; scan it again with the retry operation) or `not_scanned` (no scanner configured, development only). The file is served only when `clean` or `not_scanned`."},"Scope":{"type":"string","enum":["organization:read","organization:write","members:read","members:write","contacts:read","contacts:write","segments:read","segments:write","imports_exports:read","imports_exports:write","security:read","companies:read","companies:write","tickets:read","tickets:write","replies:read","replies:write","audit:read","erasure:read","erasure:write","error_log:read","error_log:write","billing:read","billing:write","wallet:read","wallet:write","pricing:read","notifications:read","notifications:write","chat:read","chat:write","search:read","spaces:read","spaces:write","ai:read","ai:write","channels:read","channels:write","sms:read","sms:write","campaigns:read","campaigns:write","platform_sms:read","platform_sms:write","voice:read","voice:write","integrations:read","integrations:write","abuse:read","abuse:write","webhooks:read","webhooks:write","credentials:read","credentials:write","test_mode:read","test_mode:write","platform_operations:read","platform_operations:write","platform_security:read","platform_organizations:read","platform_organizations:write","platform_pricing:read","platform_team:read","platform_team:write","platform_audit:read","platform_billing:read","platform_billing:write","platform_integrations:read","platform_integrations:write","platform_problems:read"],"description":"A module scope (docs/16): `organization:read` Read the organization's settings (name, language, time zone, country), the CRM settings and the email signatures. `organization:write` Change the organization's settings, the CRM settings, the tickets' classification lists and tags, and the email signatures. `members:read` Read the members, the roles and their permissions, and the invitations. `members:write` Invite people, change members' roles and seats, and remove members (only within the permissions of the member who granted access). `contacts:read` Read and search the contacts, their notes, their merge history and a contact's communication history. `contacts:write` Create, edit and delete contacts, their phone numbers, email addresses, company links and notes, and merge or unmerge contacts. `segments:read` Read the segments (saved filters of contacts and companies) and how many records each lists. `segments:write` Create, change and delete segments. `imports_exports:read` Read the CSV imports and exports of contacts and companies, their progress and errors, and download exported files. `imports_exports:write` Import contacts from CSV files and export contacts and companies to CSV files. `security:read` Read the organization's sensitive-access log (recordings played, exports, bulk reads of contacts), its security alerts and the integrity of its audit log (the owner only). `companies:read` Read and search the companies, their notes and their merge history. `companies:write` Create, edit and delete companies, their email domains and notes, and merge or unmerge companies. `tickets:read` Read the tickets the member may see, their timelines (messages, internal notes, files), the store reviews they hold with their public replies, and the classification lists and tags with the ticket counts by each. `tickets:write` Start, edit (with their note, classifications and tags), pick up, close, assign and merge tickets, reply to customers (on WhatsApp also with templates, locations, contact cards, reactions and the typing indicator; and to store reviews), delete a public reply to a store review, add internal notes and files, and retry failed messages. `replies:read` Read the canned replies (the organization's, the spaces' and the connected member's own). `replies:write` Create, change and delete canned replies (only within the permissions of the member who granted access). `audit:read` Read the audit log. `erasure:read` Read the requests to erase contacts' personal data: their state, dates, failures and counts of what they erased. `erasure:write` Ask to erase a contact's personal data (it goes to the trash for the organization's restore window, then its personal data is erased for good) and retry an erasure that stopped. `error_log:read` Read the organization's error log (every recorded error with its code and reference). `error_log:write` Escalate an error a member saw to the Rabt team (by its reference). `billing:read` Read the seats and their billing (the subscription, the seat pricing model, the seat log), price one more seat, and read the monthly invoices (with their PDF and CSV), their credit and debit notes and the billing profile. `billing:write` Save the billing profile copied onto invoices, and choose the seat pricing model before the first seat payment. `wallet:read` Read the prepaid wallet's balance and its transactions, the top-ups, the saved card, the auto top-up settings and the receipt vouchers. `wallet:write` Top up the wallet with a saved card (3-D Secure in the app when the bank asks), choose the default card, delete a card and change the auto top-up settings. `pricing:read` Get price quotes for usage (messages, calls, AI) at the current prices. `notifications:read` Read your notifications and your notification preferences. `notifications:write` Mark your notifications as read and change your notification preferences. `chat:read` Read the connected member's internal chat rooms, their members, messages, pinned messages, files and read positions, and search their messages. `chat:write` Post, edit, delete, react to and pin messages in the connected member's rooms, send files, create and manage private groups, start direct messages, and set their read positions and notifications. `search:read` Search everything the connected member may see in one query: tickets, messages and internal notes, contacts, companies and their notes, and their chat rooms. Each kind of result also needs its own module's read scope. `spaces:read` Read the spaces, their members and channels, who is available, the availability log, the routing limits and the routing of every connected item (its destination and its tickets of the last 24 hours). `spaces:write` Create, change and archive spaces, manage their members and channels, set the routing limits, set the destination of every connected address, account, phone number, channel and widget, and set the connected member's own availability. `ai:read` Read the AI agent's Markdown blocks of every level (organization, channel, private/public and address), the AI switches of every level and which apply to a channel, and what the AI agent receives for a ticket on a channel. `ai:write` Add, edit, reorder, switch off and archive the AI agent's blocks, and set the AI switches of every level. `channels:read` Read the channels: the web chat widgets with their settings, embed snippet and status, the email channels with their status and settings (never their credentials), inbound address and sender domain checks, the Microsoft 365 mailboxes with their addresses and receiving state, and the WhatsApp numbers with their status, quality, messaging limit, health, templates and the account events Meta reported, the App Store channels with their status, key IDs (never the private key) and apps, the Google Maps review channels with their status, locations and the business locations their Google account can connect, and the Google Play channels with their status, service account, key id (never the key), apps and how current their reviews are. `channels:write` Create, change, switch off and remove web chat widgets and rotate a widget's identity-verification secret; connect, change, reconnect and disconnect email channels, send forwarding check messages and run the sender domain checks; connect Microsoft 365 mailboxes, manage their addresses, check sending from them, sync and disconnect them; connect WhatsApp numbers with Embedded Signup, rename, register, check health, ask for the WhatsApp Business app history, create, edit and sync templates, and disconnect; connect, rename, reconnect and disconnect App Store channels and refresh their apps; connect, rename, reconnect and disconnect Google Maps review channels, choose their locations and read their reviews again; connect, rename, change the package names of, reconnect or check again, read now and disconnect Google Play channels and refresh their apps. `sms:read` Read SMS: the sender names with their registration status, documents and complaints, the opt-out list, the SMS settings, and every SMS sent with its delivery status. `sms:write` Request sender names and upload their registration documents, choose the default sender name, add and lift opt-outs, change the SMS settings, send SMS (service messages and one-time codes, paid from the wallet) and report one-time codes as used. `campaigns:read` Read the campaigns on WhatsApp, SMS and voice with their results, their review before launch (recipients, estimated cost, compliance checks), their recipients with each one’s status, listen to a voice campaign’s audio, and read the sender health of each WhatsApp QR number and mailbox (trust level, allowance and use today, reply rate, the measurement days). `campaigns:write` Create, change and remove draft campaigns, add a voice campaign’s recording, create its speech (paid from the wallet), and launch (past the sender’s allowance only with the risk accepted), pause, resume and cancel campaigns (they spend from the wallet). `platform_sms:read` Rabt platform team only: read every organization’s SMS sender names with their registration documents and spam complaints, and Rabt’s stock of phone numbers with who holds each. `platform_sms:write` Rabt platform team only: record the registration of SMS sender names (submitted, approved, rejected), log spam complaints, and suspend or lift a sender name with a mandatory reason; add phone numbers to Rabt’s stock, mark them porting, on sale or retired, give one to an organization, and suspend or lift an organization’s number with a reason. `voice:read` Read the phone numbers with their settings and destinations, the numbers available to pick, the voice settings, the calls with their recordings and voicemail, and your registered devices. `voice:write` Pick, change and release phone numbers, change the voice settings, place notification calls (never a call a member talks on), and transfer and end calls. `integrations:read` Read the connected stores and systems with their status and sync runs (never their credentials), a contact's customer records and orders in them, and look up orders by number, phone or email. `integrations:write` Connect stores and systems by signing in to their platform, reconnect and disconnect them, and ask for a sync of their customers and orders. `abuse:read` Read the block list (phone numbers, email addresses, handles and web chat networks), contacts' blocks, the quarantined senders and the Spam list. `abuse:write` Add to and remove from the block list, block or unblock a contact, release or block quarantined senders, and add to and remove from the Spam list. `webhooks:read` Read the webhook endpoints, the event types and the delivery log. `webhooks:write` Create, change and delete webhook endpoints, rotate their secrets, redeliver events and send test events. `credentials:read` Read the organization's API keys and OAuth apps, and the personal keys and connected apps acting in it. `credentials:write` Create, change, rotate and revoke the organization's API keys and OAuth apps, and revoke personal keys and connected apps acting in it; every new secret opens only in the app. `test_mode:read` Read the organization's API test mode: its current test space and when its test data was last cleared. `test_mode:write` Clear the organization's API test data (live data is never touched). `platform_operations:read` Read the platform's operations: the queues with their dead jobs, provider health, the wallet reconciliation results, the SMS operator routes, the voice operator trunks, degraded modes, status page incidents, the security incidents (PDPL breach records), SLOs, synthetic check runs and the API version calendar (Rabt team only). `platform_operations:write` Replay dead jobs, add, change, disable and enable voice operator trunks, switch degraded modes, open, update and resolve status page incidents, and record, notify and close security incidents (Rabt team only). `platform_security:read` Platform: read every organization's security alerts, the integrity of the platform audit log and of the organizations' audit logs, and the rotation status of Rabt's keys and secrets (Rabt team only). `platform_organizations:read` Platform: read every organization's summary (owner, status, seats), wallet balance and history, usage, abuse limits, trial and seat pricing model. `platform_organizations:write` Platform: set organizations' abuse limits, extend trials, switch seat pricing models and set the VAT rate. `platform_pricing:read` Platform: read the rate-card versions with their pricing table, and the fixed prices (plans). Prices are set only in code. `platform_team:read` Platform: read the key's own platform access, the platform team (members of the Rabt organization) and the platform roles. `platform_team:write` Platform: create, edit and remove platform roles, and give or take members' platform roles. `platform_audit:read` Platform: read the platform audit log. `platform_billing:read` Platform: read every organization's monthly invoices with their e-invoicing status, every receipt voucher and the failed payments, and export them as CSV. `platform_billing:write` Platform: send an invoice whose sending to Wafeq failed or was refused again (Retry). `platform_integrations:read` Platform: read the Integrations page (Wafeq and Tap: configured or not, the choices made, the last connection test, Tap's webhook URL; never a key) and the lists loaded live from the providers. `platform_integrations:write` Platform: enter Rabt's provider credentials (stored in the vault, never shown again), test the connections, and choose the provider settings from the lists loaded live. `platform_problems:read` Platform: read the Problems log: every error or rejection users saw, grouped into problems with counts, affected organizations, trend, releases, sample references and the text for investigation. A module's write scope includes its read scope."},"SearchResult":{"type":"object","properties":{"type":{"$ref":"#/components/schemas/SearchResultType"},"id":{"type":"string","format":"uuid","description":"The id of what was found (ticket, message, note, contact…)."},"title":{"description":"Its name or heading.","$ref":"#/components/schemas/HighlightedText"},"subtitle":{"description":"A context line (phone, room, contact).","type":["string","null"]},"snippet":{"anyOf":[{"$ref":"#/components/schemas/HighlightedText"},{"type":"null"}],"description":"The matching text around the match; null when the title shows it."},"occurred_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"path":{"type":"string","description":"Where the web app opens it, exactly there (e.g. `/tickets/1283?message=<id>`)."},"ticket":{"anyOf":[{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"number":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"subject":{"type":["string","null"]},"status":{"$ref":"#/components/schemas/TicketStatus"}},"required":["id","number","subject","status"],"additionalProperties":false},{"type":"null"}]},"contact_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"company_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"room":{"anyOf":[{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"type":{"type":"string","enum":["space","all","group","direct"]},"name":{"type":["string","null"]}},"required":["id","type","name"],"additionalProperties":false},{"type":"null"}]},"message_seq":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}],"description":"A chat message’s number in its room (open the room at it)."}},"required":["type","id","title","subtitle","snippet","occurred_at","path","ticket","contact_id","company_id","room","message_seq"],"additionalProperties":false},"SearchResults":{"type":"object","properties":{"query":{"type":"string"},"groups":{"type":"array","items":{"type":"object","properties":{"type":{"$ref":"#/components/schemas/SearchResultType"},"results":{"type":"array","items":{"$ref":"#/components/schemas/SearchResult"}}},"required":["type","results"],"additionalProperties":false}}},"required":["query","groups"],"additionalProperties":false,"description":"One group per kind searched (in a fixed order, empty ones included); kinds your API key or app has no read scope for are left out."},"SearchResultType":{"type":"string","enum":["ticket","message","note","contact","company","contact_note","company_note","chat_message","external_record"],"description":"ticket (number, subject), message (message texts on every channel), note (internal notes of tickets), contact, company, contact_note, company_note, chat_message (only your rooms), external_record (customer records of connected systems, on their contact)."},"SeatEvent":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"membership_id":{"type":"string","format":"uuid"},"member_name":{"type":"string"},"action":{"type":"string","enum":["added","deactivated","reactivated","removed"]},"occurred_at":{"type":"string","format":"date-time"},"charge":{"anyOf":[{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"amount":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"SAR in halalas (1 SAR = 100 halalas)."},"days":{"type":"integer","minimum":1,"maximum":9007199254740991}},"required":["id","amount","days"],"additionalProperties":false},{"type":"null"}],"description":"The prorated seat charge it caused."}},"required":["id","membership_id","member_name","action","occurred_at","charge"],"additionalProperties":false,"description":"A change of a seat."},"SeatEventPage":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/SeatEvent"},"description":"Newest first."},"next_cursor":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"description":"Pass as `cursor` for older entries; null on the last page."},"total":{"type":"integer","minimum":0,"maximum":10000,"description":"How many rows the list has with these filters, counted up to 10000."},"total_capped":{"type":"boolean","description":"The list has more than 10000 rows (`total` is 10000)."}},"required":["data","next_cursor","total","total_capped"],"additionalProperties":false,"description":"A page of the seat log (docs/10)."},"SeatQuote":{"type":"object","properties":{"billing_state":{"type":"string","enum":["trial","active","seats_inactive"]},"basis":{"type":"string","enum":["prorated","trial","seats_inactive","already_paid","free"],"description":"`prorated`: charged now from the wallet for the rest of the month; `trial`: free during the trial; `seats_inactive`: nothing now, paid with every seat when a payment ends SeatsInactive; `already_paid`: this seat is paid for this month; `free`: the organization is free of charge."},"amount":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"What adding or reactivating the seat takes from the wallet now: `net_amount` plus `vat_amount`."},"net_amount":{"description":"The prorated seat price before VAT.","type":"integer","minimum":0,"maximum":9007199254740991},"vat_amount":{"description":"The VAT added at the debit.","type":"integer","minimum":0,"maximum":9007199254740991},"vat_rate_bps":{"description":"The VAT rate used, in basis points.","type":"integer","minimum":0,"maximum":10000},"days":{"type":"integer","minimum":1,"maximum":9007199254740991,"description":"Days left in the month, today included."},"period_days":{"type":"integer","minimum":28,"maximum":31},"period_start":{"type":"string","format":"date-time"},"period_end":{"type":"string","format":"date-time"},"seat_price":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"SAR in halalas (1 SAR = 100 halalas)."},{"type":"null"}],"description":"The monthly seat price before VAT."},"members":{"type":"integer","minimum":0,"maximum":9007199254740991},"trial_member_limit":{"type":"integer","minimum":1,"maximum":9007199254740991}},"required":["billing_state","basis","amount","days","period_days","period_start","period_end","seat_price","members","trial_member_limit"],"additionalProperties":false,"description":"The price of one more seat before paying it (docs/10 \"Proration\"; refused with WAL-1001 when the wallet cannot pay it)."},"SecretViewLink":{"type":"object","properties":{"url":{"type":"string","format":"uri","description":"Open it in Rabt's app, signed in as the member."},"expires_at":{"type":"string","format":"date-time"}},"required":["url","expires_at"],"additionalProperties":false},"SecurityAlert":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"rule":{"type":"string","enum":["sign_in_new_country","sign_in_failures","large_export","bulk_read","api_key_new_network","audit_chain_broken"],"description":"`sign_in_new_country`, `sign_in_failures` (5 failed codes within 15 minutes), `large_export` (1,000 rows or more, or a full organization export), `bulk_read` (1,000 contacts or more within an hour), `api_key_new_network`, `audit_chain_broken`."},"subject_type":{"type":"string","description":"What it is about: `account`, `membership`, `api_key`, `oauth_app`, `audit_log`…"},"subject_id":{"type":["string","null"]},"detail":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":["string","number","boolean","null"]},"description":"The facts of the entry (never message content)."},"occurred_at":{"type":"string","format":"date-time"}},"required":["id","rule","subject_type","subject_id","detail","occurred_at"],"additionalProperties":false,"description":"An alert of the rule-based anomaly checks."},"SecurityAlertPage":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/SecurityAlert"},"description":"Newest first."},"next_cursor":{"description":"Pass as `cursor`; null at the end.","type":["string","null"]},"total":{"type":"integer","minimum":0,"maximum":10000,"description":"How many rows the list has with these filters, counted up to 10000."},"total_capped":{"type":"boolean","description":"The list has more than 10000 rows (`total` is 10000)."}},"required":["data","next_cursor","total","total_capped"],"additionalProperties":false},"SecurityPolicy":{"type":"object","properties":{"require_passkeys":{"type":"boolean","description":"Sign-in with the device's code: members are asked, in the desktop app (Windows, Mac), to turn on sign-in with the computer's own unlock (Windows Hello, Touch ID) after a code sign-in, until it is on for that computer, and the app asks for the device's code after sign-in and after 15 minutes idle. Never required to sign in: the code always works, and browsers are not affected."},"require_profile_photo":{"type":"boolean","description":"Every member has a profile photo: a member without one adds it before going on (current members when they next open the app, invited ones on accepting)."},"require_app_unlock":{"type":"boolean","deprecated":true,"description":"Deprecated, read-only: the same as `require_passkeys` (the app lock is part of it)."},"session_max_hours":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"deprecated":true,"description":"Deprecated, read-only: always 720 (a session lasts 30 days after its code, for every organization)."},"session_idle_minutes":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"deprecated":true,"description":"Deprecated, read-only: always 20160 (a session ends after 14 days unused, for every organization)."},"app_unlock_idle_minutes":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}],"deprecated":true,"description":"Deprecated, read-only: 1440 (24 hours) while `require_passkeys` is true, else null (the idle time is fixed)."},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"updated_by_membership_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]}},"required":["require_passkeys","require_profile_photo","require_app_unlock","session_max_hours","session_idle_minutes","app_unlock_idle_minutes","updated_at","updated_by_membership_id"],"additionalProperties":false},"Segment":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"entity":{"$ref":"#/components/schemas/CrmListEntity"},"source":{"type":"string","enum":["filter","file"],"description":"`filter`: the records its filter lists now; `file`: the contacts of the file it was made from (`POST /v1/segment-imports`; its `filter` is empty and cannot be changed, `CRM-6058`)."},"filter":{"$ref":"#/components/schemas/SegmentFilter"},"count":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"How many records it lists now (at most 100000)."},"count_capped":{"type":"boolean","description":"True when it lists more than `count` records."},"created_by_membership_id":{"type":"string","format":"uuid"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}},"required":["id","name","entity","source","filter","count","count_capped","created_by_membership_id","created_at","updated_at"],"additionalProperties":false,"description":"A saved filter of contacts or companies, or the contacts of a file (docs/14). A segment saved with tags, before Rabt removed them, keeps listing by them until its filter is changed."},"SegmentFilter":{"type":"object","properties":{"q":{"description":"Free text, searched like the list of contacts or companies.","type":"string","maxLength":200},"company_id":{"description":"Contacts of this company.","type":"string","format":"uuid"},"channel_type":{"description":"Contacts with an identity on this channel.","$ref":"#/components/schemas/ChannelType"},"active_within_days":{"description":"Contacts active in the last N days (with `channel_type`: seen on that channel in the last N days).","type":"integer","minimum":1,"maximum":3650}},"additionalProperties":false,"description":"A filter of contacts (every part) or companies (`q` only). Parts left out do not filter."},"SegmentImport":{"type":"object","properties":{"segment":{"$ref":"#/components/schemas/Segment"},"import":{"$ref":"#/components/schemas/CrmTransfer"}},"required":["segment","import"],"additionalProperties":false,"description":"The new segment and the import that fills it (read it until `completed`)."},"SegmentList":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Segment"}}},"required":["data"],"additionalProperties":false},"SelectGoogleBusinessLocations":{"type":"object","properties":{"location_ids":{"maxItems":500,"type":"array","items":{"type":"string","minLength":1,"maxLength":120},"description":"Google’s location ids (`locations/{id}` or the id alone, from `listGoogleBusinessAvailableLocations`) the channel carries from now on; locations left out are removed (their reviews and tickets stay). An empty list removes every location."}},"required":["location_ids"],"additionalProperties":false},"SenderBlock":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"kind":{"type":"string","enum":["phone","email","handle","ip"]},"channel_type":{"anyOf":[{"type":"string","enum":["facebook","instagram","x","tiktok","youtube"]},{"type":"null"}]},"value":{"type":"string","description":"As it is matched (E.164, lower case, network)."},"note":{"type":["string","null"]},"refused_count":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Items refused since it was added."},"last_refused_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"created_by_membership_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"created_at":{"type":"string","format":"date-time"},"removed_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]}},"required":["id","kind","channel_type","value","note","refused_count","last_refused_at","created_by_membership_id","created_at","removed_at"],"additionalProperties":false},"SenderBlockList":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/SenderBlock"}}},"required":["data"],"additionalProperties":false},"SenderDomainCheck":{"type":"object","properties":{"domain":{"type":"string"},"checked_at":{"type":"string","format":"date-time"},"checks":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string","enum":["spf","dkim","dmarc","reverse_dns"]},"status":{"type":"string","enum":["pass","warning","fail","unknown"]},"finding":{"type":"string","enum":["spf_found","spf_missing","spf_multiple","spf_allows_all","dkim_aligned","dkim_unaligned","dkim_key_missing","dkim_not_signed","dkim_not_checked","dmarc_enforced","dmarc_monitor_only","dmarc_missing","reverse_dns_confirmed","reverse_dns_missing","reverse_dns_mismatch","lookup_failed"]},"name":{"type":"string","description":"The DNS name looked up."},"record":{"description":"The record found, as published.","type":["string","null"]}},"required":["key","status","finding","name","record"],"additionalProperties":false}}},"required":["domain","checked_at","checks"],"additionalProperties":false,"description":"SPF, DKIM, DMARC and reverse DNS of the sender domain (docs/02 §4); Microsoft 365 mailboxes have no reverse DNS check (Microsoft’s servers send)."},"SenderHealth":{"type":"object","properties":{"channel_id":{"type":"string","format":"uuid"},"channel_type":{"type":"string","enum":["whatsapp_web","email"]},"name":{"type":"string"},"unit":{"type":"string","description":"The allowance unit: `messages_day`, `emails_day`."},"mode":{"type":"string","enum":["measure","enforce"],"description":"`measure`: computed and recorded, nothing held back (the default); `enforce`: the rules hold recipients back."},"level":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"top_level":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"state":{"type":"string","enum":["normal","frozen","paused"]},"reasons":{"type":"array","items":{"type":"string","enum":["new_sender","history_start","relinked","new_domain","climbed","climb_wait","small_sample","few_replies","failures_high","stops_high","session_dropped","bounces_high","complaints_high","provider_ceiling","quality_yellow","quality_red","tier_lowered","provider_flagged"]}},"paused_until":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"allowance":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"People who never wrote to the organization, a day."},"warm_allowance":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"People who wrote to the organization before, a day."},"used_today":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"warm_used_today":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"ceiling":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}],"description":"The provider's daily limit (email)."},"reply_rate":{"type":["number","null"]},"sent_7d":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"failed_7d":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"stops_7d":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"pace":{"type":"object","properties":{"min_seconds":{"type":"number"},"max_seconds":{"type":"number"}},"required":["min_seconds","max_seconds"],"additionalProperties":false},"outer_limit":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"What a campaign launched past the allowance (the risk box) may send a day."},"evaluated_at":{"type":"string","format":"date-time"},"days":{"type":"array","items":{"$ref":"#/components/schemas/SenderHealthDay"}}},"required":["channel_id","channel_type","name","unit","mode","level","top_level","state","reasons","paused_until","allowance","warm_allowance","used_today","warm_used_today","ceiling","reply_rate","sent_7d","failed_7d","stops_7d","pace","outer_limit","evaluated_at","days"],"additionalProperties":false},"SenderHealthDay":{"type":"object","properties":{"day":{"type":"string","format":"date","description":"Riyadh's day."},"mode":{"type":"string","enum":["measure","enforce"]},"level":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"state":{"type":"string","enum":["normal","frozen","paused"]},"allowance":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"warm_allowance":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"used":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"warm_used":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"held":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Recipients the trust rules held back that day (measuring only: would have held back)."},"gated":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Recipients a hard gate (a stop request, the suppression list, another campaign in 3 days) left out (measuring only: would have)."}},"required":["day","mode","level","state","allowance","warm_allowance","used","warm_used","held","gated"],"additionalProperties":false},"SenderHealthList":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/SenderHealth"}}},"required":["data"],"additionalProperties":false},"SenderQuarantine":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"contact_id":{"type":"string","format":"uuid"},"contact_name":{"type":["string","null"]},"ticket_id":{"type":"string","format":"uuid","description":"The quarantined ticket that keeps what they send."},"ticket_number":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"channel_type":{"type":"string"},"reason":{"type":"string","enum":["messages","tickets"],"description":"`messages`: too many messages in a minute; `tickets`: too many new tickets."},"status":{"type":"string","enum":["active","released","blocked"]},"message_count":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Items kept since the quarantine began."},"started_at":{"type":"string","format":"date-time"},"last_message_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"resolved_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"resolved_by_membership_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]}},"required":["id","contact_id","contact_name","ticket_id","ticket_number","channel_type","reason","status","message_count","started_at","last_message_at","resolved_at","resolved_by_membership_id"],"additionalProperties":false},"SenderQuarantineList":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/SenderQuarantine"}}},"required":["data"],"additionalProperties":false},"SendInstagramMessage":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["post_share"]},"media_id":{"type":"string","pattern":"^\\d{1,40}$"},"client_key":{"type":"string","pattern":"^[A-Za-z0-9._~-]{1,100}$"}},"required":["type","media_id"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["heart"]},"client_key":{"type":"string","pattern":"^[A-Za-z0-9._~-]{1,100}$"}},"required":["type"],"additionalProperties":false}],"description":"`post_share`: one of the account’s own recent posts, reels or stories (`media_id` from `GET /v1/channels/instagram/tickets/{ticketId}/media`). `heart`: the heart sticker. `client_key`: your key for this send; the same key never creates a second message."},"SendMessage":{"type":"object","properties":{"mode":{"type":"string","enum":["reply","note"],"description":"`reply`: to the customer on the ticket channel. `note`: an internal note."},"body":{"anyOf":[{"type":"string","maxLength":100000},{"type":"null"}],"description":"The text (null: files only)."},"content_type":{"type":"string","enum":["text","image","video","audio","voice","document","sticker","location","contacts","template","event","call","gif","unsupported","encrypted"]},"attachment_ids":{"maxItems":50,"type":"array","items":{"type":"string","format":"uuid"},"description":"Uploaded files of this ticket to send with it."},"mentioned_membership_ids":{"maxItems":50,"type":"array","items":{"type":"string","format":"uuid"},"description":"Members mentioned in a note (@mentions)."},"reply_to_message_id":{"description":"The message of this ticket it replies to (reply context).","anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"client_key":{"description":"Your key for this send: the same key never creates a second message.","type":"string","pattern":"^[A-Za-z0-9._~-]{1,100}$"},"base_message_id":{"description":"The newest item you had seen; the answer tells what arrived since (the send-time warning).","anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"email":{"description":"An email reply’s recipients (To, Cc, Bcc), signature and From address as the member set them (the email composer, C05); without them the reply answers the customer’s last email, keeps its Cc and carries the signature. Its subject is always the ticket’s, as it is (`PATCH /v1/tickets/{ticketId}` changes it). A call ticket answered by email (`channel_id` of an email channel in its `channels`) goes by default to the contact’s primary address; a call ticket without a subject takes the channel’s `email.subject`. Ignored on other channels.","type":"object","properties":{"to":{"minItems":1,"maxItems":100,"type":"array","items":{"type":"string","maxLength":254,"format":"email"}},"cc":{"maxItems":100,"type":"array","items":{"type":"string","maxLength":254,"format":"email"}},"bcc":{"description":"Blind copies: they receive the email, the others do not see them.","maxItems":100,"type":"array","items":{"type":"string","maxLength":254,"format":"email"}},"subject":{"description":"Deprecated: every email carries the ticket’s subject (`PATCH /v1/tickets/{ticketId}` changes it while the ticket has no email). The ticket’s own subject (trimmed) is ignored; any other answers `TKT-6225`.","deprecated":true,"type":"string","maxLength":998},"signature":{"description":"False leaves out the email signature Rabt adds under a member’s reply (`GET /v1/email-signatures/preview` shows it); by default the reply carries it.","type":"boolean"},"from_address_id":{"description":"The address an email reply leaves from (the composer’s From), by default the one marked `default`. One of the `from_addresses` of the reply’s channel in the ticket’s `channels` (on an email ticket, of its own channel: its own address and your addresses — routed to your spaces, to you, and to «الكل» when you see it — on any of the organization’s mailboxes; an address of another mailbox sends through it). An address routed to a member is that member’s alone. `TKT-6208` for an address not offered to you, or on a channel that is not email; `TKT-6227` when no address is offered to you.","type":"string","format":"uuid"}},"additionalProperties":false},"channel_id":{"description":"The channel a `reply` goes out on, by default the ticket’s own (ignored for notes). One of the ticket’s `channels` (a phone thread’s channels with the same number: e.g. its WhatsApp number on a ticket that started with a call). That channel’s own rules apply (its composer, limits and reply window: on WhatsApp outside its 24 hours only a template, `POST /v1/channels/whatsapp/tickets/{ticketId}/messages`). Another channel is `TKT-6207`; a channel without replies (calls) is `TKT-6119`.","anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"location":{"description":"Instead of text (`body` null), where `send.location` (TKT-6275).","type":"object","properties":{"latitude":{"type":"number","minimum":-90,"maximum":90},"longitude":{"type":"number","minimum":-180,"maximum":180},"name":{"default":null,"anyOf":[{"type":"string","maxLength":1000},{"type":"null"}]},"address":{"default":null,"anyOf":[{"type":"string","maxLength":1000},{"type":"null"}]}},"required":["latitude","longitude"],"additionalProperties":false},"contacts":{"description":"Phones E.164; instead of text, where `send.contacts` (TKT-6275).","minItems":1,"maxItems":10,"type":"array","items":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200},"phones":{"default":[],"maxItems":10,"type":"array","items":{"type":"string","pattern":"^\\+[1-9]\\d{6,14}$"}},"emails":{"default":[],"maxItems":10,"type":"array","items":{"type":"string","maxLength":254,"format":"email"}},"organization":{"default":null,"anyOf":[{"type":"string","maxLength":200},{"type":"null"}]}},"required":["name"],"additionalProperties":false}},"poll":{"description":"Instead of text, where `send.poll`; its sizes: `send.poll_limits`.","type":"object","properties":{"question":{"type":"string","minLength":1,"maxLength":255},"options":{"minItems":2,"maxItems":12,"type":"array","items":{"type":"string","minLength":1,"maxLength":100}},"multiple":{"default":false,"type":"boolean"}},"required":["question","options"],"additionalProperties":false},"notify_on_reply":{"description":"Tell me of the reply (list_watches).","type":"boolean"},"callback_url":{"description":"https: one signed webhook.","type":"string","maxLength":2000},"private_reply":{"description":"A `reply` sent privately (text only, once per comment, within 7 days of it) to the customer who wrote a public comment, on channels that offer it. Facebook and Instagram comment tickets (`GET /v1/channels/capabilities` `private_reply`): to `reply_to_message_id`, else the thread’s newest customer comment. Once per comment (`FB-2017`, `IG-2017`), within 7 days (`FB-2018`, `IG-2018`); not a customer’s comment: `FB-2027` (`IG-2027`); no private replies: `TKT-6196`. A public reply to a hidden Instagram or live video comment fails `IG-2032` (send it privately). The answer arrives as a private conversation.","type":"boolean"}},"required":["mode","body"],"additionalProperties":false},"SendResult":{"type":"object","properties":{"message":{"$ref":"#/components/schemas/Message"},"duplicate":{"type":"boolean","description":"Your `client_key` was already used: its message."},"warnings":{"$ref":"#/components/schemas/SendWarnings"},"watch":{"description":"The watch `notify_on_reply` created.","$ref":"#/components/schemas/ReplyWatch"},"watch_secret":{"description":"The callback’s signing secret (`whsec_…`), shown once; only with `callback_url`.","type":"string"},"email":{"description":"An email reply’s From and To (the chosen `email.from_address_id`, else the ticket’s own address; `email.to`, else the customer’s); null for a note or another channel.","anyOf":[{"type":"object","properties":{"from":{"type":"string","description":"The address the email leaves from."},"to":{"type":"array","items":{"type":"string"},"description":"The addresses it goes to."}},"required":["from","to"],"additionalProperties":false},{"type":"null"}]}},"required":["message","duplicate","warnings"],"additionalProperties":false},"SendSms":{"type":"object","properties":{"to":{"type":"string","pattern":"^\\+[1-9]\\d{6,14}$","description":"A mobile number in E.164, e.g. `+966500000000`."},"body":{"type":"string","minLength":1,"maxLength":1600,"description":"The text: at most 10 parts (1,530 GSM-7 or 670 UCS-2 characters; Arabic is UCS-2). KSA rules apply: no phone numbers or WhatsApp links, links only to allowed domains."},"category":{"type":"string","enum":["service","otp"],"description":"`service` or `otp` (a one-time code: the text must state its purpose). Promotional SMS go through campaigns (`SMS-4038`)."},"sender_name_id":{"description":"Default: the default sender name (or the only approved service name).","anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"client_key":{"type":"string","pattern":"^[A-Za-z0-9][A-Za-z0-9._:-]{0,99}$","description":"Your key for this send (letters, digits, `. _ : -`, up to 100): repeating it never sends a second SMS."}},"required":["to","body","category"],"additionalProperties":false},"SendTicketChannelMessage":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["buttons"]},"body":{"type":"string","minLength":1,"maxLength":1024,"description":"The message text above the buttons or list."},"header":{"default":null,"anyOf":[{"type":"string","maxLength":60},{"type":"null"}]},"footer":{"default":null,"anyOf":[{"type":"string","maxLength":60},{"type":"null"}]},"buttons":{"minItems":1,"maxItems":3,"type":"array","items":{"type":"object","properties":{"id":{"description":"Comes back with the customer's choice; `button-<n>` or `option-<n>` (its position) when not given.","type":"string","minLength":1,"maxLength":200},"title":{"type":"string","minLength":1,"maxLength":20}},"required":["title"],"additionalProperties":false},"description":"Up to 3 reply buttons; the customer taps one."},"reply_to_message_id":{"description":"The message of this ticket it replies to (reply context).","anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"client_key":{"description":"Your key for this send: the same key never creates a second message.","type":"string","pattern":"^[A-Za-z0-9._~-]{1,100}$"}},"required":["type","body","buttons"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["list"]},"body":{"type":"string","minLength":1,"maxLength":1024,"description":"The message text above the buttons or list."},"header":{"default":null,"anyOf":[{"type":"string","maxLength":60},{"type":"null"}]},"footer":{"default":null,"anyOf":[{"type":"string","maxLength":60},{"type":"null"}]},"button":{"type":"string","minLength":1,"maxLength":20,"description":"The label of the button that opens the list."},"rows":{"minItems":1,"maxItems":10,"type":"array","items":{"type":"object","properties":{"id":{"description":"Comes back with the customer's choice; `button-<n>` or `option-<n>` (its position) when not given.","type":"string","minLength":1,"maxLength":200},"title":{"type":"string","minLength":1,"maxLength":24},"description":{"default":null,"anyOf":[{"type":"string","maxLength":72},{"type":"null"}]}},"required":["title"],"additionalProperties":false},"description":"Up to 10 options; the customer chooses one."},"reply_to_message_id":{"description":"The message of this ticket it replies to (reply context).","anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"client_key":{"description":"Your key for this send: the same key never creates a second message.","type":"string","pattern":"^[A-Za-z0-9._~-]{1,100}$"}},"required":["type","body","button","rows"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["link"]},"body":{"type":"string","minLength":1,"maxLength":1024,"description":"The message text above the buttons or list."},"header":{"default":null,"anyOf":[{"type":"string","maxLength":60},{"type":"null"}]},"footer":{"default":null,"anyOf":[{"type":"string","maxLength":60},{"type":"null"}]},"button":{"type":"string","minLength":1,"maxLength":20,"description":"The button’s text; it opens `url`."},"url":{"type":"string","maxLength":2000,"format":"uri","description":"The web address the button opens."},"reply_to_message_id":{"description":"The message of this ticket it replies to (reply context).","anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"client_key":{"description":"Your key for this send: the same key never creates a second message.","type":"string","pattern":"^[A-Za-z0-9._~-]{1,100}$"}},"required":["type","body","button","url"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["location_request"]},"body":{"type":"string","minLength":1,"maxLength":1024,"description":"The text above the button that asks the customer to share their location."},"reply_to_message_id":{"description":"The message of this ticket it replies to (reply context).","anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"client_key":{"description":"Your key for this send: the same key never creates a second message.","type":"string","pattern":"^[A-Za-z0-9._~-]{1,100}$"}},"required":["type","body"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["template"]},"template_id":{"type":"string","format":"uuid"},"components":{"default":[],"maxItems":12,"type":"array","items":{"type":"object","properties":{"type":{"type":"string","enum":["header","body","button"]},"sub_type":{"type":"string","enum":["quick_reply","url","copy_code"]},"index":{"type":"integer","minimum":0,"maximum":9},"parameters":{"maxItems":20,"type":"array","items":{"type":"object","properties":{"type":{"type":"string","enum":["text","currency","date_time","image","video","document","payload","coupon_code"]},"value":{"type":"string","minLength":1,"maxLength":2000},"name":{"type":"string","pattern":"^[a-z0-9_]{1,100}$"},"currency":{"type":"object","properties":{"code":{"type":"string","pattern":"^[A-Z]{3}$"},"amount_1000":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["code","amount_1000"],"additionalProperties":false}},"required":["type","value"],"additionalProperties":false}}},"required":["type","parameters"],"additionalProperties":false}},"reply_to_message_id":{"description":"The message of this ticket it replies to (reply context).","anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"client_key":{"description":"Your key for this send: the same key never creates a second message.","type":"string","pattern":"^[A-Za-z0-9._~-]{1,100}$"}},"required":["type","template_id"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["post_share"]},"media_id":{"type":"string","pattern":"^\\d{1,40}$"},"client_key":{"type":"string","pattern":"^[A-Za-z0-9._~-]{1,100}$"}},"required":["type","media_id"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["heart"]},"client_key":{"type":"string","pattern":"^[A-Za-z0-9._~-]{1,100}$"}},"required":["type"],"additionalProperties":false}],"description":"What the ticket’s channel sends beyond text and files, as its capabilities declare: reply buttons (`buttons`), a list (`list`), a button that opens a web address (`link`) or a request for the customer’s location (`location_request`) where `send.interactive`; an approved template (`template`, from `GET /v1/channels/{channelId}/templates`; the only content once the reply window closed) where `send.template`; one of the account’s own posts (`post_share`, `media_id` from `GET /v1/tickets/{ticketId}/shareable-media`) where `send.share`; the heart sticker (`heart`) where `send.heart`. `client_key`: the same key never creates a second message."},"SendTicketSms":{"type":"object","properties":{"to":{"type":"string","pattern":"^\\+[1-9]\\d{6,14}$","description":"One of the contact's mobile numbers (`SMS-4039` otherwise)."},"body":{"type":"string","minLength":1,"maxLength":1600,"description":"The text: at most 10 parts (1,530 GSM-7 or 670 UCS-2 characters; Arabic is UCS-2). KSA rules apply: no phone numbers or WhatsApp links, links only to allowed domains."},"sender_name_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"client_key":{"type":"string","pattern":"^[A-Za-z0-9][A-Za-z0-9._:-]{0,99}$","description":"Your key for this send (letters, digits, `. _ : -`, up to 100): repeating it never sends a second SMS."}},"required":["to","body"],"additionalProperties":false},"SendWarnings":{"type":"object","properties":{"customer_messages":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Messages from the customer since your base."},"teammate_replies":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Replies other members sent since your base."}},"required":["customer_messages","teammate_replies"],"additionalProperties":false,"description":"The send-time warning."},"SendWhatsappMessage":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["template"]},"template_id":{"type":"string","format":"uuid"},"components":{"default":[],"maxItems":12,"type":"array","items":{"type":"object","properties":{"type":{"type":"string","enum":["header","body","button"]},"sub_type":{"type":"string","enum":["quick_reply","url","copy_code"]},"index":{"type":"integer","minimum":0,"maximum":9},"parameters":{"maxItems":20,"type":"array","items":{"type":"object","properties":{"type":{"type":"string","enum":["text","currency","date_time","image","video","document","payload","coupon_code"]},"value":{"type":"string","minLength":1,"maxLength":2000},"name":{"type":"string","pattern":"^[a-z0-9_]{1,100}$"},"currency":{"type":"object","properties":{"code":{"type":"string","pattern":"^[A-Z]{3}$"},"amount_1000":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["code","amount_1000"],"additionalProperties":false}},"required":["type","value"],"additionalProperties":false}}},"required":["type","parameters"],"additionalProperties":false}},"reply_to_message_id":{"description":"The message of this ticket it replies to (reply context).","anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"client_key":{"description":"Your key for this send: the same key never creates a second message.","type":"string","pattern":"^[A-Za-z0-9._~-]{1,100}$"}},"required":["type","template_id"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["location"]},"latitude":{"type":"number","minimum":-90,"maximum":90},"longitude":{"type":"number","minimum":-180,"maximum":180},"name":{"default":null,"anyOf":[{"type":"string","maxLength":1000},{"type":"null"}]},"address":{"default":null,"anyOf":[{"type":"string","maxLength":1000},{"type":"null"}]},"reply_to_message_id":{"description":"The message of this ticket it replies to (reply context).","anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"client_key":{"description":"Your key for this send: the same key never creates a second message.","type":"string","pattern":"^[A-Za-z0-9._~-]{1,100}$"}},"required":["type","latitude","longitude"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["contacts"]},"contacts":{"minItems":1,"maxItems":10,"type":"array","items":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200},"phones":{"default":[],"maxItems":10,"type":"array","items":{"type":"string","minLength":3,"maxLength":40}},"emails":{"default":[],"maxItems":10,"type":"array","items":{"type":"string","maxLength":254,"format":"email"}},"organization":{"default":null,"anyOf":[{"type":"string","maxLength":200},{"type":"null"}]}},"required":["name"],"additionalProperties":false}},"reply_to_message_id":{"description":"The message of this ticket it replies to (reply context).","anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"client_key":{"description":"Your key for this send: the same key never creates a second message.","type":"string","pattern":"^[A-Za-z0-9._~-]{1,100}$"}},"required":["type","contacts"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["buttons"]},"body":{"type":"string","minLength":1,"maxLength":1024,"description":"The message text above the buttons or list."},"header":{"default":null,"anyOf":[{"type":"string","maxLength":60},{"type":"null"}]},"footer":{"default":null,"anyOf":[{"type":"string","maxLength":60},{"type":"null"}]},"buttons":{"minItems":1,"maxItems":3,"type":"array","items":{"type":"object","properties":{"id":{"description":"Comes back with the customer's choice; `button-<n>` or `option-<n>` (its position) when not given.","type":"string","minLength":1,"maxLength":200},"title":{"type":"string","minLength":1,"maxLength":20}},"required":["title"],"additionalProperties":false},"description":"Up to 3 reply buttons; the customer taps one."},"reply_to_message_id":{"description":"The message of this ticket it replies to (reply context).","anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"client_key":{"description":"Your key for this send: the same key never creates a second message.","type":"string","pattern":"^[A-Za-z0-9._~-]{1,100}$"}},"required":["type","body","buttons"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["list"]},"body":{"type":"string","minLength":1,"maxLength":1024,"description":"The message text above the buttons or list."},"header":{"default":null,"anyOf":[{"type":"string","maxLength":60},{"type":"null"}]},"footer":{"default":null,"anyOf":[{"type":"string","maxLength":60},{"type":"null"}]},"button":{"type":"string","minLength":1,"maxLength":20,"description":"The label of the button that opens the list."},"rows":{"minItems":1,"maxItems":10,"type":"array","items":{"type":"object","properties":{"id":{"description":"Comes back with the customer's choice; `button-<n>` or `option-<n>` (its position) when not given.","type":"string","minLength":1,"maxLength":200},"title":{"type":"string","minLength":1,"maxLength":24},"description":{"default":null,"anyOf":[{"type":"string","maxLength":72},{"type":"null"}]}},"required":["title"],"additionalProperties":false},"description":"Up to 10 options; the customer chooses one."},"reply_to_message_id":{"description":"The message of this ticket it replies to (reply context).","anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"client_key":{"description":"Your key for this send: the same key never creates a second message.","type":"string","pattern":"^[A-Za-z0-9._~-]{1,100}$"}},"required":["type","body","button","rows"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["link"]},"body":{"type":"string","minLength":1,"maxLength":1024,"description":"The message text above the buttons or list."},"header":{"default":null,"anyOf":[{"type":"string","maxLength":60},{"type":"null"}]},"footer":{"default":null,"anyOf":[{"type":"string","maxLength":60},{"type":"null"}]},"button":{"type":"string","minLength":1,"maxLength":20,"description":"The button’s text; it opens `url`."},"url":{"type":"string","maxLength":2000,"format":"uri","description":"The web address the button opens."},"reply_to_message_id":{"description":"The message of this ticket it replies to (reply context).","anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"client_key":{"description":"Your key for this send: the same key never creates a second message.","type":"string","pattern":"^[A-Za-z0-9._~-]{1,100}$"}},"required":["type","body","button","url"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["location_request"]},"body":{"type":"string","minLength":1,"maxLength":1024,"description":"The text above the button that asks the customer to share their location."},"reply_to_message_id":{"description":"The message of this ticket it replies to (reply context).","anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"client_key":{"description":"Your key for this send: the same key never creates a second message.","type":"string","pattern":"^[A-Za-z0-9._~-]{1,100}$"}},"required":["type","body"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["reaction"]},"message_id":{"type":"string","format":"uuid","description":"The customer's message of this ticket."},"emoji":{"type":"string","maxLength":16,"description":"One emoji; empty removes the reaction."},"client_key":{"description":"Your key for this send: the same key never creates a second message.","type":"string","pattern":"^[A-Za-z0-9._~-]{1,100}$"}},"required":["type","message_id","emoji"],"additionalProperties":false}],"description":"A reply that is more than text and files: an approved template (the only content outside the 24-hour window), a location, contact cards, reply buttons, a list, a button that opens a web address (`link`), a request for the customer’s location (`location_request`) or a reaction. The customer’s choice or location comes back as their message, replying to this one. Text, media and voice notes use `POST /v1/tickets/{ticketId}/messages`."},"SendWhatsappWebMessage":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["location"]},"latitude":{"type":"number","minimum":-90,"maximum":90},"longitude":{"type":"number","minimum":-180,"maximum":180},"name":{"anyOf":[{"type":"string","maxLength":1000},{"type":"null"}]},"address":{"anyOf":[{"type":"string","maxLength":1000},{"type":"null"}]},"reply_to_message_id":{"description":"A message of the ticket to quote.","anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"client_key":{"type":"string","pattern":"^[A-Za-z0-9._~-]{1,100}$","description":"The client’s key: a repeated request with the same key is done once."}},"required":["type","latitude","longitude"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["contacts"]},"contacts":{"minItems":1,"maxItems":20,"type":"array","items":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":500},"phones":{"maxItems":20,"type":"array","items":{"type":"string","minLength":1,"maxLength":40}},"emails":{"maxItems":20,"type":"array","items":{"type":"string","maxLength":320,"format":"email"}},"organization":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}]}},"required":["name"],"additionalProperties":false}},"reply_to_message_id":{"description":"A message of the ticket to quote.","anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"client_key":{"type":"string","pattern":"^[A-Za-z0-9._~-]{1,100}$","description":"The client’s key: a repeated request with the same key is done once."}},"required":["type","contacts"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["poll"]},"question":{"type":"string","minLength":1,"maxLength":255},"options":{"minItems":2,"maxItems":12,"type":"array","items":{"type":"string","minLength":1,"maxLength":100}},"multiple":{"description":"A customer may choose several.","type":"boolean"},"client_key":{"type":"string","pattern":"^[A-Za-z0-9._~-]{1,100}$","description":"The client’s key: a repeated request with the same key is done once."}},"required":["type","question","options"],"additionalProperties":false}],"description":"A location, contact cards or a poll (text and files go through `sendTicketMessage`). Votes arrive on the poll’s message (`metadata.whatsapp_web.votes`)."},"SensitiveAccess":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"action":{"type":"string","enum":["call_recording.accessed","organization_export.requested","organization_export.downloaded","crm_export.requested","crm_export.downloaded","contact_export.downloaded","wallet_export.downloaded","invoice_export.downloaded","contacts.bulk_read","ticket_conversation.exported","ticket_export.downloaded","data_export.downloaded"],"description":"`call_recording.accessed` (a recording or voicemail played or downloaded), `organization_export.requested` / `.downloaded`, `crm_export.requested` / `.downloaded` (CSV exports of records), `wallet_export.downloaded` (the wallet history as CSV), `invoice_export.downloaded` (an invoice’s lines as CSV), `contact_export.downloaded` (one contact’s data), `contacts.bulk_read` (one member or key reading 100, 1,000, 10,000… contacts within an hour), `ticket_conversation.exported` (a ticket’s whole conversation printed or saved as PDF), `ticket_export.downloaded` (a page of whole tickets exported, `GET /v1/ticket-exports`)."},"target_type":{"type":"string"},"target_id":{"type":["string","null"]},"membership_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"description":"Who: the member."},"api_key_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"description":"The API key they acted through."},"oauth_grant_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"description":"The OAuth app they acted through."},"detail":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":["string","number","boolean","null"]},"description":"The facts of the entry (never message content)."},"ip":{"description":"From where: the client address.","type":["string","null"]},"country":{"description":"The country of the address (ISO 3166-1 alpha-2), when known.","type":["string","null"]},"occurred_at":{"type":"string","format":"date-time"}},"required":["id","action","target_type","target_id","membership_id","api_key_id","oauth_grant_id","detail","ip","country","occurred_at"],"additionalProperties":false,"description":"One entry of the sensitive-access log."},"SensitiveAccessPage":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/SensitiveAccess"},"description":"Newest first."},"next_cursor":{"description":"Pass as `cursor`; null at the end.","type":["string","null"]},"total":{"type":"integer","minimum":0,"maximum":10000,"description":"How many rows the list has with these filters, counted up to 10000."},"total_capped":{"type":"boolean","description":"The list has more than 10000 rows (`total` is 10000)."}},"required":["data","next_cursor","total","total_capped"],"additionalProperties":false},"SentSms":{"type":"object","properties":{"sms":{"$ref":"#/components/schemas/Sms"},"duplicate":{"type":"boolean"}},"required":["sms","duplicate"],"additionalProperties":false},"SetAiAgentSwitch":{"type":"object","properties":{"stopped":{"type":"boolean","description":"True stops the AI agent everywhere and hands every conversation it replies in to the members; false starts it again."}},"required":["stopped"],"additionalProperties":false},"SetAiSettings":{"type":"object","properties":{"level":{"$ref":"#/components/schemas/AiLevel"},"channel_type":{"description":"For `channel_type` only.","anyOf":[{"$ref":"#/components/schemas/AiChannelType"},{"type":"null"}]},"channel_id":{"description":"The channel (or web chat widget): for `channel` and `kind`, and for `address` with a phone number.","anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"kind":{"description":"For `kind` only.","anyOf":[{"$ref":"#/components/schemas/AiKind"},{"type":"null"}]},"channel_address_id":{"description":"For `address`: an email address, app or location of the channel.","anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"phone_number_id":{"anyOf":[{"description":"For `address`: a phone number of the channel (instead of an address): its id, or the number in E.164.","anyOf":[{"type":"string","format":"uuid"},{"type":"string","pattern":"^[+][1-9][0-9]{1,14}$"}]},{"type":"null"}]},"enabled":{"type":"boolean","description":"The AI agent replies automatically at this level."}},"required":["level","enabled"],"additionalProperties":false,"description":"Turns the AI agent on or off at a channel type, account or account side level. A level never set has its wider level's value; a channel type never set is off. `level: organization` is deprecated (the organization level has no switch): it sets every text channel and web chat widget that has no value of its own to `enabled`."},"SetAvailability":{"type":"object","properties":{"status":{"$ref":"#/components/schemas/Availability"},"reassign_while_away":{"deprecated":true,"description":"Deprecated: the away-with-reassign switch was removed. `false` is ignored; `true` is refused (`SPC-6220`).","type":"boolean"}},"required":["status"],"additionalProperties":false},"SetChatNotify":{"type":"object","properties":{"notify":{"$ref":"#/components/schemas/ChatNotifySetting"}},"required":["notify"],"additionalProperties":false},"SetCustomerDestination":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["all"]},"kind":{"description":"On a two-sided account, the side whose destination is set (left out: both sides); `SPC-6221` on an item with one side.","$ref":"#/components/schemas/RoutingSide"}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["space"]},"space_id":{"type":"string","format":"uuid"},"kind":{"description":"On a two-sided account, the side whose destination is set (left out: both sides); `SPC-6221` on an item with one side.","$ref":"#/components/schemas/RoutingSide"}},"required":["type","space_id"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["member"]},"membership_id":{"type":"string","format":"uuid"},"kind":{"description":"On a two-sided account, the side whose destination is set (left out: both sides); `SPC-6221` on an item with one side.","$ref":"#/components/schemas/RoutingSide"}},"required":["type","membership_id"],"additionalProperties":false}],"description":"Exactly one destination of a contact or company: `all` (none of its own: its tickets follow their channel's), a live space (`space_id`, SPC-6201 otherwise) or a member who can receive tickets (`membership_id`; TKT-6107 removed, TKT-6122 inactive seat); `kind` is ignored. It applies to the next new ticket and replaces the previous destination."},"SetMemberAvailability":{"type":"object","properties":{"status":{"$ref":"#/components/schemas/Availability"}},"required":["status"],"additionalProperties":false},"SetRoutingDestination":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["all"]},"kind":{"description":"On a two-sided account, the side whose destination is set (left out: both sides); `SPC-6221` on an item with one side.","$ref":"#/components/schemas/RoutingSide"}},"required":["type"],"additionalProperties":false,"deprecated":true,"description":"Deprecated: All is no destination of an item; refused with `SPC-6222`."},{"type":"object","properties":{"type":{"type":"string","enum":["space"]},"space_id":{"type":"string","format":"uuid"},"kind":{"description":"On a two-sided account, the side whose destination is set (left out: both sides); `SPC-6221` on an item with one side.","$ref":"#/components/schemas/RoutingSide"}},"required":["type","space_id"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["member"]},"membership_id":{"type":"string","format":"uuid"},"kind":{"description":"On a two-sided account, the side whose destination is set (left out: both sides); `SPC-6221` on an item with one side.","$ref":"#/components/schemas/RoutingSide"}},"required":["type","membership_id"],"additionalProperties":false}],"description":"Exactly one destination: a live space (`space_id`, SPC-6201 otherwise) or a member who can receive tickets (`membership_id`; TKT-6107 removed, TKT-6122 inactive seat), for the whole item or one side of a two-sided account (`kind`). It applies to the next new ticket and replaces the previous destination; `all` is refused (`SPC-6222`): a route is changed, never cleared."},"SetSecurityPolicy":{"type":"object","properties":{"require_passkeys":{"description":"Omitted: unchanged.","type":"boolean"},"require_profile_photo":{"description":"Omitted: unchanged.","type":"boolean"},"require_app_unlock":{"deprecated":true,"description":"Deprecated and ignored: the app lock is part of `require_passkeys`.","type":"boolean"},"session_max_hours":{"deprecated":true,"description":"Deprecated and ignored: a session lasts 30 days after its code.","anyOf":[{"type":"integer","minimum":1,"maximum":720},{"type":"null"}]},"session_idle_minutes":{"deprecated":true,"description":"Deprecated and ignored: a session ends after 14 days unused.","anyOf":[{"type":"integer","minimum":5,"maximum":20160},{"type":"null"}]},"app_unlock_idle_minutes":{"deprecated":true,"description":"Deprecated and ignored: the app asks to unlock after 24 idle hours (1440 minutes).","anyOf":[{"type":"integer","minimum":1,"maximum":240},{"type":"null"}]}},"additionalProperties":false},"SetSsoConnection":{"type":"object","properties":{"issuer":{"type":"string","minLength":9,"maxLength":2000,"description":"Exactly as the provider shows it, e.g. https://<org>.okta.com, https://login.microsoftonline.com/<tenant>/v2.0."},"client_id":{"type":"string","minLength":1,"maxLength":500,"description":"The client (application) id."},"client_secret":{"description":"Needed the first time; omitted keeps the saved one. Never returned.","type":"string","minLength":1,"maxLength":2000},"enabled":{"description":"Omitted: unchanged (off when new).","type":"boolean"},"allow_other_methods":{"description":"Whether members' other sign-in methods still open the organization (the owner always keeps them). Omitted: unchanged (true when new).","type":"boolean"}},"required":["issuer","client_id"],"additionalProperties":false},"SettleTickets":{"type":"object","properties":{"tickets_to":{"$ref":"#/components/schemas/TicketsTo"}},"additionalProperties":false},"SetTrustedIssuer":{"type":"object","properties":{"issuer":{"type":"string","minLength":1,"maxLength":2000,"description":"The Issuer URL exactly as the identity provider shows it (https, e.g. `https://identity.anthropic.com/issuers/…` for Claude, or your IdP's issuer)."}},"required":["issuer"]},"SimulateCustomerMessage":{"type":"object","properties":{"body":{"type":"string","minLength":1,"maxLength":4096,"description":"What the customer writes."}},"required":["body"],"additionalProperties":false},"SimulatedCustomerMessage":{"type":"object","properties":{"message":{"anyOf":[{"$ref":"#/components/schemas/Message"},{"type":"null"}],"description":"The customer’s message (null: blocked)."},"blocked":{"type":"boolean","description":"The customer is on the block list: nothing landed."}},"required":["message","blocked"],"additionalProperties":false},"Sms":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"sender_name_id":{"type":"string","format":"uuid"},"sender_name":{"type":"string"},"to":{"type":"string"},"country":{"type":"string"},"body":{"type":"string"},"category":{"type":"string","enum":["service","otp","promotional","awareness"]},"source":{"type":"string","enum":["ticket","api","system","campaign"]},"encoding":{"type":"string","enum":["gsm7","ucs2"]},"segments":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"status":{"type":"string","enum":["queued","submitting","submitted","delivered","failed","unknown"],"description":"`queued`, `submitting`, `submitted` (an operator accepted it), `delivered`, `failed` or `unknown` (no delivery report in time)."},"status_changed_at":{"type":"string","format":"date-time"},"error":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"reference":{"type":"string"},"retryable":{"type":"boolean"},"provider":{"type":"object","properties":{"name":{"type":"string"},"code":{"type":"string"},"message":{"type":"string"}},"required":["name"],"additionalProperties":false},"occurred_at":{"type":"string","format":"date-time"}},"required":["code","reference","retryable","occurred_at"],"additionalProperties":false},{"type":"null"}],"description":"Why it failed, or why its status is unknown: the catalog code, reference and the operator’s own error (docs/23)."},"ticket_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"message_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"campaign_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"membership_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"not_before":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"valid_until":{"type":"string","format":"date-time"},"amount":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}],"description":"Halalas charged (null until submitted)."},"submitted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"delivered_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"failed_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"verified_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"created_at":{"type":"string","format":"date-time"}},"required":["id","sender_name_id","sender_name","to","country","body","category","source","encoding","segments","status","status_changed_at","error","ticket_id","message_id","campaign_id","membership_id","not_before","valid_until","amount","submitted_at","delivered_at","failed_at","verified_at","created_at"],"additionalProperties":false},"SmsDetail":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"sender_name_id":{"type":"string","format":"uuid"},"sender_name":{"type":"string"},"to":{"type":"string"},"country":{"type":"string"},"body":{"type":"string"},"category":{"type":"string","enum":["service","otp","promotional","awareness"]},"source":{"type":"string","enum":["ticket","api","system","campaign"]},"encoding":{"type":"string","enum":["gsm7","ucs2"]},"segments":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"status":{"type":"string","enum":["queued","submitting","submitted","delivered","failed","unknown"],"description":"`queued`, `submitting`, `submitted` (an operator accepted it), `delivered`, `failed` or `unknown` (no delivery report in time)."},"status_changed_at":{"type":"string","format":"date-time"},"error":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"reference":{"type":"string"},"retryable":{"type":"boolean"},"provider":{"type":"object","properties":{"name":{"type":"string"},"code":{"type":"string"},"message":{"type":"string"}},"required":["name"],"additionalProperties":false},"occurred_at":{"type":"string","format":"date-time"}},"required":["code","reference","retryable","occurred_at"],"additionalProperties":false},{"type":"null"}],"description":"Why it failed, or why its status is unknown: the catalog code, reference and the operator’s own error (docs/23)."},"ticket_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"message_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"campaign_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"membership_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"not_before":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"valid_until":{"type":"string","format":"date-time"},"amount":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}],"description":"Halalas charged (null until submitted)."},"submitted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"delivered_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"failed_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"verified_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"created_at":{"type":"string","format":"date-time"},"parts":{"type":"array","items":{"$ref":"#/components/schemas/SmsPart"}}},"required":["id","sender_name_id","sender_name","to","country","body","category","source","encoding","segments","status","status_changed_at","error","ticket_id","message_id","campaign_id","membership_id","not_before","valid_until","amount","submitted_at","delivered_at","failed_at","verified_at","created_at","parts"],"additionalProperties":false},"SmsDocumentDownload":{"type":"object","properties":{"url":{"type":"string"},"expires_at":{"type":"string","format":"date-time"}},"required":["url","expires_at"],"additionalProperties":false},"SmsOptOut":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"phone":{"type":"string"},"source":{"type":"string","enum":["recipient_request","member","api"]},"note":{"type":["string","null"]},"created_by_membership_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"created_at":{"type":"string","format":"date-time"},"lifted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"lifted_by_membership_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"lift_reason":{"type":["string","null"]}},"required":["id","phone","source","note","created_by_membership_id","created_at","lifted_at","lifted_by_membership_id","lift_reason"],"additionalProperties":false},"SmsOptOutPage":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/SmsOptOut"}},"next_cursor":{"type":["string","null"]}},"required":["data","next_cursor"],"additionalProperties":false},"SmsPage":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Sms"}},"next_cursor":{"type":["string","null"]}},"required":["data","next_cursor"],"additionalProperties":false},"SmsPart":{"type":"object","properties":{"part_number":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"route":{"type":"string"},"operator_message_id":{"type":"string"},"status":{"type":"string","enum":["submitted","delivered","failed","unknown"]},"report_state":{"type":["string","null"]},"network_error_code":{"type":["string","null"]},"submitted_at":{"type":"string","format":"date-time"},"done_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]}},"required":["part_number","route","operator_message_id","status","report_state","network_error_code","submitted_at","done_at"],"additionalProperties":false},"SmsPreview":{"type":"object","properties":{"encoding":{"type":"string","enum":["gsm7","ucs2"]},"segments":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"units":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"remaining":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"sender_name":{"type":"string"}},"required":["encoding","segments","units","remaining","sender_name"],"additionalProperties":false},"SmsSenderName":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"classification":{"type":"string","enum":["service","promotional","awareness"]},"status":{"type":"string","enum":["pending","approved","rejected"]},"status_changed_at":{"type":"string","format":"date-time"},"rejection_reason":{"type":["string","null"]},"purpose":{"type":"string"},"submitted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"When Rabt submitted it to the operators."},"is_default":{"type":"boolean"},"suspension":{"anyOf":[{"type":"object","properties":{"at":{"type":"string","format":"date-time"},"reason":{"type":"string"}},"required":["at","reason"],"additionalProperties":false},{"type":"null"}],"description":"Suspended by the Rabt platform team: SMS under it are refused (`SMS-4022`)."},"requested_by_membership_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}},"required":["id","name","classification","status","status_changed_at","rejection_reason","purpose","submitted_at","is_default","suspension","requested_by_membership_id","created_at","updated_at"],"additionalProperties":false},"SmsSenderNameComplaint":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"sender_name_id":{"type":"string","format":"uuid"},"source":{"type":"string","enum":["regulator","operator","recipient"]},"external_reference":{"type":["string","null"]},"description":{"type":"string"},"recipient_phone":{"type":["string","null"]},"received_at":{"type":"string","format":"date-time"},"created_at":{"type":"string","format":"date-time"}},"required":["id","sender_name_id","source","external_reference","description","recipient_phone","received_at","created_at"],"additionalProperties":false},"SmsSenderNameDetail":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"classification":{"type":"string","enum":["service","promotional","awareness"]},"status":{"type":"string","enum":["pending","approved","rejected"]},"status_changed_at":{"type":"string","format":"date-time"},"rejection_reason":{"type":["string","null"]},"purpose":{"type":"string"},"submitted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"When Rabt submitted it to the operators."},"is_default":{"type":"boolean"},"suspension":{"anyOf":[{"type":"object","properties":{"at":{"type":"string","format":"date-time"},"reason":{"type":"string"}},"required":["at","reason"],"additionalProperties":false},{"type":"null"}],"description":"Suspended by the Rabt platform team: SMS under it are refused (`SMS-4022`)."},"requested_by_membership_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"documents":{"type":"array","items":{"$ref":"#/components/schemas/SmsSenderNameDocument"}},"complaints":{"type":"array","items":{"$ref":"#/components/schemas/SmsSenderNameComplaint"}}},"required":["id","name","classification","status","status_changed_at","rejection_reason","purpose","submitted_at","is_default","suspension","requested_by_membership_id","created_at","updated_at","documents","complaints"],"additionalProperties":false},"SmsSenderNameDocument":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"kind":{"type":"string","enum":["commercial_registration","authorization_letter","trademark","other"]},"file_name":{"type":"string"},"mime_type":{"type":"string","enum":["application/pdf","image/png","image/jpeg"]},"size":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"sha256":{"type":"string"},"uploaded_by_membership_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"created_at":{"type":"string","format":"date-time"}},"required":["id","kind","file_name","mime_type","size","sha256","uploaded_by_membership_id","created_at"],"additionalProperties":false},"SmsSenderNameList":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/SmsSenderName"}}},"required":["data"],"additionalProperties":false},"SmsSettings":{"type":"object","properties":{"allowed_countries":{"type":"array","items":{"type":"string"}},"allowed_link_domains":{"type":"array","items":{"type":"string"}},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]}},"required":["allowed_countries","allowed_link_domains","updated_at"],"additionalProperties":false},"SmtpSecurity":{"type":"string","enum":["tls","starttls"],"description":"`starttls` (STARTTLS required) or `tls` (implicit TLS). Rabt never sends unencrypted."},"Space":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"description":{"type":"string"},"type":{"type":"string","enum":["department"]},"returning_customer_days":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"no_agent_message":{"type":["string","null"]},"member_count":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"channel_count":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"The channels, email addresses and phone numbers routed to it."},"available_count":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Members available now (docs/13)."},"is_member":{"type":"boolean","description":"You belong to this space."},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}},"required":["id","name","description","type","returning_customer_days","no_agent_message","member_count","channel_count","available_count","is_member","created_at","updated_at"],"additionalProperties":false},"SpaceChannel":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"space_id":{"type":"string","format":"uuid"},"channel_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"channel_address_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"phone_number_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"kind":{"anyOf":[{"type":"string","enum":["private","public"]},{"type":"null"}],"description":"The side of a two-sided account it routes (`private`: its private messages, `public`: its public replies); null on an item with one side."},"created_at":{"type":"string","format":"date-time"}},"required":["id","space_id","channel_id","channel_address_id","phone_number_id","kind","created_at"],"additionalProperties":false},"SpaceChannelList":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/SpaceChannel"}}},"required":["data"],"additionalProperties":false},"SpaceList":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Space"}}},"required":["data"],"additionalProperties":false},"SpaceMember":{"type":"object","properties":{"membership_id":{"type":"string","format":"uuid"},"availability":{"$ref":"#/components/schemas/Availability"},"added_at":{"type":"string","format":"date-time"}},"required":["membership_id","availability","added_at"],"additionalProperties":false},"SpaceMemberList":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/SpaceMember"}}},"required":["data"],"additionalProperties":false},"SpamEntry":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"kind":{"type":"string","enum":["email","domain","phone","handle"],"description":"`email`, `domain` (matches email senders only), `phone` (E.164) or `handle` (on `channel_type`)."},"channel_type":{"anyOf":[{"type":"string","enum":["whatsapp","facebook","instagram","x","tiktok","email","voice","sms","webchat","webform","app_store","google_business","google_play","whatsapp_web","youtube","salla_reviews","zid_questions","zid_reviews","zid_portal"]},{"type":"null"}]},"value":{"type":"string","description":"As it is matched (lower case, E.164)."},"created_by_membership_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"created_at":{"type":"string","format":"date-time"},"removed_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"removed_by_membership_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]}},"required":["id","kind","channel_type","value","created_by_membership_id","created_at","removed_at","removed_by_membership_id"],"additionalProperties":false},"SpamEntryList":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/SpamEntry"}}},"required":["data"],"additionalProperties":false},"SsoDomain":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"domain":{"type":"string","description":"Lower-case (an international domain in its ASCII form)."},"verified":{"type":"boolean","description":"Proven by its TXT record: sign-in uses it."},"verified_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"last_checked_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"txt_name":{"type":"string","description":"The TXT record’s name: `_rabt-verification.<domain>`."},"txt_value":{"type":"string","description":"The TXT record’s value: `rabt-verification=<token>`."},"created_at":{"type":"string","format":"date-time"}},"required":["id","domain","verified","verified_at","last_checked_at","txt_name","txt_value","created_at"],"additionalProperties":false},"SsoSettings":{"type":"object","properties":{"connection":{"anyOf":[{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"issuer":{"type":"string"},"client_id":{"type":"string"},"client_secret_set":{"type":"boolean","description":"A secret is saved (never returned).","enum":[true]},"enabled":{"type":"boolean"},"allow_other_methods":{"type":"boolean","description":"Whether the members' other sign-in methods still open the organization (the owner always keeps them)."},"updated_at":{"type":"string","format":"date-time"}},"required":["id","issuer","client_id","client_secret_set","enabled","allow_other_methods","updated_at"],"additionalProperties":false},{"type":"null"}]},"domains":{"type":"array","items":{"$ref":"#/components/schemas/SsoDomain"}},"redirect_uri":{"type":"string","format":"uri","description":"The sign-in redirect URI to register at the provider."},"protocol":{"type":"string","description":"OpenID Connect only (SAML is not supported).","enum":["oidc"]}},"required":["connection","domains","redirect_uri","protocol"],"additionalProperties":false},"StartAttachment":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"ticket_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"description":"Null until a start’s first message sends it; then the ticket it went to."},"message_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"file_name":{"type":"string"},"mime_type":{"type":"string"},"size":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"upload_status":{"type":"string","enum":["pending","stored"]},"scan_status":{"$ref":"#/components/schemas/ScanStatus"},"scan_detail":{"anyOf":[{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},{"type":"null"}],"description":"A quarantined file's `signature`, and the recorded error's `code`, `reference` and `release` (also in `scan_error`)."},"scan_error":{"anyOf":[{"$ref":"#/components/schemas/ScanError"},{"type":"null"}],"description":"The recorded error of a quarantined file (TKT-6113) or a failed scan (TKT-6190), shown in place of the file; null otherwise."},"media":{"$ref":"#/components/schemas/AttachmentMedia"},"created_at":{"type":"string","format":"date-time"}},"required":["id","ticket_id","message_id","file_name","mime_type","size","upload_status","scan_status","scan_detail","scan_error","media","created_at"],"additionalProperties":false},"StartAttachmentUpload":{"type":"object","properties":{"attachment":{"$ref":"#/components/schemas/StartAttachment"},"upload":{"anyOf":[{"type":"object","properties":{"method":{"type":"string","enum":["PUT"]},"url":{"type":"string"},"headers":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}},"expires_at":{"type":"string","format":"date-time"}},"required":["method","url","headers","expires_at"],"additionalProperties":false},{"type":"null"}],"description":"The request that uploads the file; null when the organization already holds this file (the `sha256` given matched): it is stored already and there is nothing to upload or complete."}},"required":["attachment","upload"],"additionalProperties":false,"description":"Upload the file with exactly this request, then complete it (`POST /v1/attachments/uploads/{attachmentId}/complete`); with no request the file is stored already."},"StartChannelConnection":{"type":"object","properties":{"input":{"description":"The channel's own start options or form fields, as its own route takes them: e.g. `{ login: 'instagram' }` for Instagram, `{ kind: 'shared', shared_address }` for a Microsoft 365 shared mailbox, `{ coexistence: true }` for WhatsApp, the server settings, key or key file of SMTP forwarding, App Store and Google Play.","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"additionalProperties":false},"StartConversation":{"type":"object","properties":{"contact_id":{"description":"The contact, when you have its id.","type":"string","format":"uuid"},"contact":{"description":"Finds the contact by phone, email or unique name, else creates it from phone or email (contacts:write). With contact_id: the phone or email is added to it (CRM-6003/6004: merge them).","type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200},"phone":{"description":"Any form; read with the organization's country.","type":"string","maxLength":40},"email":{"type":"string","maxLength":320,"format":"email"}},"additionalProperties":false},"channel_id":{"description":"Your channel to start on; default: the preselected one.","type":"string","format":"uuid"},"channel_address_id":{"description":"Email: the sender address: ask, never pick.","type":"string","format":"uuid"},"to":{"description":"The contact’s phone or email to start to.","type":"string","maxLength":320},"subject":{"description":"The ticket subject: required to start on email (TKT-6226).","type":"string","minLength":1,"maxLength":998},"attachment_urls":{"description":"https addresses of files, sent with the message (none fetched: nothing sent).","maxItems":5,"type":"array","items":{"type":"string","maxLength":2048}},"message":{"$ref":"#/components/schemas/FirstMessage"},"notify_on_reply":{"description":"Tell me of the reply (list_watches).","type":"boolean"},"callback_url":{"description":"https: one signed webhook.","type":"string","maxLength":2000}},"required":["message"],"additionalProperties":false},"StartedConversation":{"type":"object","properties":{"contact":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"description":"The stored name: written by a member when `name_by_member`, else saved automatically. Show `display_name`.","type":["string","null"]},"name_by_member":{"type":"boolean"},"display_name":{"description":"The name shown everywhere (docs/12 \"Display name\"): a member's name, else the most recently updated connected system's name, else the most recently seen channel profile name, else the saved name, else the formatted primary phone number or email address. Null only for an erased contact or one with nothing.","type":["string","null"]},"display_name_source":{"anyOf":[{"type":"string","enum":["member","system","channel","saved","phone","email"]},{"type":"null"}]},"names":{"type":"array","items":{"$ref":"#/components/schemas/ContactName"},"description":"Every name the contact is known by, in precedence order."},"avatar_url":{"description":"The photo a member set.","type":["string","null"]},"photo_url":{"description":"The photo to show: `avatar_url`, else the newest channel profile photo Rabt copied (an identity’s `photo_url`); null: show the initials.","type":["string","null"]},"primary_phone":{"type":["string","null"]},"primary_email":{"type":["string","null"]},"phones":{"type":"array","items":{"$ref":"#/components/schemas/ContactPhone"}},"emails":{"type":"array","items":{"$ref":"#/components/schemas/ContactEmail"}},"identities":{"type":"array","items":{"$ref":"#/components/schemas/ContactIdentity"}},"companies":{"type":"array","items":{"$ref":"#/components/schemas/ContactCompanyRef"}},"last_activity_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"last_channel_type":{"anyOf":[{"$ref":"#/components/schemas/ChannelType"},{"type":"null"}]},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"deleted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"When it went to the trash (deleted, or its erasure requested: see `GET /v1/contact-erasures?contact_id=`); null while it is live."},"erased_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"When its personal data was erased; null when it was not."},"activity":{"description":"Lists only (`GET /v1/contacts`, `search_contacts`): its communication counts; the history itself: `get_contact_history`.","type":"object","properties":{"open_tickets":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Its tickets not closed (open or in progress) you may see."},"closed_tickets":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Its closed tickets you may see."},"notes":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Its internal notes."}},"required":["open_tickets","closed_tickets","notes"],"additionalProperties":false},"created":{"type":"boolean","description":"True: the contact was created by this call."}},"required":["id","name","name_by_member","display_name","display_name_source","names","avatar_url","photo_url","primary_phone","primary_email","phones","emails","identities","companies","last_activity_at","last_channel_type","created_at","updated_at","deleted_at","erased_at","created"],"additionalProperties":false},"ticket":{"$ref":"#/components/schemas/StartedTicket"},"message":{"description":"The first reply or note.","$ref":"#/components/schemas/Message"},"email":{"description":"An email start’s From and To as sent; null on other channels.","anyOf":[{"type":"object","properties":{"from":{"type":"string"},"to":{"type":"array","items":{"type":"string"}}},"required":["from","to"],"additionalProperties":false},{"type":"null"}]},"watch":{"description":"The watch `notify_on_reply` created.","$ref":"#/components/schemas/ReplyWatch"},"watch_secret":{"description":"The callback’s signing secret (`whsec_…`), shown once; only with `callback_url`.","type":"string"}},"required":["contact","ticket","message"],"additionalProperties":false},"StartedTicket":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"number":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"url":{"type":"string","description":"The ticket in the app (a stable, copyable link)."},"contact_id":{"type":"string","format":"uuid"},"contact_name":{"description":"The contact's name (null when it has none).","type":["string","null"]},"contact_erased":{"type":"boolean","description":"The contact's personal data was erased (C02b): the ticket, its timeline and counts stay; its texts, files and the contact's details are erased."},"contact_photo_url":{"description":"The contact's photo, the contact's `photo_url` (served at `/v1/images/…`); null: show the initials (no photo, or the contact was erased).","type":["string","null"]},"company_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"channel_type":{"$ref":"#/components/schemas/ChannelType"},"channel_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"channel_address_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"channel_endpoint":{"description":"Which of the organization’s endpoints the ticket came in on: the email address it was received at, the phone number of its phone thread (calls, WhatsApp, SMS), else the connected account’s name (`@handle`, the page). Null when unknown.","type":["string","null"]},"kind":{"type":"string","enum":["private","public"]},"source_ref":{"type":["string","null"]},"conversation_key":{"description":"A public ticket’s conversation: the post, video or root post its channel names (docs/13 \"Public items\"). One customer’s public comments and replies in one conversation join one ticket, each kept in its own comment thread; null on private tickets and on store reviews (a ticket per review).","type":["string","null"]},"subject":{"description":"The ticket’s subject. Every email of the ticket carries it as it is (no `Re:`, no ticket number).","type":["string","null"]},"subject_locked":{"type":"boolean","description":"The subject no longer changes (`TKT-6225`): the ticket has an email, sent or received (its channel’s `fixed_subject`)."},"note":{"deprecated":true,"description":"Deprecated: the apps no longer show the ticket's free-text note; use internal notes and the customer's notes. Still returned as members typed it (free text); null when none.","type":["string","null"]},"type":{"deprecated":true,"description":"Deprecated: use `note` (the same value), itself deprecated.","type":["string","null"]},"classifications":{"type":"array","items":{"$ref":"#/components/schemas/TicketClassification"},"description":"The ticket’s option of each live classification list, in the lists’ order (docs/13 \"Settings\"); an option archived after it was picked stays (`option_archived`)."},"tags":{"type":"array","items":{"$ref":"#/components/schemas/TicketTag"},"description":"The ticket’s tags, by name."},"priority":{"type":"string","enum":["low","normal","high"],"deprecated":true,"description":"Deprecated: the priority the ticket has stored (`normal` for every ticket made since the priority was removed; an organization keeps its own «الأولوية» classification list)."},"status":{"$ref":"#/components/schemas/TicketStatus"},"space_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"assignee_membership_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"assignment_reason":{"anyOf":[{"type":"string","enum":["returning_customer","fewest_open_tickets","queue","manual","email_address","address_route"]},{"type":"null"}]},"assigned_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"queued_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"Waiting in its space’s queue for the automatic distribution since then (oldest first); null when not waiting."},"returned_from_membership_id":{"type":"null","deprecated":true,"description":"Deprecated: always null. The away-with-reassign switch was removed."},"returned_at":{"type":"null","deprecated":true,"description":"Deprecated: always null. The away-with-reassign switch was removed."},"previous_ticket_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"description":"The closed ticket this one follows: the customer wrote more than 7 days after its close, so a new ticket started instead of reopening it (docs/13 \"Reopening window\"). Null when it follows none."},"previous_ticket_number":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}],"description":"The number of the ticket in `previous_ticket_id` («تابع للتذكرة #N»); null when it follows none."},"merged_into_ticket_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"quarantined_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"Since when it keeps the messages of a quarantined sender (no notifications, routing or AI answers until the sender is released or blocked); null otherwise."},"spam_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"Since when it is in Spam (its sender is on the Spam list, or a member marked it): in no list, space or counter, with no notifications, routing or AI answers; null otherwise."},"last_customer_message_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"last_member_reply_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"failed_reply_at":{"description":"When its newest failed reply of a member failed; null while none of its replies is failed. A reply that failed after the member left the ticket marks it here, and a successful retry clears it.","anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"last_message_at":{"type":"string","format":"date-time","description":"The time of its newest item: the last activity the ticket log shows and sorts by, newest first."},"latest_activity":{"anyOf":[{"$ref":"#/components/schemas/TicketLatestActivity"},{"type":"null"}]},"match_snippet":{"description":"Only in the log with `q`: its newest message or note matching `q` (an excerpt, matched words marked); null when it matched by number, subject or contact.","anyOf":[{"$ref":"#/components/schemas/TicketMatchSnippet"},{"type":"null"}]},"window_expires_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"recipient":{"description":"Whom a ticket a member started goes to (the address, number or identity chosen); null for tickets the customer started.","type":["string","null"]},"reply_window":{"$ref":"#/components/schemas/ReplyWindow"},"phone_thread":{"$ref":"#/components/schemas/TicketPhoneThread"},"channels":{"type":"array","items":{"$ref":"#/components/schemas/TicketChannel"},"description":"The channels the conversation goes through, its own first: a phone thread also lists each connected channel with the same number, and a ticket whose own channel takes no replies (calls) lists each connected email channel when the contact has an email address. A reply names one with `channel_id` (`POST /v1/tickets/{ticketId}/messages`); each has its own composer and limits (`GET /v1/channels/capabilities`) and reply window."},"first_responded_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"closed_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"close_reason":{"anyOf":[{"type":"string","enum":["member","auto"]},{"type":"null"}]},"ai_enabled":{"type":"boolean"},"ai_effective":{"$ref":"#/components/schemas/TicketAiEffective"},"ai":{"anyOf":[{"$ref":"#/components/schemas/TicketAi"},{"type":"null"}]},"version":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Send it with an edit (`TKT-6104` when stale)."},"read_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"The time of the newest timeline item you have seen (`POST /v1/tickets/{ticketId}/read`); null when you never opened it."},"unread":{"type":"boolean","description":"A customer message you have not seen yet (never for a closed ticket): the unread marker."},"unread_count":{"description":"How many customer messages you have not seen yet (0 when read, at least 1 while `unread`): the badge of the ticket list.","type":"integer","minimum":0,"maximum":9007199254740991},"has_draft":{"type":"boolean","description":"You left an unsent reply or note on this ticket (your saved draft, `GET /v1/tickets/{ticketId}/draft`)."},"end_to_end_encrypted":{"type":"boolean","description":"The conversation is encrypted end to end (X Chat): its messages are ciphertext (`content_type` `encrypted`, `metadata.encrypted`), read and answered only on a member’s device; a plain reply is refused (`TKT-6199`) and the AI agent hands it to the members."},"typed_details":{"description":"What the customer typed (a web form, an anonymous web chat visitor) that is not on the contact: unconfirmed, it never joins a contact by itself; add it with `POST /v1/contacts/{contactId}/phones` or `/emails` (another contact's, CRM-6003/CRM-6004: merge the two contacts). Null when none.","anyOf":[{"type":"object","properties":{"phone":{"description":"E.164.","type":["string","null"]},"email":{"type":["string","null"]}},"required":["phone","email"],"additionalProperties":false},{"type":"null"}]},"created_by_membership_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"created":{"type":"boolean","description":"True: a new ticket was created with the first message (`201`). False: the contact already had an open or in-progress ticket where their message on this channel account would land (a conversation-threaded channel: WhatsApp, X, Instagram, Messenger and TikTok DMs, web chat), and the first message was added to that ticket instead (`200`), which becomes yours when nobody had it."},"message_id":{"type":"string","format":"uuid","description":"The first message or note."},"duplicate":{"type":"boolean","description":"True: the `first_message.client_key` started this before; that ticket and message are answered and nothing new is written."}},"required":["id","number","url","contact_id","contact_name","contact_erased","contact_photo_url","company_id","channel_type","channel_id","channel_address_id","channel_endpoint","kind","source_ref","conversation_key","subject","subject_locked","note","type","classifications","tags","priority","status","space_id","assignee_membership_id","assignment_reason","assigned_at","queued_at","returned_from_membership_id","returned_at","previous_ticket_id","previous_ticket_number","merged_into_ticket_id","quarantined_at","spam_at","last_customer_message_at","last_member_reply_at","last_message_at","latest_activity","window_expires_at","recipient","reply_window","phone_thread","channels","first_responded_at","closed_at","close_reason","ai_enabled","ai_effective","ai","version","read_at","unread","has_draft","end_to_end_encrypted","created_by_membership_id","created_at","updated_at","created","message_id","duplicate"],"additionalProperties":false,"description":"The ticket a start opened: a new one, or the contact’s open conversation on that channel account (docs/13 \"One open conversation per contact per channel account\")."},"StartFacebookConnect":{"type":"object","properties":{"reconnect_channel_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]}},"additionalProperties":false,"description":"Starts Facebook Login for Business. `reconnect_channel_id` reconnects a channel waiting for it (`needs_reauth`), asking again for declined permissions."},"StartImport":{"type":"object","properties":{"import_valid_rows":{"description":"Import the valid rows of a file that has errors and set the rows with errors aside (listed by `GET /v1/crm-transfers/{id}/errors`). Absent or `false`: the import starts only when the check found no errors.","type":"boolean"},"segment_name":{"description":"Also make a segment of this name (unique, needs `campaigns.manage`) of the contacts the valid rows create or match.","type":"string","minLength":1,"maxLength":120}},"additionalProperties":false},"StartInstagramConnect":{"type":"object","properties":{"login":{"type":"string","enum":["facebook","instagram"]},"reconnect_channel_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]}},"required":["login"],"additionalProperties":false,"description":"`login`: `facebook` (Facebook Login for Business, the account’s Page) or `instagram` (Instagram Login). `reconnect_channel_id` reconnects a channel waiting for it (`needs_reauth`), through either login."},"StartIntegrationConnection":{"type":"object","properties":{"adapter":{"type":"string","minLength":1,"maxLength":32,"description":"The platform: `salla`, `zid`, `shopify`, `wafeq_accounting` (Wafeq), `zoho_books`, `zoho_crm`, `foodics` or `qoyod`."},"account_hint":{"description":"The store’s address, for platforms whose sign-in starts from the store (`account_hint: shop_domain`, e.g. `my-store.myshopify.com`).","type":"string","minLength":1,"maxLength":255}},"required":["adapter"],"additionalProperties":false},"StartTicketImport":{"type":"object","properties":{"source":{"$ref":"#/components/schemas/TicketImportSource"},"source_account":{"type":"string","minLength":1,"maxLength":100,"description":"The source’s account: its subdomain or workspace id, or for `csv` and `other` the label of the file or system. With `source` it scopes every source id: two accounts never share one."},"mode":{"type":"string","enum":["sample","full"],"description":"`sample` (about 20 tickets to review the mapping; withdrawable) or `full` (never withdrawn; a later full batch sends the delta after the cut-over)."}},"required":["source","source_account","mode"],"additionalProperties":false},"StartTikTokConnect":{"type":"object","properties":{"reconnect_channel_id":{"description":"A channel to reconnect (after `needs_reauth`); omit to connect a new account.","anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]}},"additionalProperties":false},"StartTikTokLoginKitConnect":{"type":"object","properties":{},"additionalProperties":false},"StartYouTubeConnect":{"type":"object","properties":{"reconnect_channel_id":{"description":"A channel to reconnect (after `needs_reauth`); omit to connect a new channel.","anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]}},"additionalProperties":false},"StoreCustomer":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"integration_id":{"type":"string","format":"uuid"},"adapter":{"type":"string"},"integration_name":{"type":"string"},"external_id":{"type":"string"},"name":{"type":["string","null"]},"phones":{"type":"array","items":{"type":"string"},"description":"E.164."},"emails":{"type":"array","items":{"type":"string"}},"orders_count":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"total_spent":{"anyOf":[{"$ref":"#/components/schemas/StoreMoney"},{"type":"null"}]},"url":{"description":"The customer in the store’s admin.","type":["string","null"]},"external_updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"synced_at":{"type":"string","format":"date-time"}},"required":["id","integration_id","adapter","integration_name","external_id","name","phones","emails","orders_count","total_spent","url","external_updated_at","synced_at"],"additionalProperties":false},"StoreMoney":{"type":"object","properties":{"amount_minor":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"In minor units of the currency."},"currency":{"type":"string","description":"ISO 4217 (the store’s own currency)."}},"required":["amount_minor","currency"],"additionalProperties":false},"StoreOrder":{"type":"object","properties":{"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"description":"Rabt’s copy of the order; null for an order read live (order lookup)."},"integration_id":{"type":"string","format":"uuid"},"adapter":{"type":"string"},"integration_name":{"type":"string"},"external_id":{"type":"string"},"number":{"type":"string","description":"The number the customer knows."},"status":{"type":"string","enum":["pending","processing","shipped","delivered","completed","cancelled","refunded","other"]},"provider_status":{"type":"string","description":"The store’s own status label."},"payment_status":{"type":["string","null"]},"total":{"$ref":"#/components/schemas/StoreMoney"},"placed_at":{"type":"string","format":"date-time"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"customer":{"type":"object","properties":{"external_id":{"type":["string","null"]},"name":{"type":["string","null"]},"phone":{"type":["string","null"]},"email":{"type":["string","null"]}},"required":["external_id","name","phone","email"],"additionalProperties":false},"items":{"type":"array","items":{"$ref":"#/components/schemas/StoreOrderItem"}},"shipments":{"type":"array","items":{"$ref":"#/components/schemas/StoreShipment"}},"history":{"type":"array","items":{"$ref":"#/components/schemas/StoreTimelineEntry"},"description":"Every change of the order’s status, newest first."},"url":{"description":"The order in the store’s admin.","type":["string","null"]},"synced_at":{"type":"string","format":"date-time"}},"required":["id","integration_id","adapter","integration_name","external_id","number","status","provider_status","payment_status","total","placed_at","updated_at","customer","items","shipments","url","synced_at"],"additionalProperties":false},"StoreOrderItem":{"type":"object","properties":{"name":{"type":"string"},"quantity":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"sku":{"type":["string","null"]},"total":{"description":"The line’s total as the store gives it.","anyOf":[{"$ref":"#/components/schemas/StoreMoney"},{"type":"null"}]}},"required":["name","quantity","sku"],"additionalProperties":false},"StoreShipment":{"type":"object","properties":{"carrier":{"type":["string","null"]},"tracking_number":{"type":["string","null"]},"tracking_url":{"type":["string","null"]},"status":{"description":"Its current tracking status as the store gives it.","type":["string","null"]},"events":{"description":"Its tracking events, newest first (where it reached); absent when the store gave none.","type":"array","items":{"$ref":"#/components/schemas/StoreTimelineEntry"}}},"required":["carrier","tracking_number","tracking_url","status"],"additionalProperties":false},"StoreTimelineEntry":{"type":"object","properties":{"at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"When it happened (null: the store gave no time)."},"status":{"type":["string","null"]},"note":{"type":["string","null"]},"internal":{"description":"Written by the store’s staff (a comment), not a status change; never shown to the AI agent.","type":"boolean"}},"required":["at","status","note"],"additionalProperties":false},"Subscription":{"type":"object","properties":{"billing_state":{"type":"string","enum":["trial","active","seats_inactive"],"description":"`trial`: seats free (up to the member limit); `active`: seats paid; `seats_inactive`: the seat charge could not be paid, every seat is view only until a payment (docs/10)."},"pricing_model":{"type":"string","enum":["per_member","all_employees"],"description":"The seat pricing model (`GET /v1/billing/pricing-model`); `plan` is its seat price."},"plan":{"anyOf":[{"$ref":"#/components/schemas/Plan"},{"type":"null"}],"description":"Null before a seat price is published."},"trial_ends_at":{"type":"string","format":"date-time"},"trial_member_limit":{"type":"integer","minimum":1,"maximum":9007199254740991},"current_period_start":{"type":"string","format":"date-time","description":"The time paid for (the trial, then the month or its rest), from."},"current_period_end":{"type":"string","format":"date-time","description":"Until (00:00 on the 1st, Asia/Riyadh)."},"paid_seats":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Seats paid for the current period."},"active_seats":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Active memberships: every one is a seat."},"members":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Members not removed (the trial counts them)."},"next_charge":{"anyOf":[{"type":"object","properties":{"at":{"type":"string","format":"date-time"},"amount":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"What the wallet pays: `net_amount` plus `vat_amount`."},"net_amount":{"description":"The seats before VAT.","type":"integer","minimum":0,"maximum":9007199254740991},"vat_amount":{"description":"The VAT added at the debit.","type":"integer","minimum":0,"maximum":9007199254740991},"vat_rate_bps":{"description":"The VAT rate used, in basis points.","type":"integer","minimum":0,"maximum":10000},"seats":{"type":"integer","minimum":0,"maximum":9007199254740991},"days":{"type":"integer","minimum":1,"maximum":31,"description":"The days of the month it pays for: fewer than `period_days` when it is prorated (the rest of the month)."},"period_days":{"type":"integer","minimum":28,"maximum":31,"description":"The days in that month."}},"required":["at","amount","seats","days","period_days"],"additionalProperties":false},{"type":"null"}],"description":"Trial: the charge when it ends (the rest of that month). Active: the next renewal (on the 1st). SeatsInactive: what reactivates the seats now. An estimate from today's seats; null before a seat price is published."}},"required":["billing_state","pricing_model","plan","trial_ends_at","trial_member_limit","current_period_start","current_period_end","paid_seats","active_seats","members","next_charge"],"additionalProperties":false,"description":"The organization's seats and their billing (docs/10)."},"TeamAvailability":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/TeamMember"}}},"required":["data"],"additionalProperties":false},"TeamBoard":{"type":"object","properties":{"summary":{"type":"object","properties":{"available_members":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Available, with an active seat."},"members":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"queued_tickets":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Tickets waiting in a space’s queue."},"oldest_queued_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"Since when the oldest waiting ticket waits."},"open_tickets":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Tickets not closed, assigned or not."}},"required":["available_members","members","queued_tickets","oldest_queued_at","open_tickets"],"additionalProperties":false},"spaces":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"members":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"available_members":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"queued_tickets":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"oldest_queued_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]}},"required":["id","name","members","available_members","queued_tickets","oldest_queued_at"],"additionalProperties":false},"description":"The spaces you see, by name, with their queues."},"members":{"type":"array","items":{"$ref":"#/components/schemas/TeamMember"},"description":"Every member, in the order they joined."},"queue":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"number":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"subject":{"type":["string","null"]},"channel_type":{"$ref":"#/components/schemas/ChannelType"},"priority":{"type":"string","enum":["low","normal","high"],"deprecated":true,"description":"Deprecated: the priority the ticket has stored (`normal` for every ticket made since the priority was removed; an organization keeps its own «الأولوية» classification list)."},"status":{"$ref":"#/components/schemas/TicketStatus"},"space_id":{"type":"string","format":"uuid"},"contact_id":{"type":"string","format":"uuid"},"contact_name":{"type":["string","null"]},"queued_at":{"type":"string","format":"date-time"}},"required":["id","number","subject","channel_type","priority","status","space_id","contact_id","contact_name","queued_at"],"additionalProperties":false},"description":"The first 100 waiting tickets you may see, oldest first (`GET /v1/team-board/queue` pages all of them)."}},"required":["summary","spaces","members","queue"],"additionalProperties":false},"TeamMember":{"type":"object","properties":{"membership_id":{"type":"string","format":"uuid"},"availability":{"$ref":"#/components/schemas/Availability"},"availability_changed_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"open_tickets":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Assigned tickets not closed, in every department space and the All space."},"shared_open_tickets":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Those in department spaces: what the limit counts. Tickets in the All space (items routed to the member by a channel or a customer route, and any other) never count."},"max_open_tickets":{"type":"null","deprecated":true,"description":"Deprecated: always null. Members no longer have their own limit; `limit` is the organization’s."},"limit":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"The organization’s limit of open tickets in department spaces (`PUT /v1/routing-settings`): at it, the automatic distribution skips the member. Items routed to the member directly are never held by it."},"last_assigned_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"space_ids":{"type":"array","items":{"type":"string","format":"uuid"}},"oldest_open_ticket_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"When the oldest of their open tickets was created; null when they hold none."},"on_call":{"type":"boolean","description":"On a call now (answered, not ended)."},"reassign_while_away":{"type":"boolean","deprecated":true,"description":"Deprecated: always false. The away-with-reassign switch was removed.","enum":[false]},"served_by_colleagues":{"type":"number","deprecated":true,"description":"Deprecated: always 0. The away-with-reassign switch was removed.","enum":[0]},"stopped_by_membership_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"description":"The manager who stopped their tickets (Unavailable until they or a manager turn them Available; reconnecting does not end it); null otherwise."}},"required":["membership_id","availability","availability_changed_at","open_tickets","shared_open_tickets","max_open_tickets","limit","last_assigned_at","space_ids","oldest_open_ticket_at","on_call","reassign_while_away","served_by_colleagues","stopped_by_membership_id"],"additionalProperties":false},"TeamQueuePage":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"number":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"subject":{"type":["string","null"]},"channel_type":{"$ref":"#/components/schemas/ChannelType"},"priority":{"type":"string","enum":["low","normal","high"],"deprecated":true,"description":"Deprecated: the priority the ticket has stored (`normal` for every ticket made since the priority was removed; an organization keeps its own «الأولوية» classification list)."},"status":{"$ref":"#/components/schemas/TicketStatus"},"space_id":{"type":"string","format":"uuid"},"contact_id":{"type":"string","format":"uuid"},"contact_name":{"type":["string","null"]},"queued_at":{"type":"string","format":"date-time"}},"required":["id","number","subject","channel_type","priority","status","space_id","contact_id","contact_name","queued_at"],"additionalProperties":false}},"next_cursor":{"type":["string","null"]},"total":{"type":"integer","minimum":0,"maximum":10000,"description":"How many rows the list has with these filters, counted up to 10000."},"total_capped":{"type":"boolean","description":"The list has more than 10000 rows (`total` is 10000)."}},"required":["data","next_cursor","total","total_capped"],"additionalProperties":false},"TestMode":{"type":"object","properties":{"mode":{"description":"The mode of the credential that asked (`test` for a test key).","$ref":"#/components/schemas/ApiMode"},"organization_id":{"type":"string","format":"uuid","description":"The live organization."},"space":{"anyOf":[{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"organization_id":{"type":"string","format":"uuid","description":"The organization id test keys work in (what `Rabt-Organization` may name with a test key)."},"created_at":{"type":"string","format":"date-time"}},"required":["id","organization_id","created_at"],"additionalProperties":false},{"type":"null"}],"description":"The current test space; null before the first request with a test key and after the test data was cleared."},"last_cleared_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]}},"required":["mode","organization_id","space","last_cleared_at"],"additionalProperties":false,"description":"The organization's API test mode: its separate test space, where test keys work."},"TestRecordConnector":{"type":"object","properties":{"connector_id":{"description":"A saved connector to start from (its settings and saved secrets).","type":"string","format":"uuid"},"source":{"type":"string","pattern":"^[a-z0-9][a-z0-9_.-]{0,62}$"},"record_type":{"type":"string","pattern":"^[a-z0-9][a-z0-9_.-]{0,62}$"},"config":{"$ref":"#/components/schemas/RecordConnectorConfig"},"secrets":{"$ref":"#/components/schemas/RecordConnectorSecrets"}},"additionalProperties":false},"Ticket":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"number":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"url":{"type":"string","description":"The ticket in the app (a stable, copyable link)."},"contact_id":{"type":"string","format":"uuid"},"contact_name":{"description":"The contact's name (null when it has none).","type":["string","null"]},"contact_erased":{"type":"boolean","description":"The contact's personal data was erased (C02b): the ticket, its timeline and counts stay; its texts, files and the contact's details are erased."},"contact_photo_url":{"description":"The contact's photo, the contact's `photo_url` (served at `/v1/images/…`); null: show the initials (no photo, or the contact was erased).","type":["string","null"]},"company_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"channel_type":{"$ref":"#/components/schemas/ChannelType"},"channel_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"channel_address_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"channel_endpoint":{"description":"Which of the organization’s endpoints the ticket came in on: the email address it was received at, the phone number of its phone thread (calls, WhatsApp, SMS), else the connected account’s name (`@handle`, the page). Null when unknown.","type":["string","null"]},"kind":{"type":"string","enum":["private","public"]},"source_ref":{"type":["string","null"]},"conversation_key":{"description":"A public ticket’s conversation: the post, video or root post its channel names (docs/13 \"Public items\"). One customer’s public comments and replies in one conversation join one ticket, each kept in its own comment thread; null on private tickets and on store reviews (a ticket per review).","type":["string","null"]},"subject":{"description":"The ticket’s subject. Every email of the ticket carries it as it is (no `Re:`, no ticket number).","type":["string","null"]},"subject_locked":{"type":"boolean","description":"The subject no longer changes (`TKT-6225`): the ticket has an email, sent or received (its channel’s `fixed_subject`)."},"note":{"deprecated":true,"description":"Deprecated: the apps no longer show the ticket's free-text note; use internal notes and the customer's notes. Still returned as members typed it (free text); null when none.","type":["string","null"]},"type":{"deprecated":true,"description":"Deprecated: use `note` (the same value), itself deprecated.","type":["string","null"]},"classifications":{"type":"array","items":{"$ref":"#/components/schemas/TicketClassification"},"description":"The ticket’s option of each live classification list, in the lists’ order (docs/13 \"Settings\"); an option archived after it was picked stays (`option_archived`)."},"tags":{"type":"array","items":{"$ref":"#/components/schemas/TicketTag"},"description":"The ticket’s tags, by name."},"priority":{"type":"string","enum":["low","normal","high"],"deprecated":true,"description":"Deprecated: the priority the ticket has stored (`normal` for every ticket made since the priority was removed; an organization keeps its own «الأولوية» classification list)."},"status":{"$ref":"#/components/schemas/TicketStatus"},"space_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"assignee_membership_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"assignment_reason":{"anyOf":[{"type":"string","enum":["returning_customer","fewest_open_tickets","queue","manual","email_address","address_route"]},{"type":"null"}]},"assigned_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"queued_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"Waiting in its space’s queue for the automatic distribution since then (oldest first); null when not waiting."},"returned_from_membership_id":{"type":"null","deprecated":true,"description":"Deprecated: always null. The away-with-reassign switch was removed."},"returned_at":{"type":"null","deprecated":true,"description":"Deprecated: always null. The away-with-reassign switch was removed."},"previous_ticket_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"description":"The closed ticket this one follows: the customer wrote more than 7 days after its close, so a new ticket started instead of reopening it (docs/13 \"Reopening window\"). Null when it follows none."},"previous_ticket_number":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}],"description":"The number of the ticket in `previous_ticket_id` («تابع للتذكرة #N»); null when it follows none."},"merged_into_ticket_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"quarantined_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"Since when it keeps the messages of a quarantined sender (no notifications, routing or AI answers until the sender is released or blocked); null otherwise."},"spam_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"Since when it is in Spam (its sender is on the Spam list, or a member marked it): in no list, space or counter, with no notifications, routing or AI answers; null otherwise."},"last_customer_message_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"last_member_reply_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"failed_reply_at":{"description":"When its newest failed reply of a member failed; null while none of its replies is failed. A reply that failed after the member left the ticket marks it here, and a successful retry clears it.","anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"last_message_at":{"type":"string","format":"date-time","description":"The time of its newest item: the last activity the ticket log shows and sorts by, newest first."},"latest_activity":{"anyOf":[{"$ref":"#/components/schemas/TicketLatestActivity"},{"type":"null"}]},"match_snippet":{"description":"Only in the log with `q`: its newest message or note matching `q` (an excerpt, matched words marked); null when it matched by number, subject or contact.","anyOf":[{"$ref":"#/components/schemas/TicketMatchSnippet"},{"type":"null"}]},"window_expires_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"recipient":{"description":"Whom a ticket a member started goes to (the address, number or identity chosen); null for tickets the customer started.","type":["string","null"]},"reply_window":{"$ref":"#/components/schemas/ReplyWindow"},"phone_thread":{"$ref":"#/components/schemas/TicketPhoneThread"},"channels":{"type":"array","items":{"$ref":"#/components/schemas/TicketChannel"},"description":"The channels the conversation goes through, its own first: a phone thread also lists each connected channel with the same number, and a ticket whose own channel takes no replies (calls) lists each connected email channel when the contact has an email address. A reply names one with `channel_id` (`POST /v1/tickets/{ticketId}/messages`); each has its own composer and limits (`GET /v1/channels/capabilities`) and reply window."},"first_responded_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"closed_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"close_reason":{"anyOf":[{"type":"string","enum":["member","auto"]},{"type":"null"}]},"ai_enabled":{"type":"boolean"},"ai_effective":{"$ref":"#/components/schemas/TicketAiEffective"},"ai":{"anyOf":[{"$ref":"#/components/schemas/TicketAi"},{"type":"null"}]},"version":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Send it with an edit (`TKT-6104` when stale)."},"read_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"The time of the newest timeline item you have seen (`POST /v1/tickets/{ticketId}/read`); null when you never opened it."},"unread":{"type":"boolean","description":"A customer message you have not seen yet (never for a closed ticket): the unread marker."},"unread_count":{"description":"How many customer messages you have not seen yet (0 when read, at least 1 while `unread`): the badge of the ticket list.","type":"integer","minimum":0,"maximum":9007199254740991},"has_draft":{"type":"boolean","description":"You left an unsent reply or note on this ticket (your saved draft, `GET /v1/tickets/{ticketId}/draft`)."},"end_to_end_encrypted":{"type":"boolean","description":"The conversation is encrypted end to end (X Chat): its messages are ciphertext (`content_type` `encrypted`, `metadata.encrypted`), read and answered only on a member’s device; a plain reply is refused (`TKT-6199`) and the AI agent hands it to the members."},"typed_details":{"description":"What the customer typed (a web form, an anonymous web chat visitor) that is not on the contact: unconfirmed, it never joins a contact by itself; add it with `POST /v1/contacts/{contactId}/phones` or `/emails` (another contact's, CRM-6003/CRM-6004: merge the two contacts). Null when none.","anyOf":[{"type":"object","properties":{"phone":{"description":"E.164.","type":["string","null"]},"email":{"type":["string","null"]}},"required":["phone","email"],"additionalProperties":false},{"type":"null"}]},"created_by_membership_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}},"required":["id","number","url","contact_id","contact_name","contact_erased","contact_photo_url","company_id","channel_type","channel_id","channel_address_id","channel_endpoint","kind","source_ref","conversation_key","subject","subject_locked","note","type","classifications","tags","priority","status","space_id","assignee_membership_id","assignment_reason","assigned_at","queued_at","returned_from_membership_id","returned_at","previous_ticket_id","previous_ticket_number","merged_into_ticket_id","quarantined_at","spam_at","last_customer_message_at","last_member_reply_at","last_message_at","latest_activity","window_expires_at","recipient","reply_window","phone_thread","channels","first_responded_at","closed_at","close_reason","ai_enabled","ai_effective","ai","version","read_at","unread","has_draft","end_to_end_encrypted","created_by_membership_id","created_at","updated_at"],"additionalProperties":false,"description":"A ticket (docs/13)."},"TicketAi":{"type":"object","properties":{"status":{"type":"string","enum":["replying","handed_off","stopped"],"description":"`replying`: the AI agent answers the customer (a member's reply or an assignment never stops it); `handed_off`: it gave the conversation to the members (when the customer asked for a person or in a case the organization's instructions name it also switched itself off here; or it could not reply); `stopped`: a member switched it off here."},"reason":{"type":"string","enum":["engaged","switched_on","instructions","customer_asked","negative_sentiment","no_answer","customer_stuck","failed","balance","kill_switch","disabled","human_replied","assigned","switched_off","sender_limit"],"description":"Why the status changed."},"changed_at":{"type":"string","format":"date-time"},"holds_queue":{"type":"boolean","description":"The AI agent replies first: the automatic distribution waits until it hands off (docs/17 step 2)."},"error":{"anyOf":[{"$ref":"#/components/schemas/AttachedError"},{"type":"null"}],"description":"Why the AI agent last failed here (docs/23), if it did."}},"required":["status","reason","changed_at","holds_queue","error"],"additionalProperties":false,"description":"The AI agent in this conversation (docs/15); null until it first takes part. Turn it on again with `POST /v1/tickets/{ticketId}/ai/resume`."},"TicketAiEffective":{"type":"object","properties":{"enabled":{"type":"boolean","description":"The AI agent replies on this ticket: its own `ai_enabled` is on and `unavailable` is null."},"unavailable":{"anyOf":[{"type":"string","enum":["channel_unsupported","agent_stopped","channel_off"]},{"type":"null"}],"description":"Why `ai_enabled` has no effect now, whatever its value (kept as it is): `channel_unsupported`, the ticket’s channel takes no AI (SMS, web forms); `agent_stopped`, the organization stopped the AI agent (`PUT /v1/ai/agent`); `channel_off`, the AI switch of its channel, account or side is off (`GET /v1/ai/settings/effective`), on a call ticket its latest call’s number’s. Null: `ai_enabled` decides alone."}},"required":["enabled","unavailable"],"additionalProperties":false,"description":"The AI switch as it applies to this ticket (docs/15 \"Per-ticket switch\"), read with it: the same switches the AI agent reads before it replies."},"TicketChannel":{"type":"object","properties":{"channel_type":{"$ref":"#/components/schemas/ChannelType"},"channel_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"own":{"type":"boolean","description":"The ticket’s own channel (where it started)."},"name":{"description":"The channel’s name, when known.","type":["string","null"]},"preferred":{"description":"The channel a reply naming no `channel_id` goes out on, on a ticket whose own channel takes no replies (a call, `replies_via`): the same number’s channel while its reply window is open, else the contact’s channel they wrote on last that you see, else an email channel with a From you may use; none: notes only (`TKT-6119`). The sent message’s `channel_id` names the one used. Always sent.","type":"boolean"},"reply_window":{"$ref":"#/components/schemas/ReplyWindow"},"channel_status":{"description":"The channel’s connection state; null for a channel without a connection (web chat). A reply on a `needs_reauth` or `disconnected` channel is refused with `TKT-6270` until someone with `channels.manage` reconnects it.","anyOf":[{"type":"string","enum":["pending","active","needs_reauth","disconnected"]},{"type":"null"}]},"from_addresses":{"anyOf":[{"type":"array","items":{"$ref":"#/components/schemas/TicketFromAddress"}},{"type":"null"}],"description":"On an email channel, the addresses a reply may leave from for you (`email.from_address_id` of `POST /v1/tickets/{ticketId}/messages`), the default first; empty when there is none you may use (`TKT-6227`); null on other channels. On an email ticket’s own channel: its own address (unless it is another member’s) and your addresses (routed to your spaces, to you, and to «الكل» when you see it), on any of the organization’s mailboxes; never another member’s address."},"email":{"anyOf":[{"type":"object","properties":{"from_addresses":{"type":"array","items":{"$ref":"#/components/schemas/TicketFromAddress"},"description":"The addresses the email may leave from (`email.from_address_id`), the default first: the channel’s addresses you may use. The same list as the channel’s `from_addresses`."},"to":{"type":"array","items":{"type":"string"},"description":"The contact’s email addresses, the primary first; without `email.to` the email goes to the primary one."},"subject":{"type":"string","description":"The email’s subject: the ticket’s, else «بخصوص اتصالك» («About your call») in the organization’s language, which the ticket then keeps."}},"required":["from_addresses","to","subject"],"additionalProperties":false},{"type":"null"}],"description":"An email channel offered because the ticket’s own channel takes no replies (a call ticket whose contact has an email address); null otherwise."}},"required":["channel_type","channel_id","own","name","reply_window","from_addresses","email"],"additionalProperties":false},"TicketChannelMessageSent":{"type":"object","properties":{"message_id":{"type":"string","format":"uuid"},"duplicate":{"type":"boolean","description":"The client key was used before: its message."}},"required":["message_id","duplicate"],"additionalProperties":false},"TicketClassification":{"type":"object","properties":{"list_id":{"type":"string","format":"uuid"},"list_name":{"type":"string"},"option_id":{"type":"string","format":"uuid"},"option_name":{"type":"string"},"option_archived":{"type":"boolean","description":"The option was archived after it was picked: shown, never picked again."}},"required":["list_id","list_name","option_id","option_name","option_archived"],"additionalProperties":false,"description":"A ticket’s option of one classification list."},"TicketClassificationCounts":{"type":"object","properties":{"list_id":{"type":"string","format":"uuid"},"options":{"type":"array","items":{"type":"object","properties":{"option_id":{"type":"string","format":"uuid"},"tickets":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["option_id","tickets"],"additionalProperties":false},"description":"Each option the counted tickets have (archived ones too), most tickets first; an option no ticket has is left out."},"none":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Tickets without an option of the list."}},"required":["list_id","options","none"],"additionalProperties":false,"description":"The tickets you may see by option of one classification list (not in Spam)."},"TicketClassificationList":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"archived":{"type":"boolean","description":"Archived: it shows nowhere (no ticket field, filter or count) until brought back."},"archived_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"options":{"type":"array","items":{"$ref":"#/components/schemas/TicketClassificationOption"},"description":"Its options, live ones first, each group in the order they were added."},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}},"required":["id","name","archived","archived_at","options","created_at","updated_at"],"additionalProperties":false,"description":"A classification list (docs/13 \"Settings\"): a named dropdown a ticket takes one option of at most."},"TicketClassificationLists":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/TicketClassificationList"},"description":"In the order they were added (archived ones last, with `include_archived`)."}},"required":["data"],"additionalProperties":false},"TicketClassificationOption":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"list_id":{"type":"string","format":"uuid"},"name":{"type":"string"},"archived":{"type":"boolean","description":"Archived: it stays on the tickets that have it and is never picked again (bring it back with `archived: false`)."},"archived_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}},"required":["id","list_id","name","archived","archived_at","created_at","updated_at"],"additionalProperties":false,"description":"An option of a classification list."},"TicketComposer":{"type":"object","properties":{"ticket_id":{"type":"string","format":"uuid"},"channel_type":{"type":"string","description":"The channel that sends them."},"free_form":{"type":"boolean","description":"Content beyond an approved template may be sent now (the reply window is open and nothing blocks the channel)."},"blocked_code":{"description":"Why nothing can be sent now (catalog code); null otherwise.","type":["string","null"]},"send":{"type":"object","properties":{"interactive":{"type":"boolean","description":"Reply buttons, a list, a web-address button and a location request."}},"required":["interactive"],"additionalProperties":false},"limits":{"type":"object","properties":{"interactive":{"type":"object","properties":{"body":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"header":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"footer":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"buttons":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"button_title":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"list_button":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"url":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"rows":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"row_title":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"row_description":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"id":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["body","header","footer","buttons","button_title","list_button","url","rows","row_title","row_description","id"],"additionalProperties":false,"description":"Interactive messages: counts and lengths in characters."}},"required":["interactive"],"additionalProperties":false}},"required":["ticket_id","channel_type","free_form","blocked_code","send","limits"],"additionalProperties":false,"description":"What the composer may send now beyond text and files, on a ticket whose channel declares interactive messages (`send.interactive`)."},"TicketContext":{"type":"object","properties":{"ticket_id":{"type":"string","format":"uuid"},"status":{"type":"string","enum":["none","pending","fetched","failed"],"description":"`none`: the ticket has no thread (a private ticket, or a channel without one); `pending`: not read yet; `fetched`: read once when the ticket was created; `failed`: could not be read (`error`)."},"items":{"type":"array","items":{"$ref":"#/components/schemas/TicketContextItem"},"description":"The post at the top first, then the replies leading to the customer’s."},"error":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"reference":{"type":"string"}},"required":["code","reference"],"additionalProperties":false},{"type":"null"}],"description":"Why the thread could not be read."},"fetched_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]}},"required":["ticket_id","status","items","error","fetched_at"],"additionalProperties":false},"TicketContextItem":{"type":"object","properties":{"external_id":{"type":"string","description":"The post's or comment's id on its platform."},"kind":{"type":"string","enum":["post","reply"],"description":"`post`: the post or video at the top of the thread; `reply`: a reply in it."},"author_name":{"type":["string","null"]},"author_handle":{"description":"The author’s handle (`@name`).","type":["string","null"]},"own":{"type":"boolean","description":"Written by the connected account itself."},"body":{"type":["string","null"]},"url":{"description":"The post or comment on its platform.","type":["string","null"]},"occurred_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]}},"required":["external_id","kind","author_name","author_handle","own","body","url","occurred_at"],"additionalProperties":false},"TicketConversation":{"type":"object","properties":{"ticket":{"$ref":"#/components/schemas/Ticket"},"data":{"type":"array","items":{"$ref":"#/components/schemas/Message"},"description":"The newest items, oldest first."},"older_cursor":{"description":"Older items: `list_ticket_messages` with this `cursor` (null: none).","type":["string","null"]},"next_cursor":{"type":"string","format":"uuid","description":"Pass it as `since` to `wait_for_message` to wait for what follows."},"last_outbound":{"anyOf":[{"$ref":"#/components/schemas/LoopMessage"},{"type":"null"}],"description":"The last message the business sent, with why it failed when it did."},"last_customer_message_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"reply_window_state":{"$ref":"#/components/schemas/ReplyWindowState"},"merged_into":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"description":"The ticket this one was merged into: its conversation goes on there (wait on that one)."}},"required":["ticket","data","older_cursor","next_cursor","last_outbound","last_customer_message_at","reply_window_state","merged_into"],"additionalProperties":false},"TicketCounts":{"type":"object","properties":{"open":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"in_progress":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"in_queue":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Of `open`, the unassigned ones (a part of `open`, not added to it)."},"closed":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"total":{"description":"The tickets matching the filters, every status (with a filter or `group_by`).","type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"groups":{"description":"With `group_by`: each group's key (a UTC day `YYYY-MM-DD`, oldest first; a status, channel type, space or member id, most tickets first; null: none) and its tickets, at most 1000.","type":"array","items":{"type":"object","properties":{"key":{"type":["string","null"]},"tickets":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["key","tickets"],"additionalProperties":false}},"groups_capped":{"description":"More than 1000 groups: only those are answered.","type":"boolean"}},"required":["open","in_progress","in_queue","closed"],"additionalProperties":false,"description":"The live counters of the tickets you may see."},"TicketExportDocument":{"type":"object","properties":{"format":{"type":"string","enum":["rabt.ticket_export"]},"version":{"type":"number","enum":[1]},"external_id":{"type":"string","description":"The import’s key with `source: rabt`."},"id":{"type":"string","format":"uuid"},"number":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"subject":{"type":["string","null"]},"status":{"type":"string","enum":["open","in_progress","closed"]},"priority":{"type":"string","enum":["low","normal","high"]},"channel":{"anyOf":[{"type":"object","properties":{"external_id":{"type":"string"}},"required":["external_id"],"additionalProperties":false,"description":"As the import names a structure row: its Rabt id as the source id."},{"type":"null"}]},"source_channel":{"type":["string","null"]},"space":{"anyOf":[{"type":"object","properties":{"external_id":{"type":"string"}},"required":["external_id"],"additionalProperties":false,"description":"As the import names a structure row: its Rabt id as the source id."},{"type":"null"}]},"assignee":{"anyOf":[{"type":"object","properties":{"external_id":{"type":"string"}},"required":["external_id"],"additionalProperties":false,"description":"As the import names a structure row: its Rabt id as the source id."},{"type":"null"}]},"requester":{"type":"object","properties":{"external_id":{"type":"string"}},"required":["external_id"],"additionalProperties":false,"description":"As the import names a structure row: its Rabt id as the source id."},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"closed_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"tags":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"}},"required":["name"],"additionalProperties":false}},"classifications":{"type":"array","items":{"type":"object","properties":{"list":{"type":"string"},"option":{"type":"string"}},"required":["list","option"],"additionalProperties":false}},"details":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"value":{"type":"string"}},"required":["name","value"],"additionalProperties":false}},"items":{"type":"array","items":{"$ref":"#/components/schemas/TicketExportItem"},"description":"Messages, notes and calls, oldest first."},"events":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"created_at":{"type":"string","format":"date-time"},"body":{"type":["string","null"]},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["id","created_at","body","metadata"],"additionalProperties":false},"description":"System events, oldest first."},"kind":{"type":"string","enum":["private","public"]},"channel_type":{"type":"string"},"note":{"type":["string","null"]},"close_reason":{"anyOf":[{"type":"string","enum":["member","auto"]},{"type":"null"}]},"previous_ticket_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"merged_into_ticket_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"spam_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"ai_enabled":{"type":"boolean"},"related":{"type":"object","properties":{"channel":{"anyOf":[{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"type":{"type":"string"},"name":{"type":"string"},"endpoint":{"type":["string","null"]}},"required":["id","type","name","endpoint"],"additionalProperties":false},{"type":"null"}]},"space":{"anyOf":[{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false},{"type":"null"}]},"members":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"email":{"type":"string"}},"required":["id","name","email"],"additionalProperties":false}},"contact":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":["string","null"]},"erased":{"type":"boolean"},"emails":{"type":"array","items":{"type":"string"}},"phones":{"type":"array","items":{"type":"string"}}},"required":["id","name","erased","emails","phones"],"additionalProperties":false},"company":{"anyOf":[{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"domains":{"type":"array","items":{"type":"string"}}},"required":["id","name","domains"],"additionalProperties":false},{"type":"null"}]}},"required":["channel","space","members","contact","company"],"additionalProperties":false,"description":"What the refs name, for the import’s structure calls."},"import_refs":{"type":"array","items":{"type":"object","properties":{"source":{"type":"string","enum":["zendesk","intercom","freshdesk","zoho_desk","front","hubspot","help_scout","gorgias","csv","rabt","other"]},"source_account":{"type":"string"},"external_id":{"type":"string"}},"required":["source","source_account","external_id"],"additionalProperties":false},"description":"The source ids it was imported by from other systems."}},"required":["format","version","external_id","id","number","subject","status","priority","channel","source_channel","space","assignee","requester","created_at","updated_at","closed_at","tags","classifications","details","items","events","kind","channel_type","note","close_reason","previous_ticket_id","merged_into_ticket_id","spam_at","ai_enabled","related","import_refs"],"additionalProperties":false},"TicketExportItem":{"type":"object","properties":{"external_id":{"type":"string"},"id":{"type":"string","format":"uuid"},"kind":{"type":"string","enum":["message","note"]},"rabt_kind":{"type":"string","enum":["message","note","call"],"description":"A call is a message to the import, with its `call`."},"direction":{"type":"string","enum":["inbound","outbound"]},"author":{"anyOf":[{"anyOf":[{"type":"object","properties":{"member":{"type":"object","properties":{"external_id":{"type":"string"}},"required":["external_id"],"additionalProperties":false,"description":"As the import names a structure row: its Rabt id as the source id."}},"required":["member"],"additionalProperties":false},{"type":"object","properties":{"contact":{"type":"object","properties":{"external_id":{"type":"string"}},"required":["external_id"],"additionalProperties":false,"description":"As the import names a structure row: its Rabt id as the source id."}},"required":["contact"],"additionalProperties":false}]},{"type":"null"}],"description":"A member (`related.members`) or the contact; null for Rabt’s own."},"sender_type":{"type":"string","enum":["contact","member","bot","system"]},"body":{"type":["string","null"]},"body_format":{"type":"string","enum":["text","html"],"description":"`html`: an email’s HTML as the customer has it (`text` then holds its text)."},"text":{"type":["string","null"]},"content_type":{"type":"string","enum":["text","image","video","audio","voice","document","sticker","location","contacts","template","event","call","gif","unsupported","encrypted"]},"created_at":{"type":"string","format":"date-time"},"channel_type":{"type":["string","null"]},"channel_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"status":{"type":["string","null"]},"sent_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"delivered_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"read_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"failed_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"edited_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"edits":{"type":"array","items":{"type":"object","properties":{"body":{"type":["string","null"]},"content_type":{"type":"string"},"replaced_at":{"type":"string","format":"date-time"}},"required":["body","content_type","replaced_at"],"additionalProperties":false},"description":"Earlier versions the customer edited on the channel, oldest first."},"reactions":{"type":"array","items":{"type":"object","properties":{"by":{"type":"string","enum":["contact","business"]},"contact_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"membership_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"emoji":{"type":"string"},"reacted_at":{"type":"string","format":"date-time"}},"required":["by","contact_id","membership_id","emoji","reacted_at"],"additionalProperties":false}},"attachments":{"type":"array","items":{"type":"object","properties":{"source_url":{"type":"string","format":"uri","description":"A download link (the import fetches it from here)."},"file_name":{"type":"string"},"mime_type":{"type":"string"},"size_bytes":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"content_id":{"description":"The `cid:` an email’s HTML shows this inline image by.","type":["string","null"]}},"required":["source_url","file_name","mime_type","size_bytes","content_id"],"additionalProperties":false,"description":"Exactly the import’s fields; the link works for an hour."}},"email":{"anyOf":[{"type":"object","properties":{"message_id":{"type":"string"},"in_reply_to":{"type":["string","null"]},"references":{"type":"array","items":{"type":"string"}}},"required":["message_id","in_reply_to","references"],"additionalProperties":false},{"type":"null"}],"description":"An email’s Message-ID, In-Reply-To and References (its replies keep their thread after an import)."},"unavailable_attachments":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"file_name":{"type":"string"},"mime_type":{"type":"string"},"size_bytes":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"code":{"type":"string","description":"`TKT-6112` being scanned, `TKT-6113` blocked."}},"required":["id","file_name","mime_type","size_bytes","code"],"additionalProperties":false},"description":"Files without a link."},"call":{"anyOf":[{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"direction":{"type":"string"},"status":{"type":"string"},"from_number":{"type":["string","null"]},"to_number":{"type":"string"},"membership_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"started_at":{"type":"string","format":"date-time"},"answered_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"ended_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"duration_sec":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"end_reason":{"type":["string","null"]},"recording":{"anyOf":[{"type":"object","properties":{"url":{"type":"string","format":"uri"},"expires_at":{"type":"string","format":"date-time"}},"required":["url","expires_at"],"additionalProperties":false},{"type":"null"}],"description":"A link valid an hour (each link is in the sensitive-access log)."},"voicemail":{"anyOf":[{"type":"object","properties":{"url":{"type":"string","format":"uri"},"expires_at":{"type":"string","format":"date-time"},"duration_sec":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]}},"required":["url","expires_at","duration_sec"],"additionalProperties":false},{"type":"null"}]},"transcript":{"type":"array","items":{"type":"object","properties":{"speaker":{"type":"string"},"text":{"type":"string"},"spoken_at":{"type":"string","format":"date-time"}},"required":["speaker","text","spoken_at"],"additionalProperties":false}}},"required":["id","direction","status","from_number","to_number","membership_id","started_at","answered_at","ended_at","duration_sec","end_reason","recording","voicemail","transcript"],"additionalProperties":false},{"type":"null"}]},"import_refs":{"type":"array","items":{"type":"object","properties":{"source":{"type":"string","enum":["zendesk","intercom","freshdesk","zoho_desk","front","hubspot","help_scout","gorgias","csv","rabt","other"]},"source_account":{"type":"string"},"external_id":{"type":"string"}},"required":["source","source_account","external_id"],"additionalProperties":false}}},"required":["external_id","id","kind","rabt_kind","direction","author","sender_type","body","body_format","text","content_type","created_at","channel_type","channel_id","status","sent_at","delivered_at","read_at","failed_at","edited_at","edits","reactions","attachments","email","unavailable_attachments","call","import_refs"],"additionalProperties":false},"TicketExportPage":{"type":"object","properties":{"organization":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false,"description":"The organization the call read."},"format":{"type":"string","enum":["rabt.ticket_export"]},"version":{"type":"number","enum":[1]},"data":{"type":"array","items":{"$ref":"#/components/schemas/TicketExportDocument"}},"next_cursor":{"description":"The position after this page: the next page, or (at the end) later changes. Null before the first ticket.","type":["string","null"]},"end_of_stream":{"type":"boolean","description":"Nothing more changed until a minute ago: call again later with `next_cursor`."}},"required":["organization","format","version","data","next_cursor","end_of_stream"],"additionalProperties":false},"TicketFilter":{"type":"object","properties":{"status":{"description":"Only these statuses.","maxItems":3,"type":"array","items":{"type":"string","enum":["open","in_progress","closed"]}},"space_id":{"description":"A department space, or `none` for tickets in no department space.","type":"string","pattern":"^([0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}|none)$"},"assignee_membership_id":{"description":"A member (membership id), or `none` for unassigned tickets (the queue).","type":"string","pattern":"^([0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}|none)$"},"channel_type":{"description":"Only this channel.","$ref":"#/components/schemas/ChannelType"},"assignee":{"description":"A member by email or name (instead of the id).","type":"string","minLength":1,"maxLength":200},"space":{"description":"A space by name (instead of the id).","type":"string","minLength":1,"maxLength":200},"channel":{"description":"A channel by name or number (instead of the id).","type":"string","minLength":1,"maxLength":200},"contact":{"description":"A contact by phone or email (instead of the id).","type":"string","minLength":1,"maxLength":200},"contact_id":{"description":"Only this contact's tickets.","type":"string","format":"uuid"},"classification_option_id":{"description":"Only tickets with this option of a classification list.","type":"string","format":"uuid"},"tag_id":{"description":"Only tickets with this tag.","type":"string","format":"uuid"},"spam":{"description":"`true`: the tickets in Spam instead (`tickets.view_all`).","type":"boolean"},"unread":{"description":"`true`: only the tickets you have not read (never closed ones).","type":"boolean"},"q":{"description":"A ticket number (`1283` or `#1283`), words of the subject, or a part of the contact's name, number or address.","type":"string","maxLength":200},"updated_since":{"description":"Only tickets changed at or after this time.","type":"string","format":"date-time"},"channel_id":{"description":"Only this connected channel (one WhatsApp number, one mailbox): its id from `GET /v1/channels`, also of a disconnected one.","type":"string","format":"uuid"},"created_from":{"description":"Created at or after this time (inclusive) (ISO 8601, UTC).","type":"string","format":"date-time"},"created_to":{"description":"Created before this time (exclusive) (ISO 8601, UTC).","type":"string","format":"date-time"},"last_activity_from":{"description":"Last activity at or after this time (inclusive) (ISO 8601, UTC).","type":"string","format":"date-time"},"last_activity_to":{"description":"Last activity before this time (exclusive) (ISO 8601, UTC).","type":"string","format":"date-time"},"text":{"description":"Words of the conversation: tickets with a message or internal note containing every word (prefixes match, Arabic-aware).","type":"string","maxLength":200}},"additionalProperties":false,"description":"The ticket log’s filters, all combined."},"TicketFromAddress":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"address":{"type":"string"},"channel_id":{"type":"string","format":"uuid","description":"The email channel (mailbox) it sends through."},"default":{"type":"boolean","description":"The address used when the reply names none: the ticket’s own address, else the assignee’s own, else one routed to the ticket’s space, else one of your spaces’."}},"required":["id","address","channel_id","default"],"additionalProperties":false},"TicketGroupParticipants":{"type":"object","properties":{"ticket_id":{"type":"string","format":"uuid"},"participants":{"type":"array","items":{"type":"object","properties":{"phone":{"type":"string","description":"Their number (E.164)."},"name":{"description":"The name they last wrote under.","type":["string","null"]},"contact_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"description":"Their contact; null while none is made or after an erasure."},"last_message_at":{"type":"string","format":"date-time"},"messages":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"How many messages they wrote in this group."}},"required":["phone","name","contact_id","last_message_at","messages"],"additionalProperties":false},"description":"The senders who have written in the group, the most recently active first (at most 200); empty on a ticket that is not a group chat, or while nobody with a number wrote."}},"required":["ticket_id","participants"],"additionalProperties":false},"TicketImport":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"organization":{"$ref":"#/components/schemas/TicketImportOrganization"},"source":{"$ref":"#/components/schemas/TicketImportSource"},"source_account":{"type":"string"},"mode":{"type":"string","enum":["sample","full"]},"state":{"type":"string","enum":["open","done","withdrawn"]},"tickets_created":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"tickets_updated":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"tickets_unchanged":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"items_created":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"attachments_pending":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Attachments still being fetched."},"attachments_stored":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Attachments stored (and scanned)."},"attachments_failed":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"failed_attachments":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"ticket_id":{"type":"string","format":"uuid"},"message_id":{"type":"string","format":"uuid"},"file_name":{"type":"string"},"code":{"type":"string","description":"`TKT-6259` unreachable, `TKT-6264` larger than 100 MB, `TKT-6265` no answer in time; `CRM-6048` erased, `TKT-6246` withdrawn."},"reference":{"type":"string"},"retryable":{"type":"boolean","description":"Fetched again by `POST /v1/ticket-imports/{id}/retry-attachments`."}},"required":["id","ticket_id","message_id","file_name","code","reference","retryable"],"additionalProperties":false},"description":"The first 100 failed attachments."},"created_by_membership_id":{"type":"string","format":"uuid"},"created_at":{"type":"string","format":"date-time"},"completed_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"withdrawn_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]}},"required":["id","organization","source","source_account","mode","state","tickets_created","tickets_updated","tickets_unchanged","items_created","attachments_pending","attachments_stored","attachments_failed","failed_attachments","created_by_membership_id","created_at","completed_at","withdrawn_at"],"additionalProperties":false},"TicketImportAnswer":{"type":"object","properties":{"organization":{"$ref":"#/components/schemas/TicketImportOrganization"},"import_id":{"type":"string","format":"uuid"},"validate_only":{"type":"boolean"},"results":{"type":"array","items":{"type":"object","properties":{"external_id":{"type":"string"},"outcome":{"type":"string","enum":["created","updated","unchanged","invalid"],"description":"`unchanged`: nothing new (a retried call, or an older source update)."},"ticket_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"number":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"items_added":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"attachments_pending":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"notice":{"anyOf":[{"type":"string","enum":["closed_live_exists"]},{"type":"null"}],"description":"`closed_live_exists`: imported closed, as the contact has a live conversation on the channel."},"error":{"anyOf":[{"$ref":"#/components/schemas/TicketImportRowError"},{"type":"null"}]}},"required":["external_id","outcome","ticket_id","number","items_added","attachments_pending","notice","error"],"additionalProperties":false}},"unmapped":{"type":"object","properties":{"channels":{"type":"array","items":{"type":"string"}},"spaces":{"type":"array","items":{"type":"string"}},"members":{"type":"array","items":{"type":"string"}},"contacts":{"type":"array","items":{"type":"string"}},"tags":{"type":"array","items":{"type":"string"}},"classification_options":{"type":"array","items":{"type":"string"}},"statuses":{"type":"array","items":{"type":"string"}},"priorities":{"type":"array","items":{"type":"string"}}},"required":["channels","spaces","members","contacts","tags","classification_options","statuses","priorities"],"additionalProperties":false,"description":"The values of this call no Rabt target was found for, per kind."}},"required":["organization","import_id","validate_only","results","unmapped"],"additionalProperties":false},"TicketImportList":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/TicketImport"}}},"required":["data"],"additionalProperties":false,"description":"The newest batches, newest first."},"TicketImportOptions":{"type":"object","properties":{"organization":{"$ref":"#/components/schemas/TicketImportOrganization"},"structure_order":{"type":"array","items":{"type":"string","enum":["spaces","members","channels","contacts_and_companies","canned_replies_and_ai_knowledge","tickets"]},"description":"Send the structure in this order, tickets last: spaces and channels are made in Rabt itself (the app or their own API), canned replies and AI knowledge through their own API."},"spaces":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"description":{"type":"string"}},"required":["id","name","description"],"additionalProperties":false}},"members":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"The membership id (a ticket’s assignee or author)."},"name":{"type":"string"},"email":{"type":"string"},"role":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false},"seat_state":{"type":"string","description":"`inactive` for members imported before and not yet invited."}},"required":["id","name","email","role","seat_state"],"additionalProperties":false},"description":"Every member, the inactive imported ones too."},"roles":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false},"description":"The roles a new imported member may get (`role_id`)."},"channels":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"type":{"type":"string"},"name":{"type":"string"},"address":{"description":"Its phone number, or its first address.","type":["string","null"]},"status":{"type":"string","enum":["active","needs_reauth"]}},"required":["id","type","name","address","status"],"additionalProperties":false},"description":"The connected channels tickets import on (any of them may take a source channel the person maps to it). None: connect them first (`TKT-6257`)."},"tags":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false}},"tags_complete":{"type":"boolean","description":"False when the organization has more than 1000 tags: find the others with list_ticket_tags (`GET /v1/ticket-tags`)."},"classifications":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"options":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false}}},"required":["id","name","options"],"additionalProperties":false}},"statuses":{"type":"array","items":{"type":"string","enum":["open","in_progress","closed"]}},"priorities":{"type":"array","items":{"type":"string","enum":["low","normal","high"]}},"sources":{"type":"array","items":{"type":"string","enum":["zendesk","intercom","freshdesk","zoho_desk","front","hubspot","help_scout","gorgias","csv","rabt","other"]}},"modes":{"type":"array","items":{"type":"string","enum":["sample","full"]}},"limits":{"type":"object","properties":{"tickets_per_call":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"items_per_call":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"bytes_per_call":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"items_per_ticket":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"attachments_per_item":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"structure_per_call":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"details_per_ticket":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["tickets_per_call","items_per_call","bytes_per_call","items_per_ticket","attachments_per_item","structure_per_call","details_per_ticket"],"additionalProperties":false}},"required":["organization","structure_order","spaces","members","roles","channels","tags","tags_complete","classifications","statuses","priorities","sources","modes","limits"],"additionalProperties":false},"TicketImportOrganization":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false,"description":"The organization the call acted in (a connection may cover several)."},"TicketImportRowError":{"type":"object","properties":{"code":{"type":"string","description":"The first issue’s catalog code."},"params":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":["string","number"]}},"path":{"type":["string","null"]},"issues":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string","description":"The field, e.g. `tickets[3].items[7].created_at`."},"code":{"type":"string"},"params":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":["string","number"]}}},"required":["path","code","params"],"additionalProperties":false},"description":"Every issue of the row (its first 100)."}},"required":["code","params","path","issues"],"additionalProperties":false,"description":"Why a row was not imported."},"TicketImportSource":{"type":"string","enum":["zendesk","intercom","freshdesk","zoho_desk","front","hubspot","help_scout","gorgias","csv","rabt","other"],"description":"The system the data comes from (`csv`: a file; `rabt`: another Rabt organization’s export; `other`: any other system)."},"TicketImportStructure":{"type":"object","properties":{"organization":{"$ref":"#/components/schemas/TicketImportOrganization"},"results":{"type":"array","items":{"type":"object","properties":{"external_id":{"type":"string"},"entity":{"type":"string"},"outcome":{"type":"string","enum":["created","matched","unchanged","mapped","invalid"],"description":"`created` new; `matched` an existing row (email, phone, domain); `unchanged` imported before; `mapped` to the Rabt row named."},"rabt_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"error":{"anyOf":[{"$ref":"#/components/schemas/TicketImportRowError"},{"type":"null"}]},"skipped":{"type":"array","items":{"type":"string"},"description":"Values skipped (an invalid phone or email, one another contact has)."}},"required":["external_id","entity","outcome","rabt_id","error","skipped"],"additionalProperties":false}}},"required":["organization","results"],"additionalProperties":false},"TicketImportWithdrawal":{"type":"object","properties":{"import":{"$ref":"#/components/schemas/TicketImport"},"tickets_withdrawn":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Tickets of the sample soft-deleted."},"tickets_kept":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Tickets kept because a member worked on them since."}},"required":["import","tickets_withdrawn","tickets_kept"],"additionalProperties":false},"TicketLatestActivity":{"type":"object","properties":{"kind":{"type":"string","enum":["message","call","note"]},"direction":{"type":"string","enum":["inbound","outbound"]},"content_type":{"type":"string","enum":["text","image","video","audio","voice","document","sticker","location","contacts","template","event","call","gif","unsupported","encrypted"]},"preview":{"description":"The message’s text on one line, at most 140 characters (cut with “…”); null for a call, a message without text or an end-to-end encrypted one; a note’s text on one line.","type":["string","null"]},"call":{"anyOf":[{"type":"object","properties":{"answered":{"description":"False: a missed call.","type":["boolean","null"]},"duration_sec":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}],"description":"Talk time, from the answer."}},"required":["answered","duration_sec"],"additionalProperties":false},{"type":"null"}],"description":"A call’s outcome; null for a message."},"delivery_state":{"description":"An outbound message’s delivery as its thread shows it: `pending` (queued or sending), `sent`, `delivered`, `read` or `failed`; null for an inbound message or a call.","anyOf":[{"type":"string","enum":["pending","sent","delivered","read","failed"]},{"type":"null"}]},"duration_ms":{"description":"An audio or voice message’s length, or a call’s talk time, in milliseconds; null otherwise or while unknown.","anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"sender_name":{"description":"Who wrote the message in a group chat (their name, else their number); null for a one-to-one chat, a call or a note.","type":["string","null"]},"event":{"description":"A channel’s notice (`content_type` `event`: a participant joined or left, a number changed) as `{ event, …data }`, given only when the conversation holds nothing else; null otherwise.","anyOf":[{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},{"type":"null"}]},"occurred_at":{"type":"string","format":"date-time"}},"required":["kind","direction","content_type","preview","call","occurred_at"],"additionalProperties":false,"description":"The newest message, call or internal note of the conversation (system events and channel notices left out; a notice only when there is nothing else), which the ticket log shows for a ticket without a subject; null before the first one."},"TicketMatchSnippet":{"type":"object","properties":{"message_id":{"type":"string","format":"uuid","description":"The message or internal note that matched."},"text":{"type":"string","description":"An excerpt of it around the first match."},"highlights":{"type":"array","items":{"type":"object","properties":{"start":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Offset in UTF-16 code units (JavaScript string index)."},"length":{"type":"integer","minimum":1,"maximum":9007199254740991}},"required":["start","length"],"additionalProperties":false},"description":"The parts of `text` that matched."}},"required":["message_id","text","highlights"],"additionalProperties":false},"TicketMediaRetry":{"type":"object","properties":{"ticket_id":{"type":"string","format":"uuid"},"message_id":{"type":"string","format":"uuid"},"missing_files":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}],"description":"The files to fetch again (null: the channel does not say how many); they appear on the message as stored."}},"required":["ticket_id","message_id","missing_files"],"additionalProperties":false},"TicketMessageDone":{"type":"object","properties":{"ticket_id":{"type":"string","format":"uuid"},"message_id":{"type":"string","format":"uuid"}},"required":["ticket_id","message_id"],"additionalProperties":false},"TicketMessageModeration":{"type":"object","properties":{"ticket_id":{"type":"string","format":"uuid"},"message_id":{"type":"string","format":"uuid"},"action":{"type":"string","enum":["hide","unhide","delete","like","unlike"]}},"required":["ticket_id","message_id","action"],"additionalProperties":false},"TicketMessageReaction":{"type":"object","properties":{"ticket_id":{"type":"string","format":"uuid"},"message_id":{"type":"string","format":"uuid"},"emoji":{"description":"The business’s reaction now; null when removed.","type":["string","null"]}},"required":["ticket_id","message_id","emoji"],"additionalProperties":false},"TicketMessagesAfter":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Message"},"description":"The new items, oldest first."},"next_cursor":{"type":"string","format":"uuid","description":"Pass it as `since` to wait for what comes next."},"has_more":{"type":"boolean","description":"More items follow: call again at once."},"customer_replied":{"type":"boolean"},"merged_into":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"description":"The ticket this one was merged into: its conversation goes on there (wait on that one)."}},"required":["data","next_cursor","has_more","customer_replied","merged_into"],"additionalProperties":false},"TicketMetrics":{"type":"object","properties":{"from":{"type":"string","format":"date-time"},"to":{"type":"string","format":"date-time"},"group_by":{"type":"string","enum":["none","day","week","month","space","member","channel","tag","classification_option"]},"groups":{"type":"array","items":{"$ref":"#/components/schemas/TicketMetricsGroup"}}},"required":["from","to","group_by","groups"],"additionalProperties":false,"description":"The ticket metrics of a period."},"TicketMetricsGroup":{"type":"object","properties":{"key":{"description":"A space, member, tag or option id, a channel type, or the first date (YYYY-MM-DD) of a day, week or month; null: the none bucket, or `group_by` none.","type":["string","null"]},"name":{"description":"The space’s, member’s, tag’s or option’s name; null otherwise.","type":["string","null"]},"created":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"closed":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"open_at_end":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"first_response_seconds":{"type":"object","properties":{"median":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}],"description":"The median first response time, in seconds."},"p90":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}],"description":"The 90th percentile first response time, in seconds."},"tickets":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"The tickets measured."}},"required":["median","p90","tickets"],"additionalProperties":false,"description":"The first response time (null without tickets)."},"resolution_seconds":{"type":"object","properties":{"median":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}],"description":"The median resolution time, in seconds."},"p90":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}],"description":"The 90th percentile resolution time, in seconds."},"tickets":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"The tickets measured."}},"required":["median","p90","tickets"],"additionalProperties":false,"description":"The resolution time (null without tickets)."},"reopened":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"closed_after_ai":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"closed_by_members":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"handled":{"description":"With `group_by` `member`: the tickets that member closed in the period (the closer, not the assignee); null otherwise.","anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]}},"required":["key","name","created","closed","open_at_end","first_response_seconds","resolution_seconds","reopened","closed_after_ai","closed_by_members"],"additionalProperties":false},"TicketPage":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Ticket"},"description":"Newest activity first."},"next_cursor":{"type":["string","null"]},"total":{"type":"integer","minimum":0,"maximum":10000,"description":"How many rows the list has with these filters, counted up to 10000."},"total_capped":{"type":"boolean","description":"The list has more than 10000 rows (`total` is 10000)."}},"required":["data","next_cursor","total"],"additionalProperties":false},"TicketPhoneThread":{"anyOf":[{"type":"object","properties":{"business_number":{"type":"string","description":"The organization’s own number (E.164): the number called, the WhatsApp number."},"customer_number":{"type":"string","description":"The customer’s number (E.164)."}},"required":["business_number","customer_number"],"additionalProperties":false},{"type":"null"}],"description":"One thread per phone number (docs/13): calls, WhatsApp and every other phone-addressed channel (`GET /v1/channels/capabilities` `phone_addressed`) whose own number is `business_number` join this ticket for `customer_number`. Null when the ticket has none."},"TicketPriority":{"type":"string","enum":["low","normal","high"]},"TicketReferences":{"type":"object","properties":{"data":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"number":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"accessible":{"type":"boolean","enum":[true]},"ticket_id":{"type":"string","format":"uuid"},"subject":{"type":["string","null"]},"status":{"$ref":"#/components/schemas/TicketStatus"},"channel_type":{"$ref":"#/components/schemas/ChannelType"},"url":{"type":"string"}},"required":["number","accessible","ticket_id","subject","status","channel_type","url"],"additionalProperties":false},{"type":"object","properties":{"number":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"accessible":{"type":"boolean","enum":[false]}},"required":["number","accessible"],"additionalProperties":false}]}}},"required":["data"],"additionalProperties":false,"description":"`#<number>` references: the tickets you may see link to them; others (or none) say only `accessible: false`."},"TicketsListState":{"type":"object","properties":{"space":{"type":"string","pattern":"^(personal|all|unassigned|[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$","description":"The assignee filter: `all`, `personal` (your tickets), `unassigned`, or a department space’s id; with `assignee_membership_id`, `all`."},"status":{"description":"The status filter; `open` when absent. `in_queue` is deprecated: it is saved as `space` `unassigned` with status `open`.","type":"string","enum":["open","in_progress","closed","unread","in_queue"]},"assignee_membership_id":{"description":"One member’s tickets (the assignee filter’s member).","type":"string","format":"uuid"}},"required":["space"],"additionalProperties":false,"description":"How the member left the tickets list: its assignee and status filters."},"TicketSmsResult":{"type":"object","properties":{"message_id":{"type":"string","format":"uuid","description":"The ticket's timeline item that shows the SMS."},"ticket_id":{"type":"string","format":"uuid"},"duplicate":{"type":"boolean"}},"required":["message_id","ticket_id","duplicate"],"additionalProperties":false},"TicketStartOptions":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"channel_type":{"$ref":"#/components/schemas/ChannelType"},"to":{"type":"string","description":"Whom it reaches: an email address, a phone number or the identity’s handle."},"identity_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"description":"The contact’s channel identity it reaches; null for emails and phone numbers."},"state":{"type":"string","enum":["ready","not_connected","customer_starts"],"description":"`ready`: a connected channel can open the conversation (start it with `createTicket` and the channel below); `not_connected`: no channel of this type is connected; `customer_starts`: only the customer opens these conversations (web chat; App Store, Google Play and Google Maps reviews), and `createTicket` refuses them (`TKT-6197`)."},"first_message":{"type":"string","enum":["any","template"],"description":"`template`: the conversation opens only with an approved template (WhatsApp)."},"channels":{"type":"array","items":{"type":"object","properties":{"channel_id":{"type":"string","format":"uuid"},"channel_address_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"name":{"type":"string"},"address":{"type":["string","null"]}},"required":["channel_id","channel_address_id","name","address"],"additionalProperties":false}}},"required":["channel_type","to","identity_id","state","first_message","channels"],"additionalProperties":false}},"choices":{"type":"array","items":{"type":"object","properties":{"channel_type":{"$ref":"#/components/schemas/ChannelType"},"channel_id":{"type":"string","format":"uuid"},"channel_address_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"sender":{"type":"string","description":"Our side, as members recognize it: the address it sends from (email), the organization’s own number (WhatsApp), else the channel’s name."},"to":{"type":"string","description":"Whom it reaches: the contact’s email address, phone number or identity’s handle."},"identity_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"first_message":{"type":"string","enum":["any","template"]},"preselected":{"type":"boolean","description":"The one to offer first: WhatsApp, else one routed to you or to one of your spaces, else the first; never an email choice (the person chooses the sender address), so none when only email reaches the contact."}},"required":["channel_type","channel_id","channel_address_id","sender","to","identity_id","first_message","preselected"],"additionalProperties":false},"description":"What a member can start on: the `ready` options only, one per connected channel that reaches the contact, never a channel without written replies (calls start from inside a ticket). Start one with `createTicket` (its `channel_type`, `channel_id`, `channel_address_id` and the recipient `to` or `identity_id`)."}},"required":["data","choices"],"additionalProperties":false,"description":"Where a ticket can be started for a contact: each of its email addresses, phone numbers (WhatsApp, SMS, voice) and channel identities, with the connected channels that reach it, and the choices to offer (docs/12, docs/13)."},"TicketStatus":{"type":"string","enum":["open","in_progress","closed"],"description":"open, in progress, closed (a closed ticket reopens, docs/13)."},"TicketsTo":{"type":"object","properties":{"space_id":{"description":"Another live department space (their queue).","type":"string","format":"uuid"},"membership_id":{"description":"An active member to assign them to (their My space).","type":"string","format":"uuid"},"all":{"deprecated":true,"description":"Deprecated: «الكل» is a view, never a destination; refused with `SPC-6222`.","type":"boolean","enum":[true]}},"additionalProperties":false},"TicketTag":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false,"description":"A tag on a ticket (`GET /v1/ticket-tags`)."},"TicketTagCounts":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"tag_id":{"type":"string","format":"uuid"},"name":{"type":"string"},"tickets":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["tag_id","name","tickets"],"additionalProperties":false},"description":"The most used tags first (up to 100)."}},"required":["data"],"additionalProperties":false,"description":"The tickets you may see by tag (not in Spam)."},"TicketTagMergeResult":{"type":"object","properties":{"tag":{"description":"The tag it went into.","$ref":"#/components/schemas/OrganizationTicketTag"},"moved_tickets":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Tickets that had the merged tag (each now has the other, once)."}},"required":["tag","moved_tickets"],"additionalProperties":false},"TicketTagPage":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/OrganizationTicketTag"},"description":"Newest first."},"next_cursor":{"type":["string","null"]},"total":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Tags matching `q` in all (every page)."}},"required":["data","next_cursor","total"],"additionalProperties":false},"TicketUploadRequest":{"type":"object","properties":{"file_name":{"type":"string","minLength":1,"maxLength":255},"mime_type":{"description":"Its type; default: by the file name’s extension.","type":"string","maxLength":255,"pattern":"^[a-z0-9!#$&^_.+-]+\\/[a-z0-9!#$&^_.+-]+$"},"size":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Bytes."},"sha256":{"description":"The file's SHA-256 (hex). When the organization already holds this exact file, it is reused: the response has no upload and the file is already stored.","type":"string","pattern":"^[0-9a-f]{64}$"}},"required":["file_name","size"],"additionalProperties":false},"TikTokCapabilities":{"type":"object","properties":{"kinds":{"type":"array","items":{"type":"string","enum":["private","public"]}},"composer":{"type":"string","enum":["chat","email","none"]},"send":{"type":"object","properties":{"text":{"type":"boolean"},"media":{"type":"array","items":{"type":"string"}},"location":{"type":"boolean"},"interactive":{"type":"boolean"},"reaction":{"type":"boolean"},"template":{"type":"boolean"}},"required":["text","media","location","interactive","reaction","template"],"additionalProperties":false},"max_text_length":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"max_comment_length":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"max_attachment_bytes":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"image_types":{"type":"array","items":{"type":"string"}},"reply_window":{"type":"object","properties":{"hours":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"messages":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["hours","messages"],"additionalProperties":false},"public_actions":{"type":"array","items":{"type":"string"}},"statuses":{"type":"array","items":{"type":"string"}}},"required":["kinds","composer","send","max_text_length","max_comment_length","max_attachment_bytes","image_types","reply_window","public_actions","statuses"],"additionalProperties":false,"description":"What TikTok supports (docs/channels/tiktok.md); the composer offers only this."},"TikTokChannel":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"status":{"$ref":"#/components/schemas/ChannelStatus"},"status_changed_at":{"type":"string","format":"date-time"},"last_error":{"anyOf":[{"$ref":"#/components/schemas/ChannelError"},{"type":"null"}]},"open_id":{"type":"string","description":"The account holder’s TikTok `open_id`."},"username":{"type":["string","null"]},"display_name":{"type":["string","null"]},"scopes":{"type":"array","items":{"type":"string"},"description":"The permissions the account holder granted."},"api_version":{"type":["string","null"]},"token_expires_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"When the access token expires (a day; Rabt renews it before)."},"refresh_token_expires_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"When Rabt’s access ends unless it is reconnected (a year after connecting)."},"address_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"description":"The account’s channel address (docs/17: spaces take its tickets through it); null once disconnected."},"last_inbound_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"comments_synced_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"When the comments on the account’s videos were last read."},"connected_by_membership_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"connected_at":{"type":"string","format":"date-time"},"disconnected_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]}},"required":["id","name","status","status_changed_at","last_error","open_id","username","display_name","scopes","api_version","token_expires_at","refresh_token_expires_at","address_id","last_inbound_at","comments_synced_at","connected_by_membership_id","connected_at","disconnected_at"],"additionalProperties":false},"TikTokChannelList":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/TikTokChannel"}},"configured":{"type":"boolean"}},"required":["data","configured"],"additionalProperties":false},"TikTokCommentAction":{"type":"object","properties":{"action":{"type":"string","enum":["hide","unhide","delete"],"description":"`hide` or `unhide` the comment on TikTok, or `delete` it there. Rabt keeps its copy in the ticket either way."}},"required":["action"],"additionalProperties":false},"TikTokCommentActionResult":{"type":"object","properties":{"message_id":{"type":"string","format":"uuid"},"ticket_id":{"type":"string","format":"uuid"},"action":{"type":"string","enum":["hide","unhide","delete"]}},"required":["message_id","ticket_id","action"],"additionalProperties":false},"TikTokConnectStart":{"type":"object","properties":{"authorization_url":{"type":"string","format":"uri","description":"TikTok’s page where the account holder signs in and approves Rabt; TikTok then sends them to Rabt’s callback page with `code` and `state`."},"expires_at":{"type":"string","format":"date-time","description":"The flow must finish before this time (10 minutes)."}},"required":["authorization_url","expires_at"],"additionalProperties":false},"TikTokFileFetch":{"type":"object","properties":{"message_id":{"type":"string","format":"uuid"},"ticket_id":{"type":"string","format":"uuid"},"queued":{"type":"boolean","description":"The fetch is queued: the file arrives as `attachment.stored`, or the new failure is attached to the message (`metadata.fileError`).","enum":[true]}},"required":["message_id","ticket_id","queued"],"additionalProperties":false},"TikTokLoginKitAccount":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"open_id":{"type":"string","description":"TikTok’s `open_id` of the account for Rabt’s app."},"display_name":{"type":"string","description":"The account’s name on TikTok when linked."},"avatar_url":{"anyOf":[{"type":"string","format":"uri"},{"type":"null"}],"description":"The account’s picture on TikTok’s CDN when linked (TikTok’s signed URL)."},"scopes":{"type":"array","items":{"type":"string"},"description":"The permissions granted: `user.info.basic` only."},"messaging":{"type":"boolean","description":"Always false: the account is linked only. Receiving messages and comments needs TikTok’s Business Messaging approval; nothing is received, sent or charged on it.","enum":[false]},"connected_by_membership_id":{"type":"string","format":"uuid"},"connected_at":{"type":"string","format":"date-time"},"disconnected_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]}},"required":["id","open_id","display_name","avatar_url","scopes","messaging","connected_by_membership_id","connected_at","disconnected_at"],"additionalProperties":false},"TikTokLoginKitAccountList":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/TikTokLoginKitAccount"}},"mode":{"anyOf":[{"type":"string","enum":["business","login_kit"]},{"type":"null"}],"description":"How Connect links a TikTok account now: `business` (the Business Messaging API app: messages and comments), `login_kit` (the account is linked by signing in only), or null when TikTok is not set up on this Rabt."}},"required":["data","mode"],"additionalProperties":false},"TikTokReplyRules":{"type":"object","properties":{"applies":{"type":"boolean","description":"False for tickets of other channels (no rules)."},"open":{"type":"boolean","description":"Whether a reply may be sent now."},"window_open_until":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"Private conversations: free replies until then (48 hours after the customer’s last message); after it, 3 follow-up messages until the customer writes again (`messages_left`)."},"messages_left":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}],"description":"Messages that may still be sent now: in the window, of `max_messages` (10 per customer message); after it, of the 3 follow-ups TikTok allows until the customer writes again. Null when not counted."},"max_messages":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"max_text_length":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"max_files":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"file_types":{"type":"array","items":{"type":"string"}}},"required":["applies","open","window_open_until","messages_left","max_messages","max_text_length","max_files","file_types"],"additionalProperties":false},"TopUp":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"kind":{"type":"string","enum":["manual","auto"]},"status":{"type":"string","enum":["pending","requires_action","succeeded","failed"],"description":"`requires_action`: send the member to `action_url` (3-D Secure). `succeeded`: the wallet was credited, after Tap confirmed the charge."},"amount":{"type":"integer","minimum":0,"maximum":9007199254740991},"currency":{"type":"string","enum":["SAR"]},"action_url":{"type":["string","null"]},"save_card":{"type":"boolean"},"gateway_charge_id":{"type":["string","null"]},"gateway_status":{"type":["string","null"]},"error":{"anyOf":[{"$ref":"#/components/schemas/TopUpError"},{"type":"null"}]},"attempt":{"type":"integer","minimum":1,"maximum":9007199254740991},"requested_by_membership_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"receipt_voucher_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"created_at":{"type":"string","format":"date-time"},"completed_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]}},"required":["id","kind","status","amount","currency","action_url","save_card","gateway_charge_id","gateway_status","error","attempt","requested_by_membership_id","receipt_voucher_id","created_at","completed_at"],"additionalProperties":false,"description":"A card top-up of the wallet (docs/10)."},"TopUpCardToken":{"type":"object","properties":{"type":{"type":"string","enum":["card_token"]},"token":{"type":"string","minLength":1,"maxLength":200,"description":"The single-use token from Tap's card form (`tok_…`)."},"save_card":{"default":true,"description":"Save the card for later top-ups and auto top-up (the first top-up does; default true).","type":"boolean"}},"required":["type","token"],"additionalProperties":false,"description":"A card entered in the card form."},"TopUpError":{"type":"object","properties":{"code":{"type":"string","description":"The error code (docs/23), e.g. `WAL-1204`."},"reference":{"type":"string"},"provider_code":{"description":"Tap's own code, as received.","type":["string","null"]},"provider_message":{"type":["string","null"]}},"required":["code","reference","provider_code","provider_message"],"additionalProperties":false},"TopUpList":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/TopUp"}},"next_cursor":{"type":["string","null"]}},"required":["data","next_cursor"],"additionalProperties":false,"description":"Newest first."},"TopUpSavedCard":{"type":"object","properties":{"type":{"type":"string","enum":["saved_card"]},"card_id":{"default":null,"description":"One of the saved cards; the default card when null or left out.","anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]}},"required":["type"],"additionalProperties":false,"description":"One of the organization's saved cards."},"TransferCall":{"type":"object","properties":{"space_id":{"type":"string","format":"uuid"},"membership_id":{"type":"string","format":"uuid"}},"additionalProperties":false,"description":"Exactly one of `space_id` and `membership_id`."},"TransferOwnership":{"type":"object","properties":{"membership_id":{"type":"string","format":"uuid","description":"The member who becomes the owner."}},"required":["membership_id"],"additionalProperties":false},"TrustedIssuer":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"issuer":{"type":"string","description":"The identity provider's issuer URL, compared exactly with each assertion's `iss`."},"created_at":{"type":"string","format":"date-time"}},"required":["id","issuer","created_at"],"additionalProperties":false},"TrustedIssuerAnswer":{"type":"object","properties":{"trusted_issuer":{"anyOf":[{"$ref":"#/components/schemas/TrustedIssuer"},{"type":"null"}]}},"required":["trusted_issuer"],"additionalProperties":false},"UndoTicketBatch":{"type":"object","properties":{"batch_id":{"type":"string","format":"uuid","description":"The `batch_id` of a bulk change’s answer."}},"required":["batch_id"],"additionalProperties":false},"UnreadTicketCount":{"type":"object","properties":{"tickets":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Your unread tickets: assigned to you or in your department spaces (never closed, Spam or deleted ones)."}},"required":["tickets"],"additionalProperties":false},"UpdateAiBlock":{"type":"object","properties":{"title":{"type":"string","minLength":1,"maxLength":200},"content_markdown":{"type":"string","maxLength":50000,"description":"Markdown: knowledge (facts, prices, policies) or instructions."},"always_include":{"type":"boolean"},"internal":{"description":"Guidance for the AI agent only, never revealed to a customer.","type":"boolean"},"active":{"type":"boolean"},"sort_order":{"type":"integer","minimum":0,"maximum":100000,"description":"The block's place in its level, lowest first."}},"additionalProperties":false},"UpdateApiKey":{"type":"object","properties":{"expires_at":{"description":"A new expiry (in the future); null: none. Absent: unchanged.","anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]}},"additionalProperties":false},"UpdateAppStoreChannel":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200}},"required":["name"],"additionalProperties":false},"UpdateCampaign":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":120},"segment_id":{"description":"The audience: a segment of contacts (docs/14).","anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"channel_id":{"description":"WhatsApp: the channel of the WhatsApp number it sends from.","anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"channel_address_id":{"description":"Email: one of the organization’s connected email addresses it sends from (`listCampaignSources`), through that mailbox’s own provider.","anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"phone_number_id":{"anyOf":[{"description":"Voice: the number it calls from (its id, or the number in E.164: its active number with it).","anyOf":[{"type":"string","format":"uuid"},{"type":"string","pattern":"^[+][1-9][0-9]{1,14}$"}]},{"type":"null"}]},"sender_name_id":{"description":"SMS: an approved promotional sender name (ending in `-AD`).","anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"scheduled_at":{"description":"When to send (in the future, `CAMP-6309`); null sends at launch. KSA sending hours still apply.","anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"content":{"anyOf":[{"$ref":"#/components/schemas/CampaignWhatsappContentInput"},{"$ref":"#/components/schemas/CampaignSmsContentInput"},{"$ref":"#/components/schemas/CampaignWhatsappWebContentInput"},{"$ref":"#/components/schemas/CampaignEmailContentInput"},{"$ref":"#/components/schemas/CampaignVoiceContentInput"}],"description":"The content of the campaign’s channel (the fields of another channel are refused with `API-8001`)."}},"additionalProperties":false},"UpdateCannedReply":{"type":"object","properties":{"title":{"type":"string","minLength":1,"maxLength":120},"body":{"type":"string","minLength":1,"maxLength":10000}},"additionalProperties":false},"UpdateCompany":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200},"logo_url":{"anyOf":[{"type":"string","maxLength":2048,"format":"uri","description":"An https URL.","example":"https://cdn.example.com/avatar.png"},{"type":"null"}]},"phone":{"description":"The company's phone number, read as E.164 like contacts' numbers.","anyOf":[{"type":"string","maxLength":40},{"type":"null"}]},"website":{"anyOf":[{"type":"string","maxLength":2048,"format":"uri","description":"The website, http or https.","example":"https://acme.sa"},{"type":"null"}]},"address":{"anyOf":[{"$ref":"#/components/schemas/CompanyAddress"},{"type":"null"}]},"industry":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}]},"owner_membership_id":{"description":"The account owner: the member responsible for this company.","anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]}},"additionalProperties":false,"description":"Only the fields sent change."},"UpdateContact":{"type":"object","properties":{"name":{"anyOf":[{"type":"string","minLength":1,"maxLength":200},{"type":"null"}]},"avatar_url":{"anyOf":[{"type":"string","maxLength":2048,"format":"uri","description":"An https URL.","example":"https://cdn.example.com/avatar.png"},{"type":"null"}]}},"additionalProperties":false,"description":"Only the fields sent change."},"UpdateEmailChannel":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200},"display_name":{"anyOf":[{"type":"string","minLength":1,"maxLength":200},{"type":"null"}],"description":"The sender name replies carry, e.g. \"Acme Support\"."},"smtp_host":{"type":"string","minLength":1,"maxLength":253,"description":"The SMTP server's host name, e.g. `smtp.yourprovider.com`."},"smtp_port":{"type":"integer","minimum":1,"maximum":65535,"description":"The SMTP port: 587 (STARTTLS), 465 (TLS), 25 or 2525."},"smtp_security":{"$ref":"#/components/schemas/SmtpSecurity"},"smtp_username":{"type":"string","minLength":1,"maxLength":320},"smtp_password":{"type":"string","minLength":1,"maxLength":1024,"description":"Kept in the token vault, never returned."},"imap_host":{"description":"The mailbox's IMAP server (with its login: `imap_username` and `imap_password`, else `smtp_password`); null stops reading the inbox (forwarding only).","anyOf":[{"type":"string","minLength":1,"maxLength":253,"description":"The mailbox's IMAP server, e.g. `imap.yourprovider.com`: Rabt then reads the inbox directly (no forwarding needed) with `imap_username` and `imap_password`, else the SMTP account, and imports its last 90 days. Leave it out to receive by forwarding only."},{"type":"null"}]},"imap_port":{"type":"integer","minimum":1,"maximum":65535,"description":"The IMAP port: 993 (TLS, the default) or 143 (STARTTLS)."},"imap_security":{"$ref":"#/components/schemas/SmtpSecurity"},"imap_username":{"description":"The IMAP login (with `imap_password`, both or neither): its own user name; `null` for both goes back to the SMTP account (needs `smtp_password`).","anyOf":[{"type":"string","minLength":1,"maxLength":320,"description":"The IMAP login's user name when it is not the SMTP account's. Send it with `imap_password`, both or neither."},{"type":"null"}]},"imap_password":{"anyOf":[{"type":"string","minLength":1,"maxLength":1024,"description":"The IMAP login's password, kept in the token vault, never returned. Send it with `imap_username`, both or neither."},{"type":"null"}]}},"additionalProperties":false},"UpdateEmbedSettings":{"type":"object","properties":{"enabled":{"type":"boolean"},"allowed_origins":{"description":"The whole list (it replaces the current one), at most 20; each written as an origin (`https://crm.example.com`): no path, query or wildcard (`AUTH-1107`).","maxItems":20,"type":"array","items":{"type":"string","maxLength":300}}},"additionalProperties":false},"UpdateFacebookChannel":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200}},"required":["name"],"additionalProperties":false},"UpdateGmailAddress":{"type":"object","properties":{"display_name":{"description":"The sender name replies from this address carry.","anyOf":[{"type":"string","minLength":1,"maxLength":200},{"type":"null"}]},"active":{"description":"Whether the address is on: a stopped address takes no mail (it stays in the mailbox) and is never a From; replies on its tickets leave from the mailbox's default active address. The mailbox keeps one active address (EM-3622).","type":"boolean"}},"additionalProperties":false},"UpdateGmailChannel":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200},"default_address_id":{"description":"The address replies leave from when the ticket has none of its own; it must be one Gmail may send as.","type":"string","format":"uuid"}},"additionalProperties":false},"UpdateGoogleBusinessChannel":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200}},"required":["name"],"additionalProperties":false},"UpdateGooglePlayChannel":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200},"package_names":{"maxItems":100,"type":"array","items":{"type":"string","maxLength":200,"pattern":"^[A-Za-z][A-Za-z0-9_]*(\\.[A-Za-z][A-Za-z0-9_]*)+$","description":"A package name, e.g. `com.example.app`."},"description":"Apps to add by package name, besides the ones Google’s Reporting API lists for the service account (for when that API is not enabled)."}},"additionalProperties":false},"UpdateInstagramChannel":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200}},"required":["name"],"additionalProperties":false},"UpdateMicrosoftAddress":{"type":"object","properties":{"display_name":{"description":"The sender name replies from this address carry.","anyOf":[{"type":"string","minLength":1,"maxLength":200},{"type":"null"}]},"assigned_membership_id":{"description":"The member whose tickets the address’s new mail becomes (null: none).","anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"active":{"description":"Whether the address is on: a stopped address takes no mail (it stays in the mailbox) and is never a From; replies on its tickets leave from the mailbox's default active address. The mailbox keeps one active address (EM-3622).","type":"boolean"}},"additionalProperties":false},"UpdateMicrosoftChannel":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200},"default_address_id":{"description":"The address replies without one of their own leave from.","type":"string","format":"uuid"}},"additionalProperties":false},"UpdateNote":{"type":"object","properties":{"body":{"type":"string","minLength":1,"maxLength":10000},"mentioned_membership_ids":{"maxItems":50,"type":"array","items":{"type":"string","format":"uuid"},"description":"The members (membership ids) mentioned in the note."}},"additionalProperties":false},"UpdateOAuthApp":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":100},"description":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}]},"homepage_url":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}]},"redirect_uris":{"minItems":1,"maxItems":10,"type":"array","items":{"type":"string","minLength":1,"maxLength":2000},"description":"Exact redirect URIs: https, http on a loopback address (any port), or a reverse domain name scheme of a native app."}},"additionalProperties":false},"UpdateOrganization":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":100},"default_locale":{"type":"string","enum":["ar","en"]},"timezone":{"type":"string","maxLength":64,"description":"An IANA time zone; times are shown in it.","example":"Asia/Riyadh"},"default_country":{"type":"string","minLength":2,"maxLength":2,"description":"ISO 3166-1 alpha-2, upper case: the default country of phone numbers.","example":"SA"}},"additionalProperties":false},"UpdatePhoneNumber":{"type":"object","properties":{"name":{"anyOf":[{"type":"string","minLength":1,"maxLength":100},{"type":"null"}]},"destination":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["all"]}},"required":["type"],"additionalProperties":false,"deprecated":true,"description":"Deprecated: All is no destination of a number; refused with `SPC-6222`."},{"type":"object","properties":{"type":{"type":"string","enum":["space"]},"space_id":{"type":"string","format":"uuid"}},"required":["type","space_id"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["member"]},"membership_id":{"type":"string","format":"uuid"}},"required":["type","membership_id"],"additionalProperties":false}],"deprecated":true,"description":"Deprecated: set a number’s destination with `setRoutingDestination` (`PUT /v1/routing/items/number/{id}/destination`, `spaces.manage`), as on the Spaces page. Still accepted and mapped onto it, with the same permission: one `space` or one `member`; `all` is refused (`SPC-6222`)."},"record_calls":{"type":"boolean"},"recording_notice":{"description":"Play “this call is recorded” to callers before ringing.","type":"boolean"},"voicemail_enabled":{"deprecated":true,"description":"Deprecated and ignored: voicemail is on for every number.","type":"boolean"},"ring_timeout_sec":{"deprecated":true,"description":"Deprecated and ignored: each member rings 20 seconds on every number.","type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"queue_timeout_sec":{"deprecated":true,"description":"Deprecated and ignored: a caller waits 90 seconds for a member on every number.","type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"lines":{"description":"Your own number’s lines: the calls its provider package carries at once. A Rabt number’s lines are set by the Rabt team (`VOI-4565`).","type":"integer","minimum":1,"maximum":10000}},"additionalProperties":false},"UpdatePhoneNumberAiAgent":{"type":"object","properties":{"enabled":{"type":"boolean","description":"The voice AI agent answers this number’s calls."}},"required":["enabled"],"additionalProperties":false,"description":"Turns the voice AI agent on or off for this number; until set, the number has the voice level’s value."},"UpdateRecordConnector":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200},"config":{"$ref":"#/components/schemas/RecordConnectorConfig"},"secrets":{"$ref":"#/components/schemas/RecordConnectorSecrets"},"sync_interval_minutes":{"type":"integer","minimum":15,"maximum":10080}},"additionalProperties":false},"UpdateSegment":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":120},"filter":{"$ref":"#/components/schemas/SegmentFilter"}},"additionalProperties":false,"description":"The parts to change; the filter is replaced whole."},"UpdateSmsSenderName":{"type":"object","properties":{"purpose":{"description":"Only while the name is pending (`SMS-4042` otherwise).","type":"string","minLength":1,"maxLength":1000},"is_default":{"description":"The default sender name of SMS from tickets and the API: an approved service name (`SMS-4023` otherwise).","type":"boolean"}},"additionalProperties":false},"UpdateSmsSettings":{"type":"object","properties":{"allowed_countries":{"description":"ISO 3166-1 alpha-2 countries SMS may go to (the destination allowlist against SMS pumping; `SMS-4033` for others).","minItems":1,"maxItems":250,"type":"array","items":{"type":"string","pattern":"^[A-Z]{2}$"}},"allowed_link_domains":{"description":"Domains links in SMS may point to, subdomains included (`SMS-4030` for others; `SMS-4044` for an invalid one).","maxItems":100,"type":"array","items":{"type":"string","minLength":1,"maxLength":253}}},"additionalProperties":false},"UpdateSpace":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":100},"description":{"type":"string","maxLength":2000,"description":"What the space handles; the AI agent routes by name and description."},"returning_customer_days":{"type":"integer","minimum":1,"maximum":365,"description":"A returning customer goes to the member of their last ticket within these days (default 30)."},"no_agent_message":{"anyOf":[{"type":"string","maxLength":4000},{"type":"null"}],"description":"The automatic reply when a ticket enters the queue and nobody is available; null or empty: none."}},"additionalProperties":false},"UpdateTicket":{"type":"object","properties":{"version":{"type":"integer","minimum":1,"maximum":9007199254740991,"description":"The version of the ticket the member edited: a newer one (a teammate changed it) answers `TKT-6104`."},"subject":{"description":"The ticket’s subject: every email of the ticket carries it, as it is. Empty or null clears it. Fixed once the ticket has an email (`subject_locked`, `TKT-6225`); never empty on an email ticket (`TKT-6226`).","anyOf":[{"type":"string","maxLength":500},{"type":"null"}]},"note":{"deprecated":true,"description":"Deprecated: the apps no longer show the ticket's free-text note; use an internal note (`POST /v1/tickets/{ticketId}/messages` with `mode: note`) or the customer's notes. Still accepted and returned (free text up to 100 characters; empty or null clears it).","anyOf":[{"type":"string","maxLength":100},{"type":"null"}]},"type":{"deprecated":true,"description":"Deprecated: use `note`. Taken as `note` when `note` is left out.","anyOf":[{"type":"string","maxLength":100},{"type":"null"}]},"priority":{"deprecated":true,"description":"Deprecated: accepted and ignored (no built-in priority; set a classification option instead, `classifications`). The ticket keeps the priority it has.","type":"string","enum":["low","normal","high"]},"classifications":{"type":"object","propertyNames":{"type":"string","format":"uuid"},"additionalProperties":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"description":"The option of each classification list, `{list_id: option_id}` (`GET /v1/ticket-classifications`); null clears a list, lists not named keep theirs. One option per list; an archived option or list is refused (`TKT-6234`, `TKT-6232`)."},"tags":{"maxItems":100,"type":"array","items":{"type":"string","maxLength":200},"description":"All the ticket’s tags by name (up to 20, each up to 50 characters: `TKT-6240`, `TKT-6239`): a new name becomes an organization tag on first use (`TKT-6241` past 10,000), the name of a merged tag adds the tag it went into, and the tags left out are removed. `[]` removes them all."},"company_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"ai_enabled":{"description":"Whether the AI agent may answer this conversation (on by default).","type":"boolean"}},"required":["version"],"additionalProperties":false,"description":"Only the fields sent change."},"UpdateTicketClassificationList":{"type":"object","properties":{"name":{"type":"string","maxLength":200,"description":"Up to 50 characters, trimmed with spaces collapsed (`TKT-6239`); unique ignoring case and Arabic spelling."},"archived":{"description":"`true` archives the list (it shows nowhere; its tickets keep their options); `false` brings it back (`TKT-6237` at the limit of 20 live lists).","type":"boolean"}},"additionalProperties":false,"description":"Only the fields sent change."},"UpdateTicketClassificationOption":{"type":"object","properties":{"name":{"type":"string","maxLength":200,"description":"Up to 50 characters, trimmed with spaces collapsed (`TKT-6239`); unique ignoring case and Arabic spelling."},"archived":{"description":"`true` archives the option (it stays on its tickets and is never picked again); `false` brings it back (`TKT-6238` at the limit of 100 live options).","type":"boolean"}},"additionalProperties":false,"description":"Only the fields sent change."},"UpdateTikTokChannel":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200}},"required":["name"],"additionalProperties":false},"UpdateVoiceAiAgent":{"type":"object","properties":{"enabled":{"description":"The agent answers inbound calls (off until an admin turns it on: every minute is paid).","type":"boolean"},"voice":{"description":"The voice the agent speaks with on calls: `female` or `male`.","type":"string","enum":["female","male"]},"kill_switch":{"description":"The organization’s one kill switch of the AI agent (the same as `PUT /v1/ai/agent`): on, it answers no call and replies in no conversation, and hands the calls and conversations it is in to the members within seconds, whatever the other switches say.","type":"boolean"}},"additionalProperties":false},"UpdateVoiceProviderConnection":{"type":"object","properties":{"name":{"anyOf":[{"type":"string","minLength":1,"maxLength":100},{"type":"null"}],"description":"What you call the connection; null shows its addresses."},"addresses":{"description":"The provider’s public IPv4 addresses or ranges (/24 or narrower), signaling and media in one list. Outbound calls go to its single addresses, in any order: the one that answers takes the call, the others on failure. Empty when the provider authenticates with your organization’s SIP credentials instead.","maxItems":16,"type":"array","items":{"anyOf":[{"type":"string","format":"ipv4"},{"type":"string","format":"cidrv4","pattern":"^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\\/([0-9]|[1-2][0-9]|3[0-2])$"}]}},"transport":{"type":"string","enum":["udp","tcp","tls"],"description":"The signaling transport to the provider: `udp` (default), `tcp` or `tls`."},"port":{"type":"integer","minimum":1,"maximum":65535,"description":"The provider’s SIP port (default 5060, 5061 for `tls`)."},"codecs":{"minItems":1,"maxItems":3,"type":"array","items":{"type":"string","enum":["PCMA","PCMU","G722"]},"description":"The codecs offered to the provider, in order (default `PCMA`, `PCMU`)."},"international_prefix":{"type":"string","pattern":"^[0-9]{2,4}$","description":"The international prefix read on numbers the provider sends nationally (default `00`). Rabt sends every number in E.164."},"country":{"type":"string","pattern":"^[A-Z]{2}$","description":"The country of national numbers (default `SA`)."},"from_domain":{"anyOf":[{"type":"string","minLength":4,"maxLength":253,"pattern":"^([a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?\\.)+[a-z]{2,63}$"},{"type":"null"}],"description":"Only if your provider requires its own domain in the From header; null uses Rabt’s Saudi SIP domain."},"max_channels":{"type":"integer","minimum":1,"maximum":10000,"description":"The concurrent calls your provider allows on this connection (default 30)."},"outbound_username":{"anyOf":[{"type":"string","pattern":"^[\\x21-\\x7e]{1,128}$"},{"type":"null"}],"description":"The username Rabt gives when your provider asks it to authenticate on outgoing calls; null when it does not."},"outbound_password":{"type":"string","pattern":"^[\\x21-\\x7e]{1,128}$","description":"The password for `outbound_username` (stored encrypted, never shown again)."},"enabled":{"description":"Off: calls from the provider to its numbers are refused and outbound calls stop.","type":"boolean"},"authentication":{"description":"How your provider and Rabt recognise each other (`address` or `registration`); changes only while no number is on the connection (VOI-4571).","type":"string","enum":["address","registration"]},"registrar":{"anyOf":[{"type":"string","maxLength":253,"pattern":"^(([a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?\\.)+[a-z]{2,63}|([0-9]{1,3}\\.){3}[0-9]{1,3})$"},{"type":"null"}],"description":"The provider’s registrar (host name or IPv4 address) for `registration`, reached on the connection’s port and transport; null for `address`. The accounts are registered in `from_domain`, else Rabt’s Saudi SIP domain, and its calls may name an account by its username."}},"additionalProperties":false},"UpdateVoiceSettings":{"type":"object","properties":{"international_calling_enabled":{"description":"Outbound calls abroad (off by default; premium ranges are always blocked).","type":"boolean"},"international_countries":{"description":"ISO 3166-1 alpha-2 countries allowed when international calling is on.","maxItems":250,"type":"array","items":{"type":"string","pattern":"^[A-Z]{2}$"}},"default_number_id":{"description":"The number outbound calls leave from when the ticket has none.","anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]}},"additionalProperties":false},"UpdateWebchatWidget":{"type":"object","properties":{"name":{"description":"The name visitors see in the widget header and members see in Rabt.","type":"string","minLength":1,"maxLength":100},"status":{"description":"`disabled` switches the widget off on every website.","type":"string","enum":["active","disabled"]},"header_color":{"type":"string","enum":["sidebar","teal","plum","sand"]},"pre_chat":{"type":"object","properties":{"enabled":{"description":"The pre-chat form: on, a visitor gives a name and an email or a mobile number before chatting.","type":"boolean"},"name":{"deprecated":true,"description":"Deprecated: accepted and ignored.","type":"string","enum":["hidden","optional","required"]},"email":{"deprecated":true,"description":"Deprecated: accepted and ignored.","type":"string","enum":["hidden","optional","required"]},"phone":{"deprecated":true,"description":"Deprecated: accepted and ignored.","type":"string","enum":["hidden","optional","required"]}},"additionalProperties":false},"privacy_policy_url":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"description":"Your privacy policy page (https), linked in the widget before a conversation starts (docs/08, PDPL); `null` or empty links the Rabt privacy policy. `WEB-4021` for an address that is not https."},"greeting":{"deprecated":true,"description":"Deprecated: accepted and ignored. The widget greets every visitor with a fixed text in their language.","type":"object","properties":{"ar":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}]},"en":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}]}},"additionalProperties":false},"business_name":{"deprecated":true,"description":"Deprecated: accepted and ignored. The widget has one name, `name`, which visitors see.","anyOf":[{"type":"string","maxLength":100},{"type":"null"}]},"allowed_domains":{"deprecated":true,"description":"Deprecated: accepted and ignored. A widget loads on any website.","maxItems":50,"type":"array","items":{"type":"string","maxLength":300}},"default_locale":{"deprecated":true,"description":"Deprecated: accepted and ignored. The widget follows the visitor’s browser language.","type":"string","enum":["ar","en"]},"position":{"deprecated":true,"description":"Deprecated: accepted and ignored. Bottom-left in Arabic, bottom-right in English.","type":"string","enum":["left","right"]}},"additionalProperties":false},"UpdateWebForm":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200},"enabled":{"description":"Off: the form’s address and its ready page answer `WEB-4025`.","type":"boolean"}},"additionalProperties":false},"UpdateWebhookEndpoint":{"type":"object","properties":{"url":{"type":"string","minLength":1,"maxLength":2000},"description":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}]},"event_types":{"minItems":1,"maxItems":1000,"type":"array","items":{"type":"string","minLength":1,"maxLength":100}},"enabled":{"description":"Disable or enable it; enabling also clears its count of failures.","type":"boolean"}},"additionalProperties":false},"UpdateWhatsappChannel":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200}},"required":["name"],"additionalProperties":false},"UpdateXChannel":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200}},"required":["name"],"additionalProperties":false},"UpdateYouTubeChannel":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200}},"required":["name"],"additionalProperties":false},"UpdateZohoMailAddress":{"type":"object","properties":{"display_name":{"description":"The sender name replies from this address carry.","anyOf":[{"type":"string","minLength":1,"maxLength":200},{"type":"null"}]},"active":{"description":"Whether the address is on: a stopped address takes no mail (it stays in the mailbox) and is never a From; replies on its tickets leave from the mailbox's default active address. The mailbox keeps one active address (EM-3622).","type":"boolean"}},"additionalProperties":false},"UpdateZohoMailChannel":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200},"default_address_id":{"description":"The address replies leave from when the ticket has none of its own; Zoho Mail must send from it.","type":"string","format":"uuid"}},"additionalProperties":false},"UploadRequest":{"type":"object","properties":{"file_name":{"type":"string","minLength":1,"maxLength":255},"mime_type":{"type":"string","maxLength":255,"pattern":"^[a-z0-9!#$&^_.+-]+\\/[a-z0-9!#$&^_.+-]+$"},"size":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Bytes."},"sha256":{"description":"The file's SHA-256 (hex). When the organization already holds this exact file, it is reused: the response has no upload and the file is already stored.","type":"string","pattern":"^[0-9a-f]{64}$"}},"required":["file_name","mime_type","size"],"additionalProperties":false},"UploadSmsSenderNameDocument":{"type":"object","properties":{"sender_name_id":{"type":"string","format":"uuid"},"kind":{"type":"string","enum":["commercial_registration","authorization_letter","trademark","other"]},"file_name":{"type":"string","minLength":1,"maxLength":255},"mime_type":{"type":"string","enum":["application/pdf","image/png","image/jpeg"]},"data":{"type":"string","maxLength":6990508,"format":"base64","contentEncoding":"base64","pattern":"^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$","description":"The file, base64 (PDF, PNG or JPEG, at most 5 MB)."}},"required":["sender_name_id","kind","file_name","mime_type","data"],"additionalProperties":false},"UrlFileRequest":{"type":"object","properties":{"url":{"type":"string","maxLength":2048,"format":"uri","description":"A public https address that opens the file itself (no sign-in): Rabt fetches it (at most 3 redirects, 20 seconds; TKT-6301, TKT-6302, TKT-6114)."},"ticket_id":{"description":"The ticket it is for; none: for a ticket not started yet (the first message’s `attachment_ids`).","anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"file_name":{"description":"Its name; default: the address’s last part.","type":"string","minLength":1,"maxLength":255},"mime_type":{"description":"Its type; default: the one the address answers with.","type":"string","maxLength":255,"pattern":"^[a-z0-9!#$&^_.+-]+\\/[a-z0-9!#$&^_.+-]+$"}},"required":["url"],"additionalProperties":false},"VoiceAiAgent":{"type":"object","properties":{"enabled":{"type":"boolean","description":"The agent answers inbound calls (default off)."},"voice":{"type":"string","enum":["female","male"],"description":"The voice the agent speaks with on calls (default `male`)."},"kill_switch":{"type":"boolean","description":"The organization stopped the AI agent on every call and channel (its one kill switch)."},"kill_switch_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"kill_switch_by_membership_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"balance_stopped":{"type":"boolean","description":"The agent is stopped because the wallet ran out (until a top-up)."},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]}},"required":["enabled","voice","kill_switch","kill_switch_at","kill_switch_by_membership_id","balance_stopped","updated_at"],"additionalProperties":false,"description":"The voice AI agent’s switch at the voice level (a number has it until the number’s own is set), its voice and the organization’s kill switch."},"VoiceDevice":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"membership_id":{"type":"string","format":"uuid"},"platform":{"type":"string","enum":["apns_voip","fcm"]},"environment":{"anyOf":[{"type":"string","enum":["production","sandbox"]},{"type":"null"}]},"label":{"type":["string","null"]},"last_woken_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"created_at":{"type":"string","format":"date-time"}},"required":["id","membership_id","platform","environment","label","last_woken_at","created_at"],"additionalProperties":false},"VoiceDeviceList":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/VoiceDevice"}}},"required":["data"],"additionalProperties":false},"VoiceProviderConnection":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"organization_id":{"type":"string","format":"uuid"},"name":{"type":["string","null"]},"addresses":{"type":"array","items":{"type":"string"}},"transport":{"type":"string","enum":["udp","tcp","tls"]},"port":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"codecs":{"type":"array","items":{"type":"string","enum":["PCMA","PCMU","G722"]}},"international_prefix":{"type":"string"},"country":{"type":"string"},"from_domain":{"type":["string","null"]},"max_channels":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"outbound_username":{"type":["string","null"]},"has_outbound_password":{"type":"boolean"},"outbound_address":{"type":["string","null"]},"enabled":{"type":"boolean"},"authentication":{"type":"string","enum":["address","registration"]},"registrar":{"type":["string","null"]},"registrations":{"type":"array","items":{"$ref":"#/components/schemas/VoiceProviderRegistration"},"description":"The accounts Rabt registers (connections by registration): one per username."},"status":{"type":"string","enum":["active","disabled","suspended"]},"suspended_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"suspension_reason":{"type":["string","null"]},"numbers":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Your numbers on this connection (not released)."},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}},"required":["id","organization_id","name","addresses","transport","port","codecs","international_prefix","country","from_domain","max_channels","outbound_username","has_outbound_password","outbound_address","enabled","authentication","registrar","registrations","status","suspended_at","suspension_reason","numbers","created_at","updated_at"],"additionalProperties":false},"VoiceProviderConnectionList":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/VoiceProviderConnection"}}},"required":["data"],"additionalProperties":false},"VoiceProviderRegistration":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"username":{"type":"string"},"numbers":{"type":"array","items":{"type":"string"},"description":"The own numbers on this account (E.164)."},"status":{"type":"string","enum":["pending","registered","failing"],"description":"`pending` until the voice node reports it, `registered`, or `failing` (with `sip_code`): while it fails its numbers receive no calls."},"sip_code":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}],"description":"The registrar’s last SIP answer while failing; null when it did not answer."},"status_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]}},"required":["id","username","numbers","status","sip_code","status_at"],"additionalProperties":false},"VoiceRegistrationCredentials":{"type":"object","properties":{"username":{"type":"string","pattern":"^[\\x21-\\x7e]{1,128}$","description":"The username your provider gave for this number."},"password":{"type":"string","pattern":"^[\\x21-\\x7e]{1,128}$","description":"Its password (stored encrypted, never shown again)."}},"required":["username","password"],"additionalProperties":false},"VoiceSettings":{"type":"object","properties":{"international_calling_enabled":{"type":"boolean"},"international_countries":{"type":"array","items":{"type":"string"}},"default_number_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"inbound_stopped":{"type":"boolean","description":"Inbound calls are refused before answer because the wallet ran out (until a top-up)."},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"platform_configured":{"type":"boolean","description":"Voice is set up on this Rabt (its SIP edge and call control). Without it no softphone or SIP client can register (`getSoftphoneCredentials` answers `SYS-1001`), so apps show no phone."}},"required":["international_calling_enabled","international_countries","default_number_id","inbound_stopped","updated_at","platform_configured"],"additionalProperties":false},"VoiceSipCredentials":{"type":"object","properties":{"username":{"type":"string"},"password":{"type":"string"},"realm":{"type":"string"},"generation":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["username","password","realm","generation"],"additionalProperties":false},"VoiceSipDetails":{"type":"object","properties":{"domain":{"description":"Rabt’s SIP domain (the Saudi domain when set, else the SIP domain).","type":["string","null"]},"sip_domain":{"description":"The voice nodes’ SIP domain.","type":["string","null"]},"saudi_domain":{"description":"Rabt’s Saudi SIP domain, when set.","type":["string","null"]},"addresses":{"maxItems":0,"type":"array","items":{"type":"string"},"deprecated":true,"description":"Deprecated, always empty: Rabt’s addresses are given only by the Rabt team, for a connection by address it makes on request."},"ports":{"type":"object","properties":{"udp":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"tcp":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"tls":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["udp","tcp","tls"],"additionalProperties":false},"transports":{"type":"array","items":{"type":"string","enum":["udp","tcp","tls"]}},"rtp":{"type":"object","properties":{"addresses":{"maxItems":0,"type":"array","items":{"type":"string"},"deprecated":true,"description":"Deprecated, always empty (as `addresses`)."},"port_from":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"port_to":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["addresses","port_from","port_to"],"additionalProperties":false},"codecs":{"type":"array","items":{"type":"string","enum":["PCMA","PCMU","G722"]}},"dtmf":{"type":"string","enum":["rfc2833"]}},"required":["domain","sip_domain","saudi_domain","addresses","ports","transports","rtp","codecs","dtmf"],"additionalProperties":false},"WalletBalance":{"type":"object","properties":{"currency":{"type":"string","enum":["SAR"]},"available_minor":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"The ledger balance: can be spent now."},"held_minor":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Set aside in active holds (a call in progress, the usage allowance)."},"total_minor":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"available + held: all of the organization's money."},"sequence":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"The number of transactions in the ledger."},"free_of_charge":{"type":"boolean","description":"The organization is free of charge (set by the Rabt team): every paid action runs at any balance and nothing is charged."}},"required":["currency","available_minor","held_minor","total_minor","sequence","free_of_charge"],"additionalProperties":false,"description":"The prepaid wallet (docs/10)."},"WalletReport":{"type":"object","properties":{"from":{"type":"string","format":"date-time"},"to":{"type":"string","format":"date-time"},"interval":{"type":"string","enum":["none","day","week","month"]},"group_by":{"type":"string"},"rows":{"type":"array","items":{"type":"object","properties":{"bucket":{"description":"The first date (YYYY-MM-DD, UTC) of the day, week or month; null without `interval`.","type":["string","null"]},"key":{"description":"The group’s key; null: the none bucket (no space, no member…), `group_by` none, or `other`.","type":["string","null"]},"name":{"description":"The space’s, member’s or campaign’s name; null otherwise.","type":["string","null"]},"other":{"type":"boolean","description":"The sum of the smaller groups of this bucket."},"transactions":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Transactions."},"amount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Halalas, signed (top-ups positive, debits negative), summed."},"net_amount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Debits’ price before VAT, halalas, summed."},"vat_amount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Debits’ VAT, halalas, summed."}},"required":["bucket","key","name","other","transactions","amount","net_amount","vat_amount"],"additionalProperties":false}}},"required":["from","to","interval","group_by","rows"],"additionalProperties":false,"description":"The wallet aggregate of a period. Rows: without `interval` one row per group (the 100 largest, the rest in one `other: true` row); with `interval` (`day`, `week` from Monday, `month`; UTC; `bucket` is its first date) every bucket, zeros included, or with `group_by` the 10 largest groups' rows of each bucket plus one `other: true` row summing the rest. Every metric adds up across rows."},"WalletTransaction":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"sequence":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Position in the organization's ledger: 1, 2, 3…"},"amount_minor":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Credits positive, debits negative. A usage debit or seat charge is minus `net_amount_minor` plus `vat_amount_minor`."},"net_amount_minor":{"description":"Usage debits and seat charges: the price before VAT; null before VAT was added at the debit and on other types.","anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Halalas (SAR minor units)."},{"type":"null"}]},"vat_amount_minor":{"description":"The VAT added at the debit.","anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Halalas (SAR minor units)."},{"type":"null"}]},"vat_rate_bps":{"description":"The VAT rate used, in basis points.","anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"reference":{"anyOf":[{"type":"object","properties":{"type":{"type":"string"},"id":{"type":"string"}},"required":["type","id"],"additionalProperties":false},{"type":"null"}],"description":"What it is for, e.g. a usage record or a top-up."},"actor":{"type":"object","properties":{"type":{"type":"string","enum":["system","member","platform"]},"membership_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]}},"required":["type","membership_id"],"additionalProperties":false},"reason":{"description":"A manual entry's description (shown to the customer).","type":["string","null"]},"description":{"$ref":"#/components/schemas/BilingualText"},"link":{"anyOf":[{"type":"string","format":"starts_with","pattern":"^\\/.*"},{"type":"null"}],"description":"The app page of what it is for (relative to the app's address): the ticket, campaign, top-up and its receipt voucher, or seats; null when there is none."},"manual_entry":{"anyOf":[{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"number":{"type":"string","description":"`MN-YYYY-NNNNNN`."},"direction":{"type":"string","enum":["credit","debit"]},"description":{"type":"string"},"external_reference":{"description":"E.g. a bank transfer number.","type":["string","null"]},"corrects_entry_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"description":"The entry this one corrects."}},"required":["id","number","direction","description","external_reference","corrects_entry_id"],"additionalProperties":false},{"type":"null"}],"description":"For an `adjustment`: the manual entry of the Rabt team it records (docs/10); null otherwise."},"occurred_at":{"type":"string","format":"date-time","description":"When the charged event happened."},"created_at":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["top_up","usage_debit","seat_charge","adjustment"]},"balance_after_minor":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"The wallet's money right after this movement (its total balance): each row's balance is the one before plus its amount."},"hold_id":{"type":"null","deprecated":true,"description":"Always null: holds are not shown to the organization."}},"required":["id","sequence","amount_minor","reference","actor","reason","description","link","manual_entry","occurred_at","created_at","type","balance_after_minor","hold_id"],"additionalProperties":false,"description":"One movement of the wallet: a top-up, usage, a seat charge or a manual entry. `description` says what it is for, in Arabic and English: the priced item, quantity and what it belongs to (ticket, campaign, phone number), the card and receipt voucher of a top-up, the month and seats of a seat charge, a manual entry's number and description."},"WalletTransactionPage":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/WalletTransaction"},"description":"Newest first."},"next_cursor":{"type":["string","null"]},"total":{"type":"integer","minimum":0,"maximum":10000,"description":"How many rows the list has with these filters, counted up to 10000."},"total_capped":{"type":"boolean","description":"The list has more than 10000 rows (`total` is 10000)."}},"required":["data","next_cursor","total","total_capped"],"additionalProperties":false},"WebchatWidget":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"key":{"type":"string","description":"The public key the embed snippet names (`rbw_…`)."},"name":{"type":"string"},"status":{"type":"string","enum":["active","disabled"]},"allowed_domains":{"maxItems":0,"type":"array","items":{"type":"string"},"deprecated":true,"description":"Deprecated, always empty: a widget loads on any website."},"business_name":{"type":"string","deprecated":true,"description":"Deprecated, always `name`."},"greeting":{"type":"object","properties":{"ar":{"type":"null"},"en":{"type":"null"}},"required":["ar","en"],"additionalProperties":false,"deprecated":true,"description":"Deprecated, always null: the widget greets every visitor with a fixed text in their language."},"default_locale":{"type":"string","deprecated":true,"description":"Deprecated, always `ar`: the widget follows the visitor’s browser language.","enum":["ar"]},"position":{"type":"string","deprecated":true,"description":"Deprecated, always `left`: bottom-left in Arabic, bottom-right in English.","enum":["left"]},"header_color":{"type":"string","enum":["sidebar","teal","plum","sand"]},"pre_chat":{"type":"object","properties":{"enabled":{"type":"boolean","description":"The pre-chat form: on, a visitor gives a name and an email or a mobile number before chatting."},"name":{"type":"string","deprecated":true,"description":"Deprecated, always `required`.","enum":["required"]},"email":{"type":"string","deprecated":true,"description":"Deprecated, always `optional` (an email or a mobile number is needed).","enum":["optional"]},"phone":{"type":"string","deprecated":true,"description":"Deprecated, always `optional` (an email or a mobile number is needed).","enum":["optional"]}},"required":["enabled","name","email","phone"],"additionalProperties":false},"privacy_policy_url":{"description":"The privacy policy set for the widget; null: the Rabt privacy policy is linked.","type":["string","null"]},"privacy_policy_links":{"type":"object","properties":{"ar":{"type":"string"},"en":{"type":"string"}},"required":["ar","en"],"additionalProperties":false,"description":"What visitors see linked before a conversation starts, in each language: `privacy_policy_url`, or the Rabt privacy policy."},"logo":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["image/png","image/jpeg","image/webp"]},"url":{"type":"string"}},"required":["type","url"],"additionalProperties":false},{"type":"null"}],"description":"Null: the business’s initials are shown."},"embed_snippet":{"type":"string","description":"The HTML to paste into the website."},"identity_verification":{"type":"boolean","description":"Whether an identity-verification secret was issued (`rotateWebchatWidgetSecret` issues the first one): signed-in users of the website can then be verified."},"identity_secret_hint":{"description":"The current secret's last 4 characters (`…abcd`), to recognize it; null without one or for one set before hints were kept.","type":["string","null"]},"identity_secret_rotated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"connection":{"type":"string","enum":["connected","not_connected"],"description":"`connected`: the widget is on and a visitor has opened it on a website; `not_connected`: it is off or not on a website yet."},"last_visitor_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"last_inbound_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"When a visitor’s last message came; null before the first one."},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}},"required":["id","key","name","status","allowed_domains","business_name","greeting","default_locale","position","header_color","pre_chat","privacy_policy_url","privacy_policy_links","logo","embed_snippet","identity_verification","connection","last_visitor_at","last_inbound_at","created_at","updated_at"],"additionalProperties":false},"WebchatWidgetCreated":{"type":"object","properties":{"widget":{"$ref":"#/components/schemas/WebchatWidget"},"identity_secret":{"deprecated":true,"description":"Deprecated: always `null`. A widget is created without an identity-verification secret; `rotateWebchatWidgetSecret` issues one on demand.","type":["string","null"]}},"required":["widget","identity_secret"],"additionalProperties":false},"WebchatWidgetList":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/WebchatWidget"}}},"required":["data"],"additionalProperties":false},"WebchatWidgetLogo":{"type":"object","properties":{"type":{"type":"string","enum":["image/png","image/jpeg","image/webp"]},"data":{"type":"string","maxLength":174764,"format":"base64","contentEncoding":"base64","pattern":"^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$","description":"The image, base64 (PNG, JPEG or WebP, at most 128 KB)."}},"required":["type","data"],"additionalProperties":false},"WebchatWidgetWithSecret":{"type":"object","properties":{"widget":{"$ref":"#/components/schemas/WebchatWidget"},"identity_secret":{"type":"string","description":"The identity-verification secret (`rbwis_…`) just issued, shown only now (`shown_once`). Your server signs each signed-in user’s identity token with it (a JWT, HS256: `sub`, `email`, `phone`, `iat`, `exp`, `jti`), passed as `rabt(\"identify\", { token })` on the page."},"shown_once":{"description":"True: the secret is in this answer, shown only now. A repeat with the same `Idempotency-Key` within 10 minutes answers it again; a later one is `API-8118` (rotate again for a new one).","type":"boolean"}},"required":["widget","identity_secret"],"additionalProperties":false},"WebForm":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"key":{"type":"string","description":"The form’s public key (`rbf_…`): it names the form in its address. Not a secret."},"enabled":{"type":"boolean"},"status":{"type":"string","enum":["active","disabled","disconnected"]},"endpoint_url":{"type":"string","description":"Where a website’s own form posts (`POST`, any website): JSON, `application/x-www-form-urlencoded` or `multipart/form-data` with the files in `attachments[]`. Fields: `name`, `email`, `subject`, `message` (required), `phone`, `company`, `website` (leave empty), `redirect_url` (https, on the website that posts the form; otherwise or none: Rabt’s thank-you page), `client_key`, `locale`."},"html_example":{"type":"string","description":"A form with the fixed field names, to copy."},"page_url":{"type":"string","description":"Rabt’s ready form on its own page: the link to share (`#l=en` or `#l=ar` for one language)."},"embed_snippet":{"type":"string","description":"The HTML that shows Rabt’s ready form where it is pasted, on any website."},"last_inbound_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"The last submission; null before the first."},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"disconnected_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]}},"required":["id","name","key","enabled","status","endpoint_url","html_example","page_url","embed_snippet","last_inbound_at","created_at","updated_at","disconnected_at"],"additionalProperties":false},"WebFormList":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/WebForm"}}},"required":["data"],"additionalProperties":false},"WebhookDelivery":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"Also the `webhook-id` header: `msg_<id>`."},"endpoint_id":{"type":"string","format":"uuid"},"event_id":{"type":"string","format":"uuid"},"event_type":{"type":"string"},"status":{"type":"string","enum":["pending","succeeded","failed"]},"attempts":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"last_attempt_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"last_response_status":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"last_error_code":{"type":["string","null"]},"delivered_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"created_at":{"type":"string","format":"date-time"}},"required":["id","endpoint_id","event_id","event_type","status","attempts","last_attempt_at","last_response_status","last_error_code","delivered_at","created_at"],"additionalProperties":false},"WebhookDeliveryDetail":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"Also the `webhook-id` header: `msg_<id>`."},"endpoint_id":{"type":"string","format":"uuid"},"event_id":{"type":"string","format":"uuid"},"event_type":{"type":"string"},"status":{"type":"string","enum":["pending","succeeded","failed"]},"attempts":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"last_attempt_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"last_response_status":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"last_error_code":{"type":["string","null"]},"delivered_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"created_at":{"type":"string","format":"date-time"},"payload":{"description":"The body sent on every attempt."},"attempt_log":{"type":"array","items":{"type":"object","properties":{"attempt":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"trigger":{"type":"string","enum":["automatic","manual"]},"status":{"type":"string","enum":["succeeded","failed"]},"response_status":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"response_body":{"description":"The start of the endpoint's answer (2 KiB).","type":["string","null"]},"error_code":{"type":["string","null"]},"error_reference":{"type":["string","null"]},"duration_ms":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"attempted_at":{"type":"string","format":"date-time"}},"required":["attempt","trigger","status","response_status","response_body","error_code","error_reference","duration_ms","attempted_at"],"additionalProperties":false}}},"required":["id","endpoint_id","event_id","event_type","status","attempts","last_attempt_at","last_response_status","last_error_code","delivered_at","created_at","payload","attempt_log"],"additionalProperties":false},"WebhookDeliveryPage":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/WebhookDelivery"},"description":"Newest first."},"next_cursor":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]}},"required":["data","next_cursor"],"additionalProperties":false},"WebhookEndpoint":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"url":{"type":"string"},"description":{"type":["string","null"]},"event_types":{"type":"array","items":{"type":"string"}},"status":{"type":"string","enum":["enabled","disabled"]},"disabled_reason":{"anyOf":[{"type":"string","enum":["manual","failing"]},{"type":"null"}],"description":"`failing`: Rabt disabled it after repeated failed deliveries."},"disabled_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"consecutive_failures":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"secret_hint":{"description":"The current secret's last 4 characters (`…abcd`), to recognize it; null without one or for one set before hints were kept.","type":["string","null"]},"secret_rotated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}},"required":["id","url","description","event_types","status","disabled_reason","disabled_at","consecutive_failures","created_at","updated_at"],"additionalProperties":false},"WebhookEndpointList":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/WebhookEndpointListItem"}}},"required":["data"],"additionalProperties":false},"WebhookEndpointListItem":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"url":{"type":"string"},"description":{"type":["string","null"]},"event_types":{"type":"array","items":{"type":"string"}},"status":{"type":"string","enum":["enabled","disabled"]},"disabled_reason":{"anyOf":[{"type":"string","enum":["manual","failing"]},{"type":"null"}],"description":"`failing`: Rabt disabled it after repeated failed deliveries."},"disabled_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"consecutive_failures":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"secret_hint":{"description":"The current secret's last 4 characters (`…abcd`), to recognize it; null without one or for one set before hints were kept.","type":["string","null"]},"secret_rotated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"last_delivery":{"description":"The newest delivery to the endpoint; null before the first.","anyOf":[{"$ref":"#/components/schemas/WebhookDelivery"},{"type":"null"}]}},"required":["id","url","description","event_types","status","disabled_reason","disabled_at","consecutive_failures","created_at","updated_at"],"additionalProperties":false},"WebhookEndpointWithSecret":{"type":"object","properties":{"endpoint":{"$ref":"#/components/schemas/WebhookEndpoint"},"secret":{"description":"The signing secret (`whsec_…`), shown only now (`shown_once`): verify `webhook-signature` with it (Standard Webhooks). Null when you sent your own (never echoed back).","type":["string","null"]},"shown_once":{"description":"True: the secret is in this answer, shown only now. A repeat with the same `Idempotency-Key` within 10 minutes answers it again; a later one is `API-8118` (rotate again for a new one).","type":"boolean"}},"required":["endpoint","secret"],"additionalProperties":false},"WebhookEventType":{"type":"object","properties":{"type":{"type":"string"},"module":{"type":"string"},"version":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"description":{"type":"string"},"description_ar":{"description":"The same text in Arabic.","type":"string"},"data_schema":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"description":"The JSON Schema of `data` in the delivered body."}},"required":["type","module","version","description","data_schema"],"additionalProperties":false},"WebhookEventTypeList":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/WebhookEventType"}}},"required":["data"],"additionalProperties":false},"WebhookTestEvent":{"type":"object","properties":{"event_type":{"type":"string","enum":["organization.ownership_transferred","membership.joined","membership.role_changed","membership.seat_changed","membership.removed","test_mode.cleared","webhook_endpoint.disabled","contact.created","contact.updated","contact.merged","contact.data_exported","contact.unmerged","company.created","company.updated","company.merged","company.unmerged","ticket.created","ticket.context_fetched","ticket.private_conversation_opened","ticket.status_changed","ticket.closed","ticket.reopened","ticket.assigned","ticket.updated","ticket.merged","ticket.moved","ticket.returned","ticket.queued","ticket_import.completed","message.created","message.status_changed","message.reaction_changed","message.channel_changed","message.edited","message.deleted","message.file_fetch_requested","message.files_downloaded","message.opened","message.mentioned","message.moderated","attachment.stored","attachment.scanned","attachment.processed","organization.billing_state_changed","organization.pricing_model_changed","segment.created","segment.updated","segment.deleted","crm_transfer.finished","invoice.finalized","invoice.einvoice_accepted","billing.profile_updated","wallet.low_balance","wallet.depleted","wallet.replenished","wallet.topped_up","wallet.top_up_failed","wallet.card_expiring","wallet.manual_entry_added","wallet.card_saved","wallet.card_deleted","wallet.default_card_changed","channel.connected","channel.updated","channel.status_changed","channel.disconnected","channel.sync_requested","channel.paused","channel.resumed","whatsapp.template_changed","whatsapp.template_status_changed","whatsapp.account_changed","channel.addresses_changed","channel.address_updated","email_signature.updated","email_layout.updated","import.progressed","review.received","review.updated","review.reply_changed","review.coverage_gap","review.polling_stalled","review.poll_requested","integration.connected","integration.updated","integration.status_changed","integration.connection_health_changed","integration.disconnected","integration.sync_requested","integration.sync_completed","integration.order_changed","integration.privacy_request","integration.record_changed","integration.connector_created","integration.connector_updated","integration.connector_status_changed","integration.connector_removed","integration.connector_sync_requested","integration.connector_sync_completed","integration.person_changed","integration.person_activated","integration.person_left","integration.department_mapping_changed","space.created","space.updated","space.archived","space.member_added","space.member_removed","space.channel_assigned","space.channel_unassigned","member.status_changed","member.reassign_changed","routing.limit_changed","routing.destination_changed","routing.customer_destination_changed","call.started","call.member_declined","call.answered","call.transferred","call.ended","call.ai_answered","call.ai_ended","call.transcript_added","call.recording_ready","phone_number.assigned","phone_number.updated","phone_number.suspended","phone_number.resumed","phone_number.released","voice.settings_updated","voice.velocity_alert","voice.trunk.created","voice.trunk.disabled","voice.trunk.enabled","voice.trunk.updated","voice.trunk.approved","voice.trunk.rejected","voice.platform_settings.updated","voice.provider.submitted","voice.provider.approved","voice.provider.rejected","voice.provider_connection.created","voice.provider_connection.updated","voice.provider_connection.removed","voice.provider_connection.suspended","voice.provider_connection.unsuspended","voice.provider_connection.disabled","voice.provider_connection.enabled","voice.provider_registration.changed","voice.sip_credentials.replaced","phone_number.added","canned_reply.created","canned_reply.updated","canned_reply.deleted","retention.policy.updated","store_review.access.set","store_review.access.disabled","store_review.access.window_changed","client_version.policy.set","organization.security_policy.updated","passkey_recovery.requested","passkey_recovery.decided","security_incident.recorded","security_incident.changed","security_incident.action_added","security_incident.notice_recorded","security_incident.closed","security_incident.deadline_alert","security.alert_raised","security.sensitive_access_recorded","platform.security_alert","chat.message.created","chat.incoming_webhook.created","chat.incoming_webhook.revoked","chat.message.updated","chat.message.deleted","chat.room.updated","chat.room.member_added","chat.room.member_removed","chat.attachment.scanned","webchat.widget.created","webchat.widget.updated","webchat.widget.secret_rotated","webchat.widget.deleted","sms.sender_name.requested","sms.sender_name.updated","sms.sender_name.document_added","sms.sender_name.document_removed","sms.sender_name.submitted","sms.sender_name.status_changed","sms.sender_name.suspended","sms.sender_name.suspension_lifted","sms.sender_name.complaint_logged","sms.opt_out.created","sms.opt_out.lifted","sms.settings.updated","sms.queued","sms.status_changed","sms.verified","platform.provider_balance.account_created","platform.provider_balance.account_updated","platform.provider_balance.account_archived","platform.provider_balance.recorded","platform.provider_balance.low","platform.provider_balance.burn_spike","platform.provider_balance.read_failed","ai_block.created","ai_block.updated","ai_block.archived","ai_block.file_added","ai_block.file_scanned","ai_block.file_removed","ai_settings.updated","ai_knowledge.embedding_failed","ai_agent.status_changed","ai_interaction.recorded","ai_agent.switch_changed","ai_knowledge.embedding_requested","campaign.created","campaign.updated","campaign.removed","campaign.launched","campaign.started","campaign.paused","campaign.resumed","campaign.cancelled","campaign.completed","campaign.recipient_changed","sender.quarantined","sender.released","sender.blocked","sender_block.created","sender_block.removed","spam_entry.created","spam_entry.removed","ticket.spam","ticket.not_spam","abuse_settings.updated","problem.detected","problem.spiking","problem.status_changed","problem.resolution_edited","problem.described","malware.detected","contact.erasure_requested","contact.erasure_withdrawn","contact.erasure_failed","contact.erased","organization.deletion_requested","organization.deletion_withdrawn","organization.deletion_failed","organization.deleted"],"description":"A public event type (`listWebhookEventTypes`); the endpoint need not be subscribed to it."}},"required":["event_type"],"additionalProperties":false},"WhatsappAccountEvent":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"channel_id":{"type":"string","format":"uuid"},"topic":{"type":"string","description":"`quality`, `messaging_limit`, `account`, `capability`, `template_status`, `template_quality`, `template_category`, `health` or `history`."},"event":{"type":"string","description":"Meta's event name, e.g. `FLAGGED`, `UPGRADE`."},"data":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"occurred_at":{"type":"string","format":"date-time"}},"required":["id","channel_id","topic","event","data","occurred_at"],"additionalProperties":false},"WhatsappAccountEventList":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/WhatsappAccountEvent"}},"total":{"type":"integer","minimum":0,"maximum":10000,"description":"How many rows the list has with these filters, counted up to 10000."},"total_capped":{"type":"boolean","description":"The list has more than 10000 rows (`total` is 10000)."}},"required":["data","total","total_capped"],"additionalProperties":false},"WhatsappChannel":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"status":{"type":"string","enum":["pending","active","needs_reauth","disconnected"]},"status_changed_at":{"type":"string","format":"date-time"},"last_error":{"anyOf":[{"$ref":"#/components/schemas/ChannelError"},{"type":"null"}]},"phone_number":{"type":"string","description":"E.164."},"display_phone_number":{"type":"string"},"phone_number_id":{"type":"string"},"waba_id":{"type":"string"},"business_id":{"type":["string","null"]},"verified_name":{"type":["string","null"]},"name_status":{"type":["string","null"]},"quality_rating":{"description":"`GREEN`, `YELLOW`, `RED` or `UNKNOWN`.","type":["string","null"]},"messaging_limit":{"description":"The business portfolio's messaging limit, e.g. `TIER_1K`.","type":["string","null"]},"throughput_level":{"type":["string","null"]},"coexistence":{"type":"boolean"},"registered_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"registration_error_code":{"type":["string","null"]},"health":{"anyOf":[{"$ref":"#/components/schemas/WhatsappHealth"},{"type":"null"}]},"sending_stopped":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"since":{"type":"string","format":"date-time"},"until":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"Meta's end of the restriction or its retry time; null: none given."},"reference":{"description":"The recorded error's reference, to look it up in the error log.","type":["string","null"]}},"required":["code","since","until","reference"],"additionalProperties":false},{"type":"null"}],"description":"Sending stopped after WhatsApp flagged spam or restricted the account. It resumes at `until`, when Meta lifts the restriction, when a health check finds the number available, or with `resumeWhatsappSending`."},"history":{"type":"object","properties":{"status":{"type":"string","enum":["not_requested","importing","imported","declined","failed"]},"progress":{"type":"number"},"imported_messages":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"error_code":{"type":["string","null"]}},"required":["status","progress","imported_messages","updated_at","error_code"],"additionalProperties":false},"templates_synced_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"granted_scopes":{"type":"array","items":{"type":"string"}},"last_inbound_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"connected_at":{"type":"string","format":"date-time"},"disconnected_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]}},"required":["id","name","status","status_changed_at","last_error","phone_number","display_phone_number","phone_number_id","waba_id","business_id","verified_name","name_status","quality_rating","messaging_limit","throughput_level","coexistence","registered_at","registration_error_code","health","sending_stopped","history","templates_synced_at","granted_scopes","last_inbound_at","connected_at","disconnected_at"],"additionalProperties":false},"WhatsappChannelList":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/WhatsappChannel"}}},"required":["data"],"additionalProperties":false},"WhatsappComposer":{"type":"object","properties":{"channel_type":{"type":"string","enum":["whatsapp"]},"channel_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"channel_status":{"type":["string","null"]},"composer":{"type":"string","enum":["chat"]},"window":{"type":"object","properties":{"open":{"type":"boolean","description":"The 24-hour customer service window is open."},"expires_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"When it closes: 24 hours after Meta's timestamp of the customer's last message."},"free_entry_point_until":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]}},"required":["open","expires_at","free_entry_point_until"],"additionalProperties":false},"free_form":{"type":"boolean","description":"Free-form content may be sent now; otherwise only an approved template."},"send":{"type":"object","properties":{"text":{"type":"boolean"},"media":{"type":"array","items":{"type":"string"}},"voice_note":{"type":"boolean"},"location":{"type":"boolean"},"contacts":{"type":"boolean"},"interactive":{"type":"boolean","description":"Reply buttons, lists, a web-address button and a location request."},"reaction":{"type":"boolean"},"template":{"type":"boolean"},"reply_context":{"type":"boolean"},"typing_indicator":{"type":"boolean"}},"required":["text","media","voice_note","location","contacts","interactive","reaction","template","reply_context","typing_indicator"],"additionalProperties":false},"limits":{"type":"object","properties":{"max_text_length":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"max_caption_length":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"files_per_message":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"interactive":{"type":"object","properties":{"body":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"header":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"footer":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"buttons":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"button_title":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"list_button":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"url":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"rows":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"row_title":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"row_description":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"id":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["body","header","footer","buttons","button_title","list_button","url","rows","row_title","row_description","id"],"additionalProperties":false,"description":"Interactive messages: counts and lengths in characters."},"media":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"object","properties":{"max_bytes":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"mime_types":{"type":"array","items":{"type":"string"}}},"required":["max_bytes","mime_types"],"additionalProperties":false}}},"required":["max_text_length","max_caption_length","files_per_message","interactive","media"],"additionalProperties":false},"blocked_code":{"description":"Why nothing can be sent now (catalog code), e.g. `WA-2103`; null otherwise.","type":["string","null"]},"templates":{"type":"array","items":{"$ref":"#/components/schemas/WhatsappTemplate"},"description":"The approved templates."}},"required":["channel_type","channel_id","channel_status","composer","window","free_form","send","limits","blocked_code","templates"],"additionalProperties":false,"description":"What the composer offers on a WhatsApp ticket (docs/channels/whatsapp.md): of the interactive messages, reply buttons, lists, a web-address button and a location request; product, catalog, payment and Flow messages are never sent from Rabt."},"WhatsappHealth":{"type":"object","properties":{"status":{"type":"string","enum":["available","limited","blocked","unknown"]},"checked_at":{"type":"string","format":"date-time"},"reasons":{"type":"array","items":{"type":"object","properties":{"entity":{"type":"string"},"code":{"type":["string","null"]},"description":{"type":"string"}},"required":["entity","code","description"],"additionalProperties":false}}},"required":["status","checked_at","reasons"],"additionalProperties":false,"description":"Meta's health status of the number: whether it can send messages now, and why not."},"WhatsappMediaRetry":{"type":"object","properties":{"message_id":{"type":"string","format":"uuid"},"missing_files":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991,"description":"The files to download again; they appear on the message as stored."}},"required":["message_id","missing_files"],"additionalProperties":false},"WhatsappSentMessage":{"type":"object","properties":{"message_id":{"type":"string","format":"uuid"},"duplicate":{"type":"boolean","description":"The client key was used before: its message."}},"required":["message_id","duplicate"],"additionalProperties":false},"WhatsappSignup":{"type":"object","properties":{"app_id":{"type":"string"},"config_id":{"type":"string"},"graph_api_version":{"type":"string"},"embedded_signup_version":{"type":"string"},"session_info_version":{"type":"string"},"feature_type":{"type":"string","description":"`whatsapp_business_app_onboarding` for coexistence, else empty."},"state":{"type":"string","description":"Send it back with the flow’s result (valid 30 minutes)."}},"required":["app_id","config_id","graph_api_version","embedded_signup_version","session_info_version","feature_type","state"],"additionalProperties":false,"description":"What the browser needs to run Meta's Embedded Signup v4 (`FB.login` with this configuration)."},"WhatsappTemplate":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"channel_id":{"type":"string","format":"uuid"},"external_id":{"type":"string","description":"Meta's template id."},"name":{"type":"string"},"language":{"type":"string"},"category":{"type":"string","description":"`marketing`, `utility` or `authentication`."},"status":{"type":"string","description":"`pending`, `approved`, `rejected`, `paused`, `disabled`…; only `approved` can be sent."},"status_reason":{"type":["string","null"]},"quality_score":{"type":["string","null"]},"pause_count":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"parameter_format":{"type":"string"},"components":{"type":"array","items":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"status_changed_at":{"type":"string","format":"date-time"},"synced_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"created_at":{"type":"string","format":"date-time"},"created_by_membership_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]}},"required":["id","channel_id","external_id","name","language","category","status","status_reason","quality_score","pause_count","parameter_format","components","status_changed_at","synced_at","created_at","created_by_membership_id"],"additionalProperties":false},"WhatsappTemplateList":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/WhatsappTemplate"}}},"required":["data"],"additionalProperties":false},"WhatsappWebChannel":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"status":{"type":"string","enum":["pending","active","needs_reauth","disconnected","error"],"description":"`pending` until the phone confirms the link; `needs_reauth` after WhatsApp ended the session (logged out on the phone, banned, replaced by another link): link it again."},"phone_number":{"description":"The linked number (E.164).","type":["string","null"]},"push_name":{"description":"The WhatsApp profile name.","type":["string","null"]},"platform":{"description":"The phone’s WhatsApp app.","type":["string","null"]},"linked_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"last_error":{"anyOf":[{"type":"object","properties":{"code":{"type":"string","description":"The catalog code, e.g. `APS-3701` or `GBP-3806`."},"reference":{"type":"string","description":"The error log reference."},"retryable":{"type":"boolean"},"provider":{"anyOf":[{"type":"object","properties":{"name":{"type":"string"},"code":{"type":["string","null"]},"message":{"type":["string","null"]}},"required":["name","code","message"],"additionalProperties":false},{"type":"null"}]},"occurred_at":{"type":"string"},"params":{"description":"The values the catalog’s texts name, e.g. `{ \"service\": \"WhatsApp\" }`.","anyOf":[{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}},{"type":"null"}]}},"required":["code","reference","retryable","provider","occurred_at"],"additionalProperties":false,"description":"An error kept on the item it stopped (docs/23)."},{"type":"null"}]},"created_at":{"type":"string","format":"date-time"}},"required":["id","name","status","phone_number","push_name","platform","linked_at","last_error","created_at"],"additionalProperties":false},"WhatsappWebChannelList":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/WhatsappWebChannel"}}},"required":["data"],"additionalProperties":false},"WhatsappWebLink":{"type":"object","properties":{"channel":{"$ref":"#/components/schemas/WhatsappWebChannel"},"state":{"type":"string","enum":["idle","waiting","linked","failed"],"description":"`waiting` for the phone (read again until `linked`), `failed` with `error_code` (`WAW-2502` expired: start again)."},"qr":{"description":"The QR code’s text (a `qr` link).","type":["string","null"]},"pairing_code":{"description":"The eight-character code to type on the phone (a `pairing` link).","type":["string","null"]},"expires_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"expires_in":{"description":"Whole seconds left of the attempt when this answer was made (from the server’s clock): a client counts down from it instead of comparing `expires_at` with its own clock.","anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"error_code":{"type":["string","null"]}},"required":["channel","state","qr","pairing_code","expires_at","error_code"],"additionalProperties":false},"WhatsappWebMessageDone":{"type":"object","properties":{"message_id":{"type":"string","format":"uuid"}},"required":["message_id"],"additionalProperties":false},"WhatsappWebSentMessage":{"type":"object","properties":{"message_id":{"type":"string","format":"uuid"},"duplicate":{"type":"boolean","description":"True when `client_key` was already sent."}},"required":["message_id","duplicate"],"additionalProperties":false},"WhatsappWebStatusPosted":{"type":"object","properties":{"status_id":{"type":"string"},"audience":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"How many of the organization’s WhatsApp contacts it was posted to."}},"required":["status_id","audience"],"additionalProperties":false},"WrittenExternalRecord":{"type":"object","properties":{"record":{"$ref":"#/components/schemas/ExternalRecord"},"change":{"type":"string","enum":["created","updated","deleted","unchanged"],"description":"What the call changed: `unchanged` when the record already held this (a repeated call) or the version sent is older than the stored one."}},"required":["record","change"],"additionalProperties":false},"XChannel":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"status":{"type":"string","enum":["pending","active","needs_reauth","disconnected"],"description":"`active`, `needs_reauth` (X refused the tokens or the account revoked Rabt: reconnect), `disconnected`."},"status_changed_at":{"type":"string","format":"date-time"},"account":{"type":"object","properties":{"user_id":{"type":"string","description":"The X account's user id."},"username":{"type":"string"},"display_name":{"type":"string"},"profile_image_url":{"type":["string","null"]}},"required":["user_id","username","display_name","profile_image_url"],"additionalProperties":false},"scopes":{"type":"array","items":{"type":"string"},"description":"The permissions X granted."},"delivery":{"type":"string","enum":["webhook"],"deprecated":true,"description":"Deprecated: always `webhook`. Events arrive by X Activity API webhooks only; Rabt never polls X (every read is billed). Read `webhook_health` for whether X delivers."},"webhook_health":{"anyOf":[{"type":"string","enum":["valid","degraded","disabled"]},{"type":"null"}],"description":"Whether X delivers this account’s events (checked hourly with calls X does not bill): `valid`; `degraded` (a subscription X lost is being recreated, X-3041); `disabled` (Rabt’s X webhook is unusable, X-3031: nothing arrives until it works again, then X resends the last 24 hours); null before the first subscription and while unsubscribed."},"subscribed":{"type":"boolean","description":"Subscribed to the X Activity API (false while paused or disconnected)."},"paused":{"anyOf":[{"type":"object","properties":{"at":{"type":"string","format":"date-time"},"reason":{"type":"string","enum":["balance","provider_account"]}},"required":["at","reason"],"additionalProperties":false},{"type":"null"}],"description":"Paused at zero balance (`balance`): nothing is received, read or sent (it would be billed) until a top-up resumes it; or (`provider_account`) the provider restricted the account, with the error in `last_error`."},"last_error":{"anyOf":[{"$ref":"#/components/schemas/XChannelError"},{"type":"null"}]},"last_inbound_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"sync_requested_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"deprecated":true,"description":"Deprecated: always null. Members no longer ask for a read: missed messages are read automatically (see `synced_at`)."},"synced_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"When missed messages were last read, from the saved cursor (paid reads): automatically after a reconnection, a top-up that resumed the channel, or X’s webhook working again after a long stop."},"capabilities":{"type":"object","properties":{"kinds":{"type":"array","items":{"type":"string","enum":["private","public"]}},"composer":{"type":"string","enum":["chat","email","none"]},"media":{"type":"array","items":{"type":"string"}},"max_attachment_bytes":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"text_limits":{"type":"object","properties":{"private":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}],"description":"Direct messages: none documented."},"public":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Public replies: a weighted length of at most 280 (a link counts 23, CJK and emoji 2)."}},"required":["private","public"],"additionalProperties":false},"public_actions":{"type":"array","items":{"type":"string"}},"statuses":{"type":"array","items":{"type":"string"}}},"required":["kinds","composer","media","max_attachment_bytes","text_limits","public_actions","statuses"],"additionalProperties":false,"description":"What the channel can do (the composer offers only these)."},"connected_at":{"type":"string","format":"date-time"},"disconnected_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]}},"required":["id","name","status","status_changed_at","account","scopes","delivery","webhook_health","subscribed","paused","last_error","last_inbound_at","sync_requested_at","synced_at","capabilities","connected_at","disconnected_at"],"additionalProperties":false},"XChannelError":{"type":"object","properties":{"code":{"type":"string"},"reference":{"type":"string"},"retryable":{"type":"boolean"},"provider":{"anyOf":[{"type":"object","properties":{"name":{"type":"string"},"code":{"type":["string","null"]},"message":{"type":["string","null"]}},"required":["name","code","message"],"additionalProperties":false},{"type":"null"}]},"occurred_at":{"type":"string"},"params":{"description":"The values the catalog’s texts name, e.g. `{ \"service\": \"WhatsApp\" }`.","anyOf":[{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}},{"type":"null"}]}},"required":["code","reference","retryable","provider","occurred_at"],"additionalProperties":false,"description":"Why the channel stopped working (docs/23)."},"XChannelList":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/XChannel"}}},"required":["data"],"additionalProperties":false},"XChatKeys":{"type":"object","properties":{"ticket_id":{"type":"string","format":"uuid"},"conversation_id":{"type":"string","description":"X’s conversation id."},"account_user_id":{"type":"string","description":"The connected account’s X user id: the identity to decrypt as."},"signing_key_version":{"type":"string","description":"The account’s newest registered key version: replies are signed with it."},"juicebox_config":{"type":"string","description":"The account’s X Chat key store settings (JSON, as X returns them, with the realms’ auth tokens): the X Chat XDK unlocks the account’s keys with them and the PIN, on the device. Keep it in memory only."},"signing_keys":{"type":"array","items":{"type":"object","properties":{"user_id":{"type":"string"},"public_key_version":{"type":"string"},"public_key":{"type":"string","description":"The signing public key (base64)."},"identity_public_key":{"type":"string","description":"The identity public key (base64)."},"identity_public_key_signature":{"type":"string"}},"required":["user_id","public_key_version","public_key","identity_public_key","identity_public_key_signature"],"additionalProperties":false},"description":"Both participants’ registered signing keys, every version X lists."}},"required":["ticket_id","conversation_id","account_user_id","signing_key_version","juicebox_config","signing_keys"],"additionalProperties":false,"description":"What a device needs to read and answer an X Chat conversation with the X Chat XDK: never a private key, a PIN or a text (X Chat’s key rules)."},"XChatMessage":{"type":"object","properties":{"message_id":{"type":"string","minLength":1,"maxLength":100},"encoded_message_create_event":{"type":"string","minLength":1,"maxLength":1000000},"encoded_message_event_signature":{"default":null,"anyOf":[{"type":"string","minLength":1,"maxLength":100000},{"type":"null"}]},"conversation_token":{"default":null,"anyOf":[{"type":"string","minLength":1,"maxLength":10000},{"type":"null"}]},"client_key":{"type":"string","pattern":"^[A-Za-z0-9._~-]{1,100}$"}},"required":["message_id","encoded_message_create_event"],"additionalProperties":false,"description":"An X Chat message encrypted and signed on the member’s device with the X Chat XDK: Rabt relays it as is and never sees its text (X Chat keys never leave the device)."},"XChatMessageQueued":{"type":"object","properties":{"message_id":{"type":"string","format":"uuid"},"ticket_id":{"type":"string","format":"uuid"},"duplicate":{"type":"boolean","description":"The same `client_key` was sent before: this is the message it created."}},"required":["message_id","ticket_id","duplicate"],"additionalProperties":false},"XConnectStart":{"type":"object","properties":{"authorization_url":{"type":"string","format":"uri","description":"X's consent page: open it in the member's browser. X sends the member back to Rabt's callback page with `state` and `code` (or `error`)."},"expires_at":{"type":"string","format":"date-time","description":"Finish connecting before this time."}},"required":["authorization_url","expires_at"],"additionalProperties":false},"XModeration":{"type":"object","properties":{"message_id":{"type":"string","format":"uuid"},"ticket_id":{"type":"string","format":"uuid"},"action":{"type":"string","enum":["hide","unhide","delete"]},"moderated_at":{"type":"string","format":"date-time"}},"required":["message_id","ticket_id","action","moderated_at"],"additionalProperties":false},"YouTubeChannel":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"status":{"$ref":"#/components/schemas/ChannelStatus"},"status_changed_at":{"type":"string","format":"date-time"},"last_error":{"anyOf":[{"$ref":"#/components/schemas/ChannelError"},{"type":"null"}]},"youtube_channel_id":{"type":"string","description":"The YouTube channel id (`UC…`)."},"handle":{"type":["string","null"]},"email":{"type":"string","description":"The Google account the channel was connected with."},"scopes":{"type":"array","items":{"type":"string"},"description":"The permissions the owner granted."},"api_version":{"type":["string","null"]},"token_expires_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"When the access token expires (an hour; Rabt renews it before)."},"address_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"description":"The channel’s address (docs/17: spaces take its tickets through it); null once disconnected."},"last_inbound_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"comments_synced_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"When the comments on the channel’s videos were last read."},"connected_by_membership_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"connected_at":{"type":"string","format":"date-time"},"disconnected_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"data_deletion_due_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"When the stored YouTube data (comment text, commenter names, pictures and channel ids) is removed, as YouTube’s developer policies require: 7 days after disconnecting, 30 days after Google refused the access (`needs_reauth`) unless the channel is reconnected first. The tickets and messages stay. Null while the channel works or once removed."},"data_deleted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"When the stored YouTube data was removed."}},"required":["id","name","status","status_changed_at","last_error","youtube_channel_id","handle","email","scopes","api_version","token_expires_at","address_id","last_inbound_at","comments_synced_at","connected_by_membership_id","connected_at","disconnected_at","data_deletion_due_at","data_deleted_at"],"additionalProperties":false},"YouTubeChannelList":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/YouTubeChannel"}},"configured":{"type":"boolean"}},"required":["data","configured"],"additionalProperties":false},"YouTubeCommentAction":{"type":"object","properties":{"action":{"type":"string","enum":["hide","unhide","delete"],"description":"`hide` holds the comment for review on YouTube, `unhide` publishes it again, `delete` removes it there (a customer’s comment is rejected, the channel’s own reply deleted). Rabt keeps its copy in the ticket either way."}},"required":["action"],"additionalProperties":false},"YouTubeCommentActionResult":{"type":"object","properties":{"message_id":{"type":"string","format":"uuid"},"ticket_id":{"type":"string","format":"uuid"},"action":{"type":"string","enum":["hide","unhide","delete"]}},"required":["message_id","ticket_id","action"],"additionalProperties":false},"YouTubeConnectStart":{"type":"object","properties":{"authorization_url":{"type":"string","format":"uri","description":"Google’s page where the channel owner signs in and approves Rabt (`youtube.force-ssl`); Google then sends them to Rabt’s callback page with `code` and `state`."},"expires_at":{"type":"string","format":"date-time","description":"The flow must finish before this time (10 minutes)."}},"required":["authorization_url","expires_at"],"additionalProperties":false},"YouTubeQuota":{"type":"object","properties":{"quota_day":{"type":"string","format":"date","description":"The quota day (the Pacific-time date; YouTube renews the quota at midnight)."},"organization_units":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Units your organization spent today."},"organization_limit":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Your organization’s daily share of units."},"project_units":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Units all organizations spent today."},"project_limit":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"The units YouTube gives Rabt’s project a day."}},"required":["quota_day","organization_units","organization_limit","project_units","project_limit"],"additionalProperties":false,"description":"The YouTube Data API quota of today: reading costs 1 unit a call, a reply, a hold for review and a deletion 50. A call over either limit is refused (`YT-3911`, `YT-3912`) until the quota renews."},"YouTubeReplyRules":{"type":"object","properties":{"applies":{"type":"boolean","description":"False for tickets of other channels (no rules)."},"open":{"type":"boolean","description":"Whether a reply may be sent now."},"max_text_length":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"max_files":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]}},"required":["applies","open","max_text_length","max_files"],"additionalProperties":false},"ZohoMailAuthorization":{"type":"object","properties":{"authorization_url":{"type":"string","format":"uri","description":"Where the member signs in with Zoho."},"state":{"type":"string","description":"The sign-in’s `state` (it starts with the organization id); Zoho sends it back with the code."},"expires_at":{"type":"string","format":"date-time","description":"The sign-in must be finished before this time."}},"required":["authorization_url","state","expires_at"],"additionalProperties":false},"ZohoMailChannel":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"address":{"type":"string","description":"The mailbox (its primary address)."},"data_center":{"type":"string","description":"The Zoho data centre of the mailbox: `sa`, `us`, `eu`, `in`…"},"status":{"type":"string","enum":["pending","active","needs_reauth","disconnected"],"description":"`active`, `needs_reauth` (Zoho refused the saved access: reconnect), or `disconnected`."},"status_changed_at":{"type":"string","format":"date-time"},"last_error":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"reference":{"type":"string"},"retryable":{"type":"boolean"},"provider":{"anyOf":[{"type":"object","properties":{"name":{"type":"string"},"code":{"type":["string","null"]},"message":{"type":["string","null"]}},"required":["name","code","message"],"additionalProperties":false},{"type":"null"}]},"occurred_at":{"type":"string"}},"required":["code","reference","retryable","provider","occurred_at"],"additionalProperties":false},{"type":"null"}]},"scopes":{"type":"array","items":{"type":"string"},"description":"The permissions Zoho granted."},"addresses":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"address":{"type":"string"},"display_name":{"type":["string","null"]},"is_default":{"type":"boolean"},"send_as_verified":{"type":"boolean","description":"Zoho Mail may send from it (the mailbox, an alias, a verified send-as)."},"active":{"type":"boolean","description":"On: its mail makes tickets and it is offered as a From; off: stopped."}},"required":["id","address","display_name","is_default","send_as_verified","active"],"additionalProperties":false}},"last_sync_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"The last good read of the mailbox."},"last_inbound_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"domain_check":{"anyOf":[{"type":"object","properties":{"domain":{"type":"string"},"checked_at":{"type":"string","format":"date-time"},"checks":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string","enum":["spf","dkim","dmarc","reverse_dns"]},"status":{"type":"string","enum":["pass","warning","fail","unknown"]},"finding":{"type":"string","enum":["spf_found","spf_missing","spf_multiple","spf_allows_all","dkim_aligned","dkim_unaligned","dkim_key_missing","dkim_not_signed","dkim_not_checked","dmarc_enforced","dmarc_monitor_only","dmarc_missing","reverse_dns_confirmed","reverse_dns_missing","reverse_dns_mismatch","lookup_failed"]},"name":{"type":"string"},"record":{"type":["string","null"]}},"required":["key","status","finding","name","record"],"additionalProperties":false}}},"required":["domain","checked_at","checks"],"additionalProperties":false},{"type":"null"}]},"connected_at":{"type":"string","format":"date-time"},"disconnected_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]}},"required":["id","name","address","data_center","status","status_changed_at","last_error","scopes","addresses","last_sync_at","last_inbound_at","domain_check","connected_at","disconnected_at"],"additionalProperties":false},"ZohoMailChannelList":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/ZohoMailChannel"}},"platform_configured":{"type":"boolean","description":"Whether Zoho is set up on this Rabt: false means a mailbox cannot be connected yet (the app hides \"Connect Zoho Mail\"; starting one answers `SYS-1001`)."}},"required":["data","platform_configured"],"additionalProperties":false}},"headers":{"RateLimit":{"description":"What is left of each quota this request counted against (IETF RateLimit header fields): `r` requests remaining, `t` seconds until the window ends, e.g. `\"client-ip\";r=5998;t=41, \"api-key\";r=598;t=41, \"organization\";r=2950;t=41`.","schema":{"type":"string"}},"RateLimit-Policy":{"description":"The quota policies this request counted against: `q` requests per window of `w` seconds. `client-ip` every request from the client address; then `api-key` per API key, `organization` per organization (all its members and keys), `account` per signed-in account outside any organization, or `anonymous` per client address for requests with none of them.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before trying again.","schema":{"type":"integer","minimum":1}}},"responses":{"Problem":{"description":"Any other error, with its code: e.g. `API-8005` the body is not valid JSON, `API-8006` the body is too large, `API-8007` the body is not JSON, `API-8008` no such endpoint, `API-8009` the request cannot be read, `API-8010` the request took too long, `API-8022` or `API-8023` the body compression or character set is not supported, `AUTH-1014` a change sent with the session cookie (or a sign-in) that does not come from a Rabt web page, `SYS-1002` or `SYS-1011` a dependency is unreachable, `SYS-1041` the organization is using its full share of the server, `SYS-1042` the server is overloaded (retry after `Retry-After`), `SYS-1070` Rabt is in read-only mode during an incident (changes are refused; reading works), `SYS-1071` a non-essential feature (search) is paused during an incident, `SYS-9000` an unexpected error.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"RateLimited":{"description":"`API-8004`: a rate limit quota is used up (see `RateLimit`). Try again after `Retry-After` seconds.","headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"},"Retry-After":{"$ref":"#/components/headers/Retry-After"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"ValidationFailed":{"description":"`API-8001`: some fields are missing or not valid. `details.fields` lists each invalid field with its own code (e.g. `API-8002` required, `API-8012` wrong format).","headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}}},"parameters":{"WebhookId":{"name":"webhook-id","in":"header","required":true,"description":"The delivery id: the same on every retry of one event, to deduplicate by.","schema":{"type":"string"}},"WebhookSignature":{"name":"webhook-signature","in":"header","required":true,"description":"`v1,<base64 HMAC-SHA256 of \"<webhook-id>.<webhook-timestamp>.<body>\">` with the endpoint's secret (`whsec_…`); several, separated by spaces, during a secret rotation.","schema":{"type":"string"}},"WebhookTimestamp":{"name":"webhook-timestamp","in":"header","required":true,"description":"When the delivery was signed (seconds since the epoch).","schema":{"type":"string"}}}},"webhooks":{"organization.ownership_transferred":{"post":{"summary":"organization.ownership_transferred","description":"The owner transferred the ownership to another member.","tags":["webhooks"],"x-rabt-module":"organization","parameters":[{"$ref":"#/components/parameters/WebhookId"},{"$ref":"#/components/parameters/WebhookTimestamp"},{"$ref":"#/components/parameters/WebhookSignature"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["type","version","timestamp","mode","data"],"properties":{"type":{"type":"string","enum":["organization.ownership_transferred"]},"version":{"type":"integer","enum":[1],"description":"The version of `data`; a breaking change is a new version."},"timestamp":{"type":"string","format":"date-time","description":"When the event happened (UTC)."},"mode":{"type":"string","enum":["live","test"],"description":"`test` for events of the API test space, `live` otherwise."},"data":{"type":"object","properties":{"organization_id":{"type":"string","format":"uuid","description":"The organization the event happened in."},"from_membership_id":{"type":"string","format":"uuid"},"to_membership_id":{"type":"string","format":"uuid"}},"required":["organization_id","from_membership_id","to_membership_id"],"additionalProperties":false}}}}}},"responses":{"2XX":{"description":"Received. Any other answer, or none within the delivery timeout, is retried with exponential backoff; deliveries can be replayed from the delivery log."}}}},"membership.joined":{"post":{"summary":"membership.joined","description":"Someone became a member: an invitation was accepted. `via: directory` appears in events from earlier releases only (the retired HR people directory).","tags":["webhooks"],"x-rabt-module":"members","parameters":[{"$ref":"#/components/parameters/WebhookId"},{"$ref":"#/components/parameters/WebhookTimestamp"},{"$ref":"#/components/parameters/WebhookSignature"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["type","version","timestamp","mode","data"],"properties":{"type":{"type":"string","enum":["membership.joined"]},"version":{"type":"integer","enum":[1],"description":"The version of `data`; a breaking change is a new version."},"timestamp":{"type":"string","format":"date-time","description":"When the event happened (UTC)."},"mode":{"type":"string","enum":["live","test"],"description":"`test` for events of the API test space, `live` otherwise."},"data":{"type":"object","properties":{"organization_id":{"type":"string","format":"uuid","description":"The organization the event happened in."},"membership_id":{"type":"string","format":"uuid"},"account_id":{"type":"string","format":"uuid"},"role_id":{"type":"string","format":"uuid"},"via":{"type":"string","enum":["organization_created","invitation","directory"]}},"required":["organization_id","membership_id","account_id","role_id","via"],"additionalProperties":false}}}}}},"responses":{"2XX":{"description":"Received. Any other answer, or none within the delivery timeout, is retried with exponential backoff; deliveries can be replayed from the delivery log."}}}},"membership.role_changed":{"post":{"summary":"membership.role_changed","description":"A member's role changed.","tags":["webhooks"],"x-rabt-module":"members","parameters":[{"$ref":"#/components/parameters/WebhookId"},{"$ref":"#/components/parameters/WebhookTimestamp"},{"$ref":"#/components/parameters/WebhookSignature"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["type","version","timestamp","mode","data"],"properties":{"type":{"type":"string","enum":["membership.role_changed"]},"version":{"type":"integer","enum":[1],"description":"The version of `data`; a breaking change is a new version."},"timestamp":{"type":"string","format":"date-time","description":"When the event happened (UTC)."},"mode":{"type":"string","enum":["live","test"],"description":"`test` for events of the API test space, `live` otherwise."},"data":{"type":"object","properties":{"organization_id":{"type":"string","format":"uuid","description":"The organization the event happened in."},"membership_id":{"type":"string","format":"uuid"},"from_role_id":{"type":"string","format":"uuid"},"to_role_id":{"type":"string","format":"uuid"}},"required":["organization_id","membership_id","from_role_id","to_role_id"],"additionalProperties":false}}}}}},"responses":{"2XX":{"description":"Received. Any other answer, or none within the delivery timeout, is retried with exponential backoff; deliveries can be replayed from the delivery log."}}}},"membership.seat_changed":{"post":{"summary":"membership.seat_changed","description":"A member's seat was deactivated or reactivated.","tags":["webhooks"],"x-rabt-module":"members","parameters":[{"$ref":"#/components/parameters/WebhookId"},{"$ref":"#/components/parameters/WebhookTimestamp"},{"$ref":"#/components/parameters/WebhookSignature"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["type","version","timestamp","mode","data"],"properties":{"type":{"type":"string","enum":["membership.seat_changed"]},"version":{"type":"integer","enum":[1],"description":"The version of `data`; a breaking change is a new version."},"timestamp":{"type":"string","format":"date-time","description":"When the event happened (UTC)."},"mode":{"type":"string","enum":["live","test"],"description":"`test` for events of the API test space, `live` otherwise."},"data":{"type":"object","properties":{"organization_id":{"type":"string","format":"uuid","description":"The organization the event happened in."},"membership_id":{"type":"string","format":"uuid"},"seat_state":{"type":"string","enum":["active","inactive"]}},"required":["organization_id","membership_id","seat_state"],"additionalProperties":false}}}}}},"responses":{"2XX":{"description":"Received. Any other answer, or none within the delivery timeout, is retried with exponential backoff; deliveries can be replayed from the delivery log."}}}},"membership.removed":{"post":{"summary":"membership.removed","description":"A member was removed from the organization.","tags":["webhooks"],"x-rabt-module":"members","parameters":[{"$ref":"#/components/parameters/WebhookId"},{"$ref":"#/components/parameters/WebhookTimestamp"},{"$ref":"#/components/parameters/WebhookSignature"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["type","version","timestamp","mode","data"],"properties":{"type":{"type":"string","enum":["membership.removed"]},"version":{"type":"integer","enum":[1],"description":"The version of `data`; a breaking change is a new version."},"timestamp":{"type":"string","format":"date-time","description":"When the event happened (UTC)."},"mode":{"type":"string","enum":["live","test"],"description":"`test` for events of the API test space, `live` otherwise."},"data":{"type":"object","properties":{"organization_id":{"type":"string","format":"uuid","description":"The organization the event happened in."},"membership_id":{"type":"string","format":"uuid"}},"required":["organization_id","membership_id"],"additionalProperties":false}}}}}},"responses":{"2XX":{"description":"Received. Any other answer, or none within the delivery timeout, is retried with exponential backoff; deliveries can be replayed from the delivery log."}}}},"test_mode.cleared":{"post":{"summary":"test_mode.cleared","description":"The organization's API test data was cleared: its test space was retired, and the next test request starts an empty one (OP04).","tags":["webhooks"],"x-rabt-module":"test_mode","parameters":[{"$ref":"#/components/parameters/WebhookId"},{"$ref":"#/components/parameters/WebhookTimestamp"},{"$ref":"#/components/parameters/WebhookSignature"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["type","version","timestamp","mode","data"],"properties":{"type":{"type":"string","enum":["test_mode.cleared"]},"version":{"type":"integer","enum":[1],"description":"The version of `data`; a breaking change is a new version."},"timestamp":{"type":"string","format":"date-time","description":"When the event happened (UTC)."},"mode":{"type":"string","enum":["live","test"],"description":"`test` for events of the API test space, `live` otherwise."},"data":{"type":"object","properties":{"organization_id":{"type":"string","format":"uuid","description":"The organization the event happened in."},"test_space_id":{"type":"string","format":"uuid"},"space_organization_id":{"type":"string","format":"uuid"},"cleared_by_membership_id":{"type":"string","format":"uuid"}},"required":["organization_id","test_space_id","space_organization_id","cleared_by_membership_id"],"additionalProperties":false}}}}}},"responses":{"2XX":{"description":"Received. Any other answer, or none within the delivery timeout, is retried with exponential backoff; deliveries can be replayed from the delivery log."}}}},"webhook_endpoint.disabled":{"post":{"summary":"webhook_endpoint.disabled","description":"Rabt disabled a webhook endpoint after 5 failed deliveries in a row (API-8145); nothing more is sent to it until it is enabled again (`update_webhook_endpoint` with `enabled: true`), then `redeliver_failed_webhooks` sends what failed. The disabled endpoint itself does not receive this event.","tags":["webhooks"],"x-rabt-module":"webhooks","parameters":[{"$ref":"#/components/parameters/WebhookId"},{"$ref":"#/components/parameters/WebhookTimestamp"},{"$ref":"#/components/parameters/WebhookSignature"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["type","version","timestamp","mode","data"],"properties":{"type":{"type":"string","enum":["webhook_endpoint.disabled"]},"version":{"type":"integer","enum":[1],"description":"The version of `data`; a breaking change is a new version."},"timestamp":{"type":"string","format":"date-time","description":"When the event happened (UTC)."},"mode":{"type":"string","enum":["live","test"],"description":"`test` for events of the API test space, `live` otherwise."},"data":{"type":"object","properties":{"organization_id":{"type":"string","format":"uuid","description":"The organization the event happened in."},"endpoint_id":{"type":"string","format":"uuid"},"failures":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["organization_id","endpoint_id","failures"],"additionalProperties":false}}}}}},"responses":{"2XX":{"description":"Received. Any other answer, or none within the delivery timeout, is retried with exponential backoff; deliveries can be replayed from the delivery log."}}}},"contact.created":{"post":{"summary":"contact.created","description":"A contact was created: by a first message or call on a channel, by a member, or by an import.","tags":["webhooks"],"x-rabt-module":"contacts","parameters":[{"$ref":"#/components/parameters/WebhookId"},{"$ref":"#/components/parameters/WebhookTimestamp"},{"$ref":"#/components/parameters/WebhookSignature"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["type","version","timestamp","mode","data"],"properties":{"type":{"type":"string","enum":["contact.created"]},"version":{"type":"integer","enum":[1],"description":"The version of `data`; a breaking change is a new version."},"timestamp":{"type":"string","format":"date-time","description":"When the event happened (UTC)."},"mode":{"type":"string","enum":["live","test"],"description":"`test` for events of the API test space, `live` otherwise."},"data":{"type":"object","properties":{"organization_id":{"type":"string","format":"uuid","description":"The organization the event happened in."},"contact_id":{"type":"string","format":"uuid"}},"required":["organization_id","contact_id"],"additionalProperties":false}}}}}},"responses":{"2XX":{"description":"Received. Any other answer, or none within the delivery timeout, is retried with exponential backoff; deliveries can be replayed from the delivery log."}}}},"contact.updated":{"post":{"summary":"contact.updated","description":"A contact changed: a field, a phone number or email address (a channel or import may add one), a company link, a note, a merge, an unmerge, a restore, or its deletion (read the contact for the values).","tags":["webhooks"],"x-rabt-module":"contacts","parameters":[{"$ref":"#/components/parameters/WebhookId"},{"$ref":"#/components/parameters/WebhookTimestamp"},{"$ref":"#/components/parameters/WebhookSignature"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["type","version","timestamp","mode","data"],"properties":{"type":{"type":"string","enum":["contact.updated"]},"version":{"type":"integer","enum":[1],"description":"The version of `data`; a breaking change is a new version."},"timestamp":{"type":"string","format":"date-time","description":"When the event happened (UTC)."},"mode":{"type":"string","enum":["live","test"],"description":"`test` for events of the API test space, `live` otherwise."},"data":{"type":"object","properties":{"organization_id":{"type":"string","format":"uuid","description":"The organization the event happened in."},"contact_id":{"type":"string","format":"uuid"},"change":{"type":"string","enum":["fields","note","deleted"],"description":"What changed: `fields` (a field, a phone number, an email address, a link, a domain, a merge or unmerge, a restore), `note`, or `deleted` (also merged away)."}},"required":["organization_id","contact_id","change"],"additionalProperties":false}}}}}},"responses":{"2XX":{"description":"Received. Any other answer, or none within the delivery timeout, is retried with exponential backoff; deliveries can be replayed from the delivery log."}}}},"contact.merged":{"post":{"summary":"contact.merged","description":"A secondary contact was merged into a primary one (it now points to the primary); the merge can be undone.","tags":["webhooks"],"x-rabt-module":"contacts","parameters":[{"$ref":"#/components/parameters/WebhookId"},{"$ref":"#/components/parameters/WebhookTimestamp"},{"$ref":"#/components/parameters/WebhookSignature"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["type","version","timestamp","mode","data"],"properties":{"type":{"type":"string","enum":["contact.merged"]},"version":{"type":"integer","enum":[1],"description":"The version of `data`; a breaking change is a new version."},"timestamp":{"type":"string","format":"date-time","description":"When the event happened (UTC)."},"mode":{"type":"string","enum":["live","test"],"description":"`test` for events of the API test space, `live` otherwise."},"data":{"type":"object","properties":{"organization_id":{"type":"string","format":"uuid","description":"The organization the event happened in."},"contact_merge_id":{"type":"string","format":"uuid"},"primary_contact_id":{"type":"string","format":"uuid"},"secondary_contact_id":{"type":"string","format":"uuid"}},"required":["organization_id","contact_merge_id","primary_contact_id","secondary_contact_id"],"additionalProperties":false}}}}}},"responses":{"2XX":{"description":"Received. Any other answer, or none within the delivery timeout, is retried with exponential backoff; deliveries can be replayed from the delivery log."}}}},"contact.data_exported":{"post":{"summary":"contact.data_exported","description":"All the data of one contact was exported in one file (the data-subject access copy, docs/08 PDPL), by the member named or through their API key or app.","tags":["webhooks"],"x-rabt-module":"contacts","parameters":[{"$ref":"#/components/parameters/WebhookId"},{"$ref":"#/components/parameters/WebhookTimestamp"},{"$ref":"#/components/parameters/WebhookSignature"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["type","version","timestamp","mode","data"],"properties":{"type":{"type":"string","enum":["contact.data_exported"]},"version":{"type":"integer","enum":[1],"description":"The version of `data`; a breaking change is a new version."},"timestamp":{"type":"string","format":"date-time","description":"When the event happened (UTC)."},"mode":{"type":"string","enum":["live","test"],"description":"`test` for events of the API test space, `live` otherwise."},"data":{"type":"object","properties":{"organization_id":{"type":"string","format":"uuid","description":"The organization the event happened in."},"contact_id":{"type":"string","format":"uuid"},"by_membership_id":{"type":"string","format":"uuid"}},"required":["organization_id","contact_id","by_membership_id"],"additionalProperties":false}}}}}},"responses":{"2XX":{"description":"Received. Any other answer, or none within the delivery timeout, is retried with exponential backoff; deliveries can be replayed from the delivery log."}}}},"contact.unmerged":{"post":{"summary":"contact.unmerged","description":"A contact merge was undone: the secondary contact is separate again.","tags":["webhooks"],"x-rabt-module":"contacts","parameters":[{"$ref":"#/components/parameters/WebhookId"},{"$ref":"#/components/parameters/WebhookTimestamp"},{"$ref":"#/components/parameters/WebhookSignature"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["type","version","timestamp","mode","data"],"properties":{"type":{"type":"string","enum":["contact.unmerged"]},"version":{"type":"integer","enum":[1],"description":"The version of `data`; a breaking change is a new version."},"timestamp":{"type":"string","format":"date-time","description":"When the event happened (UTC)."},"mode":{"type":"string","enum":["live","test"],"description":"`test` for events of the API test space, `live` otherwise."},"data":{"type":"object","properties":{"organization_id":{"type":"string","format":"uuid","description":"The organization the event happened in."},"contact_merge_id":{"type":"string","format":"uuid"},"primary_contact_id":{"type":"string","format":"uuid"},"secondary_contact_id":{"type":"string","format":"uuid"}},"required":["organization_id","contact_merge_id","primary_contact_id","secondary_contact_id"],"additionalProperties":false}}}}}},"responses":{"2XX":{"description":"Received. Any other answer, or none within the delivery timeout, is retried with exponential backoff; deliveries can be replayed from the delivery log."}}}},"company.created":{"post":{"summary":"company.created","description":"A company was created: by a member (`source` `member`: the app, the API, MCP, an import) or automatically from the email domain two contacts share (`automatic`).","tags":["webhooks"],"x-rabt-module":"companies","parameters":[{"$ref":"#/components/parameters/WebhookId"},{"$ref":"#/components/parameters/WebhookTimestamp"},{"$ref":"#/components/parameters/WebhookSignature"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["type","version","timestamp","mode","data"],"properties":{"type":{"type":"string","enum":["company.created"]},"version":{"type":"integer","enum":[1],"description":"The version of `data`; a breaking change is a new version."},"timestamp":{"type":"string","format":"date-time","description":"When the event happened (UTC)."},"mode":{"type":"string","enum":["live","test"],"description":"`test` for events of the API test space, `live` otherwise."},"data":{"type":"object","properties":{"organization_id":{"type":"string","format":"uuid","description":"The organization the event happened in."},"company_id":{"type":"string","format":"uuid"},"source":{"type":"string","enum":["member","automatic"],"description":"How the company came to be: `member` or `automatic` (by email domain)."}},"required":["organization_id","company_id","source"],"additionalProperties":false}}}}}},"responses":{"2XX":{"description":"Received. Any other answer, or none within the delivery timeout, is retried with exponential backoff; deliveries can be replayed from the delivery log."}}}},"company.updated":{"post":{"summary":"company.updated","description":"A company changed: a field, a domain, a note, a merge, an unmerge, a restore, or its deletion (read the company for the values).","tags":["webhooks"],"x-rabt-module":"companies","parameters":[{"$ref":"#/components/parameters/WebhookId"},{"$ref":"#/components/parameters/WebhookTimestamp"},{"$ref":"#/components/parameters/WebhookSignature"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["type","version","timestamp","mode","data"],"properties":{"type":{"type":"string","enum":["company.updated"]},"version":{"type":"integer","enum":[1],"description":"The version of `data`; a breaking change is a new version."},"timestamp":{"type":"string","format":"date-time","description":"When the event happened (UTC)."},"mode":{"type":"string","enum":["live","test"],"description":"`test` for events of the API test space, `live` otherwise."},"data":{"type":"object","properties":{"organization_id":{"type":"string","format":"uuid","description":"The organization the event happened in."},"company_id":{"type":"string","format":"uuid"},"change":{"type":"string","enum":["fields","note","deleted"],"description":"What changed: `fields` (a field, a phone number, an email address, a link, a domain, a merge or unmerge, a restore), `note`, or `deleted` (also merged away)."}},"required":["organization_id","company_id","change"],"additionalProperties":false}}}}}},"responses":{"2XX":{"description":"Received. Any other answer, or none within the delivery timeout, is retried with exponential backoff; deliveries can be replayed from the delivery log."}}}},"company.merged":{"post":{"summary":"company.merged","description":"A secondary company was merged into a primary one (it now points to the primary); the merge can be undone.","tags":["webhooks"],"x-rabt-module":"companies","parameters":[{"$ref":"#/components/parameters/WebhookId"},{"$ref":"#/components/parameters/WebhookTimestamp"},{"$ref":"#/components/parameters/WebhookSignature"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["type","version","timestamp","mode","data"],"properties":{"type":{"type":"string","enum":["company.merged"]},"version":{"type":"integer","enum":[1],"description":"The version of `data`; a breaking change is a new version."},"timestamp":{"type":"string","format":"date-time","description":"When the event happened (UTC)."},"mode":{"type":"string","enum":["live","test"],"description":"`test` for events of the API test space, `live` otherwise."},"data":{"type":"object","properties":{"organization_id":{"type":"string","format":"uuid","description":"The organization the event happened in."},"company_merge_id":{"type":"string","format":"uuid"},"primary_company_id":{"type":"string","format":"uuid"},"secondary_company_id":{"type":"string","format":"uuid"}},"required":["organization_id","company_merge_id","primary_company_id","secondary_company_id"],"additionalProperties":false}}}}}},"responses":{"2XX":{"description":"Received. Any other answer, or none within the delivery timeout, is retried with exponential backoff; deliveries can be replayed from the delivery log."}}}},"company.unmerged":{"post":{"summary":"company.unmerged","description":"A company merge was undone: the secondary company is separate again.","tags":["webhooks"],"x-rabt-module":"companies","parameters":[{"$ref":"#/components/parameters/WebhookId"},{"$ref":"#/components/parameters/WebhookTimestamp"},{"$ref":"#/components/parameters/WebhookSignature"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["type","version","timestamp","mode","data"],"properties":{"type":{"type":"string","enum":["company.unmerged"]},"version":{"type":"integer","enum":[1],"description":"The version of `data`; a breaking change is a new version."},"timestamp":{"type":"string","format":"date-time","description":"When the event happened (UTC)."},"mode":{"type":"string","enum":["live","test"],"description":"`test` for events of the API test space, `live` otherwise."},"data":{"type":"object","properties":{"organization_id":{"type":"string","format":"uuid","description":"The organization the event happened in."},"company_merge_id":{"type":"string","format":"uuid"},"primary_company_id":{"type":"string","format":"uuid"},"secondary_company_id":{"type":"string","format":"uuid"}},"required":["organization_id","company_merge_id","primary_company_id","secondary_company_id"],"additionalProperties":false}}}}}},"responses":{"2XX":{"description":"Received. Any other answer, or none within the delivery timeout, is retried with exponential backoff; deliveries can be replayed from the delivery log."}}}},"ticket.created":{"post":{"summary":"ticket.created","description":"A ticket was created, by a customer message or call or by a member; after a closed ticket, the new one names it.","tags":["webhooks"],"x-rabt-module":"tickets","parameters":[{"$ref":"#/components/parameters/WebhookId"},{"$ref":"#/components/parameters/WebhookTimestamp"},{"$ref":"#/components/parameters/WebhookSignature"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["type","version","timestamp","mode","data"],"properties":{"type":{"type":"string","enum":["ticket.created"]},"version":{"type":"integer","enum":[1],"description":"The version of `data`; a breaking change is a new version."},"timestamp":{"type":"string","format":"date-time","description":"When the event happened (UTC)."},"mode":{"type":"string","enum":["live","test"],"description":"`test` for events of the API test space, `live` otherwise."},"data":{"type":"object","properties":{"organization_id":{"type":"string","format":"uuid","description":"The organization the event happened in."},"ticket_id":{"type":"string","format":"uuid"},"number":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991,"description":"The ticket number, sequential per organization."},"contact_id":{"type":"string","format":"uuid"},"channel_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"space_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"kind":{"type":"string","enum":["private","public"]},"previous_ticket_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]}},"required":["organization_id","ticket_id","number","contact_id","channel_id","space_id","kind","previous_ticket_id"],"additionalProperties":false}}}}}},"responses":{"2XX":{"description":"Received. Any other answer, or none within the delivery timeout, is retried with exponential backoff; deliveries can be replayed from the delivery log."}}}},"ticket.context_fetched":{"post":{"summary":"ticket.context_fetched","description":"The thread a public ticket answers (the post at its top and the replies leading to the customer) was read once from its channel and kept, or could not be read; read it with GET /v1/tickets/{ticket_id}/context.","tags":["webhooks"],"x-rabt-module":"tickets","parameters":[{"$ref":"#/components/parameters/WebhookId"},{"$ref":"#/components/parameters/WebhookTimestamp"},{"$ref":"#/components/parameters/WebhookSignature"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["type","version","timestamp","mode","data"],"properties":{"type":{"type":"string","enum":["ticket.context_fetched"]},"version":{"type":"integer","enum":[1],"description":"The version of `data`; a breaking change is a new version."},"timestamp":{"type":"string","format":"date-time","description":"When the event happened (UTC)."},"mode":{"type":"string","enum":["live","test"],"description":"`test` for events of the API test space, `live` otherwise."},"data":{"type":"object","properties":{"organization_id":{"type":"string","format":"uuid","description":"The organization the event happened in."},"ticket_id":{"type":"string","format":"uuid"},"number":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991,"description":"The ticket number, sequential per organization."},"status":{"type":"string","enum":["fetched","failed"]},"items":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"How many posts and replies were kept."}},"required":["organization_id","ticket_id","number","status","items"],"additionalProperties":false}}}}}},"responses":{"2XX":{"description":"Received. Any other answer, or none within the delivery timeout, is retried with exponential backoff; deliveries can be replayed from the delivery log."}}}},"ticket.private_conversation_opened":{"post":{"summary":"ticket.private_conversation_opened","description":"A public ticket moved to a private conversation with its author: their open private ticket on the same account, or a new one (`created`); a timeline note in each links the two.","tags":["webhooks"],"x-rabt-module":"tickets","parameters":[{"$ref":"#/components/parameters/WebhookId"},{"$ref":"#/components/parameters/WebhookTimestamp"},{"$ref":"#/components/parameters/WebhookSignature"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["type","version","timestamp","mode","data"],"properties":{"type":{"type":"string","enum":["ticket.private_conversation_opened"]},"version":{"type":"integer","enum":[1],"description":"The version of `data`; a breaking change is a new version."},"timestamp":{"type":"string","format":"date-time","description":"When the event happened (UTC)."},"mode":{"type":"string","enum":["live","test"],"description":"`test` for events of the API test space, `live` otherwise."},"data":{"type":"object","properties":{"organization_id":{"type":"string","format":"uuid","description":"The organization the event happened in."},"ticket_id":{"type":"string","format":"uuid"},"number":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991,"description":"The ticket number, sequential per organization."},"private_ticket_id":{"type":"string","format":"uuid"},"private_number":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991,"description":"The ticket number, sequential per organization."},"created":{"type":"boolean"},"via":{"type":"string","enum":["private_reply","direct_message"]},"membership_id":{"type":"string","format":"uuid"}},"required":["organization_id","ticket_id","number","private_ticket_id","private_number","created","via","membership_id"],"additionalProperties":false}}}}}},"responses":{"2XX":{"description":"Received. Any other answer, or none within the delivery timeout, is retried with exponential backoff; deliveries can be replayed from the delivery log."}}}},"ticket.status_changed":{"post":{"summary":"ticket.status_changed","description":"A ticket moved along open, in progress and closed (a closed ticket reopens when the customer writes again or a member reopens it).","tags":["webhooks"],"x-rabt-module":"tickets","parameters":[{"$ref":"#/components/parameters/WebhookId"},{"$ref":"#/components/parameters/WebhookTimestamp"},{"$ref":"#/components/parameters/WebhookSignature"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["type","version","timestamp","mode","data"],"properties":{"type":{"type":"string","enum":["ticket.status_changed"]},"version":{"type":"integer","enum":[1],"description":"The version of `data`; a breaking change is a new version."},"timestamp":{"type":"string","format":"date-time","description":"When the event happened (UTC)."},"mode":{"type":"string","enum":["live","test"],"description":"`test` for events of the API test space, `live` otherwise."},"data":{"type":"object","properties":{"organization_id":{"type":"string","format":"uuid","description":"The organization the event happened in."},"ticket_id":{"type":"string","format":"uuid"},"number":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991,"description":"The ticket number, sequential per organization."},"previous_status":{"type":"string","enum":["open","in_progress","closed"]},"status":{"type":"string","enum":["open","in_progress","closed"]},"close_reason":{"anyOf":[{"type":"string","enum":["member","auto"]},{"type":"null"}]}},"required":["organization_id","ticket_id","number","previous_status","status","close_reason"],"additionalProperties":false}}}}}},"responses":{"2XX":{"description":"Received. Any other answer, or none within the delivery timeout, is retried with exponential backoff; deliveries can be replayed from the delivery log."}}}},"ticket.closed":{"post":{"summary":"ticket.closed","description":"A ticket was closed by a member (or by merging it into another ticket). It reopens if the customer writes again within 7 days. `close_reason` `auto` appears only for tickets closed before auto-close was removed.","tags":["webhooks"],"x-rabt-module":"tickets","parameters":[{"$ref":"#/components/parameters/WebhookId"},{"$ref":"#/components/parameters/WebhookTimestamp"},{"$ref":"#/components/parameters/WebhookSignature"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["type","version","timestamp","mode","data"],"properties":{"type":{"type":"string","enum":["ticket.closed"]},"version":{"type":"integer","enum":[1],"description":"The version of `data`; a breaking change is a new version."},"timestamp":{"type":"string","format":"date-time","description":"When the event happened (UTC)."},"mode":{"type":"string","enum":["live","test"],"description":"`test` for events of the API test space, `live` otherwise."},"data":{"type":"object","properties":{"organization_id":{"type":"string","format":"uuid","description":"The organization the event happened in."},"ticket_id":{"type":"string","format":"uuid"},"number":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991,"description":"The ticket number, sequential per organization."},"close_reason":{"type":"string","enum":["member","auto"]}},"required":["organization_id","ticket_id","number","close_reason"],"additionalProperties":false}}}}}},"responses":{"2XX":{"description":"Received. Any other answer, or none within the delivery timeout, is retried with exponential backoff; deliveries can be replayed from the delivery log."}}}},"ticket.reopened":{"post":{"summary":"ticket.reopened","description":"A closed ticket was reopened (status open): the customer wrote again on any channel, or a member reopened it. It keeps its assignee when that member is still active and available, otherwise it waits in its space queue for the automatic distribution.","tags":["webhooks"],"x-rabt-module":"tickets","parameters":[{"$ref":"#/components/parameters/WebhookId"},{"$ref":"#/components/parameters/WebhookTimestamp"},{"$ref":"#/components/parameters/WebhookSignature"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["type","version","timestamp","mode","data"],"properties":{"type":{"type":"string","enum":["ticket.reopened"]},"version":{"type":"integer","enum":[1],"description":"The version of `data`; a breaking change is a new version."},"timestamp":{"type":"string","format":"date-time","description":"When the event happened (UTC)."},"mode":{"type":"string","enum":["live","test"],"description":"`test` for events of the API test space, `live` otherwise."},"data":{"type":"object","properties":{"organization_id":{"type":"string","format":"uuid","description":"The organization the event happened in."},"ticket_id":{"type":"string","format":"uuid"},"number":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991,"description":"The ticket number, sequential per organization."},"reopened_by":{"type":"string","enum":["customer","member"]},"reopened_by_membership_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"space_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"assignee_membership_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"previous_close_reason":{"anyOf":[{"type":"string","enum":["member","auto"]},{"type":"null"}]}},"required":["organization_id","ticket_id","number","reopened_by","reopened_by_membership_id","space_id","assignee_membership_id","previous_close_reason"],"additionalProperties":false}}}}}},"responses":{"2XX":{"description":"Received. Any other answer, or none within the delivery timeout, is retried with exponential backoff; deliveries can be replayed from the delivery log."}}}},"ticket.assigned":{"post":{"summary":"ticket.assigned","description":"A ticket got an assignee, automatically or by hand, with the reason.","tags":["webhooks"],"x-rabt-module":"tickets","parameters":[{"$ref":"#/components/parameters/WebhookId"},{"$ref":"#/components/parameters/WebhookTimestamp"},{"$ref":"#/components/parameters/WebhookSignature"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["type","version","timestamp","mode","data"],"properties":{"type":{"type":"string","enum":["ticket.assigned"]},"version":{"type":"integer","enum":[1],"description":"The version of `data`; a breaking change is a new version."},"timestamp":{"type":"string","format":"date-time","description":"When the event happened (UTC)."},"mode":{"type":"string","enum":["live","test"],"description":"`test` for events of the API test space, `live` otherwise."},"data":{"type":"object","properties":{"organization_id":{"type":"string","format":"uuid","description":"The organization the event happened in."},"ticket_id":{"type":"string","format":"uuid"},"number":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991,"description":"The ticket number, sequential per organization."},"space_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"assignee_membership_id":{"type":"string","format":"uuid"},"previous_assignee_membership_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"reason":{"type":"string","enum":["returning_customer","fewest_open_tickets","queue","manual","email_address","address_route"]},"assigned_by_membership_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]}},"required":["organization_id","ticket_id","number","space_id","assignee_membership_id","previous_assignee_membership_id","reason","assigned_by_membership_id"],"additionalProperties":false}}}}}},"responses":{"2XX":{"description":"Received. Any other answer, or none within the delivery timeout, is retried with exponential backoff; deliveries can be replayed from the delivery log."}}}},"ticket.updated":{"post":{"summary":"ticket.updated","description":"A ticket's subject, note, priority, classifications, tags, company or AI switch changed; `version` is its new version, `tags` and `classifications` the ticket's after the change. `changed` names `type` with `note` (its deprecated alias) until the next version.","tags":["webhooks"],"x-rabt-module":"tickets","parameters":[{"$ref":"#/components/parameters/WebhookId"},{"$ref":"#/components/parameters/WebhookTimestamp"},{"$ref":"#/components/parameters/WebhookSignature"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["type","version","timestamp","mode","data"],"properties":{"type":{"type":"string","enum":["ticket.updated"]},"version":{"type":"integer","enum":[1],"description":"The version of `data`; a breaking change is a new version."},"timestamp":{"type":"string","format":"date-time","description":"When the event happened (UTC)."},"mode":{"type":"string","enum":["live","test"],"description":"`test` for events of the API test space, `live` otherwise."},"data":{"type":"object","properties":{"organization_id":{"type":"string","format":"uuid","description":"The organization the event happened in."},"ticket_id":{"type":"string","format":"uuid"},"number":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991,"description":"The ticket number, sequential per organization."},"version":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"changed":{"minItems":1,"type":"array","items":{"type":"string","enum":["subject","type","priority","custom_fields","company","ai_enabled","note","classifications","tags"]}},"membership_id":{"type":"string","format":"uuid"},"tags":{"description":"The ticket's tags after the change, by their names when the delivery was made (absent in events recorded before).","type":"array","items":{"type":"string","minLength":1}},"classifications":{"description":"The ticket's option of each classification list after the change, with the names when the delivery was made (absent in events recorded before).","type":"array","items":{"type":"object","properties":{"list_id":{"type":"string","format":"uuid"},"list_name":{"type":"string","minLength":1},"option_id":{"type":"string","format":"uuid"},"option_name":{"type":"string","minLength":1}},"required":["list_id","list_name","option_id","option_name"],"additionalProperties":false}}},"required":["organization_id","ticket_id","number","version","changed","membership_id"],"additionalProperties":false}}}}}},"responses":{"2XX":{"description":"Received. Any other answer, or none within the delivery timeout, is retried with exponential backoff; deliveries can be replayed from the delivery log."}}}},"ticket.merged":{"post":{"summary":"ticket.merged","description":"A ticket was merged into another of the same contact: its messages moved there and it was closed.","tags":["webhooks"],"x-rabt-module":"tickets","parameters":[{"$ref":"#/components/parameters/WebhookId"},{"$ref":"#/components/parameters/WebhookTimestamp"},{"$ref":"#/components/parameters/WebhookSignature"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["type","version","timestamp","mode","data"],"properties":{"type":{"type":"string","enum":["ticket.merged"]},"version":{"type":"integer","enum":[1],"description":"The version of `data`; a breaking change is a new version."},"timestamp":{"type":"string","format":"date-time","description":"When the event happened (UTC)."},"mode":{"type":"string","enum":["live","test"],"description":"`test` for events of the API test space, `live` otherwise."},"data":{"type":"object","properties":{"organization_id":{"type":"string","format":"uuid","description":"The organization the event happened in."},"ticket_id":{"type":"string","format":"uuid"},"number":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991,"description":"The ticket number, sequential per organization."},"merged_ticket_id":{"type":"string","format":"uuid"},"merged_number":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991,"description":"The ticket number, sequential per organization."},"membership_id":{"type":"string","format":"uuid"}},"required":["organization_id","ticket_id","number","merged_ticket_id","merged_number","membership_id"],"additionalProperties":false}}}}}},"responses":{"2XX":{"description":"Received. Any other answer, or none within the delivery timeout, is retried with exponential backoff; deliveries can be replayed from the delivery log."}}}},"ticket.moved":{"post":{"summary":"ticket.moved","description":"A ticket moved to another space, where it waits for the automatic distribution, or to a member (`to_space_id` null: their My space, followed by `ticket.assigned`); its assignee was cleared unless its space was archived.","tags":["webhooks"],"x-rabt-module":"tickets","parameters":[{"$ref":"#/components/parameters/WebhookId"},{"$ref":"#/components/parameters/WebhookTimestamp"},{"$ref":"#/components/parameters/WebhookSignature"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["type","version","timestamp","mode","data"],"properties":{"type":{"type":"string","enum":["ticket.moved"]},"version":{"type":"integer","enum":[1],"description":"The version of `data`; a breaking change is a new version."},"timestamp":{"type":"string","format":"date-time","description":"When the event happened (UTC)."},"mode":{"type":"string","enum":["live","test"],"description":"`test` for events of the API test space, `live` otherwise."},"data":{"type":"object","properties":{"organization_id":{"type":"string","format":"uuid","description":"The organization the event happened in."},"ticket_id":{"type":"string","format":"uuid"},"number":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991,"description":"The ticket number, sequential per organization."},"from_space_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"to_space_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"moved_by_membership_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]}},"required":["organization_id","ticket_id","number","from_space_id","to_space_id","moved_by_membership_id"],"additionalProperties":false}}}}}},"responses":{"2XX":{"description":"Received. Any other answer, or none within the delivery timeout, is retried with exponential backoff; deliveries can be replayed from the delivery log."}}}},"ticket.returned":{"post":{"summary":"ticket.returned","description":"The open ticket of a member whose membership ended with no destination chosen (a deleted account) returned to its space, routed again as new (`reason` `member_removed`; `away` in earlier deliveries only). `space_id` null: the All space.","tags":["webhooks"],"x-rabt-module":"tickets","parameters":[{"$ref":"#/components/parameters/WebhookId"},{"$ref":"#/components/parameters/WebhookTimestamp"},{"$ref":"#/components/parameters/WebhookSignature"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["type","version","timestamp","mode","data"],"properties":{"type":{"type":"string","enum":["ticket.returned"]},"version":{"type":"integer","enum":[1],"description":"The version of `data`; a breaking change is a new version."},"timestamp":{"type":"string","format":"date-time","description":"When the event happened (UTC)."},"mode":{"type":"string","enum":["live","test"],"description":"`test` for events of the API test space, `live` otherwise."},"data":{"type":"object","properties":{"organization_id":{"type":"string","format":"uuid","description":"The organization the event happened in."},"ticket_id":{"type":"string","format":"uuid"},"number":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991,"description":"The ticket number, sequential per organization."},"space_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"from_membership_id":{"type":"string","format":"uuid"},"reason":{"type":"string","enum":["away","member_removed"]}},"required":["organization_id","ticket_id","number","space_id","from_membership_id","reason"],"additionalProperties":false}}}}}},"responses":{"2XX":{"description":"Received. Any other answer, or none within the delivery timeout, is retried with exponential backoff; deliveries can be replayed from the delivery log."}}}},"ticket.queued":{"post":{"summary":"ticket.queued","description":"A ticket waits in its space's queue: nobody available under their limit could take it (no_member_available: nobody in the space is available at all).","tags":["webhooks"],"x-rabt-module":"tickets","parameters":[{"$ref":"#/components/parameters/WebhookId"},{"$ref":"#/components/parameters/WebhookTimestamp"},{"$ref":"#/components/parameters/WebhookSignature"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["type","version","timestamp","mode","data"],"properties":{"type":{"type":"string","enum":["ticket.queued"]},"version":{"type":"integer","enum":[1],"description":"The version of `data`; a breaking change is a new version."},"timestamp":{"type":"string","format":"date-time","description":"When the event happened (UTC)."},"mode":{"type":"string","enum":["live","test"],"description":"`test` for events of the API test space, `live` otherwise."},"data":{"type":"object","properties":{"organization_id":{"type":"string","format":"uuid","description":"The organization the event happened in."},"ticket_id":{"type":"string","format":"uuid"},"number":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991,"description":"The ticket number, sequential per organization."},"space_id":{"type":"string","format":"uuid"},"no_member_available":{"type":"boolean"}},"required":["organization_id","ticket_id","number","space_id","no_member_available"],"additionalProperties":false}}}}}},"responses":{"2XX":{"description":"Received. Any other answer, or none within the delivery timeout, is retried with exponential backoff; deliveries can be replayed from the delivery log."}}}},"ticket_import.completed":{"post":{"summary":"ticket_import.completed","description":"A ticket import batch from another help desk was completed: how many tickets it created, updated and found unchanged, the items it added and the attachments still being fetched. Imported tickets send no `ticket.created` or `message.created`; read them with `GET /v1/tickets`.","tags":["webhooks"],"x-rabt-module":"tickets","parameters":[{"$ref":"#/components/parameters/WebhookId"},{"$ref":"#/components/parameters/WebhookTimestamp"},{"$ref":"#/components/parameters/WebhookSignature"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["type","version","timestamp","mode","data"],"properties":{"type":{"type":"string","enum":["ticket_import.completed"]},"version":{"type":"integer","enum":[1],"description":"The version of `data`; a breaking change is a new version."},"timestamp":{"type":"string","format":"date-time","description":"When the event happened (UTC)."},"mode":{"type":"string","enum":["live","test"],"description":"`test` for events of the API test space, `live` otherwise."},"data":{"type":"object","properties":{"organization_id":{"type":"string","format":"uuid","description":"The organization the event happened in."},"import_id":{"type":"string","format":"uuid"},"source":{"type":"string","enum":["zendesk","intercom","freshdesk","zoho_desk","front","hubspot","help_scout","gorgias","csv","rabt","other"]},"mode":{"type":"string","enum":["sample","full"]},"tickets_created":{"type":"integer","minimum":0,"maximum":9007199254740991},"tickets_updated":{"type":"integer","minimum":0,"maximum":9007199254740991},"tickets_unchanged":{"type":"integer","minimum":0,"maximum":9007199254740991},"items_created":{"type":"integer","minimum":0,"maximum":9007199254740991},"attachments_pending":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["organization_id","import_id","source","mode","tickets_created","tickets_updated","tickets_unchanged","items_created","attachments_pending"],"additionalProperties":false}}}}}},"responses":{"2XX":{"description":"Received. Any other answer, or none within the delivery timeout, is retried with exponential backoff; deliveries can be replayed from the delivery log."}}}},"message.created":{"post":{"summary":"message.created","description":"A message was added to a ticket: from the customer, a member reply, an internal note, the AI agent or the system. Read it with `GET /v1/messages/{message_id}`.","tags":["webhooks"],"x-rabt-module":"tickets","parameters":[{"$ref":"#/components/parameters/WebhookId"},{"$ref":"#/components/parameters/WebhookTimestamp"},{"$ref":"#/components/parameters/WebhookSignature"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["type","version","timestamp","mode","data"],"properties":{"type":{"type":"string","enum":["message.created"]},"version":{"type":"integer","enum":[1],"description":"The version of `data`; a breaking change is a new version."},"timestamp":{"type":"string","format":"date-time","description":"When the event happened (UTC)."},"mode":{"type":"string","enum":["live","test"],"description":"`test` for events of the API test space, `live` otherwise."},"data":{"type":"object","properties":{"organization_id":{"type":"string","format":"uuid","description":"The organization the event happened in."},"message_id":{"type":"string","format":"uuid"},"ticket_id":{"type":"string","format":"uuid"},"direction":{"type":"string","enum":["inbound","outbound"]},"sender_type":{"type":"string","enum":["contact","member","bot","system"]},"sender_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"is_internal_note":{"type":"boolean"}},"required":["organization_id","message_id","ticket_id","direction","sender_type","sender_id","is_internal_note"],"additionalProperties":false}}}}}},"responses":{"2XX":{"description":"Received. Any other answer, or none within the delivery timeout, is retried with exponential backoff; deliveries can be replayed from the delivery log."}}}},"message.status_changed":{"post":{"summary":"message.status_changed","description":"A message to the customer moved along queued, sending, sent, delivered and read, or failed (with its error code).","tags":["webhooks"],"x-rabt-module":"tickets","parameters":[{"$ref":"#/components/parameters/WebhookId"},{"$ref":"#/components/parameters/WebhookTimestamp"},{"$ref":"#/components/parameters/WebhookSignature"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["type","version","timestamp","mode","data"],"properties":{"type":{"type":"string","enum":["message.status_changed"]},"version":{"type":"integer","enum":[1],"description":"The version of `data`; a breaking change is a new version."},"timestamp":{"type":"string","format":"date-time","description":"When the event happened (UTC)."},"mode":{"type":"string","enum":["live","test"],"description":"`test` for events of the API test space, `live` otherwise."},"data":{"type":"object","properties":{"organization_id":{"type":"string","format":"uuid","description":"The organization the event happened in."},"message_id":{"type":"string","format":"uuid"},"ticket_id":{"type":"string","format":"uuid"},"previous_status":{"type":"string","enum":["received","queued","sending","sent","delivered","read","failed"]},"status":{"type":"string","enum":["received","queued","sending","sent","delivered","read","failed"]},"error_code":{"type":["string","null"]}},"required":["organization_id","message_id","ticket_id","previous_status","status","error_code"],"additionalProperties":false}}}}}},"responses":{"2XX":{"description":"Received. Any other answer, or none within the delivery timeout, is retried with exponential backoff; deliveries can be replayed from the delivery log."}}}},"message.reaction_changed":{"post":{"summary":"message.reaction_changed","description":"The customer reacted to a message, changed the reaction or removed it (null).","tags":["webhooks"],"x-rabt-module":"tickets","parameters":[{"$ref":"#/components/parameters/WebhookId"},{"$ref":"#/components/parameters/WebhookTimestamp"},{"$ref":"#/components/parameters/WebhookSignature"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["type","version","timestamp","mode","data"],"properties":{"type":{"type":"string","enum":["message.reaction_changed"]},"version":{"type":"integer","enum":[1],"description":"The version of `data`; a breaking change is a new version."},"timestamp":{"type":"string","format":"date-time","description":"When the event happened (UTC)."},"mode":{"type":"string","enum":["live","test"],"description":"`test` for events of the API test space, `live` otherwise."},"data":{"type":"object","properties":{"organization_id":{"type":"string","format":"uuid","description":"The organization the event happened in."},"message_id":{"type":"string","format":"uuid"},"ticket_id":{"type":"string","format":"uuid"},"contact_id":{"type":"string","format":"uuid"},"emoji":{"type":["string","null"]}},"required":["organization_id","message_id","ticket_id","contact_id","emoji"],"additionalProperties":false}}}}}},"responses":{"2XX":{"description":"Received. Any other answer, or none within the delivery timeout, is retried with exponential backoff; deliveries can be replayed from the delivery log."}}}},"message.channel_changed":{"post":{"summary":"message.channel_changed","description":"A message changed on its channel: the customer edited it (details in `message.edited`), a public item (a Facebook or TikTok comment) was hidden, unhidden, deleted, liked or unliked there (a deletion also in `message.deleted`), the business reacted to a customer message, changed its reaction (`reacted`) or removed it (`unreacted`; the reaction is the message’s `business_reaction`), by a member through Rabt (`by_membership_id`) or on the platform, or the customer played a voice note (`played`), or the one private reply to a comment was sent (`private_reply_sent`). Rabt keeps its copy.","tags":["webhooks"],"x-rabt-module":"tickets","parameters":[{"$ref":"#/components/parameters/WebhookId"},{"$ref":"#/components/parameters/WebhookTimestamp"},{"$ref":"#/components/parameters/WebhookSignature"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["type","version","timestamp","mode","data"],"properties":{"type":{"type":"string","enum":["message.channel_changed"]},"version":{"type":"integer","enum":[1],"description":"The version of `data`; a breaking change is a new version."},"timestamp":{"type":"string","format":"date-time","description":"When the event happened (UTC)."},"mode":{"type":"string","enum":["live","test"],"description":"`test` for events of the API test space, `live` otherwise."},"data":{"type":"object","properties":{"organization_id":{"type":"string","format":"uuid","description":"The organization the event happened in."},"message_id":{"type":"string","format":"uuid"},"ticket_id":{"type":"string","format":"uuid"},"change":{"type":"string","enum":["edited","hidden","unhidden","deleted","liked","unliked","reacted","unreacted","played","private_reply_sent","poll_voted"]},"by_membership_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]}},"required":["organization_id","message_id","ticket_id","change","by_membership_id"],"additionalProperties":false}}}}}},"responses":{"2XX":{"description":"Received. Any other answer, or none within the delivery timeout, is retried with exponential backoff; deliveries can be replayed from the delivery log."}}}},"message.edited":{"post":{"summary":"message.edited","description":"The customer edited a message on its channel: the message now has the new content and keeps the earlier version in its edit history (`edit_id`). An edit the provider delivers under a new id (an edited X post, an App Store review) stays the same message. `current` is false when an older edit arrived late (kept in the history only).","tags":["webhooks"],"x-rabt-module":"tickets","parameters":[{"$ref":"#/components/parameters/WebhookId"},{"$ref":"#/components/parameters/WebhookTimestamp"},{"$ref":"#/components/parameters/WebhookSignature"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["type","version","timestamp","mode","data"],"properties":{"type":{"type":"string","enum":["message.edited"]},"version":{"type":"integer","enum":[1],"description":"The version of `data`; a breaking change is a new version."},"timestamp":{"type":"string","format":"date-time","description":"When the event happened (UTC)."},"mode":{"type":"string","enum":["live","test"],"description":"`test` for events of the API test space, `live` otherwise."},"data":{"type":"object","properties":{"organization_id":{"type":"string","format":"uuid","description":"The organization the event happened in."},"message_id":{"type":"string","format":"uuid"},"ticket_id":{"type":"string","format":"uuid"},"edit_id":{"type":"string","format":"uuid"},"edited_at":{"type":"string","format":"date-time"},"current":{"type":"boolean"}},"required":["organization_id","message_id","ticket_id","edit_id","edited_at","current"],"additionalProperties":false}}}}}},"responses":{"2XX":{"description":"Received. Any other answer, or none within the delivery timeout, is retried with exponential backoff; deliveries can be replayed from the delivery log."}}}},"message.deleted":{"post":{"summary":"message.deleted","description":"A message was deleted at its provider: the customer unsent it or removed their comment, or the business deleted its own message there (by a member through Rabt, `by_membership_id`, or in the provider’s app). `scope` says who no longer sees it there (`for_me`: only the business; `for_everyone`). Rabt keeps the message and its content in the ticket.","tags":["webhooks"],"x-rabt-module":"tickets","parameters":[{"$ref":"#/components/parameters/WebhookId"},{"$ref":"#/components/parameters/WebhookTimestamp"},{"$ref":"#/components/parameters/WebhookSignature"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["type","version","timestamp","mode","data"],"properties":{"type":{"type":"string","enum":["message.deleted"]},"version":{"type":"integer","enum":[1],"description":"The version of `data`; a breaking change is a new version."},"timestamp":{"type":"string","format":"date-time","description":"When the event happened (UTC)."},"mode":{"type":"string","enum":["live","test"],"description":"`test` for events of the API test space, `live` otherwise."},"data":{"type":"object","properties":{"organization_id":{"type":"string","format":"uuid","description":"The organization the event happened in."},"message_id":{"type":"string","format":"uuid"},"ticket_id":{"type":"string","format":"uuid"},"scope":{"type":"string","enum":["for_me","for_everyone"]},"deleted_at":{"type":"string","format":"date-time"},"by_membership_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]}},"required":["organization_id","message_id","ticket_id","scope","deleted_at","by_membership_id"],"additionalProperties":false}}}}}},"responses":{"2XX":{"description":"Received. Any other answer, or none within the delivery timeout, is retried with exponential backoff; deliveries can be replayed from the delivery log."}}}},"message.file_fetch_requested":{"post":{"summary":"message.file_fetch_requested","description":"A member asked Rabt to fetch a received file again from its channel (a TikTok image or video whose download failed). The file arrives as `attachment.stored`; a new failure is attached to the message again.","tags":["webhooks"],"x-rabt-module":"tickets","parameters":[{"$ref":"#/components/parameters/WebhookId"},{"$ref":"#/components/parameters/WebhookTimestamp"},{"$ref":"#/components/parameters/WebhookSignature"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["type","version","timestamp","mode","data"],"properties":{"type":{"type":"string","enum":["message.file_fetch_requested"]},"version":{"type":"integer","enum":[1],"description":"The version of `data`; a breaking change is a new version."},"timestamp":{"type":"string","format":"date-time","description":"When the event happened (UTC)."},"mode":{"type":"string","enum":["live","test"],"description":"`test` for events of the API test space, `live` otherwise."},"data":{"type":"object","properties":{"organization_id":{"type":"string","format":"uuid","description":"The organization the event happened in."},"message_id":{"type":"string","format":"uuid"},"ticket_id":{"type":"string","format":"uuid"},"channel_id":{"type":"string","format":"uuid"},"channel_type":{"type":"string"},"requested_by_membership_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]}},"required":["organization_id","message_id","ticket_id","channel_id","channel_type","requested_by_membership_id"],"additionalProperties":false}}}}}},"responses":{"2XX":{"description":"Received. Any other answer, or none within the delivery timeout, is retried with exponential backoff; deliveries can be replayed from the delivery log."}}}},"message.files_downloaded":{"post":{"summary":"message.files_downloaded","description":"The files of a customer's email were downloaded one by one from its Microsoft 365 mailbox (on receipt, or when asked again): how many were stored and how many are still missing (EM-3128 on the message).","tags":["webhooks"],"x-rabt-module":"tickets","parameters":[{"$ref":"#/components/parameters/WebhookId"},{"$ref":"#/components/parameters/WebhookTimestamp"},{"$ref":"#/components/parameters/WebhookSignature"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["type","version","timestamp","mode","data"],"properties":{"type":{"type":"string","enum":["message.files_downloaded"]},"version":{"type":"integer","enum":[1],"description":"The version of `data`; a breaking change is a new version."},"timestamp":{"type":"string","format":"date-time","description":"When the event happened (UTC)."},"mode":{"type":"string","enum":["live","test"],"description":"`test` for events of the API test space, `live` otherwise."},"data":{"type":"object","properties":{"organization_id":{"type":"string","format":"uuid","description":"The organization the event happened in."},"message_id":{"type":"string","format":"uuid"},"ticket_id":{"type":"string","format":"uuid"},"channel_id":{"type":"string","format":"uuid"},"downloaded":{"type":"integer","minimum":0,"maximum":9007199254740991},"missing":{"type":"integer","minimum":0,"maximum":9007199254740991},"error_code":{"type":["string","null"]}},"required":["organization_id","message_id","ticket_id","channel_id","downloaded","missing","error_code"],"additionalProperties":false}}}}}},"responses":{"2XX":{"description":"Received. Any other answer, or none within the delivery timeout, is retried with exponential backoff; deliveries can be replayed from the delivery log."}}}},"message.opened":{"post":{"summary":"message.opened","description":"An email reply was opened: the reader's mail app loaded its open indicator (`opened`), or only Apple's privacy proxy did (`possibly_opened`, followed by `opened` when a real open comes later). The message's `opened` has the same values. `recipient` names the address whose own copy was opened when the email went as a copy per recipient (also sent for each recipient's first open).","tags":["webhooks"],"x-rabt-module":"tickets","parameters":[{"$ref":"#/components/parameters/WebhookId"},{"$ref":"#/components/parameters/WebhookTimestamp"},{"$ref":"#/components/parameters/WebhookSignature"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["type","version","timestamp","mode","data"],"properties":{"type":{"type":"string","enum":["message.opened"]},"version":{"type":"integer","enum":[1],"description":"The version of `data`; a breaking change is a new version."},"timestamp":{"type":"string","format":"date-time","description":"When the event happened (UTC)."},"mode":{"type":"string","enum":["live","test"],"description":"`test` for events of the API test space, `live` otherwise."},"data":{"type":"object","properties":{"organization_id":{"type":"string","format":"uuid","description":"The organization the event happened in."},"message_id":{"type":"string","format":"uuid"},"ticket_id":{"type":"string","format":"uuid"},"kind":{"type":"string","enum":["opened","possibly_opened"]},"opened_at":{"type":"string","format":"date-time"},"recipient":{"type":"string"}},"required":["organization_id","message_id","ticket_id","kind","opened_at"],"additionalProperties":false}}}}}},"responses":{"2XX":{"description":"Received. Any other answer, or none within the delivery timeout, is retried with exponential backoff; deliveries can be replayed from the delivery log."}}}},"message.mentioned":{"post":{"summary":"message.mentioned","description":"An internal note mentioned members.","tags":["webhooks"],"x-rabt-module":"tickets","parameters":[{"$ref":"#/components/parameters/WebhookId"},{"$ref":"#/components/parameters/WebhookTimestamp"},{"$ref":"#/components/parameters/WebhookSignature"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["type","version","timestamp","mode","data"],"properties":{"type":{"type":"string","enum":["message.mentioned"]},"version":{"type":"integer","enum":[1],"description":"The version of `data`; a breaking change is a new version."},"timestamp":{"type":"string","format":"date-time","description":"When the event happened (UTC)."},"mode":{"type":"string","enum":["live","test"],"description":"`test` for events of the API test space, `live` otherwise."},"data":{"type":"object","properties":{"organization_id":{"type":"string","format":"uuid","description":"The organization the event happened in."},"message_id":{"type":"string","format":"uuid"},"ticket_id":{"type":"string","format":"uuid"},"author_membership_id":{"type":"string","format":"uuid"},"mentioned_membership_ids":{"minItems":1,"type":"array","items":{"type":"string","format":"uuid"}}},"required":["organization_id","message_id","ticket_id","author_membership_id","mentioned_membership_ids"],"additionalProperties":false}}}}}},"responses":{"2XX":{"description":"Received. Any other answer, or none within the delivery timeout, is retried with exponential backoff; deliveries can be replayed from the delivery log."}}}},"message.moderated":{"post":{"summary":"message.moderated","description":"A member hid or showed again a public reply on X, or deleted the organization's own reply or direct message there; the message stays in the ticket, marked.","tags":["webhooks"],"x-rabt-module":"tickets","parameters":[{"$ref":"#/components/parameters/WebhookId"},{"$ref":"#/components/parameters/WebhookTimestamp"},{"$ref":"#/components/parameters/WebhookSignature"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["type","version","timestamp","mode","data"],"properties":{"type":{"type":"string","enum":["message.moderated"]},"version":{"type":"integer","enum":[1],"description":"The version of `data`; a breaking change is a new version."},"timestamp":{"type":"string","format":"date-time","description":"When the event happened (UTC)."},"mode":{"type":"string","enum":["live","test"],"description":"`test` for events of the API test space, `live` otherwise."},"data":{"type":"object","properties":{"organization_id":{"type":"string","format":"uuid","description":"The organization the event happened in."},"message_id":{"type":"string","format":"uuid"},"ticket_id":{"type":"string","format":"uuid"},"channel_type":{"type":"string"},"action":{"type":"string","enum":["hide","unhide","delete"]},"moderated_by_membership_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]}},"required":["organization_id","message_id","ticket_id","channel_type","action","moderated_by_membership_id"],"additionalProperties":false}}}}}},"responses":{"2XX":{"description":"Received. Any other answer, or none within the delivery timeout, is retried with exponential backoff; deliveries can be replayed from the delivery log."}}}},"attachment.stored":{"post":{"summary":"attachment.stored","description":"A file of a ticket was stored (a member upload completed, or a file received from the customer); it is scanned for malware next.","tags":["webhooks"],"x-rabt-module":"tickets","parameters":[{"$ref":"#/components/parameters/WebhookId"},{"$ref":"#/components/parameters/WebhookTimestamp"},{"$ref":"#/components/parameters/WebhookSignature"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["type","version","timestamp","mode","data"],"properties":{"type":{"type":"string","enum":["attachment.stored"]},"version":{"type":"integer","enum":[1],"description":"The version of `data`; a breaking change is a new version."},"timestamp":{"type":"string","format":"date-time","description":"When the event happened (UTC)."},"mode":{"type":"string","enum":["live","test"],"description":"`test` for events of the API test space, `live` otherwise."},"data":{"type":"object","properties":{"organization_id":{"type":"string","format":"uuid","description":"The organization the event happened in."},"attachment_id":{"type":"string","format":"uuid"},"ticket_id":{"type":"string","format":"uuid"}},"required":["organization_id","attachment_id","ticket_id"],"additionalProperties":false}}}}}},"responses":{"2XX":{"description":"Received. Any other answer, or none within the delivery timeout, is retried with exponential backoff; deliveries can be replayed from the delivery log."}}}},"attachment.scanned":{"post":{"summary":"attachment.scanned","description":"The malware scan of a file finished: clean, infected (quarantined: kept, never served, never deleted), scan_failed (the scanner answered an error for the file; it can be scanned again), or not scanned when no scanner is configured. An infected file carries its signature, and an infected file or a failed scan the recorded error (code and reference).","tags":["webhooks"],"x-rabt-module":"tickets","parameters":[{"$ref":"#/components/parameters/WebhookId"},{"$ref":"#/components/parameters/WebhookTimestamp"},{"$ref":"#/components/parameters/WebhookSignature"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["type","version","timestamp","mode","data"],"properties":{"type":{"type":"string","enum":["attachment.scanned"]},"version":{"type":"integer","enum":[2],"description":"The version of `data`; a breaking change is a new version."},"timestamp":{"type":"string","format":"date-time","description":"When the event happened (UTC)."},"mode":{"type":"string","enum":["live","test"],"description":"`test` for events of the API test space, `live` otherwise."},"data":{"type":"object","properties":{"organization_id":{"type":"string","format":"uuid","description":"The organization the event happened in."},"attachment_id":{"type":"string","format":"uuid"},"ticket_id":{"type":"string","format":"uuid"},"result":{"type":"string","enum":["clean","infected","scan_failed","not_scanned"]},"signature":{"type":["string","null"]},"error_code":{"type":["string","null"]},"reference":{"type":["string","null"]}},"required":["organization_id","attachment_id","ticket_id","result","signature","error_code","reference"],"additionalProperties":false}}}}}},"responses":{"2XX":{"description":"Received. Any other answer, or none within the delivery timeout, is retried with exponential backoff; deliveries can be replayed from the delivery log."}}}},"attachment.processed":{"post":{"summary":"attachment.processed","description":"A file's media processing finished (OP11): its copy for the ticket's channel (profile of the channel, e.g. whatsapp) is ready (converted or fitting as it is), unfit (refused before sending, with its error code) or failed (can be tried again); or its preview (profile preview) is ready or could not be made.","tags":["webhooks"],"x-rabt-module":"tickets","parameters":[{"$ref":"#/components/parameters/WebhookId"},{"$ref":"#/components/parameters/WebhookTimestamp"},{"$ref":"#/components/parameters/WebhookSignature"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["type","version","timestamp","mode","data"],"properties":{"type":{"type":"string","enum":["attachment.processed"]},"version":{"type":"integer","enum":[1],"description":"The version of `data`; a breaking change is a new version."},"timestamp":{"type":"string","format":"date-time","description":"When the event happened (UTC)."},"mode":{"type":"string","enum":["live","test"],"description":"`test` for events of the API test space, `live` otherwise."},"data":{"type":"object","properties":{"organization_id":{"type":"string","format":"uuid","description":"The organization the event happened in."},"attachment_id":{"type":"string","format":"uuid"},"ticket_id":{"type":"string","format":"uuid"},"profile":{"type":"string"},"status":{"type":"string","enum":["ready","unfit","failed"]},"converted":{"type":"boolean"},"error_code":{"type":["string","null"]}},"required":["organization_id","attachment_id","ticket_id","profile","status","converted","error_code"],"additionalProperties":false}}}}}},"responses":{"2XX":{"description":"Received. Any other answer, or none within the delivery timeout, is retried with exponential backoff; deliveries can be replayed from the delivery log."}}}},"organization.billing_state_changed":{"post":{"summary":"organization.billing_state_changed","description":"The organization's billing state changed: the trial ended, a renewal could not be paid (seats inactive), or a payment reactivated the seats.","tags":["webhooks"],"x-rabt-module":"billing","parameters":[{"$ref":"#/components/parameters/WebhookId"},{"$ref":"#/components/parameters/WebhookTimestamp"},{"$ref":"#/components/parameters/WebhookSignature"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["type","version","timestamp","mode","data"],"properties":{"type":{"type":"string","enum":["organization.billing_state_changed"]},"version":{"type":"integer","enum":[1],"description":"The version of `data`; a breaking change is a new version."},"timestamp":{"type":"string","format":"date-time","description":"When the event happened (UTC)."},"mode":{"type":"string","enum":["live","test"],"description":"`test` for events of the API test space, `live` otherwise."},"data":{"type":"object","properties":{"organization_id":{"type":"string","format":"uuid","description":"The organization the event happened in."},"from":{"type":"string","enum":["trial","active","seats_inactive"]},"to":{"type":"string","enum":["trial","active","seats_inactive"]},"reason":{"type":"string","enum":["trial_ended","renewal","payment"]},"amount_minor":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"An amount in halalas (SAR minor units)."},"seats":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["organization_id","from","to","reason","amount_minor","seats"],"additionalProperties":false}}}}}},"responses":{"2XX":{"description":"Received. Any other answer, or none within the delivery timeout, is retried with exponential backoff; deliveries can be replayed from the delivery log."}}}},"organization.pricing_model_changed":{"post":{"summary":"organization.pricing_model_changed","description":"The seat pricing model changed: chosen by the organization before its first seat payment, or switched by the Rabt team with a reason. Seat charges from now on use the new model's seat price; charges already made never change.","tags":["webhooks"],"x-rabt-module":"billing","parameters":[{"$ref":"#/components/parameters/WebhookId"},{"$ref":"#/components/parameters/WebhookTimestamp"},{"$ref":"#/components/parameters/WebhookSignature"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["type","version","timestamp","mode","data"],"properties":{"type":{"type":"string","enum":["organization.pricing_model_changed"]},"version":{"type":"integer","enum":[1],"description":"The version of `data`; a breaking change is a new version."},"timestamp":{"type":"string","format":"date-time","description":"When the event happened (UTC)."},"mode":{"type":"string","enum":["live","test"],"description":"`test` for events of the API test space, `live` otherwise."},"data":{"type":"object","properties":{"organization_id":{"type":"string","format":"uuid","description":"The organization the event happened in."},"change_id":{"type":"string","format":"uuid"},"from":{"type":"string","enum":["per_member","all_employees"]},"to":{"type":"string","enum":["per_member","all_employees"]},"source":{"type":"string","enum":["owner","platform"]},"seat_price_minor":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"An amount in halalas (SAR minor units)."},"reason":{"type":["string","null"]}},"required":["organization_id","change_id","from","to","source","seat_price_minor","reason"],"additionalProperties":false}}}}}},"responses":{"2XX":{"description":"Received. Any other answer, or none within the delivery timeout, is retried with exponential backoff; deliveries can be replayed from the delivery log."}}}},"segment.created":{"post":{"summary":"segment.created","description":"A segment was created: a saved filter of contacts or companies, or the contacts of a file (its import then fills it).","tags":["webhooks"],"x-rabt-module":"segments","parameters":[{"$ref":"#/components/parameters/WebhookId"},{"$ref":"#/components/parameters/WebhookTimestamp"},{"$ref":"#/components/parameters/WebhookSignature"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["type","version","timestamp","mode","data"],"properties":{"type":{"type":"string","enum":["segment.created"]},"version":{"type":"integer","enum":[1],"description":"The version of `data`; a breaking change is a new version."},"timestamp":{"type":"string","format":"date-time","description":"When the event happened (UTC)."},"mode":{"type":"string","enum":["live","test"],"description":"`test` for events of the API test space, `live` otherwise."},"data":{"type":"object","properties":{"organization_id":{"type":"string","format":"uuid","description":"The organization the event happened in."},"segment_id":{"type":"string","format":"uuid"}},"required":["organization_id","segment_id"],"additionalProperties":false}}}}}},"responses":{"2XX":{"description":"Received. Any other answer, or none within the delivery timeout, is retried with exponential backoff; deliveries can be replayed from the delivery log."}}}},"segment.updated":{"post":{"summary":"segment.updated","description":"A segment was renamed or its filter changed.","tags":["webhooks"],"x-rabt-module":"segments","parameters":[{"$ref":"#/components/parameters/WebhookId"},{"$ref":"#/components/parameters/WebhookTimestamp"},{"$ref":"#/components/parameters/WebhookSignature"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["type","version","timestamp","mode","data"],"properties":{"type":{"type":"string","enum":["segment.updated"]},"version":{"type":"integer","enum":[1],"description":"The version of `data`; a breaking change is a new version."},"timestamp":{"type":"string","format":"date-time","description":"When the event happened (UTC)."},"mode":{"type":"string","enum":["live","test"],"description":"`test` for events of the API test space, `live` otherwise."},"data":{"type":"object","properties":{"organization_id":{"type":"string","format":"uuid","description":"The organization the event happened in."},"segment_id":{"type":"string","format":"uuid"}},"required":["organization_id","segment_id"],"additionalProperties":false}}}}}},"responses":{"2XX":{"description":"Received. Any other answer, or none within the delivery timeout, is retried with exponential backoff; deliveries can be replayed from the delivery log."}}}},"segment.deleted":{"post":{"summary":"segment.deleted","description":"A segment was deleted.","tags":["webhooks"],"x-rabt-module":"segments","parameters":[{"$ref":"#/components/parameters/WebhookId"},{"$ref":"#/components/parameters/WebhookTimestamp"},{"$ref":"#/components/parameters/WebhookSignature"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["type","version","timestamp","mode","data"],"properties":{"type":{"type":"string","enum":["segment.deleted"]},"version":{"type":"integer","enum":[1],"description":"The version of `data`; a breaking change is a new version."},"timestamp":{"type":"string","format":"date-time","description":"When the event happened (UTC)."},"mode":{"type":"string","enum":["live","test"],"description":"`test` for events of the API test space, `live` otherwise."},"data":{"type":"object","properties":{"organization_id":{"type":"string","format":"uuid","description":"The organization the event happened in."},"segment_id":{"type":"string","format":"uuid"}},"required":["organization_id","segment_id"],"additionalProperties":false}}}}}},"responses":{"2XX":{"description":"Received. Any other answer, or none within the delivery timeout, is retried with exponential backoff; deliveries can be replayed from the delivery log."}}}},"crm_transfer.finished":{"post":{"summary":"crm_transfer.finished","description":"A step of an import or a CSV export finished: the check of an import (validated: start it when it has no errors), the import itself (a segment from a file: its contacts joined `segment_id`) or an export (completed), or it failed.","tags":["webhooks"],"x-rabt-module":"imports_exports","parameters":[{"$ref":"#/components/parameters/WebhookId"},{"$ref":"#/components/parameters/WebhookTimestamp"},{"$ref":"#/components/parameters/WebhookSignature"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["type","version","timestamp","mode","data"],"properties":{"type":{"type":"string","enum":["crm_transfer.finished"]},"version":{"type":"integer","enum":[1],"description":"The version of `data`; a breaking change is a new version."},"timestamp":{"type":"string","format":"date-time","description":"When the event happened (UTC)."},"mode":{"type":"string","enum":["live","test"],"description":"`test` for events of the API test space, `live` otherwise."},"data":{"type":"object","properties":{"organization_id":{"type":"string","format":"uuid","description":"The organization the event happened in."},"transfer_id":{"type":"string","format":"uuid"},"kind":{"type":"string","enum":["import","export"]},"entity":{"type":"string","enum":["contacts","companies"]},"phase":{"type":"string","enum":["check","import","export"]},"status":{"type":"string","enum":["validated","completed","failed"]},"total_rows":{"type":"integer","minimum":0,"maximum":9007199254740991},"created_count":{"type":"integer","minimum":0,"maximum":9007199254740991},"updated_count":{"type":"integer","minimum":0,"maximum":9007199254740991},"error_count":{"type":"integer","minimum":0,"maximum":9007199254740991},"segment_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"description":"The segment the import's contacts made (a segment from a file); else null."}},"required":["organization_id","transfer_id","kind","entity","phase","status","total_rows","created_count","updated_count","error_count","segment_id"],"additionalProperties":false}}}}}},"responses":{"2XX":{"description":"Received. Any other answer, or none within the delivery timeout, is retried with exponential backoff; deliveries can be replayed from the delivery log."}}}},"invoice.finalized":{"post":{"summary":"invoice.finalized","description":"A monthly invoice was finalized on the 2nd of the next month at 03:00 (Asia/Riyadh): numbered, reconciled with the wallet ledger, its PDF and CSV available. Amounts in halalas, VAT included.","tags":["webhooks"],"x-rabt-module":"billing","parameters":[{"$ref":"#/components/parameters/WebhookId"},{"$ref":"#/components/parameters/WebhookTimestamp"},{"$ref":"#/components/parameters/WebhookSignature"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["type","version","timestamp","mode","data"],"properties":{"type":{"type":"string","enum":["invoice.finalized"]},"version":{"type":"integer","enum":[1],"description":"The version of `data`; a breaking change is a new version."},"timestamp":{"type":"string","format":"date-time","description":"When the event happened (UTC)."},"mode":{"type":"string","enum":["live","test"],"description":"`test` for events of the API test space, `live` otherwise."},"data":{"type":"object","properties":{"organization_id":{"type":"string","format":"uuid","description":"The organization the event happened in."},"invoice_id":{"type":"string","format":"uuid"},"number":{"type":"string","description":"The invoice number, RB-YYYY-NNNNNN."},"period_month":{"type":"string","pattern":"^\\d{4}-(?:0[1-9]|1[0-2])-01$","description":"The month billed, as its first day (Asia/Riyadh), e.g. 2026-10-01."},"subtotal_minor":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"An amount in halalas (SAR minor units)."},"tax_minor":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"An amount in halalas (SAR minor units)."},"total_minor":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"An amount in halalas (SAR minor units)."},"billing_email":{"anyOf":[{"type":"string","format":"email"},{"type":"null"}],"description":"The billing profile's email the PDF is sent to, or null."}},"required":["organization_id","invoice_id","number","period_month","subtotal_minor","tax_minor","total_minor","billing_email"],"additionalProperties":false}}}}}},"responses":{"2XX":{"description":"Received. Any other answer, or none within the delivery timeout, is retried with exponential backoff; deliveries can be replayed from the delivery log."}}}},"invoice.einvoice_accepted":{"post":{"summary":"invoice.einvoice_accepted","description":"A monthly invoice was issued in the e-invoicing system (Wafeq: a final tax invoice, recorded as paid). Its official PDF can be downloaded from now on (`GET /v1/billing/invoices/{invoice_id}/document`).","tags":["webhooks"],"x-rabt-module":"billing","parameters":[{"$ref":"#/components/parameters/WebhookId"},{"$ref":"#/components/parameters/WebhookTimestamp"},{"$ref":"#/components/parameters/WebhookSignature"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["type","version","timestamp","mode","data"],"properties":{"type":{"type":"string","enum":["invoice.einvoice_accepted"]},"version":{"type":"integer","enum":[1],"description":"The version of `data`; a breaking change is a new version."},"timestamp":{"type":"string","format":"date-time","description":"When the event happened (UTC)."},"mode":{"type":"string","enum":["live","test"],"description":"`test` for events of the API test space, `live` otherwise."},"data":{"type":"object","properties":{"organization_id":{"type":"string","format":"uuid","description":"The organization the event happened in."},"invoice_id":{"type":"string","format":"uuid"},"number":{"type":"string","description":"The invoice number, RB-YYYY-NNNNNN."},"period_month":{"type":"string","pattern":"^\\d{4}-(?:0[1-9]|1[0-2])-01$","description":"The month billed, as its first day (Asia/Riyadh), e.g. 2026-10-01."},"provider":{"type":"string","enum":["wafeq"],"description":"The e-invoicing system that issued it."}},"required":["organization_id","invoice_id","number","period_month","provider"],"additionalProperties":false}}}}}},"responses":{"2XX":{"description":"Received. Any other answer, or none within the delivery timeout, is retried with exponential backoff; deliveries can be replayed from the delivery log."}}}},"billing.profile_updated":{"post":{"summary":"billing.profile_updated","description":"The billing profile (legal name, VAT number, commercial registration, national address, billing email) was created or changed; invoices finalized from now on carry it.","tags":["webhooks"],"x-rabt-module":"billing","parameters":[{"$ref":"#/components/parameters/WebhookId"},{"$ref":"#/components/parameters/WebhookTimestamp"},{"$ref":"#/components/parameters/WebhookSignature"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["type","version","timestamp","mode","data"],"properties":{"type":{"type":"string","enum":["billing.profile_updated"]},"version":{"type":"integer","enum":[1],"description":"The version of `data`; a breaking change is a new version."},"timestamp":{"type":"string","format":"date-time","description":"When the event happened (UTC)."},"mode":{"type":"string","enum":["live","test"],"description":"`test` for events of the API test space, `live` otherwise."},"data":{"type":"object","properties":{"organization_id":{"type":"string","format":"uuid","description":"The organization the event happened in."},"billing_profile_id":{"type":"string","format":"uuid"},"changed":{"minItems":1,"type":"array","items":{"type":"string","enum":["legal_name","vat_number","cr_number","national_address","billing_email"]},"description":"The fields that changed (all of them when the profile was created)."}},"required":["organization_id","billing_profile_id","changed"],"additionalProperties":false}}}}}},"responses":{"2XX":{"description":"Received. Any other answer, or none within the delivery timeout, is retried with exponential backoff; deliveries can be replayed from the delivery log."}}}},"wallet.low_balance":{"post":{"summary":"wallet.low_balance","description":"The wallet's balance went below its low-balance threshold.","tags":["webhooks"],"x-rabt-module":"wallet","parameters":[{"$ref":"#/components/parameters/WebhookId"},{"$ref":"#/components/parameters/WebhookTimestamp"},{"$ref":"#/components/parameters/WebhookSignature"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["type","version","timestamp","mode","data"],"properties":{"type":{"type":"string","enum":["wallet.low_balance"]},"version":{"type":"integer","enum":[1],"description":"The version of `data`; a breaking change is a new version."},"timestamp":{"type":"string","format":"date-time","description":"When the event happened (UTC)."},"mode":{"type":"string","enum":["live","test"],"description":"`test` for events of the API test space, `live` otherwise."},"data":{"type":"object","properties":{"organization_id":{"type":"string","format":"uuid","description":"The organization the event happened in."},"wallet_id":{"type":"string","format":"uuid"},"balance_minor":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"An amount in halalas (SAR minor units)."},"threshold_minor":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"An amount in halalas (SAR minor units)."}},"required":["organization_id","wallet_id","balance_minor","threshold_minor"],"additionalProperties":false}}}}}},"responses":{"2XX":{"description":"Received. Any other answer, or none within the delivery timeout, is retried with exponential backoff; deliveries can be replayed from the delivery log."}}}},"wallet.depleted":{"post":{"summary":"wallet.depleted","description":"A paid action was refused for lack of balance (`refused`), or a charge left nothing available (`empty`): the paid services concerned stop until a top-up.","tags":["webhooks"],"x-rabt-module":"wallet","parameters":[{"$ref":"#/components/parameters/WebhookId"},{"$ref":"#/components/parameters/WebhookTimestamp"},{"$ref":"#/components/parameters/WebhookSignature"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["type","version","timestamp","mode","data"],"properties":{"type":{"type":"string","enum":["wallet.depleted"]},"version":{"type":"integer","enum":[1],"description":"The version of `data`; a breaking change is a new version."},"timestamp":{"type":"string","format":"date-time","description":"When the event happened (UTC)."},"mode":{"type":"string","enum":["live","test"],"description":"`test` for events of the API test space, `live` otherwise."},"data":{"type":"object","properties":{"organization_id":{"type":"string","format":"uuid","description":"The organization the event happened in."},"reason":{"type":"string","enum":["refused","empty"]},"path_id":{"type":"string"},"resource_type":{"type":["string","null"]},"resource_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"required_minor":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"An amount in halalas (SAR minor units)."},"available_minor":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"An amount in halalas (SAR minor units)."}},"required":["organization_id","reason","path_id","resource_type","resource_id","required_minor","available_minor"],"additionalProperties":false}}}}}},"responses":{"2XX":{"description":"Received. Any other answer, or none within the delivery timeout, is retried with exponential backoff; deliveries can be replayed from the delivery log."}}}},"wallet.replenished":{"post":{"summary":"wallet.replenished","description":"Money was added to a wallet whose paid services had stopped, or the organization was made free of charge: they resume.","tags":["webhooks"],"x-rabt-module":"wallet","parameters":[{"$ref":"#/components/parameters/WebhookId"},{"$ref":"#/components/parameters/WebhookTimestamp"},{"$ref":"#/components/parameters/WebhookSignature"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["type","version","timestamp","mode","data"],"properties":{"type":{"type":"string","enum":["wallet.replenished"]},"version":{"type":"integer","enum":[1],"description":"The version of `data`; a breaking change is a new version."},"timestamp":{"type":"string","format":"date-time","description":"When the event happened (UTC)."},"mode":{"type":"string","enum":["live","test"],"description":"`test` for events of the API test space, `live` otherwise."},"data":{"type":"object","properties":{"organization_id":{"type":"string","format":"uuid","description":"The organization the event happened in."},"available_minor":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"An amount in halalas (SAR minor units)."}},"required":["organization_id","available_minor"],"additionalProperties":false}}}}}},"responses":{"2XX":{"description":"Received. Any other answer, or none within the delivery timeout, is retried with exponential backoff; deliveries can be replayed from the delivery log."}}}},"wallet.topped_up":{"post":{"summary":"wallet.topped_up","description":"A card top-up was confirmed by the payment gateway and credited to the wallet, with its receipt voucher.","tags":["webhooks"],"x-rabt-module":"wallet","parameters":[{"$ref":"#/components/parameters/WebhookId"},{"$ref":"#/components/parameters/WebhookTimestamp"},{"$ref":"#/components/parameters/WebhookSignature"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["type","version","timestamp","mode","data"],"properties":{"type":{"type":"string","enum":["wallet.topped_up"]},"version":{"type":"integer","enum":[1],"description":"The version of `data`; a breaking change is a new version."},"timestamp":{"type":"string","format":"date-time","description":"When the event happened (UTC)."},"mode":{"type":"string","enum":["live","test"],"description":"`test` for events of the API test space, `live` otherwise."},"data":{"type":"object","properties":{"organization_id":{"type":"string","format":"uuid","description":"The organization the event happened in."},"top_up_id":{"type":"string","format":"uuid"},"kind":{"type":"string","enum":["manual","auto"]},"amount_minor":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"An amount in halalas (SAR minor units)."},"receipt_voucher_id":{"type":"string","format":"uuid"},"balance_minor":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"An amount in halalas (SAR minor units)."}},"required":["organization_id","top_up_id","kind","amount_minor","receipt_voucher_id","balance_minor"],"additionalProperties":false}}}}}},"responses":{"2XX":{"description":"Received. Any other answer, or none within the delivery timeout, is retried with exponential backoff; deliveries can be replayed from the delivery log."}}}},"wallet.top_up_failed":{"post":{"summary":"wallet.top_up_failed","description":"A card top-up failed (declined, abandoned, not completed), with the error code and reference; repeated auto top-up failures turn auto top-up off until the card is updated.","tags":["webhooks"],"x-rabt-module":"wallet","parameters":[{"$ref":"#/components/parameters/WebhookId"},{"$ref":"#/components/parameters/WebhookTimestamp"},{"$ref":"#/components/parameters/WebhookSignature"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["type","version","timestamp","mode","data"],"properties":{"type":{"type":"string","enum":["wallet.top_up_failed"]},"version":{"type":"integer","enum":[1],"description":"The version of `data`; a breaking change is a new version."},"timestamp":{"type":"string","format":"date-time","description":"When the event happened (UTC)."},"mode":{"type":"string","enum":["live","test"],"description":"`test` for events of the API test space, `live` otherwise."},"data":{"type":"object","properties":{"organization_id":{"type":"string","format":"uuid","description":"The organization the event happened in."},"top_up_id":{"type":"string","format":"uuid"},"kind":{"type":"string","enum":["manual","auto"]},"amount_minor":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"An amount in halalas (SAR minor units)."},"code":{"type":"string"},"reference":{"type":"string"},"attempt":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"auto_top_up_disabled":{"type":"boolean"}},"required":["organization_id","top_up_id","kind","amount_minor","code","reference","attempt","auto_top_up_disabled"],"additionalProperties":false}}}}}},"responses":{"2XX":{"description":"Received. Any other answer, or none within the delivery timeout, is retried with exponential backoff; deliveries can be replayed from the delivery log."}}}},"wallet.card_expiring":{"post":{"summary":"wallet.card_expiring","description":"The saved card expires within 30 days (it is valid through the end of its expiry month): update it before top-ups and auto top-ups fail. Sent once per card (F17).","tags":["webhooks"],"x-rabt-module":"wallet","parameters":[{"$ref":"#/components/parameters/WebhookId"},{"$ref":"#/components/parameters/WebhookTimestamp"},{"$ref":"#/components/parameters/WebhookSignature"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["type","version","timestamp","mode","data"],"properties":{"type":{"type":"string","enum":["wallet.card_expiring"]},"version":{"type":"integer","enum":[1],"description":"The version of `data`; a breaking change is a new version."},"timestamp":{"type":"string","format":"date-time","description":"When the event happened (UTC)."},"mode":{"type":"string","enum":["live","test"],"description":"`test` for events of the API test space, `live` otherwise."},"data":{"type":"object","properties":{"organization_id":{"type":"string","format":"uuid","description":"The organization the event happened in."},"saved_card_id":{"type":"string","format":"uuid"},"brand":{"type":"string"},"last4":{"type":"string","pattern":"^[0-9]{4}$"},"expiry_month":{"type":"integer","minimum":1,"maximum":12},"expiry_year":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["organization_id","saved_card_id","brand","last4","expiry_month","expiry_year"],"additionalProperties":false}}}}}},"responses":{"2XX":{"description":"Received. Any other answer, or none within the delivery timeout, is retried with exponential backoff; deliveries can be replayed from the delivery log."}}}},"wallet.manual_entry_added":{"post":{"summary":"wallet.manual_entry_added","description":"The Rabt team added a manual entry to the wallet: a credit or a debit, with its number, description and optional external reference; a correction names the entry it corrects.","tags":["webhooks"],"x-rabt-module":"wallet","parameters":[{"$ref":"#/components/parameters/WebhookId"},{"$ref":"#/components/parameters/WebhookTimestamp"},{"$ref":"#/components/parameters/WebhookSignature"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["type","version","timestamp","mode","data"],"properties":{"type":{"type":"string","enum":["wallet.manual_entry_added"]},"version":{"type":"integer","enum":[1],"description":"The version of `data`; a breaking change is a new version."},"timestamp":{"type":"string","format":"date-time","description":"When the event happened (UTC)."},"mode":{"type":"string","enum":["live","test"],"description":"`test` for events of the API test space, `live` otherwise."},"data":{"type":"object","properties":{"organization_id":{"type":"string","format":"uuid","description":"The organization the event happened in."},"entry_id":{"type":"string","format":"uuid"},"number":{"type":"string"},"direction":{"type":"string","enum":["credit","debit"]},"amount_minor":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"An amount in halalas (SAR minor units)."},"description":{"type":"string"},"external_reference":{"type":["string","null"]},"corrects_entry_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"transaction_id":{"type":"string","format":"uuid"},"balance_after_minor":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"An amount in halalas (SAR minor units)."}},"required":["organization_id","entry_id","number","direction","amount_minor","description","external_reference","corrects_entry_id","transaction_id","balance_after_minor"],"additionalProperties":false}}}}}},"responses":{"2XX":{"description":"Received. Any other answer, or none within the delivery timeout, is retried with exponential backoff; deliveries can be replayed from the delivery log."}}}},"wallet.card_saved":{"post":{"summary":"wallet.card_saved","description":"A card was saved for the organization (by a top-up that saved it, or by Add card): its brand, last 4 digits and expiry, and whether it is the default.","tags":["webhooks"],"x-rabt-module":"wallet","parameters":[{"$ref":"#/components/parameters/WebhookId"},{"$ref":"#/components/parameters/WebhookTimestamp"},{"$ref":"#/components/parameters/WebhookSignature"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["type","version","timestamp","mode","data"],"properties":{"type":{"type":"string","enum":["wallet.card_saved"]},"version":{"type":"integer","enum":[1],"description":"The version of `data`; a breaking change is a new version."},"timestamp":{"type":"string","format":"date-time","description":"When the event happened (UTC)."},"mode":{"type":"string","enum":["live","test"],"description":"`test` for events of the API test space, `live` otherwise."},"data":{"type":"object","properties":{"organization_id":{"type":"string","format":"uuid","description":"The organization the event happened in."},"saved_card_id":{"type":"string","format":"uuid"},"brand":{"type":"string"},"last4":{"type":"string","pattern":"^[0-9]{4}$"},"expiry_month":{"type":"integer","minimum":1,"maximum":12},"expiry_year":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"is_default":{"type":"boolean"}},"required":["organization_id","saved_card_id","brand","last4","expiry_month","expiry_year","is_default"],"additionalProperties":false}}}}}},"responses":{"2XX":{"description":"Received. Any other answer, or none within the delivery timeout, is retried with exponential backoff; deliveries can be replayed from the delivery log."}}}},"wallet.card_deleted":{"post":{"summary":"wallet.card_deleted","description":"A saved card was deleted. Deleting the default card turns auto top-up off (`auto_top_up_turned_off`).","tags":["webhooks"],"x-rabt-module":"wallet","parameters":[{"$ref":"#/components/parameters/WebhookId"},{"$ref":"#/components/parameters/WebhookTimestamp"},{"$ref":"#/components/parameters/WebhookSignature"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["type","version","timestamp","mode","data"],"properties":{"type":{"type":"string","enum":["wallet.card_deleted"]},"version":{"type":"integer","enum":[1],"description":"The version of `data`; a breaking change is a new version."},"timestamp":{"type":"string","format":"date-time","description":"When the event happened (UTC)."},"mode":{"type":"string","enum":["live","test"],"description":"`test` for events of the API test space, `live` otherwise."},"data":{"type":"object","properties":{"organization_id":{"type":"string","format":"uuid","description":"The organization the event happened in."},"saved_card_id":{"type":"string","format":"uuid"},"brand":{"type":"string"},"last4":{"type":"string","pattern":"^[0-9]{4}$"},"expiry_month":{"type":"integer","minimum":1,"maximum":12},"expiry_year":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"was_default":{"type":"boolean"},"auto_top_up_turned_off":{"type":"boolean"}},"required":["organization_id","saved_card_id","brand","last4","expiry_month","expiry_year","was_default","auto_top_up_turned_off"],"additionalProperties":false}}}}}},"responses":{"2XX":{"description":"Received. Any other answer, or none within the delivery timeout, is retried with exponential backoff; deliveries can be replayed from the delivery log."}}}},"wallet.default_card_changed":{"post":{"summary":"wallet.default_card_changed","description":"Another saved card became the default: auto top-up and quick top-ups use it from now on.","tags":["webhooks"],"x-rabt-module":"wallet","parameters":[{"$ref":"#/components/parameters/WebhookId"},{"$ref":"#/components/parameters/WebhookTimestamp"},{"$ref":"#/components/parameters/WebhookSignature"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["type","version","timestamp","mode","data"],"properties":{"type":{"type":"string","enum":["wallet.default_card_changed"]},"version":{"type":"integer","enum":[1],"description":"The version of `data`; a breaking change is a new version."},"timestamp":{"type":"string","format":"date-time","description":"When the event happened (UTC)."},"mode":{"type":"string","enum":["live","test"],"description":"`test` for events of the API test space, `live` otherwise."},"data":{"type":"object","properties":{"organization_id":{"type":"string","format":"uuid","description":"The organization the event happened in."},"saved_card_id":{"type":"string","format":"uuid"},"brand":{"type":"string"},"last4":{"type":"string","pattern":"^[0-9]{4}$"},"expiry_month":{"type":"integer","minimum":1,"maximum":12},"expiry_year":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"previous_saved_card_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]}},"required":["organization_id","saved_card_id","brand","last4","expiry_month","expiry_year","previous_saved_card_id"],"additionalProperties":false}}}}}},"responses":{"2XX":{"description":"Received. Any other answer, or none within the delivery timeout, is retried with exponential backoff; deliveries can be replayed from the delivery log."}}}},"channel.connected":{"post":{"summary":"channel.connected","description":"A channel was connected; an email forwarding channel is `pending` until its forwarding is verified.","tags":["webhooks"],"x-rabt-module":"channels","parameters":[{"$ref":"#/components/parameters/WebhookId"},{"$ref":"#/components/parameters/WebhookTimestamp"},{"$ref":"#/components/parameters/WebhookSignature"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["type","version","timestamp","mode","data"],"properties":{"type":{"type":"string","enum":["channel.connected"]},"version":{"type":"integer","enum":[1],"description":"The version of `data`; a breaking change is a new version."},"timestamp":{"type":"string","format":"date-time","description":"When the event happened (UTC)."},"mode":{"type":"string","enum":["live","test"],"description":"`test` for events of the API test space, `live` otherwise."},"data":{"type":"object","properties":{"organization_id":{"type":"string","format":"uuid","description":"The organization the event happened in."},"channel_id":{"type":"string","format":"uuid"},"channel_type":{"type":"string","description":"`email`, `whatsapp`…"},"provider":{"type":"string","description":"The implementation serving it, e.g. `smtp` (email forwarding), `microsoft` (Microsoft 365), `google` (Gmail)."},"status":{"type":"string","enum":["pending","active","needs_reauth","disconnected"]},"connected_by_membership_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]}},"required":["organization_id","channel_id","channel_type","provider","status","connected_by_membership_id"],"additionalProperties":false}}}}}},"responses":{"2XX":{"description":"Received. Any other answer, or none within the delivery timeout, is retried with exponential backoff; deliveries can be replayed from the delivery log."}}}},"channel.updated":{"post":{"summary":"channel.updated","description":"A channel's settings changed: its name, sender name, server settings or credentials (which are never sent), its addresses, its sender domain report (`domain_check`) or whether receiving works (`receiving`).","tags":["webhooks"],"x-rabt-module":"channels","parameters":[{"$ref":"#/components/parameters/WebhookId"},{"$ref":"#/components/parameters/WebhookTimestamp"},{"$ref":"#/components/parameters/WebhookSignature"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["type","version","timestamp","mode","data"],"properties":{"type":{"type":"string","enum":["channel.updated"]},"version":{"type":"integer","enum":[1],"description":"The version of `data`; a breaking change is a new version."},"timestamp":{"type":"string","format":"date-time","description":"When the event happened (UTC)."},"mode":{"type":"string","enum":["live","test"],"description":"`test` for events of the API test space, `live` otherwise."},"data":{"type":"object","properties":{"organization_id":{"type":"string","format":"uuid","description":"The organization the event happened in."},"channel_id":{"type":"string","format":"uuid"},"channel_type":{"type":"string","description":"`email`, `whatsapp`…"},"provider":{"type":"string","description":"The implementation serving it, e.g. `smtp` (email forwarding), `microsoft` (Microsoft 365), `google` (Gmail)."},"fields":{"type":"array","items":{"type":"string","enum":["name","display_name","smtp","credentials","addresses","default_address","domain_check","receiving","notifications","package_names","imap","enabled"]}}},"required":["organization_id","channel_id","channel_type","provider","fields"],"additionalProperties":false}}}}}},"responses":{"2XX":{"description":"Received. Any other answer, or none within the delivery timeout, is retried with exponential backoff; deliveries can be replayed from the delivery log."}}}},"channel.status_changed":{"post":{"summary":"channel.status_changed","description":"A channel moved to another status: verified (`active`), its credentials refused (`needs_reauth`: reconnect it), or reconnected. `error_code` and `error_reference` say why, when an error caused it.","tags":["webhooks"],"x-rabt-module":"channels","parameters":[{"$ref":"#/components/parameters/WebhookId"},{"$ref":"#/components/parameters/WebhookTimestamp"},{"$ref":"#/components/parameters/WebhookSignature"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["type","version","timestamp","mode","data"],"properties":{"type":{"type":"string","enum":["channel.status_changed"]},"version":{"type":"integer","enum":[1],"description":"The version of `data`; a breaking change is a new version."},"timestamp":{"type":"string","format":"date-time","description":"When the event happened (UTC)."},"mode":{"type":"string","enum":["live","test"],"description":"`test` for events of the API test space, `live` otherwise."},"data":{"type":"object","properties":{"organization_id":{"type":"string","format":"uuid","description":"The organization the event happened in."},"channel_id":{"type":"string","format":"uuid"},"channel_type":{"type":"string","description":"`email`, `whatsapp`…"},"provider":{"type":"string","description":"The implementation serving it, e.g. `smtp` (email forwarding), `microsoft` (Microsoft 365), `google` (Gmail)."},"previous_status":{"type":"string","enum":["pending","active","needs_reauth","disconnected"]},"status":{"type":"string","enum":["pending","active","needs_reauth","disconnected"]},"error_code":{"type":["string","null"]},"error_reference":{"type":["string","null"]}},"required":["organization_id","channel_id","channel_type","provider","previous_status","status","error_code","error_reference"],"additionalProperties":false}}}}}},"responses":{"2XX":{"description":"Received. Any other answer, or none within the delivery timeout, is retried with exponential backoff; deliveries can be replayed from the delivery log."}}}},"channel.disconnected":{"post":{"summary":"channel.disconnected","description":"A channel was disconnected: its credentials were revoked and it no longer sends or receives; its tickets stay.","tags":["webhooks"],"x-rabt-module":"channels","parameters":[{"$ref":"#/components/parameters/WebhookId"},{"$ref":"#/components/parameters/WebhookTimestamp"},{"$ref":"#/components/parameters/WebhookSignature"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["type","version","timestamp","mode","data"],"properties":{"type":{"type":"string","enum":["channel.disconnected"]},"version":{"type":"integer","enum":[1],"description":"The version of `data`; a breaking change is a new version."},"timestamp":{"type":"string","format":"date-time","description":"When the event happened (UTC)."},"mode":{"type":"string","enum":["live","test"],"description":"`test` for events of the API test space, `live` otherwise."},"data":{"type":"object","properties":{"organization_id":{"type":"string","format":"uuid","description":"The organization the event happened in."},"channel_id":{"type":"string","format":"uuid"},"channel_type":{"type":"string","description":"`email`, `whatsapp`…"},"provider":{"type":"string","description":"The implementation serving it, e.g. `smtp` (email forwarding), `microsoft` (Microsoft 365), `google` (Gmail)."},"disconnected_by_membership_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]}},"required":["organization_id","channel_id","channel_type","provider","disconnected_by_membership_id"],"additionalProperties":false}}}}}},"responses":{"2XX":{"description":"Received. Any other answer, or none within the delivery timeout, is retried with exponential backoff; deliveries can be replayed from the delivery log."}}}},"channel.sync_requested":{"post":{"summary":"channel.sync_requested","description":"A channel's new messages are to be fetched, automatically: after connecting or reconnecting (a Microsoft 365 mailbox, a Google Maps channel, also after a location choice), or when a mailbox's notifications were missed. They arrive as tickets and messages. `reason` `member` and `polling` are never sent.","tags":["webhooks"],"x-rabt-module":"channels","parameters":[{"$ref":"#/components/parameters/WebhookId"},{"$ref":"#/components/parameters/WebhookTimestamp"},{"$ref":"#/components/parameters/WebhookSignature"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["type","version","timestamp","mode","data"],"properties":{"type":{"type":"string","enum":["channel.sync_requested"]},"version":{"type":"integer","enum":[1],"description":"The version of `data`; a breaking change is a new version."},"timestamp":{"type":"string","format":"date-time","description":"When the event happened (UTC)."},"mode":{"type":"string","enum":["live","test"],"description":"`test` for events of the API test space, `live` otherwise."},"data":{"type":"object","properties":{"organization_id":{"type":"string","format":"uuid","description":"The organization the event happened in."},"channel_id":{"type":"string","format":"uuid"},"channel_type":{"type":"string","description":"`email`, `whatsapp`…"},"provider":{"type":"string","description":"The implementation serving it, e.g. `smtp` (email forwarding), `microsoft` (Microsoft 365), `google` (Gmail)."},"requested_by_membership_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"description":"The member whose change started it (a location choice); null when Rabt started it."},"reason":{"type":"string","enum":["member","connected","reconnected","resumed","polling","missed","subscription_removed"]}},"required":["organization_id","channel_id","channel_type","provider","requested_by_membership_id","reason"],"additionalProperties":false}}}}}},"responses":{"2XX":{"description":"Received. Any other answer, or none within the delivery timeout, is retried with exponential backoff; deliveries can be replayed from the delivery log."}}}},"channel.paused":{"post":{"summary":"channel.paused","description":"A channel was paused: `balance`, its paid sources stopped because the wallet cannot pay them (X at zero balance: no events are received or read and nothing is sent until a top-up resumes it); or `provider_account`, the provider restricted its account (a WhatsApp number restricted or flagged for spam: nothing is sent until the provider lifts it). `error_code` and `error_reference` name the error that paused it (null for `balance`).","tags":["webhooks"],"x-rabt-module":"channels","parameters":[{"$ref":"#/components/parameters/WebhookId"},{"$ref":"#/components/parameters/WebhookTimestamp"},{"$ref":"#/components/parameters/WebhookSignature"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["type","version","timestamp","mode","data"],"properties":{"type":{"type":"string","enum":["channel.paused"]},"version":{"type":"integer","enum":[1],"description":"The version of `data`; a breaking change is a new version."},"timestamp":{"type":"string","format":"date-time","description":"When the event happened (UTC)."},"mode":{"type":"string","enum":["live","test"],"description":"`test` for events of the API test space, `live` otherwise."},"data":{"type":"object","properties":{"organization_id":{"type":"string","format":"uuid","description":"The organization the event happened in."},"channel_id":{"type":"string","format":"uuid"},"channel_type":{"type":"string","description":"`email`, `whatsapp`…"},"provider":{"type":"string","description":"The implementation serving it, e.g. `smtp` (email forwarding), `microsoft` (Microsoft 365), `google` (Gmail)."},"reason":{"type":"string","enum":["balance","provider_account"]},"error_code":{"type":["string","null"]},"error_reference":{"type":["string","null"]}},"required":["organization_id","channel_id","channel_type","provider","reason","error_code","error_reference"],"additionalProperties":false}}}}}},"responses":{"2XX":{"description":"Received. Any other answer, or none within the delivery timeout, is retried with exponential backoff; deliveries can be replayed from the delivery log."}}}},"channel.resumed":{"post":{"summary":"channel.resumed","description":"A paused channel resumed: after a top-up it receives again and its missed messages are read (`balance`), or the provider lifted the restriction of its account (`provider_account`).","tags":["webhooks"],"x-rabt-module":"channels","parameters":[{"$ref":"#/components/parameters/WebhookId"},{"$ref":"#/components/parameters/WebhookTimestamp"},{"$ref":"#/components/parameters/WebhookSignature"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["type","version","timestamp","mode","data"],"properties":{"type":{"type":"string","enum":["channel.resumed"]},"version":{"type":"integer","enum":[1],"description":"The version of `data`; a breaking change is a new version."},"timestamp":{"type":"string","format":"date-time","description":"When the event happened (UTC)."},"mode":{"type":"string","enum":["live","test"],"description":"`test` for events of the API test space, `live` otherwise."},"data":{"type":"object","properties":{"organization_id":{"type":"string","format":"uuid","description":"The organization the event happened in."},"channel_id":{"type":"string","format":"uuid"},"channel_type":{"type":"string","description":"`email`, `whatsapp`…"},"provider":{"type":"string","description":"The implementation serving it, e.g. `smtp` (email forwarding), `microsoft` (Microsoft 365), `google` (Gmail)."}},"required":["organization_id","channel_id","channel_type","provider"],"additionalProperties":false}}}}}},"responses":{"2XX":{"description":"Received. Any other answer, or none within the delivery timeout, is retried with exponential backoff; deliveries can be replayed from the delivery log."}}}},"whatsapp.template_changed":{"post":{"summary":"whatsapp.template_changed","description":"A WhatsApp message template was created, edited (reviewed again), read again from Meta, or Meta changed its category or quality score.","tags":["webhooks"],"x-rabt-module":"channels","parameters":[{"$ref":"#/components/parameters/WebhookId"},{"$ref":"#/components/parameters/WebhookTimestamp"},{"$ref":"#/components/parameters/WebhookSignature"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["type","version","timestamp","mode","data"],"properties":{"type":{"type":"string","enum":["whatsapp.template_changed"]},"version":{"type":"integer","enum":[1],"description":"The version of `data`; a breaking change is a new version."},"timestamp":{"type":"string","format":"date-time","description":"When the event happened (UTC)."},"mode":{"type":"string","enum":["live","test"],"description":"`test` for events of the API test space, `live` otherwise."},"data":{"type":"object","properties":{"organization_id":{"type":"string","format":"uuid","description":"The organization the event happened in."},"channel_id":{"type":"string","format":"uuid"},"template_id":{"type":"string","format":"uuid"},"name":{"type":"string"},"language":{"type":"string"},"change":{"type":"string","enum":["created","edited","synced","category_changed","quality_changed"]},"status":{"type":"string"},"category":{"type":"string"}},"required":["organization_id","channel_id","template_id","name","language","change","status","category"],"additionalProperties":false}}}}}},"responses":{"2XX":{"description":"Received. Any other answer, or none within the delivery timeout, is retried with exponential backoff; deliveries can be replayed from the delivery log."}}}},"whatsapp.template_status_changed":{"post":{"summary":"whatsapp.template_status_changed","description":"A WhatsApp template's approval status changed (approved, rejected, paused or disabled by Meta). `pause_count` counts Meta's pauses; the third disables the template.","tags":["webhooks"],"x-rabt-module":"channels","parameters":[{"$ref":"#/components/parameters/WebhookId"},{"$ref":"#/components/parameters/WebhookTimestamp"},{"$ref":"#/components/parameters/WebhookSignature"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["type","version","timestamp","mode","data"],"properties":{"type":{"type":"string","enum":["whatsapp.template_status_changed"]},"version":{"type":"integer","enum":[1],"description":"The version of `data`; a breaking change is a new version."},"timestamp":{"type":"string","format":"date-time","description":"When the event happened (UTC)."},"mode":{"type":"string","enum":["live","test"],"description":"`test` for events of the API test space, `live` otherwise."},"data":{"type":"object","properties":{"organization_id":{"type":"string","format":"uuid","description":"The organization the event happened in."},"channel_id":{"type":"string","format":"uuid"},"template_id":{"type":"string","format":"uuid"},"name":{"type":"string"},"language":{"type":"string"},"previous_status":{"type":"string"},"status":{"type":"string"},"reason":{"type":["string","null"]},"pause_count":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["organization_id","channel_id","template_id","name","language","previous_status","status","reason","pause_count"],"additionalProperties":false}}}}}},"responses":{"2XX":{"description":"Received. Any other answer, or none within the delivery timeout, is retried with exponential backoff; deliveries can be replayed from the delivery log."}}}},"whatsapp.account_changed":{"post":{"summary":"whatsapp.account_changed","description":"Meta reported a change of a WhatsApp number or its account: quality rating, messaging limit, an account update (restriction, violation, ban), capability limits, health status or the chat history import's progress; and Rabt stopping or resuming the number's sending (`SENDING_STOPPED`, `SENDING_RESUMED`, topic `account`).","tags":["webhooks"],"x-rabt-module":"channels","parameters":[{"$ref":"#/components/parameters/WebhookId"},{"$ref":"#/components/parameters/WebhookTimestamp"},{"$ref":"#/components/parameters/WebhookSignature"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["type","version","timestamp","mode","data"],"properties":{"type":{"type":"string","enum":["whatsapp.account_changed"]},"version":{"type":"integer","enum":[1],"description":"The version of `data`; a breaking change is a new version."},"timestamp":{"type":"string","format":"date-time","description":"When the event happened (UTC)."},"mode":{"type":"string","enum":["live","test"],"description":"`test` for events of the API test space, `live` otherwise."},"data":{"type":"object","properties":{"organization_id":{"type":"string","format":"uuid","description":"The organization the event happened in."},"channel_id":{"type":"string","format":"uuid"},"topic":{"type":"string","enum":["quality","messaging_limit","account","capability","health","history"]},"event":{"type":"string"}},"required":["organization_id","channel_id","topic","event"],"additionalProperties":false}}}}}},"responses":{"2XX":{"description":"Received. Any other answer, or none within the delivery timeout, is retried with exponential backoff; deliveries can be replayed from the delivery log."}}}},"channel.addresses_changed":{"post":{"summary":"channel.addresses_changed","description":"An email channel's addresses were discovered again (a Microsoft 365 mailbox and its aliases): the addresses added and removed.","tags":["webhooks"],"x-rabt-module":"channels","parameters":[{"$ref":"#/components/parameters/WebhookId"},{"$ref":"#/components/parameters/WebhookTimestamp"},{"$ref":"#/components/parameters/WebhookSignature"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["type","version","timestamp","mode","data"],"properties":{"type":{"type":"string","enum":["channel.addresses_changed"]},"version":{"type":"integer","enum":[1],"description":"The version of `data`; a breaking change is a new version."},"timestamp":{"type":"string","format":"date-time","description":"When the event happened (UTC)."},"mode":{"type":"string","enum":["live","test"],"description":"`test` for events of the API test space, `live` otherwise."},"data":{"type":"object","properties":{"organization_id":{"type":"string","format":"uuid","description":"The organization the event happened in."},"channel_id":{"type":"string","format":"uuid"},"channel_type":{"type":"string","description":"`email`, `whatsapp`…"},"provider":{"type":"string","description":"The implementation serving it, e.g. `smtp` (email forwarding), `microsoft` (Microsoft 365), `google` (Gmail)."},"added_address_ids":{"type":"array","items":{"type":"string","format":"uuid"}},"removed_address_ids":{"type":"array","items":{"type":"string","format":"uuid"}}},"required":["organization_id","channel_id","channel_type","provider","added_address_ids","removed_address_ids"],"additionalProperties":false}}}}}},"responses":{"2XX":{"description":"Received. Any other answer, or none within the delivery timeout, is retried with exponential backoff; deliveries can be replayed from the delivery log."}}}},"channel.address_updated":{"post":{"summary":"channel.address_updated","description":"One address of an email channel changed: its sender name, the member its new mail goes to, whether mail can be sent from it (the send-as check), or whether it is active (`active`: a stopped address takes no mail and sends none).","tags":["webhooks"],"x-rabt-module":"channels","parameters":[{"$ref":"#/components/parameters/WebhookId"},{"$ref":"#/components/parameters/WebhookTimestamp"},{"$ref":"#/components/parameters/WebhookSignature"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["type","version","timestamp","mode","data"],"properties":{"type":{"type":"string","enum":["channel.address_updated"]},"version":{"type":"integer","enum":[1],"description":"The version of `data`; a breaking change is a new version."},"timestamp":{"type":"string","format":"date-time","description":"When the event happened (UTC)."},"mode":{"type":"string","enum":["live","test"],"description":"`test` for events of the API test space, `live` otherwise."},"data":{"type":"object","properties":{"organization_id":{"type":"string","format":"uuid","description":"The organization the event happened in."},"channel_id":{"type":"string","format":"uuid"},"channel_type":{"type":"string","description":"`email`, `whatsapp`…"},"provider":{"type":"string","description":"The implementation serving it, e.g. `smtp` (email forwarding), `microsoft` (Microsoft 365), `google` (Gmail)."},"address_id":{"type":"string","format":"uuid"},"fields":{"type":"array","items":{"type":"string","enum":["display_name","assigned_member","send_as","active"]}}},"required":["organization_id","channel_id","channel_type","provider","address_id","fields"],"additionalProperties":false}}}}}},"responses":{"2XX":{"description":"Received. Any other answer, or none within the delivery timeout, is retried with exponential backoff; deliveries can be replayed from the delivery log."}}}},"email_signature.updated":{"post":{"summary":"email_signature.updated","description":"An email signature was created, changed or deleted, or a sending address moved into or out of it.","tags":["webhooks"],"x-rabt-module":"organization","parameters":[{"$ref":"#/components/parameters/WebhookId"},{"$ref":"#/components/parameters/WebhookTimestamp"},{"$ref":"#/components/parameters/WebhookSignature"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["type","version","timestamp","mode","data"],"properties":{"type":{"type":"string","enum":["email_signature.updated"]},"version":{"type":"integer","enum":[3],"description":"The version of `data`; a breaking change is a new version."},"timestamp":{"type":"string","format":"date-time","description":"When the event happened (UTC)."},"mode":{"type":"string","enum":["live","test"],"description":"`test` for events of the API test space, `live` otherwise."},"data":{"type":"object","properties":{"organization_id":{"type":"string","format":"uuid","description":"The organization the event happened in."},"signature_id":{"type":"string","format":"uuid"},"address_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"description":"The sending email address that moved into or out of the signature (null: none)."},"removed":{"type":"boolean"}},"required":["organization_id","signature_id","address_id","removed"],"additionalProperties":false}}}}}},"responses":{"2XX":{"description":"Received. Any other answer, or none within the delivery timeout, is retried with exponential backoff; deliveries can be replayed from the delivery log."}}}},"email_layout.updated":{"post":{"summary":"email_layout.updated","description":"An email layout was created, changed or deleted, or a sending address moved into or out of it.","tags":["webhooks"],"x-rabt-module":"organization","parameters":[{"$ref":"#/components/parameters/WebhookId"},{"$ref":"#/components/parameters/WebhookTimestamp"},{"$ref":"#/components/parameters/WebhookSignature"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["type","version","timestamp","mode","data"],"properties":{"type":{"type":"string","enum":["email_layout.updated"]},"version":{"type":"integer","enum":[1],"description":"The version of `data`; a breaking change is a new version."},"timestamp":{"type":"string","format":"date-time","description":"When the event happened (UTC)."},"mode":{"type":"string","enum":["live","test"],"description":"`test` for events of the API test space, `live` otherwise."},"data":{"type":"object","properties":{"organization_id":{"type":"string","format":"uuid","description":"The organization the event happened in."},"layout_id":{"type":"string","format":"uuid"},"space_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"description":"Deprecated: the space of a former space layout (never applied); null otherwise."},"address_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"description":"The sending email address that moved into or out of the layout (null: none)."},"removed":{"type":"boolean"}},"required":["organization_id","layout_id","space_id","address_id","removed"],"additionalProperties":false}}}}}},"responses":{"2XX":{"description":"Received. Any other answer, or none within the delivery timeout, is retried with exponential backoff; deliveries can be replayed from the delivery log."}}}},"import.progressed":{"post":{"summary":"import.progressed","description":"A channel's history import started, stored a page, paused (`resumes_at`), or ended (`done`, `capped` at the provider's limit, `declined` at the provider, `not_possible`): how many items are stored (`done`) of how many (`total`, known, estimated or unknown), the limit the provider states (`limit_code`, a catalog code), and why it paused or stopped (`error_code`).","tags":["webhooks"],"x-rabt-module":"channels","parameters":[{"$ref":"#/components/parameters/WebhookId"},{"$ref":"#/components/parameters/WebhookTimestamp"},{"$ref":"#/components/parameters/WebhookSignature"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["type","version","timestamp","mode","data"],"properties":{"type":{"type":"string","enum":["import.progressed"]},"version":{"type":"integer","enum":[1],"description":"The version of `data`; a breaking change is a new version."},"timestamp":{"type":"string","format":"date-time","description":"When the event happened (UTC)."},"mode":{"type":"string","enum":["live","test"],"description":"`test` for events of the API test space, `live` otherwise."},"data":{"type":"object","properties":{"organization_id":{"type":"string","format":"uuid","description":"The organization the event happened in."},"import_id":{"type":"string","format":"uuid"},"channel_id":{"type":"string","format":"uuid"},"channel_type":{"type":"string","description":"`email`, `whatsapp`…"},"provider":{"type":"string","description":"The implementation serving it, e.g. `smtp` (email forwarding), `microsoft` (Microsoft 365), `google` (Gmail)."},"kind":{"type":"string","description":"What is imported, e.g. `messages` or `reviews`."},"state":{"type":"string","enum":["running","paused","capped","declined","not_possible","done"]},"done":{"type":"integer","minimum":0,"maximum":9007199254740991},"total":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"total_kind":{"type":"string","enum":["known","estimated","unknown"]},"limit_code":{"type":["string","null"]},"resumes_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"error_code":{"type":["string","null"]},"error_reference":{"type":["string","null"]}},"required":["organization_id","import_id","channel_id","channel_type","provider","kind","state","done","total","total_kind","limit_code","resumes_at","error_code","error_reference"],"additionalProperties":false}}}}}},"responses":{"2XX":{"description":"Received. Any other answer, or none within the delivery timeout, is retried with exponential backoff; deliveries can be replayed from the delivery log."}}}},"review.received":{"post":{"summary":"review.received","description":"A new store review arrived and became a ticket, with its star rating (absent only for a Zid product question).","tags":["webhooks"],"x-rabt-module":"tickets","parameters":[{"$ref":"#/components/parameters/WebhookId"},{"$ref":"#/components/parameters/WebhookTimestamp"},{"$ref":"#/components/parameters/WebhookSignature"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["type","version","timestamp","mode","data"],"properties":{"type":{"type":"string","enum":["review.received"]},"version":{"type":"integer","enum":[1],"description":"The version of `data`; a breaking change is a new version."},"timestamp":{"type":"string","format":"date-time","description":"When the event happened (UTC)."},"mode":{"type":"string","enum":["live","test"],"description":"`test` for events of the API test space, `live` otherwise."},"data":{"type":"object","properties":{"organization_id":{"type":"string","format":"uuid","description":"The organization the event happened in."},"review_id":{"type":"string","format":"uuid"},"channel_type":{"type":"string","description":"`app_store`, `google_business`, `google_play`, `zid_questions`, `zid_reviews`…"},"channel_id":{"type":"string","format":"uuid"},"channel_address_id":{"type":"string","format":"uuid","description":"The app, store or location the review is about (its channel address)."},"ticket_id":{"type":"string","format":"uuid"},"message_id":{"type":"string","format":"uuid"},"rating":{"description":"The star rating, 1 to 5; absent only for a Zid product question (`channel_type` `zid_questions`), never for a store review.","type":"integer","minimum":1,"maximum":5}},"required":["organization_id","review_id","channel_type","channel_id","channel_address_id","ticket_id","message_id"],"additionalProperties":false}}}}}},"responses":{"2XX":{"description":"Received. Any other answer, or none within the delivery timeout, is retried with exponential backoff; deliveries can be replayed from the delivery log."}}}},"review.updated":{"post":{"summary":"review.updated","description":"The customer changed their review: the new content is a new message of the review’s ticket, and the earlier version is kept (`listReviewVersions`).","tags":["webhooks"],"x-rabt-module":"tickets","parameters":[{"$ref":"#/components/parameters/WebhookId"},{"$ref":"#/components/parameters/WebhookTimestamp"},{"$ref":"#/components/parameters/WebhookSignature"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["type","version","timestamp","mode","data"],"properties":{"type":{"type":"string","enum":["review.updated"]},"version":{"type":"integer","enum":[1],"description":"The version of `data`; a breaking change is a new version."},"timestamp":{"type":"string","format":"date-time","description":"When the event happened (UTC)."},"mode":{"type":"string","enum":["live","test"],"description":"`test` for events of the API test space, `live` otherwise."},"data":{"type":"object","properties":{"organization_id":{"type":"string","format":"uuid","description":"The organization the event happened in."},"review_id":{"type":"string","format":"uuid"},"channel_type":{"type":"string","description":"`app_store`, `google_business`, `google_play`, `zid_questions`, `zid_reviews`…"},"channel_id":{"type":"string","format":"uuid"},"channel_address_id":{"type":"string","format":"uuid","description":"The app, store or location the review is about (its channel address)."},"ticket_id":{"type":"string","format":"uuid"},"message_id":{"type":"string","format":"uuid"},"rating":{"description":"The star rating, 1 to 5; absent only for a Zid product question (`channel_type` `zid_questions`), never for a store review.","type":"integer","minimum":1,"maximum":5},"previous_rating":{"description":"The star rating, 1 to 5; absent only for a Zid product question (`channel_type` `zid_questions`), never for a store review.","type":"integer","minimum":1,"maximum":5},"previous_version_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"description":"The earlier version kept (Phase 1b B9); null for a change before B9."}},"required":["organization_id","review_id","channel_type","channel_id","channel_address_id","ticket_id","message_id","previous_version_id"],"additionalProperties":false}}}}}},"responses":{"2XX":{"description":"Received. Any other answer, or none within the delivery timeout, is retried with exponential backoff; deliveries can be replayed from the delivery log."}}}},"review.reply_changed":{"post":{"summary":"review.reply_changed","description":"The review's public reply changed on the store: `pending` (sent, waiting for the store to publish it), `published`, `deleted` or `rejected` (the store's moderation refused it; its reason is the review's `reply.rejected_reason`); `author` is `member`, `bot` (the AI agent) or `external` (written outside Rabt).","tags":["webhooks"],"x-rabt-module":"tickets","parameters":[{"$ref":"#/components/parameters/WebhookId"},{"$ref":"#/components/parameters/WebhookTimestamp"},{"$ref":"#/components/parameters/WebhookSignature"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["type","version","timestamp","mode","data"],"properties":{"type":{"type":"string","enum":["review.reply_changed"]},"version":{"type":"integer","enum":[1],"description":"The version of `data`; a breaking change is a new version."},"timestamp":{"type":"string","format":"date-time","description":"When the event happened (UTC)."},"mode":{"type":"string","enum":["live","test"],"description":"`test` for events of the API test space, `live` otherwise."},"data":{"type":"object","properties":{"organization_id":{"type":"string","format":"uuid","description":"The organization the event happened in."},"review_id":{"type":"string","format":"uuid"},"channel_type":{"type":"string","description":"`app_store`, `google_business`, `google_play`, `zid_questions`, `zid_reviews`…"},"channel_id":{"type":"string","format":"uuid"},"channel_address_id":{"type":"string","format":"uuid","description":"The app, store or location the review is about (its channel address)."},"ticket_id":{"type":"string","format":"uuid"},"previous_state":{"type":"string","enum":["none","pending","published","deleted","rejected"]},"state":{"type":"string","enum":["none","pending","published","deleted","rejected"]},"author":{"anyOf":[{"type":"string","enum":["member","bot","external"]},{"type":"null"}]},"message_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"by_membership_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]}},"required":["organization_id","review_id","channel_type","channel_id","channel_address_id","ticket_id","previous_state","state","author","message_id","by_membership_id"],"additionalProperties":false}}}}}},"responses":{"2XX":{"description":"Received. Any other answer, or none within the delivery timeout, is retried with exponential backoff; deliveries can be replayed from the delivery log."}}}},"review.coverage_gap":{"post":{"summary":"review.coverage_gap","description":"Polling an app’s reviews stopped for longer than the store keeps them: reviews written or changed between `from` and `until` may be missing (see them in Play Console).","tags":["webhooks"],"x-rabt-module":"channels","parameters":[{"$ref":"#/components/parameters/WebhookId"},{"$ref":"#/components/parameters/WebhookTimestamp"},{"$ref":"#/components/parameters/WebhookSignature"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["type","version","timestamp","mode","data"],"properties":{"type":{"type":"string","enum":["review.coverage_gap"]},"version":{"type":"integer","enum":[1],"description":"The version of `data`; a breaking change is a new version."},"timestamp":{"type":"string","format":"date-time","description":"When the event happened (UTC)."},"mode":{"type":"string","enum":["live","test"],"description":"`test` for events of the API test space, `live` otherwise."},"data":{"type":"object","properties":{"organization_id":{"type":"string","format":"uuid","description":"The organization the event happened in."},"channel_type":{"type":"string","description":"`google_play`…"},"channel_id":{"type":"string","format":"uuid"},"channel_address_id":{"type":"string","format":"uuid","description":"The app polled (its channel address)."},"review_source_id":{"type":"string","format":"uuid"},"from":{"type":"string","format":"date-time"},"until":{"type":"string","format":"date-time"},"error_code":{"type":"string"},"error_reference":{"type":"string"}},"required":["organization_id","channel_type","channel_id","channel_address_id","review_source_id","from","until","error_code","error_reference"],"additionalProperties":false}}}}}},"responses":{"2XX":{"description":"Received. Any other answer, or none within the delivery timeout, is retried with exponential backoff; deliveries can be replayed from the delivery log."}}}},"review.polling_stalled":{"post":{"summary":"review.polling_stalled","description":"No full read of an app’s reviews has finished since `since`: reviews are missed unless polling resumes before `lost_after`. Sent once per stretch.","tags":["webhooks"],"x-rabt-module":"channels","parameters":[{"$ref":"#/components/parameters/WebhookId"},{"$ref":"#/components/parameters/WebhookTimestamp"},{"$ref":"#/components/parameters/WebhookSignature"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["type","version","timestamp","mode","data"],"properties":{"type":{"type":"string","enum":["review.polling_stalled"]},"version":{"type":"integer","enum":[1],"description":"The version of `data`; a breaking change is a new version."},"timestamp":{"type":"string","format":"date-time","description":"When the event happened (UTC)."},"mode":{"type":"string","enum":["live","test"],"description":"`test` for events of the API test space, `live` otherwise."},"data":{"type":"object","properties":{"organization_id":{"type":"string","format":"uuid","description":"The organization the event happened in."},"channel_type":{"type":"string","description":"`google_play`…"},"channel_id":{"type":"string","format":"uuid"},"channel_address_id":{"type":"string","format":"uuid","description":"The app polled (its channel address)."},"review_source_id":{"type":"string","format":"uuid"},"since":{"type":"string","format":"date-time"},"lost_after":{"type":"string","format":"date-time"},"error_code":{"type":"string"},"error_reference":{"type":"string"}},"required":["organization_id","channel_type","channel_id","channel_address_id","review_source_id","since","lost_after","error_code","error_reference"],"additionalProperties":false}}}}}},"responses":{"2XX":{"description":"Received. Any other answer, or none within the delivery timeout, is retried with exponential backoff; deliveries can be replayed from the delivery log."}}}},"review.poll_requested":{"post":{"summary":"review.poll_requested","description":"Retired: never sent any more (members no longer ask for a read; Google Play reviews are polled every 15 minutes). A member or an integration asked Rabt to read a review channel’s reviews now.","tags":["webhooks"],"x-rabt-module":"channels","parameters":[{"$ref":"#/components/parameters/WebhookId"},{"$ref":"#/components/parameters/WebhookTimestamp"},{"$ref":"#/components/parameters/WebhookSignature"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["type","version","timestamp","mode","data"],"properties":{"type":{"type":"string","enum":["review.poll_requested"]},"version":{"type":"integer","enum":[1],"description":"The version of `data`; a breaking change is a new version."},"timestamp":{"type":"string","format":"date-time","description":"When the event happened (UTC)."},"mode":{"type":"string","enum":["live","test"],"description":"`test` for events of the API test space, `live` otherwise."},"data":{"type":"object","properties":{"organization_id":{"type":"string","format":"uuid","description":"The organization the event happened in."},"channel_type":{"type":"string"},"channel_id":{"type":"string","format":"uuid"},"requested_by_membership_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]}},"required":["organization_id","channel_type","channel_id","requested_by_membership_id"],"additionalProperties":false}}}}}},"responses":{"2XX":{"description":"Received. Any other answer, or none within the delivery timeout, is retried with exponential backoff; deliveries can be replayed from the delivery log."}}}},"integration.connected":{"post":{"summary":"integration.connected","description":"A store was connected by signing in to its platform; its first sync is queued.","tags":["webhooks"],"x-rabt-module":"integrations","parameters":[{"$ref":"#/components/parameters/WebhookId"},{"$ref":"#/components/parameters/WebhookTimestamp"},{"$ref":"#/components/parameters/WebhookSignature"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["type","version","timestamp","mode","data"],"properties":{"type":{"type":"string","enum":["integration.connected"]},"version":{"type":"integer","enum":[1],"description":"The version of `data`; a breaking change is a new version."},"timestamp":{"type":"string","format":"date-time","description":"When the event happened (UTC)."},"mode":{"type":"string","enum":["live","test"],"description":"`test` for events of the API test space, `live` otherwise."},"data":{"type":"object","properties":{"organization_id":{"type":"string","format":"uuid","description":"The organization the event happened in."},"integration_id":{"type":"string","format":"uuid"},"adapter":{"type":"string","description":"The platform: `salla`, `zid`, `shopify`, `wafeq_accounting`, `zoho_books`, `zoho_crm`."},"status":{"type":"string","enum":["active","needs_reauth","disconnected"]},"connected_by_membership_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]}},"required":["organization_id","integration_id","adapter","status","connected_by_membership_id"],"additionalProperties":false}}}}}},"responses":{"2XX":{"description":"Received. Any other answer, or none within the delivery timeout, is retried with exponential backoff; deliveries can be replayed from the delivery log."}}}},"integration.updated":{"post":{"summary":"integration.updated","description":"An integration's access was renewed (which is never sent) or its granted permissions or store name changed.","tags":["webhooks"],"x-rabt-module":"integrations","parameters":[{"$ref":"#/components/parameters/WebhookId"},{"$ref":"#/components/parameters/WebhookTimestamp"},{"$ref":"#/components/parameters/WebhookSignature"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["type","version","timestamp","mode","data"],"properties":{"type":{"type":"string","enum":["integration.updated"]},"version":{"type":"integer","enum":[1],"description":"The version of `data`; a breaking change is a new version."},"timestamp":{"type":"string","format":"date-time","description":"When the event happened (UTC)."},"mode":{"type":"string","enum":["live","test"],"description":"`test` for events of the API test space, `live` otherwise."},"data":{"type":"object","properties":{"organization_id":{"type":"string","format":"uuid","description":"The organization the event happened in."},"integration_id":{"type":"string","format":"uuid"},"adapter":{"type":"string","description":"The platform: `salla`, `zid`, `shopify`, `wafeq_accounting`, `zoho_books`, `zoho_crm`."},"fields":{"type":"array","items":{"type":"string","enum":["credentials","scopes","name"]}}},"required":["organization_id","integration_id","adapter","fields"],"additionalProperties":false}}}}}},"responses":{"2XX":{"description":"Received. Any other answer, or none within the delivery timeout, is retried with exponential backoff; deliveries can be replayed from the delivery log."}}}},"integration.status_changed":{"post":{"summary":"integration.status_changed","description":"An integration moved to another status: its access refused by the platform (`needs_reauth`: reconnect it) or reconnected (`active`). `error_code` and `error_reference` say why, when an error caused it.","tags":["webhooks"],"x-rabt-module":"integrations","parameters":[{"$ref":"#/components/parameters/WebhookId"},{"$ref":"#/components/parameters/WebhookTimestamp"},{"$ref":"#/components/parameters/WebhookSignature"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["type","version","timestamp","mode","data"],"properties":{"type":{"type":"string","enum":["integration.status_changed"]},"version":{"type":"integer","enum":[1],"description":"The version of `data`; a breaking change is a new version."},"timestamp":{"type":"string","format":"date-time","description":"When the event happened (UTC)."},"mode":{"type":"string","enum":["live","test"],"description":"`test` for events of the API test space, `live` otherwise."},"data":{"type":"object","properties":{"organization_id":{"type":"string","format":"uuid","description":"The organization the event happened in."},"integration_id":{"type":"string","format":"uuid"},"adapter":{"type":"string","description":"The platform: `salla`, `zid`, `shopify`, `wafeq_accounting`, `zoho_books`, `zoho_crm`."},"previous_status":{"type":"string","enum":["active","needs_reauth","disconnected"]},"status":{"type":"string","enum":["active","needs_reauth","disconnected"]},"error_code":{"type":["string","null"]},"error_reference":{"type":["string","null"]}},"required":["organization_id","integration_id","adapter","previous_status","status","error_code","error_reference"],"additionalProperties":false}}}}}},"responses":{"2XX":{"description":"Received. Any other answer, or none within the delivery timeout, is retried with exponential backoff; deliveries can be replayed from the delivery log."}}}},"integration.connection_health_changed":{"post":{"summary":"integration.connection_health_changed","description":"The connection check of an active integration (each finished sync) started failing (`failing`) or works again (`ok`). `error_class` says who acts: `provider` (the platform is failing; Rabt checks again on its own), `customer_account` (the account at the platform), `not_configured` or `rabt`. Refused access is `integration.status_changed`.","tags":["webhooks"],"x-rabt-module":"integrations","parameters":[{"$ref":"#/components/parameters/WebhookId"},{"$ref":"#/components/parameters/WebhookTimestamp"},{"$ref":"#/components/parameters/WebhookSignature"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["type","version","timestamp","mode","data"],"properties":{"type":{"type":"string","enum":["integration.connection_health_changed"]},"version":{"type":"integer","enum":[1],"description":"The version of `data`; a breaking change is a new version."},"timestamp":{"type":"string","format":"date-time","description":"When the event happened (UTC)."},"mode":{"type":"string","enum":["live","test"],"description":"`test` for events of the API test space, `live` otherwise."},"data":{"type":"object","properties":{"organization_id":{"type":"string","format":"uuid","description":"The organization the event happened in."},"integration_id":{"type":"string","format":"uuid"},"adapter":{"type":"string","description":"The platform: `salla`, `zid`, `shopify`, `wafeq_accounting`, `zoho_books`, `zoho_crm`."},"health":{"type":"string","enum":["ok","failing"]},"error_code":{"type":["string","null"]},"error_reference":{"type":["string","null"]},"error_class":{"anyOf":[{"type":"string","enum":["rabt","provider","customer_account","end_customer","not_configured","expected"]},{"type":"null"}]}},"required":["organization_id","integration_id","adapter","health","error_code","error_reference","error_class"],"additionalProperties":false}}}}}},"responses":{"2XX":{"description":"Received. Any other answer, or none within the delivery timeout, is retried with exponential backoff; deliveries can be replayed from the delivery log."}}}},"integration.disconnected":{"post":{"summary":"integration.disconnected","description":"An integration was disconnected by a member (`member`) or by the store removing the app (`uninstalled`); the orders and customers read before stay.","tags":["webhooks"],"x-rabt-module":"integrations","parameters":[{"$ref":"#/components/parameters/WebhookId"},{"$ref":"#/components/parameters/WebhookTimestamp"},{"$ref":"#/components/parameters/WebhookSignature"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["type","version","timestamp","mode","data"],"properties":{"type":{"type":"string","enum":["integration.disconnected"]},"version":{"type":"integer","enum":[1],"description":"The version of `data`; a breaking change is a new version."},"timestamp":{"type":"string","format":"date-time","description":"When the event happened (UTC)."},"mode":{"type":"string","enum":["live","test"],"description":"`test` for events of the API test space, `live` otherwise."},"data":{"type":"object","properties":{"organization_id":{"type":"string","format":"uuid","description":"The organization the event happened in."},"integration_id":{"type":"string","format":"uuid"},"adapter":{"type":"string","description":"The platform: `salla`, `zid`, `shopify`, `wafeq_accounting`, `zoho_books`, `zoho_crm`."},"reason":{"type":"string","enum":["member","uninstalled"]},"disconnected_by_membership_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]}},"required":["organization_id","integration_id","adapter","reason","disconnected_by_membership_id"],"additionalProperties":false}}}}}},"responses":{"2XX":{"description":"Received. Any other answer, or none within the delivery timeout, is retried with exponential backoff; deliveries can be replayed from the delivery log."}}}},"integration.sync_requested":{"post":{"summary":"integration.sync_requested","description":"A sync of the store’s customers and orders was queued: at connection, reconnection, on schedule or asked for by a member.","tags":["webhooks"],"x-rabt-module":"integrations","parameters":[{"$ref":"#/components/parameters/WebhookId"},{"$ref":"#/components/parameters/WebhookTimestamp"},{"$ref":"#/components/parameters/WebhookSignature"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["type","version","timestamp","mode","data"],"properties":{"type":{"type":"string","enum":["integration.sync_requested"]},"version":{"type":"integer","enum":[1],"description":"The version of `data`; a breaking change is a new version."},"timestamp":{"type":"string","format":"date-time","description":"When the event happened (UTC)."},"mode":{"type":"string","enum":["live","test"],"description":"`test` for events of the API test space, `live` otherwise."},"data":{"type":"object","properties":{"organization_id":{"type":"string","format":"uuid","description":"The organization the event happened in."},"integration_id":{"type":"string","format":"uuid"},"adapter":{"type":"string","description":"The platform: `salla`, `zid`, `shopify`, `wafeq_accounting`, `zoho_books`, `zoho_crm`."},"run_id":{"type":"string","format":"uuid"},"trigger":{"type":"string","enum":["connect","reconnect","schedule","member"]},"requested_by_membership_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]}},"required":["organization_id","integration_id","adapter","run_id","trigger","requested_by_membership_id"],"additionalProperties":false}}}}}},"responses":{"2XX":{"description":"Received. Any other answer, or none within the delivery timeout, is retried with exponential backoff; deliveries can be replayed from the delivery log."}}}},"integration.sync_completed":{"post":{"summary":"integration.sync_completed","description":"A sync finished: `succeeded` with the customers and orders it read, or `failed` with its error code and reference.","tags":["webhooks"],"x-rabt-module":"integrations","parameters":[{"$ref":"#/components/parameters/WebhookId"},{"$ref":"#/components/parameters/WebhookTimestamp"},{"$ref":"#/components/parameters/WebhookSignature"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["type","version","timestamp","mode","data"],"properties":{"type":{"type":"string","enum":["integration.sync_completed"]},"version":{"type":"integer","enum":[1],"description":"The version of `data`; a breaking change is a new version."},"timestamp":{"type":"string","format":"date-time","description":"When the event happened (UTC)."},"mode":{"type":"string","enum":["live","test"],"description":"`test` for events of the API test space, `live` otherwise."},"data":{"type":"object","properties":{"organization_id":{"type":"string","format":"uuid","description":"The organization the event happened in."},"integration_id":{"type":"string","format":"uuid"},"adapter":{"type":"string","description":"The platform: `salla`, `zid`, `shopify`, `wafeq_accounting`, `zoho_books`, `zoho_crm`."},"run_id":{"type":"string","format":"uuid"},"status":{"type":"string","enum":["succeeded","failed"]},"customers_synced":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"orders_synced":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"error_code":{"type":["string","null"]},"error_reference":{"type":["string","null"]}},"required":["organization_id","integration_id","adapter","run_id","status","customers_synced","orders_synced","error_code","error_reference"],"additionalProperties":false}}}}}},"responses":{"2XX":{"description":"Received. Any other answer, or none within the delivery timeout, is retried with exponential backoff; deliveries can be replayed from the delivery log."}}}},"integration.order_changed":{"post":{"summary":"integration.order_changed","description":"An order of a connected store appeared or its status changed (e.g. shipped): the trigger for automations.","tags":["webhooks"],"x-rabt-module":"integrations","parameters":[{"$ref":"#/components/parameters/WebhookId"},{"$ref":"#/components/parameters/WebhookTimestamp"},{"$ref":"#/components/parameters/WebhookSignature"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["type","version","timestamp","mode","data"],"properties":{"type":{"type":"string","enum":["integration.order_changed"]},"version":{"type":"integer","enum":[1],"description":"The version of `data`; a breaking change is a new version."},"timestamp":{"type":"string","format":"date-time","description":"When the event happened (UTC)."},"mode":{"type":"string","enum":["live","test"],"description":"`test` for events of the API test space, `live` otherwise."},"data":{"type":"object","properties":{"organization_id":{"type":"string","format":"uuid","description":"The organization the event happened in."},"integration_id":{"type":"string","format":"uuid"},"adapter":{"type":"string","description":"The platform: `salla`, `zid`, `shopify`, `wafeq_accounting`, `zoho_books`, `zoho_crm`."},"order_id":{"type":"string","format":"uuid"},"external_id":{"type":"string","description":"The order’s id at the platform."},"number":{"type":"string","description":"The order number the customer knows."},"status":{"type":"string","enum":["pending","processing","shipped","delivered","completed","cancelled","refunded","other"]},"previous_status":{"anyOf":[{"type":"string","enum":["pending","processing","shipped","delivered","completed","cancelled","refunded","other"]},{"type":"null"}]}},"required":["organization_id","integration_id","adapter","order_id","external_id","number","status","previous_status"],"additionalProperties":false}}}}}},"responses":{"2XX":{"description":"Received. Any other answer, or none within the delivery timeout, is retried with exponential backoff; deliveries can be replayed from the delivery log."}}}},"integration.privacy_request":{"post":{"summary":"integration.privacy_request","description":"The platform sent a privacy request about a store’s customer: `customer_data_request` (answer the customer with the data read through the API), or a redaction Rabt applied (`customer_redact`, `shop_redact`).","tags":["webhooks"],"x-rabt-module":"integrations","parameters":[{"$ref":"#/components/parameters/WebhookId"},{"$ref":"#/components/parameters/WebhookTimestamp"},{"$ref":"#/components/parameters/WebhookSignature"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["type","version","timestamp","mode","data"],"properties":{"type":{"type":"string","enum":["integration.privacy_request"]},"version":{"type":"integer","enum":[1],"description":"The version of `data`; a breaking change is a new version."},"timestamp":{"type":"string","format":"date-time","description":"When the event happened (UTC)."},"mode":{"type":"string","enum":["live","test"],"description":"`test` for events of the API test space, `live` otherwise."},"data":{"type":"object","properties":{"organization_id":{"type":"string","format":"uuid","description":"The organization the event happened in."},"integration_id":{"type":"string","format":"uuid"},"adapter":{"type":"string","description":"The platform: `salla`, `zid`, `shopify`, `wafeq_accounting`, `zoho_books`, `zoho_crm`."},"kind":{"type":"string","enum":["customer_data_request","customer_redact","shop_redact"]},"customer_external_id":{"type":["string","null"]}},"required":["organization_id","integration_id","adapter","kind","customer_external_id"],"additionalProperties":false}}}}}},"responses":{"2XX":{"description":"Received. Any other answer, or none within the delivery timeout, is retried with exponential backoff; deliveries can be replayed from the delivery log."}}}},"integration.record_changed":{"post":{"summary":"integration.record_changed","description":"A customer record of an external system (docs/16 \"Generic integrations\") was created, updated or deleted, by the push API, a REST connector run or a connected store or system (its customers and orders, Phase 1b B9). Read it with `getExternalRecord` when needed, or a ticket’s whole customer data with `getTicketCustomerData`.","tags":["webhooks"],"x-rabt-module":"integrations","parameters":[{"$ref":"#/components/parameters/WebhookId"},{"$ref":"#/components/parameters/WebhookTimestamp"},{"$ref":"#/components/parameters/WebhookSignature"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["type","version","timestamp","mode","data"],"properties":{"type":{"type":"string","enum":["integration.record_changed"]},"version":{"type":"integer","enum":[1],"description":"The version of `data`; a breaking change is a new version."},"timestamp":{"type":"string","format":"date-time","description":"When the event happened (UTC)."},"mode":{"type":"string","enum":["live","test"],"description":"`test` for events of the API test space, `live` otherwise."},"data":{"type":"object","properties":{"organization_id":{"type":"string","format":"uuid","description":"The organization the event happened in."},"record_id":{"type":"string","format":"uuid"},"source":{"type":"string","description":"The system the record comes from."},"type":{"type":"string","description":"What the record is (e.g. `invoice`)."},"external_id":{"type":"string","description":"The record’s id in its system."},"change":{"type":"string","enum":["created","updated","deleted"]},"connector_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"description":"The connector that read it; null when pushed."},"kind":{"type":"string","enum":["customer","order","invoice","record"],"description":"What it is to Rabt (Phase 1b B9)."},"integration_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"description":"The connected store or system it was read from; null when pushed or read by a connector."}},"required":["organization_id","record_id","source","type","external_id","change","connector_id","kind","integration_id"],"additionalProperties":false}}}}}},"responses":{"2XX":{"description":"Received. Any other answer, or none within the delivery timeout, is retried with exponential backoff; deliveries can be replayed from the delivery log."}}}},"integration.connector_created":{"post":{"summary":"integration.connector_created","description":"A configurable REST connector was set up.","tags":["webhooks"],"x-rabt-module":"integrations","parameters":[{"$ref":"#/components/parameters/WebhookId"},{"$ref":"#/components/parameters/WebhookTimestamp"},{"$ref":"#/components/parameters/WebhookSignature"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["type","version","timestamp","mode","data"],"properties":{"type":{"type":"string","enum":["integration.connector_created"]},"version":{"type":"integer","enum":[1],"description":"The version of `data`; a breaking change is a new version."},"timestamp":{"type":"string","format":"date-time","description":"When the event happened (UTC)."},"mode":{"type":"string","enum":["live","test"],"description":"`test` for events of the API test space, `live` otherwise."},"data":{"type":"object","properties":{"organization_id":{"type":"string","format":"uuid","description":"The organization the event happened in."},"connector_id":{"type":"string","format":"uuid"},"source":{"type":"string","description":"The `source` of the records the connector writes."},"record_type":{"type":"string","description":"The `type` of the records the connector writes."},"status":{"type":"string","enum":["active","needs_auth","removed"]},"created_by_membership_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]}},"required":["organization_id","connector_id","source","record_type","status","created_by_membership_id"],"additionalProperties":false}}}}}},"responses":{"2XX":{"description":"Received. Any other answer, or none within the delivery timeout, is retried with exponential backoff; deliveries can be replayed from the delivery log."}}}},"integration.connector_updated":{"post":{"summary":"integration.connector_updated","description":"A connector’s name, settings, credentials (never sent) or schedule changed, or its sign-in was renewed.","tags":["webhooks"],"x-rabt-module":"integrations","parameters":[{"$ref":"#/components/parameters/WebhookId"},{"$ref":"#/components/parameters/WebhookTimestamp"},{"$ref":"#/components/parameters/WebhookSignature"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["type","version","timestamp","mode","data"],"properties":{"type":{"type":"string","enum":["integration.connector_updated"]},"version":{"type":"integer","enum":[1],"description":"The version of `data`; a breaking change is a new version."},"timestamp":{"type":"string","format":"date-time","description":"When the event happened (UTC)."},"mode":{"type":"string","enum":["live","test"],"description":"`test` for events of the API test space, `live` otherwise."},"data":{"type":"object","properties":{"organization_id":{"type":"string","format":"uuid","description":"The organization the event happened in."},"connector_id":{"type":"string","format":"uuid"},"source":{"type":"string","description":"The `source` of the records the connector writes."},"record_type":{"type":"string","description":"The `type` of the records the connector writes."},"fields":{"type":"array","items":{"type":"string","enum":["name","config","credentials","sync_interval"]}}},"required":["organization_id","connector_id","source","record_type","fields"],"additionalProperties":false}}}}}},"responses":{"2XX":{"description":"Received. Any other answer, or none within the delivery timeout, is retried with exponential backoff; deliveries can be replayed from the delivery log."}}}},"integration.connector_status_changed":{"post":{"summary":"integration.connector_status_changed","description":"A connector moved to another status: its credentials refused by the system (`needs_auth`) or working again (`active`). `error_code` and `error_reference` say why, when an error caused it.","tags":["webhooks"],"x-rabt-module":"integrations","parameters":[{"$ref":"#/components/parameters/WebhookId"},{"$ref":"#/components/parameters/WebhookTimestamp"},{"$ref":"#/components/parameters/WebhookSignature"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["type","version","timestamp","mode","data"],"properties":{"type":{"type":"string","enum":["integration.connector_status_changed"]},"version":{"type":"integer","enum":[1],"description":"The version of `data`; a breaking change is a new version."},"timestamp":{"type":"string","format":"date-time","description":"When the event happened (UTC)."},"mode":{"type":"string","enum":["live","test"],"description":"`test` for events of the API test space, `live` otherwise."},"data":{"type":"object","properties":{"organization_id":{"type":"string","format":"uuid","description":"The organization the event happened in."},"connector_id":{"type":"string","format":"uuid"},"source":{"type":"string","description":"The `source` of the records the connector writes."},"record_type":{"type":"string","description":"The `type` of the records the connector writes."},"previous_status":{"type":"string","enum":["active","needs_auth","removed"]},"status":{"type":"string","enum":["active","needs_auth","removed"]},"error_code":{"type":["string","null"]},"error_reference":{"type":["string","null"]}},"required":["organization_id","connector_id","source","record_type","previous_status","status","error_code","error_reference"],"additionalProperties":false}}}}}},"responses":{"2XX":{"description":"Received. Any other answer, or none within the delivery timeout, is retried with exponential backoff; deliveries can be replayed from the delivery log."}}}},"integration.connector_removed":{"post":{"summary":"integration.connector_removed","description":"A connector was removed: its credentials were revoked and it no longer runs; the records it read stay.","tags":["webhooks"],"x-rabt-module":"integrations","parameters":[{"$ref":"#/components/parameters/WebhookId"},{"$ref":"#/components/parameters/WebhookTimestamp"},{"$ref":"#/components/parameters/WebhookSignature"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["type","version","timestamp","mode","data"],"properties":{"type":{"type":"string","enum":["integration.connector_removed"]},"version":{"type":"integer","enum":[1],"description":"The version of `data`; a breaking change is a new version."},"timestamp":{"type":"string","format":"date-time","description":"When the event happened (UTC)."},"mode":{"type":"string","enum":["live","test"],"description":"`test` for events of the API test space, `live` otherwise."},"data":{"type":"object","properties":{"organization_id":{"type":"string","format":"uuid","description":"The organization the event happened in."},"connector_id":{"type":"string","format":"uuid"},"source":{"type":"string","description":"The `source` of the records the connector writes."},"record_type":{"type":"string","description":"The `type` of the records the connector writes."},"removed_by_membership_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]}},"required":["organization_id","connector_id","source","record_type","removed_by_membership_id"],"additionalProperties":false}}}}}},"responses":{"2XX":{"description":"Received. Any other answer, or none within the delivery timeout, is retried with exponential backoff; deliveries can be replayed from the delivery log."}}}},"integration.connector_sync_requested":{"post":{"summary":"integration.connector_sync_requested","description":"A connector run was queued: after it was set up or changed, on schedule, or asked for by a member.","tags":["webhooks"],"x-rabt-module":"integrations","parameters":[{"$ref":"#/components/parameters/WebhookId"},{"$ref":"#/components/parameters/WebhookTimestamp"},{"$ref":"#/components/parameters/WebhookSignature"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["type","version","timestamp","mode","data"],"properties":{"type":{"type":"string","enum":["integration.connector_sync_requested"]},"version":{"type":"integer","enum":[1],"description":"The version of `data`; a breaking change is a new version."},"timestamp":{"type":"string","format":"date-time","description":"When the event happened (UTC)."},"mode":{"type":"string","enum":["live","test"],"description":"`test` for events of the API test space, `live` otherwise."},"data":{"type":"object","properties":{"organization_id":{"type":"string","format":"uuid","description":"The organization the event happened in."},"connector_id":{"type":"string","format":"uuid"},"source":{"type":"string","description":"The `source` of the records the connector writes."},"record_type":{"type":"string","description":"The `type` of the records the connector writes."},"run_id":{"type":"string","format":"uuid"},"trigger":{"type":"string","enum":["created","changed","schedule","member"]},"requested_by_membership_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]}},"required":["organization_id","connector_id","source","record_type","run_id","trigger","requested_by_membership_id"],"additionalProperties":false}}}}}},"responses":{"2XX":{"description":"Received. Any other answer, or none within the delivery timeout, is retried with exponential backoff; deliveries can be replayed from the delivery log."}}}},"integration.connector_sync_completed":{"post":{"summary":"integration.connector_sync_completed","description":"A connector run finished: `succeeded` with the records written and skipped, or `failed` with its error code and reference.","tags":["webhooks"],"x-rabt-module":"integrations","parameters":[{"$ref":"#/components/parameters/WebhookId"},{"$ref":"#/components/parameters/WebhookTimestamp"},{"$ref":"#/components/parameters/WebhookSignature"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["type","version","timestamp","mode","data"],"properties":{"type":{"type":"string","enum":["integration.connector_sync_completed"]},"version":{"type":"integer","enum":[1],"description":"The version of `data`; a breaking change is a new version."},"timestamp":{"type":"string","format":"date-time","description":"When the event happened (UTC)."},"mode":{"type":"string","enum":["live","test"],"description":"`test` for events of the API test space, `live` otherwise."},"data":{"type":"object","properties":{"organization_id":{"type":"string","format":"uuid","description":"The organization the event happened in."},"connector_id":{"type":"string","format":"uuid"},"source":{"type":"string","description":"The `source` of the records the connector writes."},"record_type":{"type":"string","description":"The `type` of the records the connector writes."},"run_id":{"type":"string","format":"uuid"},"status":{"type":"string","enum":["succeeded","failed"]},"records_synced":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"records_skipped":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"error_code":{"type":["string","null"]},"error_reference":{"type":["string","null"]}},"required":["organization_id","connector_id","source","record_type","run_id","status","records_synced","records_skipped","error_code","error_reference"],"additionalProperties":false}}}}}},"responses":{"2XX":{"description":"Received. Any other answer, or none within the delivery timeout, is retried with exponential backoff; deliveries can be replayed from the delivery log."}}}},"integration.person_changed":{"post":{"summary":"integration.person_changed","description":"Retired: never sent any more (the HR people directory was removed). An employee of an HR system was written: `created`, `updated`, or `removed` at the source.","tags":["webhooks"],"x-rabt-module":"integrations","parameters":[{"$ref":"#/components/parameters/WebhookId"},{"$ref":"#/components/parameters/WebhookTimestamp"},{"$ref":"#/components/parameters/WebhookSignature"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["type","version","timestamp","mode","data"],"properties":{"type":{"type":"string","enum":["integration.person_changed"]},"version":{"type":"integer","enum":[1],"description":"The version of `data`; a breaking change is a new version."},"timestamp":{"type":"string","format":"date-time","description":"When the event happened (UTC)."},"mode":{"type":"string","enum":["live","test"],"description":"`test` for events of the API test space, `live` otherwise."},"data":{"type":"object","properties":{"organization_id":{"type":"string","format":"uuid","description":"The organization the event happened in."},"person_id":{"type":"string","format":"uuid"},"source":{"type":"string","description":"The HR system."},"external_id":{"type":"string","description":"The employee’s id in the HR system."},"membership_id":{"type":"string","format":"uuid"},"change":{"type":"string","enum":["created","updated","removed"]},"employment":{"type":"string","enum":["employed","terminated"]},"connector_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"description":"The connector that read it; null when pushed."}},"required":["organization_id","person_id","source","external_id","membership_id","change","employment","connector_id"],"additionalProperties":false}}}}}},"responses":{"2XX":{"description":"Received. Any other answer, or none within the delivery timeout, is retried with exponential backoff; deliveries can be replayed from the delivery log."}}}},"integration.person_activated":{"post":{"summary":"integration.person_activated","description":"Retired: never sent any more (the HR people directory was removed). The owner activated an employee of an HR system.","tags":["webhooks"],"x-rabt-module":"integrations","parameters":[{"$ref":"#/components/parameters/WebhookId"},{"$ref":"#/components/parameters/WebhookTimestamp"},{"$ref":"#/components/parameters/WebhookSignature"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["type","version","timestamp","mode","data"],"properties":{"type":{"type":"string","enum":["integration.person_activated"]},"version":{"type":"integer","enum":[1],"description":"The version of `data`; a breaking change is a new version."},"timestamp":{"type":"string","format":"date-time","description":"When the event happened (UTC)."},"mode":{"type":"string","enum":["live","test"],"description":"`test` for events of the API test space, `live` otherwise."},"data":{"type":"object","properties":{"organization_id":{"type":"string","format":"uuid","description":"The organization the event happened in."},"person_id":{"type":"string","format":"uuid"},"membership_id":{"type":"string","format":"uuid"},"activated_by_membership_id":{"type":"string","format":"uuid"}},"required":["organization_id","person_id","membership_id","activated_by_membership_id"],"additionalProperties":false}}}}}},"responses":{"2XX":{"description":"Received. Any other answer, or none within the delivery timeout, is retried with exponential backoff; deliveries can be replayed from the delivery log."}}}},"integration.person_left":{"post":{"summary":"integration.person_left","description":"Retired: never sent any more (the HR people directory was removed). The HR system said an employee left (`terminated`, or `removed` at the source).","tags":["webhooks"],"x-rabt-module":"integrations","parameters":[{"$ref":"#/components/parameters/WebhookId"},{"$ref":"#/components/parameters/WebhookTimestamp"},{"$ref":"#/components/parameters/WebhookSignature"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["type","version","timestamp","mode","data"],"properties":{"type":{"type":"string","enum":["integration.person_left"]},"version":{"type":"integer","enum":[1],"description":"The version of `data`; a breaking change is a new version."},"timestamp":{"type":"string","format":"date-time","description":"When the event happened (UTC)."},"mode":{"type":"string","enum":["live","test"],"description":"`test` for events of the API test space, `live` otherwise."},"data":{"type":"object","properties":{"organization_id":{"type":"string","format":"uuid","description":"The organization the event happened in."},"person_id":{"type":"string","format":"uuid"},"membership_id":{"type":"string","format":"uuid"},"reason":{"type":"string","enum":["terminated","removed"]}},"required":["organization_id","person_id","membership_id","reason"],"additionalProperties":false}}}}}},"responses":{"2XX":{"description":"Received. Any other answer, or none within the delivery timeout, is retried with exponential backoff; deliveries can be replayed from the delivery log."}}}},"integration.department_mapping_changed":{"post":{"summary":"integration.department_mapping_changed","description":"Retired: never sent any more (the HR people directory was removed). An HR department was mapped to a space (`set`) or the mapping was `removed`.","tags":["webhooks"],"x-rabt-module":"integrations","parameters":[{"$ref":"#/components/parameters/WebhookId"},{"$ref":"#/components/parameters/WebhookTimestamp"},{"$ref":"#/components/parameters/WebhookSignature"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["type","version","timestamp","mode","data"],"properties":{"type":{"type":"string","enum":["integration.department_mapping_changed"]},"version":{"type":"integer","enum":[1],"description":"The version of `data`; a breaking change is a new version."},"timestamp":{"type":"string","format":"date-time","description":"When the event happened (UTC)."},"mode":{"type":"string","enum":["live","test"],"description":"`test` for events of the API test space, `live` otherwise."},"data":{"type":"object","properties":{"organization_id":{"type":"string","format":"uuid","description":"The organization the event happened in."},"mapping_id":{"type":"string","format":"uuid"},"department":{"type":"string"},"space_id":{"type":"string","format":"uuid"},"change":{"type":"string","enum":["set","removed"]},"by_membership_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]}},"required":["organization_id","mapping_id","department","space_id","change","by_membership_id"],"additionalProperties":false}}}}}},"responses":{"2XX":{"description":"Received. Any other answer, or none within the delivery timeout, is retried with exponential backoff; deliveries can be replayed from the delivery log."}}}},"space.created":{"post":{"summary":"space.created","description":"A department space was created.","tags":["webhooks"],"x-rabt-module":"spaces","parameters":[{"$ref":"#/components/parameters/WebhookId"},{"$ref":"#/components/parameters/WebhookTimestamp"},{"$ref":"#/components/parameters/WebhookSignature"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["type","version","timestamp","mode","data"],"properties":{"type":{"type":"string","enum":["space.created"]},"version":{"type":"integer","enum":[1],"description":"The version of `data`; a breaking change is a new version."},"timestamp":{"type":"string","format":"date-time","description":"When the event happened (UTC)."},"mode":{"type":"string","enum":["live","test"],"description":"`test` for events of the API test space, `live` otherwise."},"data":{"type":"object","properties":{"organization_id":{"type":"string","format":"uuid","description":"The organization the event happened in."},"space_id":{"type":"string","format":"uuid"},"name":{"type":"string"}},"required":["organization_id","space_id","name"],"additionalProperties":false}}}}}},"responses":{"2XX":{"description":"Received. Any other answer, or none within the delivery timeout, is retried with exponential backoff; deliveries can be replayed from the delivery log."}}}},"space.updated":{"post":{"summary":"space.updated","description":"A space changed: its name, description, returning-customer window or \"no member available\" message.","tags":["webhooks"],"x-rabt-module":"spaces","parameters":[{"$ref":"#/components/parameters/WebhookId"},{"$ref":"#/components/parameters/WebhookTimestamp"},{"$ref":"#/components/parameters/WebhookSignature"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["type","version","timestamp","mode","data"],"properties":{"type":{"type":"string","enum":["space.updated"]},"version":{"type":"integer","enum":[1],"description":"The version of `data`; a breaking change is a new version."},"timestamp":{"type":"string","format":"date-time","description":"When the event happened (UTC)."},"mode":{"type":"string","enum":["live","test"],"description":"`test` for events of the API test space, `live` otherwise."},"data":{"type":"object","properties":{"organization_id":{"type":"string","format":"uuid","description":"The organization the event happened in."},"space_id":{"type":"string","format":"uuid"},"changed":{"type":"array","items":{"type":"string","enum":["name","description","returning_customer_days","no_agent_message"]}}},"required":["organization_id","space_id","changed"],"additionalProperties":false}}}}}},"responses":{"2XX":{"description":"Received. Any other answer, or none within the delivery timeout, is retried with exponential backoff; deliveries can be replayed from the delivery log."}}}},"space.archived":{"post":{"summary":"space.archived","description":"A space was archived: its channels were released (each item to the member who connected it, else the owner) and its open tickets moved to the chosen space or member.","tags":["webhooks"],"x-rabt-module":"spaces","parameters":[{"$ref":"#/components/parameters/WebhookId"},{"$ref":"#/components/parameters/WebhookTimestamp"},{"$ref":"#/components/parameters/WebhookSignature"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["type","version","timestamp","mode","data"],"properties":{"type":{"type":"string","enum":["space.archived"]},"version":{"type":"integer","enum":[1],"description":"The version of `data`; a breaking change is a new version."},"timestamp":{"type":"string","format":"date-time","description":"When the event happened (UTC)."},"mode":{"type":"string","enum":["live","test"],"description":"`test` for events of the API test space, `live` otherwise."},"data":{"type":"object","properties":{"organization_id":{"type":"string","format":"uuid","description":"The organization the event happened in."},"space_id":{"type":"string","format":"uuid"}},"required":["organization_id","space_id"],"additionalProperties":false}}}}}},"responses":{"2XX":{"description":"Received. Any other answer, or none within the delivery timeout, is retried with exponential backoff; deliveries can be replayed from the delivery log."}}}},"space.member_added":{"post":{"summary":"space.member_added","description":"A member was added to a space.","tags":["webhooks"],"x-rabt-module":"spaces","parameters":[{"$ref":"#/components/parameters/WebhookId"},{"$ref":"#/components/parameters/WebhookTimestamp"},{"$ref":"#/components/parameters/WebhookSignature"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["type","version","timestamp","mode","data"],"properties":{"type":{"type":"string","enum":["space.member_added"]},"version":{"type":"integer","enum":[1],"description":"The version of `data`; a breaking change is a new version."},"timestamp":{"type":"string","format":"date-time","description":"When the event happened (UTC)."},"mode":{"type":"string","enum":["live","test"],"description":"`test` for events of the API test space, `live` otherwise."},"data":{"type":"object","properties":{"organization_id":{"type":"string","format":"uuid","description":"The organization the event happened in."},"space_id":{"type":"string","format":"uuid"},"membership_id":{"type":"string","format":"uuid"}},"required":["organization_id","space_id","membership_id"],"additionalProperties":false}}}}}},"responses":{"2XX":{"description":"Received. Any other answer, or none within the delivery timeout, is retried with exponential backoff; deliveries can be replayed from the delivery log."}}}},"space.member_removed":{"post":{"summary":"space.member_removed","description":"A member was removed from a space.","tags":["webhooks"],"x-rabt-module":"spaces","parameters":[{"$ref":"#/components/parameters/WebhookId"},{"$ref":"#/components/parameters/WebhookTimestamp"},{"$ref":"#/components/parameters/WebhookSignature"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["type","version","timestamp","mode","data"],"properties":{"type":{"type":"string","enum":["space.member_removed"]},"version":{"type":"integer","enum":[1],"description":"The version of `data`; a breaking change is a new version."},"timestamp":{"type":"string","format":"date-time","description":"When the event happened (UTC)."},"mode":{"type":"string","enum":["live","test"],"description":"`test` for events of the API test space, `live` otherwise."},"data":{"type":"object","properties":{"organization_id":{"type":"string","format":"uuid","description":"The organization the event happened in."},"space_id":{"type":"string","format":"uuid"},"membership_id":{"type":"string","format":"uuid"}},"required":["organization_id","space_id","membership_id"],"additionalProperties":false}}}}}},"responses":{"2XX":{"description":"Received. Any other answer, or none within the delivery timeout, is retried with exponential backoff; deliveries can be replayed from the delivery log."}}}},"space.channel_assigned":{"post":{"summary":"space.channel_assigned","description":"A channel, email address or voice number was assigned to a space.","tags":["webhooks"],"x-rabt-module":"spaces","parameters":[{"$ref":"#/components/parameters/WebhookId"},{"$ref":"#/components/parameters/WebhookTimestamp"},{"$ref":"#/components/parameters/WebhookSignature"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["type","version","timestamp","mode","data"],"properties":{"type":{"type":"string","enum":["space.channel_assigned"]},"version":{"type":"integer","enum":[1],"description":"The version of `data`; a breaking change is a new version."},"timestamp":{"type":"string","format":"date-time","description":"When the event happened (UTC)."},"mode":{"type":"string","enum":["live","test"],"description":"`test` for events of the API test space, `live` otherwise."},"data":{"type":"object","properties":{"organization_id":{"type":"string","format":"uuid","description":"The organization the event happened in."},"space_id":{"type":"string","format":"uuid"},"assignment_id":{"type":"string","format":"uuid"},"channel_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"channel_address_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"phone_number_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]}},"required":["organization_id","space_id","assignment_id","channel_id","channel_address_id","phone_number_id"],"additionalProperties":false}}}}}},"responses":{"2XX":{"description":"Received. Any other answer, or none within the delivery timeout, is retried with exponential backoff; deliveries can be replayed from the delivery log."}}}},"space.channel_unassigned":{"post":{"summary":"space.channel_unassigned","description":"A channel, email address or voice number was removed from a space.","tags":["webhooks"],"x-rabt-module":"spaces","parameters":[{"$ref":"#/components/parameters/WebhookId"},{"$ref":"#/components/parameters/WebhookTimestamp"},{"$ref":"#/components/parameters/WebhookSignature"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["type","version","timestamp","mode","data"],"properties":{"type":{"type":"string","enum":["space.channel_unassigned"]},"version":{"type":"integer","enum":[1],"description":"The version of `data`; a breaking change is a new version."},"timestamp":{"type":"string","format":"date-time","description":"When the event happened (UTC)."},"mode":{"type":"string","enum":["live","test"],"description":"`test` for events of the API test space, `live` otherwise."},"data":{"type":"object","properties":{"organization_id":{"type":"string","format":"uuid","description":"The organization the event happened in."},"space_id":{"type":"string","format":"uuid"},"assignment_id":{"type":"string","format":"uuid"},"channel_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"channel_address_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"phone_number_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]}},"required":["organization_id","space_id","assignment_id","channel_id","channel_address_id","phone_number_id"],"additionalProperties":false}}}}}},"responses":{"2XX":{"description":"Received. Any other answer, or none within the delivery timeout, is retried with exponential backoff; deliveries can be replayed from the delivery log."}}}},"member.status_changed":{"post":{"summary":"member.status_changed","description":"A member became available or unavailable, by their own switch or by a manager stopping or resuming their tickets (`manager`, with `by_membership_id`).","tags":["webhooks"],"x-rabt-module":"spaces","parameters":[{"$ref":"#/components/parameters/WebhookId"},{"$ref":"#/components/parameters/WebhookTimestamp"},{"$ref":"#/components/parameters/WebhookSignature"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["type","version","timestamp","mode","data"],"properties":{"type":{"type":"string","enum":["member.status_changed"]},"version":{"type":"integer","enum":[1],"description":"The version of `data`; a breaking change is a new version."},"timestamp":{"type":"string","format":"date-time","description":"When the event happened (UTC)."},"mode":{"type":"string","enum":["live","test"],"description":"`test` for events of the API test space, `live` otherwise."},"data":{"type":"object","properties":{"organization_id":{"type":"string","format":"uuid","description":"The organization the event happened in."},"membership_id":{"type":"string","format":"uuid"},"status":{"type":"string","enum":["available","unavailable"]},"source":{"type":"string","enum":["manual","auto_disconnect","auto_reconnect","joined","manager"]},"by_membership_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"occurred_at":{"type":"string","format":"date-time"}},"required":["organization_id","membership_id","status","source","by_membership_id","occurred_at"],"additionalProperties":false}}}}}},"responses":{"2XX":{"description":"Received. Any other answer, or none within the delivery timeout, is retried with exponential backoff; deliveries can be replayed from the delivery log."}}}},"member.reassign_changed":{"post":{"summary":"member.reassign_changed","description":"Retired (the away-with-reassign switch was removed): listed for subscriptions that name it, never sent any more.","tags":["webhooks"],"x-rabt-module":"spaces","parameters":[{"$ref":"#/components/parameters/WebhookId"},{"$ref":"#/components/parameters/WebhookTimestamp"},{"$ref":"#/components/parameters/WebhookSignature"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["type","version","timestamp","mode","data"],"properties":{"type":{"type":"string","enum":["member.reassign_changed"]},"version":{"type":"integer","enum":[1],"description":"The version of `data`; a breaking change is a new version."},"timestamp":{"type":"string","format":"date-time","description":"When the event happened (UTC)."},"mode":{"type":"string","enum":["live","test"],"description":"`test` for events of the API test space, `live` otherwise."},"data":{"type":"object","properties":{"organization_id":{"type":"string","format":"uuid","description":"The organization the event happened in."},"membership_id":{"type":"string","format":"uuid"},"reassign_while_away":{"type":"boolean"},"occurred_at":{"type":"string","format":"date-time"}},"required":["organization_id","membership_id","reassign_while_away","occurred_at"],"additionalProperties":false}}}}}},"responses":{"2XX":{"description":"Received. Any other answer, or none within the delivery timeout, is retried with exponential backoff; deliveries can be replayed from the delivery log."}}}},"routing.limit_changed":{"post":{"summary":"routing.limit_changed","description":"The organization's maximum of open tickets per member changed. `membership_id` is null (a member's own limit appears in earlier deliveries only).","tags":["webhooks"],"x-rabt-module":"spaces","parameters":[{"$ref":"#/components/parameters/WebhookId"},{"$ref":"#/components/parameters/WebhookTimestamp"},{"$ref":"#/components/parameters/WebhookSignature"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["type","version","timestamp","mode","data"],"properties":{"type":{"type":"string","enum":["routing.limit_changed"]},"version":{"type":"integer","enum":[1],"description":"The version of `data`; a breaking change is a new version."},"timestamp":{"type":"string","format":"date-time","description":"When the event happened (UTC)."},"mode":{"type":"string","enum":["live","test"],"description":"`test` for events of the API test space, `live` otherwise."},"data":{"type":"object","properties":{"organization_id":{"type":"string","format":"uuid","description":"The organization the event happened in."},"membership_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"max_open_tickets":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]}},"required":["organization_id","membership_id","max_open_tickets"],"additionalProperties":false}}}}}},"responses":{"2XX":{"description":"Received. Any other answer, or none within the delivery timeout, is retried with exponential backoff; deliveries can be replayed from the delivery log."}}}},"routing.destination_changed":{"post":{"summary":"routing.destination_changed","description":"The destination of a connected address, account, phone number, channel or chat widget changed: its new tickets go to one space or one member. `target` is `address`, `number` (a phone number; `target_id` is its id) or `channel`. `kind` is the side of a two-sided account whose destination changed (`private`: its private messages, `public`: its public replies), null on a one-sided item.","tags":["webhooks"],"x-rabt-module":"spaces","parameters":[{"$ref":"#/components/parameters/WebhookId"},{"$ref":"#/components/parameters/WebhookTimestamp"},{"$ref":"#/components/parameters/WebhookSignature"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["type","version","timestamp","mode","data"],"properties":{"type":{"type":"string","enum":["routing.destination_changed"]},"version":{"type":"integer","enum":[1],"description":"The version of `data`; a breaking change is a new version."},"timestamp":{"type":"string","format":"date-time","description":"When the event happened (UTC)."},"mode":{"type":"string","enum":["live","test"],"description":"`test` for events of the API test space, `live` otherwise."},"data":{"type":"object","properties":{"organization_id":{"type":"string","format":"uuid","description":"The organization the event happened in."},"target":{"type":"string","enum":["address","number","channel"]},"target_id":{"type":"string","format":"uuid"},"channel_id":{"type":"string","format":"uuid"},"channel_type":{"type":"string"},"kind":{"anyOf":[{"type":"string","enum":["private","public"]},{"type":"null"}]},"before":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["all"]}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["space"]},"space_id":{"type":"string","format":"uuid"}},"required":["type","space_id"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["member"]},"membership_id":{"type":"string","format":"uuid"}},"required":["type","membership_id"],"additionalProperties":false}]},"after":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["all"]}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["space"]},"space_id":{"type":"string","format":"uuid"}},"required":["type","space_id"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["member"]},"membership_id":{"type":"string","format":"uuid"}},"required":["type","membership_id"],"additionalProperties":false}]}},"required":["organization_id","target","target_id","channel_id","channel_type","kind","before","after"],"additionalProperties":false}}}}}},"responses":{"2XX":{"description":"Received. Any other answer, or none within the delivery timeout, is retried with exponential backoff; deliveries can be replayed from the delivery log."}}}},"routing.customer_destination_changed":{"post":{"summary":"routing.customer_destination_changed","description":"A customer's own destination changed: an email address, phone number, email domain, contact or company whose new tickets follow their channel (`all`: no route of its own), go to one space or one member, before their channel's destination. `kind` is `email`, `phone`, `domain`, `contact` or `company`.","tags":["webhooks"],"x-rabt-module":"spaces","parameters":[{"$ref":"#/components/parameters/WebhookId"},{"$ref":"#/components/parameters/WebhookTimestamp"},{"$ref":"#/components/parameters/WebhookSignature"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["type","version","timestamp","mode","data"],"properties":{"type":{"type":"string","enum":["routing.customer_destination_changed"]},"version":{"type":"integer","enum":[1],"description":"The version of `data`; a breaking change is a new version."},"timestamp":{"type":"string","format":"date-time","description":"When the event happened (UTC)."},"mode":{"type":"string","enum":["live","test"],"description":"`test` for events of the API test space, `live` otherwise."},"data":{"type":"object","properties":{"organization_id":{"type":"string","format":"uuid","description":"The organization the event happened in."},"kind":{"type":"string","enum":["email","phone","domain","contact","company"]},"value":{"type":["string","null"]},"contact_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"company_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"before":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["all"]}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["space"]},"space_id":{"type":"string","format":"uuid"}},"required":["type","space_id"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["member"]},"membership_id":{"type":"string","format":"uuid"}},"required":["type","membership_id"],"additionalProperties":false}]},"after":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["all"]}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["space"]},"space_id":{"type":"string","format":"uuid"}},"required":["type","space_id"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["member"]},"membership_id":{"type":"string","format":"uuid"}},"required":["type","membership_id"],"additionalProperties":false}]}},"required":["organization_id","kind","value","contact_id","company_id","before","after"],"additionalProperties":false}}}}}},"responses":{"2XX":{"description":"Received. Any other answer, or none within the delivery timeout, is retried with exponential backoff; deliveries can be replayed from the delivery log."}}}},"call.started":{"post":{"summary":"call.started","description":"A call started: an inbound call ringing the members of its space (or waiting in its queue), or an outbound call a member placed from a ticket.","tags":["webhooks"],"x-rabt-module":"voice","parameters":[{"$ref":"#/components/parameters/WebhookId"},{"$ref":"#/components/parameters/WebhookTimestamp"},{"$ref":"#/components/parameters/WebhookSignature"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["type","version","timestamp","mode","data"],"properties":{"type":{"type":"string","enum":["call.started"]},"version":{"type":"integer","enum":[1],"description":"The version of `data`; a breaking change is a new version."},"timestamp":{"type":"string","format":"date-time","description":"When the event happened (UTC)."},"mode":{"type":"string","enum":["live","test"],"description":"`test` for events of the API test space, `live` otherwise."},"data":{"type":"object","properties":{"organization_id":{"type":"string","format":"uuid","description":"The organization the event happened in."},"call_id":{"type":"string","format":"uuid"},"ticket_id":{"type":"string","format":"uuid"},"phone_number_id":{"type":"string","format":"uuid"},"direction":{"type":"string","enum":["inbound","outbound"]},"membership_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"description":"The member who placed an outbound call."},"space_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"description":"The space rung (inbound); null for the All space."}},"required":["organization_id","call_id","ticket_id","phone_number_id","direction","membership_id","space_id"],"additionalProperties":false}}}}}},"responses":{"2XX":{"description":"Received. Any other answer, or none within the delivery timeout, is retried with exponential backoff; deliveries can be replayed from the delivery log."}}}},"call.member_declined":{"post":{"summary":"call.member_declined","description":"A member declined a call ringing them: it stops ringing them and the other members keep being rung (they are not rung again for this call).","tags":["webhooks"],"x-rabt-module":"voice","parameters":[{"$ref":"#/components/parameters/WebhookId"},{"$ref":"#/components/parameters/WebhookTimestamp"},{"$ref":"#/components/parameters/WebhookSignature"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["type","version","timestamp","mode","data"],"properties":{"type":{"type":"string","enum":["call.member_declined"]},"version":{"type":"integer","enum":[1],"description":"The version of `data`; a breaking change is a new version."},"timestamp":{"type":"string","format":"date-time","description":"When the event happened (UTC)."},"mode":{"type":"string","enum":["live","test"],"description":"`test` for events of the API test space, `live` otherwise."},"data":{"type":"object","properties":{"organization_id":{"type":"string","format":"uuid","description":"The organization the event happened in."},"call_id":{"type":"string","format":"uuid"},"ticket_id":{"type":"string","format":"uuid"},"membership_id":{"type":"string","format":"uuid"}},"required":["organization_id","call_id","ticket_id","membership_id"],"additionalProperties":false}}}}}},"responses":{"2XX":{"description":"Received. Any other answer, or none within the delivery timeout, is retried with exponential backoff; deliveries can be replayed from the delivery log."}}}},"call.answered":{"post":{"summary":"call.answered","description":"A call was answered by a member (inbound) or by the customer (outbound).","tags":["webhooks"],"x-rabt-module":"voice","parameters":[{"$ref":"#/components/parameters/WebhookId"},{"$ref":"#/components/parameters/WebhookTimestamp"},{"$ref":"#/components/parameters/WebhookSignature"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["type","version","timestamp","mode","data"],"properties":{"type":{"type":"string","enum":["call.answered"]},"version":{"type":"integer","enum":[1],"description":"The version of `data`; a breaking change is a new version."},"timestamp":{"type":"string","format":"date-time","description":"When the event happened (UTC)."},"mode":{"type":"string","enum":["live","test"],"description":"`test` for events of the API test space, `live` otherwise."},"data":{"type":"object","properties":{"organization_id":{"type":"string","format":"uuid","description":"The organization the event happened in."},"call_id":{"type":"string","format":"uuid"},"ticket_id":{"type":"string","format":"uuid"},"direction":{"type":"string","enum":["inbound","outbound"]},"membership_id":{"type":"string","format":"uuid"}},"required":["organization_id","call_id","ticket_id","direction","membership_id"],"additionalProperties":false}}}}}},"responses":{"2XX":{"description":"Received. Any other answer, or none within the delivery timeout, is retried with exponential backoff; deliveries can be replayed from the delivery log."}}}},"call.transferred":{"post":{"summary":"call.transferred","description":"An answered call was transferred to a space or to a member.","tags":["webhooks"],"x-rabt-module":"voice","parameters":[{"$ref":"#/components/parameters/WebhookId"},{"$ref":"#/components/parameters/WebhookTimestamp"},{"$ref":"#/components/parameters/WebhookSignature"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["type","version","timestamp","mode","data"],"properties":{"type":{"type":"string","enum":["call.transferred"]},"version":{"type":"integer","enum":[1],"description":"The version of `data`; a breaking change is a new version."},"timestamp":{"type":"string","format":"date-time","description":"When the event happened (UTC)."},"mode":{"type":"string","enum":["live","test"],"description":"`test` for events of the API test space, `live` otherwise."},"data":{"type":"object","properties":{"organization_id":{"type":"string","format":"uuid","description":"The organization the event happened in."},"call_id":{"type":"string","format":"uuid"},"ticket_id":{"type":"string","format":"uuid"},"from_membership_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"to_space_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"to_membership_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"by_membership_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]}},"required":["organization_id","call_id","ticket_id","from_membership_id","to_space_id","to_membership_id","by_membership_id"],"additionalProperties":false}}}}}},"responses":{"2XX":{"description":"Received. Any other answer, or none within the delivery timeout, is retried with exponential backoff; deliveries can be replayed from the delivery log."}}}},"call.ended":{"post":{"summary":"call.ended","description":"A call ended, answered or not, with its outcome, duration and the minutes charged (docs/16); `ticket_id` is null for a notification call outside a phone thread (version 2). `status` is final: `completed` (answered, then ended), `voicemail` (a message was left), `missed` (inbound, nobody answered), `rejected` (refused before it rang), `no_answer`, `busy` or `failed` (outbound, not answered), `abandoned` (ended before it reached the customer). `end_reason`: `caller`, `callee`, `member`, `balance` (the wallet ran out), `timeout`, `rejected`, `error` (with `error_code`) or `system` (Rabt ended it, e.g. a notification call whose message was spoken). The sample is an outbound notification call.","tags":["webhooks"],"x-rabt-module":"voice","parameters":[{"$ref":"#/components/parameters/WebhookId"},{"$ref":"#/components/parameters/WebhookTimestamp"},{"$ref":"#/components/parameters/WebhookSignature"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["type","version","timestamp","mode","data"],"properties":{"type":{"type":"string","enum":["call.ended"]},"version":{"type":"integer","enum":[2],"description":"The version of `data`; a breaking change is a new version."},"timestamp":{"type":"string","format":"date-time","description":"When the event happened (UTC)."},"mode":{"type":"string","enum":["live","test"],"description":"`test` for events of the API test space, `live` otherwise."},"data":{"type":"object","properties":{"organization_id":{"type":"string","format":"uuid","description":"The organization the event happened in."},"call_id":{"type":"string","format":"uuid"},"ticket_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"direction":{"type":"string","enum":["inbound","outbound"]},"duration_sec":{"type":"integer","minimum":0,"maximum":9007199254740991},"status":{"type":"string","enum":["completed","voicemail","missed","rejected","no_answer","busy","failed","abandoned"]},"end_reason":{"type":"string","enum":["caller","callee","member","balance","timeout","rejected","error","system"]},"membership_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"billed_minutes":{"type":"integer","minimum":0,"maximum":9007199254740991},"charged_amount":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Halalas."},"error_code":{"type":["string","null"]}},"required":["organization_id","call_id","ticket_id","direction","duration_sec","status","end_reason","membership_id","billed_minutes","charged_amount","error_code"],"additionalProperties":false}}}}}},"responses":{"2XX":{"description":"Received. Any other answer, or none within the delivery timeout, is retried with exponential backoff; deliveries can be replayed from the delivery log."}}}},"call.ai_answered":{"post":{"summary":"call.ai_answered","description":"The voice AI agent answered an inbound call; it may only hand it to a human of the number's space (docs/15).","tags":["webhooks"],"x-rabt-module":"voice","parameters":[{"$ref":"#/components/parameters/WebhookId"},{"$ref":"#/components/parameters/WebhookTimestamp"},{"$ref":"#/components/parameters/WebhookSignature"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["type","version","timestamp","mode","data"],"properties":{"type":{"type":"string","enum":["call.ai_answered"]},"version":{"type":"integer","enum":[2],"description":"The version of `data`; a breaking change is a new version."},"timestamp":{"type":"string","format":"date-time","description":"When the event happened (UTC)."},"mode":{"type":"string","enum":["live","test"],"description":"`test` for events of the API test space, `live` otherwise."},"data":{"type":"object","properties":{"organization_id":{"type":"string","format":"uuid","description":"The organization the event happened in."},"call_id":{"type":"string","format":"uuid"},"ticket_id":{"type":"string","format":"uuid"},"model":{"type":"null","description":"Deprecated, always null (kept until the next version of this event)."}},"required":["organization_id","call_id","ticket_id","model"],"additionalProperties":false}}}}}},"responses":{"2XX":{"description":"Received. Any other answer, or none within the delivery timeout, is retried with exponential backoff; deliveries can be replayed from the delivery log."}}}},"call.ai_ended":{"post":{"summary":"call.ai_ended","description":"The voice AI agent's part of a call ended: handed to a human, taken over by a member, stopped, failed, or the caller hung up. Read the transcript with `GET /v1/calls/{id}/transcript`.","tags":["webhooks"],"x-rabt-module":"voice","parameters":[{"$ref":"#/components/parameters/WebhookId"},{"$ref":"#/components/parameters/WebhookTimestamp"},{"$ref":"#/components/parameters/WebhookSignature"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["type","version","timestamp","mode","data"],"properties":{"type":{"type":"string","enum":["call.ai_ended"]},"version":{"type":"integer","enum":[2],"description":"The version of `data`; a breaking change is a new version."},"timestamp":{"type":"string","format":"date-time","description":"When the event happened (UTC)."},"mode":{"type":"string","enum":["live","test"],"description":"`test` for events of the API test space, `live` otherwise."},"data":{"type":"object","properties":{"organization_id":{"type":"string","format":"uuid","description":"The organization the event happened in."},"call_id":{"type":"string","format":"uuid"},"ticket_id":{"type":"string","format":"uuid"},"outcome":{"type":"string","enum":["handed_off","taken_over","stopped","balance","failed","caller_left"]},"handoff_reason":{"anyOf":[{"type":"string","enum":["instructions","customer_asked","negative_sentiment","no_answer","customer_stuck"]},{"type":"null"}]},"taken_over_by_membership_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"billed_minutes":{"type":"integer","minimum":0,"maximum":9007199254740991},"charged_amount":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Halalas."},"error_code":{"type":["string","null"]}},"required":["organization_id","call_id","ticket_id","outcome","handoff_reason","taken_over_by_membership_id","billed_minutes","charged_amount","error_code"],"additionalProperties":false}}}}}},"responses":{"2XX":{"description":"Received. Any other answer, or none within the delivery timeout, is retried with exponential backoff; deliveries can be replayed from the delivery log."}}}},"call.transcript_added":{"post":{"summary":"call.transcript_added","description":"An utterance of the caller or the voice AI agent was added to the call's live transcript; read it with `GET /v1/calls/{id}/transcript`.","tags":["webhooks"],"x-rabt-module":"voice","parameters":[{"$ref":"#/components/parameters/WebhookId"},{"$ref":"#/components/parameters/WebhookTimestamp"},{"$ref":"#/components/parameters/WebhookSignature"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["type","version","timestamp","mode","data"],"properties":{"type":{"type":"string","enum":["call.transcript_added"]},"version":{"type":"integer","enum":[1],"description":"The version of `data`; a breaking change is a new version."},"timestamp":{"type":"string","format":"date-time","description":"When the event happened (UTC)."},"mode":{"type":"string","enum":["live","test"],"description":"`test` for events of the API test space, `live` otherwise."},"data":{"type":"object","properties":{"organization_id":{"type":"string","format":"uuid","description":"The organization the event happened in."},"call_id":{"type":"string","format":"uuid"},"ticket_id":{"type":"string","format":"uuid"},"seq":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"speaker":{"type":"string","enum":["caller","agent"]}},"required":["organization_id","call_id","ticket_id","seq","speaker"],"additionalProperties":false}}}}}},"responses":{"2XX":{"description":"Received. Any other answer, or none within the delivery timeout, is retried with exponential backoff; deliveries can be replayed from the delivery log."}}}},"call.recording_ready":{"post":{"summary":"call.recording_ready","description":"A call's recording or voicemail is stored; fetch it with `GET /v1/calls/{id}/recording` or `/voicemail`.","tags":["webhooks"],"x-rabt-module":"voice","parameters":[{"$ref":"#/components/parameters/WebhookId"},{"$ref":"#/components/parameters/WebhookTimestamp"},{"$ref":"#/components/parameters/WebhookSignature"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["type","version","timestamp","mode","data"],"properties":{"type":{"type":"string","enum":["call.recording_ready"]},"version":{"type":"integer","enum":[1],"description":"The version of `data`; a breaking change is a new version."},"timestamp":{"type":"string","format":"date-time","description":"When the event happened (UTC)."},"mode":{"type":"string","enum":["live","test"],"description":"`test` for events of the API test space, `live` otherwise."},"data":{"type":"object","properties":{"organization_id":{"type":"string","format":"uuid","description":"The organization the event happened in."},"call_id":{"type":"string","format":"uuid"},"ticket_id":{"type":"string","format":"uuid"},"kind":{"type":"string","enum":["recording","voicemail"]}},"required":["organization_id","call_id","ticket_id","kind"],"additionalProperties":false}}}}}},"responses":{"2XX":{"description":"Received. Any other answer, or none within the delivery timeout, is retried with exponential backoff; deliveries can be replayed from the delivery log."}}}},"phone_number.assigned":{"post":{"summary":"phone_number.assigned","description":"A number was assigned to the organization; its first month was paid.","tags":["webhooks"],"x-rabt-module":"voice","parameters":[{"$ref":"#/components/parameters/WebhookId"},{"$ref":"#/components/parameters/WebhookTimestamp"},{"$ref":"#/components/parameters/WebhookSignature"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["type","version","timestamp","mode","data"],"properties":{"type":{"type":"string","enum":["phone_number.assigned"]},"version":{"type":"integer","enum":[1],"description":"The version of `data`; a breaking change is a new version."},"timestamp":{"type":"string","format":"date-time","description":"When the event happened (UTC)."},"mode":{"type":"string","enum":["live","test"],"description":"`test` for events of the API test space, `live` otherwise."},"data":{"type":"object","properties":{"organization_id":{"type":"string","format":"uuid","description":"The organization the event happened in."},"phone_number_id":{"type":"string","format":"uuid"},"e164":{"type":"string","description":"The number in E.164, e.g. `+966112345678`."},"type":{"type":"string","enum":["geographic","unified_9200","toll_free_800","mobile"]},"assigned_by_membership_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]}},"required":["organization_id","phone_number_id","e164","type","assigned_by_membership_id"],"additionalProperties":false}}}}}},"responses":{"2XX":{"description":"Received. Any other answer, or none within the delivery timeout, is retried with exponential backoff; deliveries can be replayed from the delivery log."}}}},"phone_number.updated":{"post":{"summary":"phone_number.updated","description":"A number's name, destination, call settings or voice AI agent switch changed.","tags":["webhooks"],"x-rabt-module":"voice","parameters":[{"$ref":"#/components/parameters/WebhookId"},{"$ref":"#/components/parameters/WebhookTimestamp"},{"$ref":"#/components/parameters/WebhookSignature"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["type","version","timestamp","mode","data"],"properties":{"type":{"type":"string","enum":["phone_number.updated"]},"version":{"type":"integer","enum":[2],"description":"The version of `data`; a breaking change is a new version."},"timestamp":{"type":"string","format":"date-time","description":"When the event happened (UTC)."},"mode":{"type":"string","enum":["live","test"],"description":"`test` for events of the API test space, `live` otherwise."},"data":{"type":"object","properties":{"organization_id":{"type":"string","format":"uuid","description":"The organization the event happened in."},"phone_number_id":{"type":"string","format":"uuid"},"e164":{"type":"string","description":"The number in E.164, e.g. `+966112345678`."},"fields":{"minItems":1,"type":"array","items":{"type":"string","enum":["name","destination","record_calls","recording_notice","voicemail_enabled","ring_timeout_sec","queue_timeout_sec","lines","ai_agent_enabled","registration"]}}},"required":["organization_id","phone_number_id","e164","fields"],"additionalProperties":false}}}}}},"responses":{"2XX":{"description":"Received. Any other answer, or none within the delivery timeout, is retried with exponential backoff; deliveries can be replayed from the delivery log."}}}},"phone_number.suspended":{"post":{"summary":"phone_number.suspended","description":"A number was suspended (its rental could not be paid, or by the Rabt team): its calls are refused.","tags":["webhooks"],"x-rabt-module":"voice","parameters":[{"$ref":"#/components/parameters/WebhookId"},{"$ref":"#/components/parameters/WebhookTimestamp"},{"$ref":"#/components/parameters/WebhookSignature"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["type","version","timestamp","mode","data"],"properties":{"type":{"type":"string","enum":["phone_number.suspended"]},"version":{"type":"integer","enum":[1],"description":"The version of `data`; a breaking change is a new version."},"timestamp":{"type":"string","format":"date-time","description":"When the event happened (UTC)."},"mode":{"type":"string","enum":["live","test"],"description":"`test` for events of the API test space, `live` otherwise."},"data":{"type":"object","properties":{"organization_id":{"type":"string","format":"uuid","description":"The organization the event happened in."},"phone_number_id":{"type":"string","format":"uuid"},"e164":{"type":"string","description":"The number in E.164, e.g. `+966112345678`."},"reason":{"type":"string","enum":["rental_unpaid","platform"]}},"required":["organization_id","phone_number_id","e164","reason"],"additionalProperties":false}}}}}},"responses":{"2XX":{"description":"Received. Any other answer, or none within the delivery timeout, is retried with exponential backoff; deliveries can be replayed from the delivery log."}}}},"phone_number.resumed":{"post":{"summary":"phone_number.resumed","description":"A suspended number works again.","tags":["webhooks"],"x-rabt-module":"voice","parameters":[{"$ref":"#/components/parameters/WebhookId"},{"$ref":"#/components/parameters/WebhookTimestamp"},{"$ref":"#/components/parameters/WebhookSignature"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["type","version","timestamp","mode","data"],"properties":{"type":{"type":"string","enum":["phone_number.resumed"]},"version":{"type":"integer","enum":[1],"description":"The version of `data`; a breaking change is a new version."},"timestamp":{"type":"string","format":"date-time","description":"When the event happened (UTC)."},"mode":{"type":"string","enum":["live","test"],"description":"`test` for events of the API test space, `live` otherwise."},"data":{"type":"object","properties":{"organization_id":{"type":"string","format":"uuid","description":"The organization the event happened in."},"phone_number_id":{"type":"string","format":"uuid"},"e164":{"type":"string","description":"The number in E.164, e.g. `+966112345678`."},"reason":{"type":"string","enum":["rental_unpaid","platform"]}},"required":["organization_id","phone_number_id","e164","reason"],"additionalProperties":false}}}}}},"responses":{"2XX":{"description":"Received. Any other answer, or none within the delivery timeout, is retried with exponential backoff; deliveries can be replayed from the delivery log."}}}},"phone_number.released":{"post":{"summary":"phone_number.released","description":"The organization released a number (final).","tags":["webhooks"],"x-rabt-module":"voice","parameters":[{"$ref":"#/components/parameters/WebhookId"},{"$ref":"#/components/parameters/WebhookTimestamp"},{"$ref":"#/components/parameters/WebhookSignature"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["type","version","timestamp","mode","data"],"properties":{"type":{"type":"string","enum":["phone_number.released"]},"version":{"type":"integer","enum":[1],"description":"The version of `data`; a breaking change is a new version."},"timestamp":{"type":"string","format":"date-time","description":"When the event happened (UTC)."},"mode":{"type":"string","enum":["live","test"],"description":"`test` for events of the API test space, `live` otherwise."},"data":{"type":"object","properties":{"organization_id":{"type":"string","format":"uuid","description":"The organization the event happened in."},"phone_number_id":{"type":"string","format":"uuid"},"e164":{"type":"string","description":"The number in E.164, e.g. `+966112345678`."},"released_by_membership_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]}},"required":["organization_id","phone_number_id","e164","released_by_membership_id"],"additionalProperties":false}}}}}},"responses":{"2XX":{"description":"Received. Any other answer, or none within the delivery timeout, is retried with exponential backoff; deliveries can be replayed from the delivery log."}}}},"voice.settings_updated":{"post":{"summary":"voice.settings_updated","description":"The voice settings changed: international calling, the countries allowed, the default number, the voice AI agent's switch or voice, or the organization's kill switch.","tags":["webhooks"],"x-rabt-module":"voice","parameters":[{"$ref":"#/components/parameters/WebhookId"},{"$ref":"#/components/parameters/WebhookTimestamp"},{"$ref":"#/components/parameters/WebhookSignature"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["type","version","timestamp","mode","data"],"properties":{"type":{"type":"string","enum":["voice.settings_updated"]},"version":{"type":"integer","enum":[2],"description":"The version of `data`; a breaking change is a new version."},"timestamp":{"type":"string","format":"date-time","description":"When the event happened (UTC)."},"mode":{"type":"string","enum":["live","test"],"description":"`test` for events of the API test space, `live` otherwise."},"data":{"type":"object","properties":{"organization_id":{"type":"string","format":"uuid","description":"The organization the event happened in."},"fields":{"minItems":1,"type":"array","items":{"type":"string","enum":["international_calling_enabled","international_countries","default_number_id","ai_agent_enabled","ai_agent_voice","ai_agent_kill_switch"]}},"updated_by_membership_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]}},"required":["organization_id","fields","updated_by_membership_id"],"additionalProperties":false}}}}}},"responses":{"2XX":{"description":"Received. Any other answer, or none within the delivery timeout, is retried with exponential backoff; deliveries can be replayed from the delivery log."}}}},"voice.velocity_alert":{"post":{"summary":"voice.velocity_alert","description":"An unusual number of outbound calls in a short time (fraud protection): check who made them.","tags":["webhooks"],"x-rabt-module":"voice","parameters":[{"$ref":"#/components/parameters/WebhookId"},{"$ref":"#/components/parameters/WebhookTimestamp"},{"$ref":"#/components/parameters/WebhookSignature"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["type","version","timestamp","mode","data"],"properties":{"type":{"type":"string","enum":["voice.velocity_alert"]},"version":{"type":"integer","enum":[1],"description":"The version of `data`; a breaking change is a new version."},"timestamp":{"type":"string","format":"date-time","description":"When the event happened (UTC)."},"mode":{"type":"string","enum":["live","test"],"description":"`test` for events of the API test space, `live` otherwise."},"data":{"type":"object","properties":{"organization_id":{"type":"string","format":"uuid","description":"The organization the event happened in."},"count":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"minutes":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["organization_id","count","minutes"],"additionalProperties":false}}}}}},"responses":{"2XX":{"description":"Received. Any other answer, or none within the delivery timeout, is retried with exponential backoff; deliveries can be replayed from the delivery log."}}}},"voice.trunk.created":{"post":{"summary":"voice.trunk.created","description":"Rabt platform organization only: an operator trunk profile was added.","tags":["webhooks"],"x-rabt-module":"platform_operations","parameters":[{"$ref":"#/components/parameters/WebhookId"},{"$ref":"#/components/parameters/WebhookTimestamp"},{"$ref":"#/components/parameters/WebhookSignature"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["type","version","timestamp","mode","data"],"properties":{"type":{"type":"string","enum":["voice.trunk.created"]},"version":{"type":"integer","enum":[1],"description":"The version of `data`; a breaking change is a new version."},"timestamp":{"type":"string","format":"date-time","description":"When the event happened (UTC)."},"mode":{"type":"string","enum":["live","test"],"description":"`test` for events of the API test space, `live` otherwise."},"data":{"type":"object","properties":{"organization_id":{"type":"string","format":"uuid","description":"The organization the event happened in."},"trunk_id":{"type":"string","format":"uuid"},"name":{"type":"string"},"by_membership_id":{"type":"string","format":"uuid"}},"required":["organization_id","trunk_id","name","by_membership_id"],"additionalProperties":false}}}}}},"responses":{"2XX":{"description":"Received. Any other answer, or none within the delivery timeout, is retried with exponential backoff; deliveries can be replayed from the delivery log."}}}},"voice.trunk.disabled":{"post":{"summary":"voice.trunk.disabled","description":"Rabt platform organization only: an operator trunk was disabled (no new call uses it).","tags":["webhooks"],"x-rabt-module":"platform_operations","parameters":[{"$ref":"#/components/parameters/WebhookId"},{"$ref":"#/components/parameters/WebhookTimestamp"},{"$ref":"#/components/parameters/WebhookSignature"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["type","version","timestamp","mode","data"],"properties":{"type":{"type":"string","enum":["voice.trunk.disabled"]},"version":{"type":"integer","enum":[1],"description":"The version of `data`; a breaking change is a new version."},"timestamp":{"type":"string","format":"date-time","description":"When the event happened (UTC)."},"mode":{"type":"string","enum":["live","test"],"description":"`test` for events of the API test space, `live` otherwise."},"data":{"type":"object","properties":{"organization_id":{"type":"string","format":"uuid","description":"The organization the event happened in."},"trunk_id":{"type":"string","format":"uuid"},"name":{"type":"string"},"by_membership_id":{"type":"string","format":"uuid"}},"required":["organization_id","trunk_id","name","by_membership_id"],"additionalProperties":false}}}}}},"responses":{"2XX":{"description":"Received. Any other answer, or none within the delivery timeout, is retried with exponential backoff; deliveries can be replayed from the delivery log."}}}},"voice.trunk.enabled":{"post":{"summary":"voice.trunk.enabled","description":"Rabt platform organization only: an operator trunk was enabled again.","tags":["webhooks"],"x-rabt-module":"platform_operations","parameters":[{"$ref":"#/components/parameters/WebhookId"},{"$ref":"#/components/parameters/WebhookTimestamp"},{"$ref":"#/components/parameters/WebhookSignature"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["type","version","timestamp","mode","data"],"properties":{"type":{"type":"string","enum":["voice.trunk.enabled"]},"version":{"type":"integer","enum":[1],"description":"The version of `data`; a breaking change is a new version."},"timestamp":{"type":"string","format":"date-time","description":"When the event happened (UTC)."},"mode":{"type":"string","enum":["live","test"],"description":"`test` for events of the API test space, `live` otherwise."},"data":{"type":"object","properties":{"organization_id":{"type":"string","format":"uuid","description":"The organization the event happened in."},"trunk_id":{"type":"string","format":"uuid"},"name":{"type":"string"},"by_membership_id":{"type":"string","format":"uuid"}},"required":["organization_id","trunk_id","name","by_membership_id"],"additionalProperties":false}}}}}},"responses":{"2XX":{"description":"Received. Any other answer, or none within the delivery timeout, is retried with exponential backoff; deliveries can be replayed from the delivery log."}}}},"voice.trunk.updated":{"post":{"summary":"voice.trunk.updated","description":"Rabt platform organization only: an operator trunk profile changed (`fields` names what).","tags":["webhooks"],"x-rabt-module":"platform_operations","parameters":[{"$ref":"#/components/parameters/WebhookId"},{"$ref":"#/components/parameters/WebhookTimestamp"},{"$ref":"#/components/parameters/WebhookSignature"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["type","version","timestamp","mode","data"],"properties":{"type":{"type":"string","enum":["voice.trunk.updated"]},"version":{"type":"integer","enum":[1],"description":"The version of `data`; a breaking change is a new version."},"timestamp":{"type":"string","format":"date-time","description":"When the event happened (UTC)."},"mode":{"type":"string","enum":["live","test"],"description":"`test` for events of the API test space, `live` otherwise."},"data":{"type":"object","properties":{"organization_id":{"type":"string","format":"uuid","description":"The organization the event happened in."},"trunk_id":{"type":"string","format":"uuid"},"name":{"type":"string"},"fields":{"minItems":1,"type":"array","items":{"type":"string","enum":["host","port","transport","priority","signaling_addresses","media_addresses","authentication","codecs","caller_id_format","dialed_number_format","international_prefix","from_domain","inbound_transports","purposes","label","country","max_channels","note"]}},"by_membership_id":{"type":"string","format":"uuid"}},"required":["organization_id","trunk_id","name","fields","by_membership_id"],"additionalProperties":false}}}}}},"responses":{"2XX":{"description":"Received. Any other answer, or none within the delivery timeout, is retried with exponential backoff; deliveries can be replayed from the delivery log."}}}},"voice.trunk.approved":{"post":{"summary":"voice.trunk.approved","description":"Retired (VOICE02). Rabt platform organization only: a provider an organization submitted was approved.","tags":["webhooks"],"x-rabt-module":"platform_operations","parameters":[{"$ref":"#/components/parameters/WebhookId"},{"$ref":"#/components/parameters/WebhookTimestamp"},{"$ref":"#/components/parameters/WebhookSignature"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["type","version","timestamp","mode","data"],"properties":{"type":{"type":"string","enum":["voice.trunk.approved"]},"version":{"type":"integer","enum":[1],"description":"The version of `data`; a breaking change is a new version."},"timestamp":{"type":"string","format":"date-time","description":"When the event happened (UTC)."},"mode":{"type":"string","enum":["live","test"],"description":"`test` for events of the API test space, `live` otherwise."},"data":{"type":"object","properties":{"organization_id":{"type":"string","format":"uuid","description":"The organization the event happened in."},"trunk_id":{"type":"string","format":"uuid"},"name":{"type":"string"},"submitted_by_organization_id":{"type":"string","format":"uuid"},"by_membership_id":{"type":"string","format":"uuid"}},"required":["organization_id","trunk_id","name","submitted_by_organization_id","by_membership_id"],"additionalProperties":false}}}}}},"responses":{"2XX":{"description":"Received. Any other answer, or none within the delivery timeout, is retried with exponential backoff; deliveries can be replayed from the delivery log."}}}},"voice.trunk.rejected":{"post":{"summary":"voice.trunk.rejected","description":"Retired (VOICE02). Rabt platform organization only: a provider an organization submitted was rejected.","tags":["webhooks"],"x-rabt-module":"platform_operations","parameters":[{"$ref":"#/components/parameters/WebhookId"},{"$ref":"#/components/parameters/WebhookTimestamp"},{"$ref":"#/components/parameters/WebhookSignature"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["type","version","timestamp","mode","data"],"properties":{"type":{"type":"string","enum":["voice.trunk.rejected"]},"version":{"type":"integer","enum":[1],"description":"The version of `data`; a breaking change is a new version."},"timestamp":{"type":"string","format":"date-time","description":"When the event happened (UTC)."},"mode":{"type":"string","enum":["live","test"],"description":"`test` for events of the API test space, `live` otherwise."},"data":{"type":"object","properties":{"organization_id":{"type":"string","format":"uuid","description":"The organization the event happened in."},"trunk_id":{"type":"string","format":"uuid"},"name":{"type":"string"},"submitted_by_organization_id":{"type":"string","format":"uuid"},"by_membership_id":{"type":"string","format":"uuid"}},"required":["organization_id","trunk_id","name","submitted_by_organization_id","by_membership_id"],"additionalProperties":false}}}}}},"responses":{"2XX":{"description":"Received. Any other answer, or none within the delivery timeout, is retried with exponential backoff; deliveries can be replayed from the delivery log."}}}},"voice.platform_settings.updated":{"post":{"summary":"voice.platform_settings.updated","description":"Rabt platform organization only: the Saudi SIP domain (the From host of outbound calls to operators and providers) changed.","tags":["webhooks"],"x-rabt-module":"platform_operations","parameters":[{"$ref":"#/components/parameters/WebhookId"},{"$ref":"#/components/parameters/WebhookTimestamp"},{"$ref":"#/components/parameters/WebhookSignature"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["type","version","timestamp","mode","data"],"properties":{"type":{"type":"string","enum":["voice.platform_settings.updated"]},"version":{"type":"integer","enum":[1],"description":"The version of `data`; a breaking change is a new version."},"timestamp":{"type":"string","format":"date-time","description":"When the event happened (UTC)."},"mode":{"type":"string","enum":["live","test"],"description":"`test` for events of the API test space, `live` otherwise."},"data":{"type":"object","properties":{"organization_id":{"type":"string","format":"uuid","description":"The organization the event happened in."},"saudi_sip_domain":{"type":["string","null"]},"by_membership_id":{"type":"string","format":"uuid"}},"required":["organization_id","saudi_sip_domain","by_membership_id"],"additionalProperties":false}}}}}},"responses":{"2XX":{"description":"Received. Any other answer, or none within the delivery timeout, is retried with exponential backoff; deliveries can be replayed from the delivery log."}}}},"voice.provider.submitted":{"post":{"summary":"voice.provider.submitted","description":"Retired (VOICE02). A member submitted an unlisted SIP-trunk provider for the Rabt team to review.","tags":["webhooks"],"x-rabt-module":"voice","parameters":[{"$ref":"#/components/parameters/WebhookId"},{"$ref":"#/components/parameters/WebhookTimestamp"},{"$ref":"#/components/parameters/WebhookSignature"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["type","version","timestamp","mode","data"],"properties":{"type":{"type":"string","enum":["voice.provider.submitted"]},"version":{"type":"integer","enum":[1],"description":"The version of `data`; a breaking change is a new version."},"timestamp":{"type":"string","format":"date-time","description":"When the event happened (UTC)."},"mode":{"type":"string","enum":["live","test"],"description":"`test` for events of the API test space, `live` otherwise."},"data":{"type":"object","properties":{"organization_id":{"type":"string","format":"uuid","description":"The organization the event happened in."},"provider_id":{"type":"string","format":"uuid"},"name":{"type":"string"},"submitted_by_membership_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]}},"required":["organization_id","provider_id","name","submitted_by_membership_id"],"additionalProperties":false}}}}}},"responses":{"2XX":{"description":"Received. Any other answer, or none within the delivery timeout, is retried with exponential backoff; deliveries can be replayed from the delivery log."}}}},"voice.provider.approved":{"post":{"summary":"voice.provider.approved","description":"Retired (VOICE02). The Rabt team approved the provider the organization submitted.","tags":["webhooks"],"x-rabt-module":"voice","parameters":[{"$ref":"#/components/parameters/WebhookId"},{"$ref":"#/components/parameters/WebhookTimestamp"},{"$ref":"#/components/parameters/WebhookSignature"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["type","version","timestamp","mode","data"],"properties":{"type":{"type":"string","enum":["voice.provider.approved"]},"version":{"type":"integer","enum":[1],"description":"The version of `data`; a breaking change is a new version."},"timestamp":{"type":"string","format":"date-time","description":"When the event happened (UTC)."},"mode":{"type":"string","enum":["live","test"],"description":"`test` for events of the API test space, `live` otherwise."},"data":{"type":"object","properties":{"organization_id":{"type":"string","format":"uuid","description":"The organization the event happened in."},"provider_id":{"type":"string","format":"uuid"},"name":{"type":"string"}},"required":["organization_id","provider_id","name"],"additionalProperties":false}}}}}},"responses":{"2XX":{"description":"Received. Any other answer, or none within the delivery timeout, is retried with exponential backoff; deliveries can be replayed from the delivery log."}}}},"voice.provider.rejected":{"post":{"summary":"voice.provider.rejected","description":"Retired (VOICE02). The Rabt team rejected the provider the organization submitted, with the reason.","tags":["webhooks"],"x-rabt-module":"voice","parameters":[{"$ref":"#/components/parameters/WebhookId"},{"$ref":"#/components/parameters/WebhookTimestamp"},{"$ref":"#/components/parameters/WebhookSignature"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["type","version","timestamp","mode","data"],"properties":{"type":{"type":"string","enum":["voice.provider.rejected"]},"version":{"type":"integer","enum":[1],"description":"The version of `data`; a breaking change is a new version."},"timestamp":{"type":"string","format":"date-time","description":"When the event happened (UTC)."},"mode":{"type":"string","enum":["live","test"],"description":"`test` for events of the API test space, `live` otherwise."},"data":{"type":"object","properties":{"organization_id":{"type":"string","format":"uuid","description":"The organization the event happened in."},"provider_id":{"type":"string","format":"uuid"},"name":{"type":"string"},"reason":{"type":"string"}},"required":["organization_id","provider_id","name","reason"],"additionalProperties":false}}}}}},"responses":{"2XX":{"description":"Received. Any other answer, or none within the delivery timeout, is retried with exponential backoff; deliveries can be replayed from the delivery log."}}}},"voice.provider_connection.created":{"post":{"summary":"voice.provider_connection.created","description":"The organization added a SIP-provider connection for its own numbers; it applies to calls within a minute.","tags":["webhooks"],"x-rabt-module":"voice","parameters":[{"$ref":"#/components/parameters/WebhookId"},{"$ref":"#/components/parameters/WebhookTimestamp"},{"$ref":"#/components/parameters/WebhookSignature"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["type","version","timestamp","mode","data"],"properties":{"type":{"type":"string","enum":["voice.provider_connection.created"]},"version":{"type":"integer","enum":[1],"description":"The version of `data`; a breaking change is a new version."},"timestamp":{"type":"string","format":"date-time","description":"When the event happened (UTC)."},"mode":{"type":"string","enum":["live","test"],"description":"`test` for events of the API test space, `live` otherwise."},"data":{"type":"object","properties":{"organization_id":{"type":"string","format":"uuid","description":"The organization the event happened in."},"connection_id":{"type":"string","format":"uuid"},"name":{"type":["string","null"]},"by_membership_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]}},"required":["organization_id","connection_id","name","by_membership_id"],"additionalProperties":false}}}}}},"responses":{"2XX":{"description":"Received. Any other answer, or none within the delivery timeout, is retried with exponential backoff; deliveries can be replayed from the delivery log."}}}},"voice.provider_connection.updated":{"post":{"summary":"voice.provider_connection.updated","description":"The organization changed a provider connection (addresses, transport, credentials, on or off…); applied within a minute. The password itself is never sent.","tags":["webhooks"],"x-rabt-module":"voice","parameters":[{"$ref":"#/components/parameters/WebhookId"},{"$ref":"#/components/parameters/WebhookTimestamp"},{"$ref":"#/components/parameters/WebhookSignature"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["type","version","timestamp","mode","data"],"properties":{"type":{"type":"string","enum":["voice.provider_connection.updated"]},"version":{"type":"integer","enum":[1],"description":"The version of `data`; a breaking change is a new version."},"timestamp":{"type":"string","format":"date-time","description":"When the event happened (UTC)."},"mode":{"type":"string","enum":["live","test"],"description":"`test` for events of the API test space, `live` otherwise."},"data":{"type":"object","properties":{"organization_id":{"type":"string","format":"uuid","description":"The organization the event happened in."},"connection_id":{"type":"string","format":"uuid"},"fields":{"minItems":1,"type":"array","items":{"type":"string","enum":["name","addresses","transport","port","codecs","number_format","international_prefix","country","from_domain","max_channels","outbound_username","outbound_password","enabled","authentication","registrar"]}},"by_membership_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]}},"required":["organization_id","connection_id","fields","by_membership_id"],"additionalProperties":false}}}}}},"responses":{"2XX":{"description":"Received. Any other answer, or none within the delivery timeout, is retried with exponential backoff; deliveries can be replayed from the delivery log."}}}},"voice.provider_connection.removed":{"post":{"summary":"voice.provider_connection.removed","description":"The organization removed a provider connection (kept for the audit trail); calls from its addresses are no longer accepted.","tags":["webhooks"],"x-rabt-module":"voice","parameters":[{"$ref":"#/components/parameters/WebhookId"},{"$ref":"#/components/parameters/WebhookTimestamp"},{"$ref":"#/components/parameters/WebhookSignature"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["type","version","timestamp","mode","data"],"properties":{"type":{"type":"string","enum":["voice.provider_connection.removed"]},"version":{"type":"integer","enum":[1],"description":"The version of `data`; a breaking change is a new version."},"timestamp":{"type":"string","format":"date-time","description":"When the event happened (UTC)."},"mode":{"type":"string","enum":["live","test"],"description":"`test` for events of the API test space, `live` otherwise."},"data":{"type":"object","properties":{"organization_id":{"type":"string","format":"uuid","description":"The organization the event happened in."},"connection_id":{"type":"string","format":"uuid"},"by_membership_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]}},"required":["organization_id","connection_id","by_membership_id"],"additionalProperties":false}}}}}},"responses":{"2XX":{"description":"Received. Any other answer, or none within the delivery timeout, is retried with exponential backoff; deliveries can be replayed from the delivery log."}}}},"voice.provider_connection.suspended":{"post":{"summary":"voice.provider_connection.suspended","description":"The Rabt team suspended one of the organization’s provider connections (abuse), with the reason: its calls are refused.","tags":["webhooks"],"x-rabt-module":"voice","parameters":[{"$ref":"#/components/parameters/WebhookId"},{"$ref":"#/components/parameters/WebhookTimestamp"},{"$ref":"#/components/parameters/WebhookSignature"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["type","version","timestamp","mode","data"],"properties":{"type":{"type":"string","enum":["voice.provider_connection.suspended"]},"version":{"type":"integer","enum":[1],"description":"The version of `data`; a breaking change is a new version."},"timestamp":{"type":"string","format":"date-time","description":"When the event happened (UTC)."},"mode":{"type":"string","enum":["live","test"],"description":"`test` for events of the API test space, `live` otherwise."},"data":{"type":"object","properties":{"organization_id":{"type":"string","format":"uuid","description":"The organization the event happened in."},"connection_id":{"type":"string","format":"uuid"},"reason":{"type":"string"}},"required":["organization_id","connection_id","reason"],"additionalProperties":false}}}}}},"responses":{"2XX":{"description":"Received. Any other answer, or none within the delivery timeout, is retried with exponential backoff; deliveries can be replayed from the delivery log."}}}},"voice.provider_connection.unsuspended":{"post":{"summary":"voice.provider_connection.unsuspended","description":"The Rabt team lifted the suspension of a provider connection, with the reason.","tags":["webhooks"],"x-rabt-module":"voice","parameters":[{"$ref":"#/components/parameters/WebhookId"},{"$ref":"#/components/parameters/WebhookTimestamp"},{"$ref":"#/components/parameters/WebhookSignature"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["type","version","timestamp","mode","data"],"properties":{"type":{"type":"string","enum":["voice.provider_connection.unsuspended"]},"version":{"type":"integer","enum":[1],"description":"The version of `data`; a breaking change is a new version."},"timestamp":{"type":"string","format":"date-time","description":"When the event happened (UTC)."},"mode":{"type":"string","enum":["live","test"],"description":"`test` for events of the API test space, `live` otherwise."},"data":{"type":"object","properties":{"organization_id":{"type":"string","format":"uuid","description":"The organization the event happened in."},"connection_id":{"type":"string","format":"uuid"},"reason":{"type":"string"}},"required":["organization_id","connection_id","reason"],"additionalProperties":false}}}}}},"responses":{"2XX":{"description":"Received. Any other answer, or none within the delivery timeout, is retried with exponential backoff; deliveries can be replayed from the delivery log."}}}},"voice.provider_connection.disabled":{"post":{"summary":"voice.provider_connection.disabled","description":"Retired (VOICE02: sent as `voice.provider_connection.updated`). A provider connection was turned off.","tags":["webhooks"],"x-rabt-module":"voice","parameters":[{"$ref":"#/components/parameters/WebhookId"},{"$ref":"#/components/parameters/WebhookTimestamp"},{"$ref":"#/components/parameters/WebhookSignature"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["type","version","timestamp","mode","data"],"properties":{"type":{"type":"string","enum":["voice.provider_connection.disabled"]},"version":{"type":"integer","enum":[1],"description":"The version of `data`; a breaking change is a new version."},"timestamp":{"type":"string","format":"date-time","description":"When the event happened (UTC)."},"mode":{"type":"string","enum":["live","test"],"description":"`test` for events of the API test space, `live` otherwise."},"data":{"type":"object","properties":{"organization_id":{"type":"string","format":"uuid","description":"The organization the event happened in."},"connection_id":{"type":"string","format":"uuid"},"provider_id":{"type":"string","format":"uuid"},"by_membership_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]}},"required":["organization_id","connection_id","provider_id","by_membership_id"],"additionalProperties":false}}}}}},"responses":{"2XX":{"description":"Received. Any other answer, or none within the delivery timeout, is retried with exponential backoff; deliveries can be replayed from the delivery log."}}}},"voice.provider_connection.enabled":{"post":{"summary":"voice.provider_connection.enabled","description":"Retired (VOICE02: sent as `voice.provider_connection.updated`). A provider connection was turned on again.","tags":["webhooks"],"x-rabt-module":"voice","parameters":[{"$ref":"#/components/parameters/WebhookId"},{"$ref":"#/components/parameters/WebhookTimestamp"},{"$ref":"#/components/parameters/WebhookSignature"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["type","version","timestamp","mode","data"],"properties":{"type":{"type":"string","enum":["voice.provider_connection.enabled"]},"version":{"type":"integer","enum":[1],"description":"The version of `data`; a breaking change is a new version."},"timestamp":{"type":"string","format":"date-time","description":"When the event happened (UTC)."},"mode":{"type":"string","enum":["live","test"],"description":"`test` for events of the API test space, `live` otherwise."},"data":{"type":"object","properties":{"organization_id":{"type":"string","format":"uuid","description":"The organization the event happened in."},"connection_id":{"type":"string","format":"uuid"},"provider_id":{"type":"string","format":"uuid"},"by_membership_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]}},"required":["organization_id","connection_id","provider_id","by_membership_id"],"additionalProperties":false}}}}}},"responses":{"2XX":{"description":"Received. Any other answer, or none within the delivery timeout, is retried with exponential backoff; deliveries can be replayed from the delivery log."}}}},"voice.provider_registration.changed":{"post":{"summary":"voice.provider_registration.changed","description":"Rabt’s registration of one account to the registrar of a provider connection changed state: `registered`, or `failing` with the registrar’s SIP answer (`sip_code`, null when it did not answer). While it fails, that account’s numbers receive no calls. The password is never sent.","tags":["webhooks"],"x-rabt-module":"voice","parameters":[{"$ref":"#/components/parameters/WebhookId"},{"$ref":"#/components/parameters/WebhookTimestamp"},{"$ref":"#/components/parameters/WebhookSignature"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["type","version","timestamp","mode","data"],"properties":{"type":{"type":"string","enum":["voice.provider_registration.changed"]},"version":{"type":"integer","enum":[1],"description":"The version of `data`; a breaking change is a new version."},"timestamp":{"type":"string","format":"date-time","description":"When the event happened (UTC)."},"mode":{"type":"string","enum":["live","test"],"description":"`test` for events of the API test space, `live` otherwise."},"data":{"type":"object","properties":{"organization_id":{"type":"string","format":"uuid","description":"The organization the event happened in."},"registration_id":{"type":"string","format":"uuid"},"connection_id":{"type":"string","format":"uuid"},"status":{"type":"string","enum":["registered","failing"]},"sip_code":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]}},"required":["organization_id","registration_id","connection_id","status","sip_code"],"additionalProperties":false}}}}}},"responses":{"2XX":{"description":"Received. Any other answer, or none within the delivery timeout, is retried with exponential backoff; deliveries can be replayed from the delivery log."}}}},"voice.sip_credentials.replaced":{"post":{"summary":"voice.sip_credentials.replaced","description":"The organization replaced its SIP credentials (a provider authenticating to Rabt by digest): the previous ones stopped working. The credentials themselves are never sent.","tags":["webhooks"],"x-rabt-module":"voice","parameters":[{"$ref":"#/components/parameters/WebhookId"},{"$ref":"#/components/parameters/WebhookTimestamp"},{"$ref":"#/components/parameters/WebhookSignature"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["type","version","timestamp","mode","data"],"properties":{"type":{"type":"string","enum":["voice.sip_credentials.replaced"]},"version":{"type":"integer","enum":[1],"description":"The version of `data`; a breaking change is a new version."},"timestamp":{"type":"string","format":"date-time","description":"When the event happened (UTC)."},"mode":{"type":"string","enum":["live","test"],"description":"`test` for events of the API test space, `live` otherwise."},"data":{"type":"object","properties":{"organization_id":{"type":"string","format":"uuid","description":"The organization the event happened in."},"generation":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"by_membership_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]}},"required":["organization_id","generation","by_membership_id"],"additionalProperties":false}}}}}},"responses":{"2XX":{"description":"Received. Any other answer, or none within the delivery timeout, is retried with exponential backoff; deliveries can be replayed from the delivery log."}}}},"phone_number.added":{"post":{"summary":"phone_number.added","description":"The organization added one of its own numbers on one of its provider connections (no rental is charged for it).","tags":["webhooks"],"x-rabt-module":"voice","parameters":[{"$ref":"#/components/parameters/WebhookId"},{"$ref":"#/components/parameters/WebhookTimestamp"},{"$ref":"#/components/parameters/WebhookSignature"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["type","version","timestamp","mode","data"],"properties":{"type":{"type":"string","enum":["phone_number.added"]},"version":{"type":"integer","enum":[1],"description":"The version of `data`; a breaking change is a new version."},"timestamp":{"type":"string","format":"date-time","description":"When the event happened (UTC)."},"mode":{"type":"string","enum":["live","test"],"description":"`test` for events of the API test space, `live` otherwise."},"data":{"type":"object","properties":{"organization_id":{"type":"string","format":"uuid","description":"The organization the event happened in."},"phone_number_id":{"type":"string","format":"uuid"},"e164":{"type":"string","description":"The number in E.164, e.g. `+966112345678`."},"provider_connection_id":{"type":"string","format":"uuid"},"added_by_membership_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]}},"required":["organization_id","phone_number_id","e164","provider_connection_id","added_by_membership_id"],"additionalProperties":false}}}}}},"responses":{"2XX":{"description":"Received. Any other answer, or none within the delivery timeout, is retried with exponential backoff; deliveries can be replayed from the delivery log."}}}},"canned_reply.created":{"post":{"summary":"canned_reply.created","description":"A canned reply was saved: the organization’s, a space’s or a member’s own (the \"/\" picker of the composer).","tags":["webhooks"],"x-rabt-module":"replies","parameters":[{"$ref":"#/components/parameters/WebhookId"},{"$ref":"#/components/parameters/WebhookTimestamp"},{"$ref":"#/components/parameters/WebhookSignature"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["type","version","timestamp","mode","data"],"properties":{"type":{"type":"string","enum":["canned_reply.created"]},"version":{"type":"integer","enum":[1],"description":"The version of `data`; a breaking change is a new version."},"timestamp":{"type":"string","format":"date-time","description":"When the event happened (UTC)."},"mode":{"type":"string","enum":["live","test"],"description":"`test` for events of the API test space, `live` otherwise."},"data":{"type":"object","properties":{"organization_id":{"type":"string","format":"uuid","description":"The organization the event happened in."},"canned_reply_id":{"type":"string","format":"uuid"},"scope":{"type":"string","enum":["organization","space","personal"]},"space_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"description":"The space of a space reply; null otherwise."},"owner_membership_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"description":"The member of a personal reply; null otherwise."}},"required":["organization_id","canned_reply_id","scope","space_id","owner_membership_id"],"additionalProperties":false}}}}}},"responses":{"2XX":{"description":"Received. Any other answer, or none within the delivery timeout, is retried with exponential backoff; deliveries can be replayed from the delivery log."}}}},"canned_reply.updated":{"post":{"summary":"canned_reply.updated","description":"A canned reply’s title or text changed.","tags":["webhooks"],"x-rabt-module":"replies","parameters":[{"$ref":"#/components/parameters/WebhookId"},{"$ref":"#/components/parameters/WebhookTimestamp"},{"$ref":"#/components/parameters/WebhookSignature"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["type","version","timestamp","mode","data"],"properties":{"type":{"type":"string","enum":["canned_reply.updated"]},"version":{"type":"integer","enum":[1],"description":"The version of `data`; a breaking change is a new version."},"timestamp":{"type":"string","format":"date-time","description":"When the event happened (UTC)."},"mode":{"type":"string","enum":["live","test"],"description":"`test` for events of the API test space, `live` otherwise."},"data":{"type":"object","properties":{"organization_id":{"type":"string","format":"uuid","description":"The organization the event happened in."},"canned_reply_id":{"type":"string","format":"uuid"},"scope":{"type":"string","enum":["organization","space","personal"]},"space_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"description":"The space of a space reply; null otherwise."},"owner_membership_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"description":"The member of a personal reply; null otherwise."}},"required":["organization_id","canned_reply_id","scope","space_id","owner_membership_id"],"additionalProperties":false}}}}}},"responses":{"2XX":{"description":"Received. Any other answer, or none within the delivery timeout, is retried with exponential backoff; deliveries can be replayed from the delivery log."}}}},"canned_reply.deleted":{"post":{"summary":"canned_reply.deleted","description":"A canned reply was deleted (no longer offered).","tags":["webhooks"],"x-rabt-module":"replies","parameters":[{"$ref":"#/components/parameters/WebhookId"},{"$ref":"#/components/parameters/WebhookTimestamp"},{"$ref":"#/components/parameters/WebhookSignature"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["type","version","timestamp","mode","data"],"properties":{"type":{"type":"string","enum":["canned_reply.deleted"]},"version":{"type":"integer","enum":[1],"description":"The version of `data`; a breaking change is a new version."},"timestamp":{"type":"string","format":"date-time","description":"When the event happened (UTC)."},"mode":{"type":"string","enum":["live","test"],"description":"`test` for events of the API test space, `live` otherwise."},"data":{"type":"object","properties":{"organization_id":{"type":"string","format":"uuid","description":"The organization the event happened in."},"canned_reply_id":{"type":"string","format":"uuid"},"scope":{"type":"string","enum":["organization","space","personal"]},"space_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"description":"The space of a space reply; null otherwise."},"owner_membership_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"description":"The member of a personal reply; null otherwise."}},"required":["organization_id","canned_reply_id","scope","space_id","owner_membership_id"],"additionalProperties":false}}}}}},"responses":{"2XX":{"description":"Received. Any other answer, or none within the delivery timeout, is retried with exponential backoff; deliveries can be replayed from the delivery log."}}}},"retention.policy.updated":{"post":{"summary":"retention.policy.updated","description":"Rabt platform organization only: the Rabt team changed how long a technical data class is kept (days); the next retention pass uses it.","tags":["webhooks"],"x-rabt-module":"platform_operations","parameters":[{"$ref":"#/components/parameters/WebhookId"},{"$ref":"#/components/parameters/WebhookTimestamp"},{"$ref":"#/components/parameters/WebhookSignature"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["type","version","timestamp","mode","data"],"properties":{"type":{"type":"string","enum":["retention.policy.updated"]},"version":{"type":"integer","enum":[1],"description":"The version of `data`; a breaking change is a new version."},"timestamp":{"type":"string","format":"date-time","description":"When the event happened (UTC)."},"mode":{"type":"string","enum":["live","test"],"description":"`test` for events of the API test space, `live` otherwise."},"data":{"type":"object","properties":{"organization_id":{"type":"string","format":"uuid","description":"The organization the event happened in."},"policy_id":{"type":"string","format":"uuid"},"data_class":{"type":"string","enum":["webhook_payloads","event_inbox","webhook_delivery_log","system_email_events","synthetic_check_runs","dead_jobs","event_payloads","error_occurrences","process_heartbeats","idempotency_keys"]},"period_days":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"previous_period_days":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"by_membership_id":{"type":"string","format":"uuid"}},"required":["organization_id","policy_id","data_class","period_days","previous_period_days","by_membership_id"],"additionalProperties":false}}}}}},"responses":{"2XX":{"description":"Received. Any other answer, or none within the delivery timeout, is retried with exponential backoff; deliveries can be replayed from the delivery log."}}}},"store_review.access.set":{"post":{"summary":"store_review.access.set","description":"Retired: never sent any more (creating a store review access was removed). Rabt platform organization only: the Rabt team created a store review access, a fixed sign-in code for one new address that ends by itself, or has no automatic end (`expires_at` null) and lasts until it is disabled.","tags":["webhooks"],"x-rabt-module":"platform_operations","parameters":[{"$ref":"#/components/parameters/WebhookId"},{"$ref":"#/components/parameters/WebhookTimestamp"},{"$ref":"#/components/parameters/WebhookSignature"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["type","version","timestamp","mode","data"],"properties":{"type":{"type":"string","enum":["store_review.access.set"]},"version":{"type":"integer","enum":[1],"description":"The version of `data`; a breaking change is a new version."},"timestamp":{"type":"string","format":"date-time","description":"When the event happened (UTC)."},"mode":{"type":"string","enum":["live","test"],"description":"`test` for events of the API test space, `live` otherwise."},"data":{"type":"object","properties":{"organization_id":{"type":"string","format":"uuid","description":"The organization the event happened in."},"access_id":{"type":"string","format":"uuid"},"email":{"type":"string","description":"The only address the code signs in."},"expires_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"When it ends by itself; `null`: no automatic end (until it is disabled)."},"by_membership_id":{"type":"string","format":"uuid"}},"required":["organization_id","access_id","email","expires_at","by_membership_id"],"additionalProperties":false}}}}}},"responses":{"2XX":{"description":"Received. Any other answer, or none within the delivery timeout, is retried with exponential backoff; deliveries can be replayed from the delivery log."}}}},"store_review.access.disabled":{"post":{"summary":"store_review.access.disabled","description":"Rabt platform organization only: a store review access was disabled by the Rabt team; its code no longer signs in.","tags":["webhooks"],"x-rabt-module":"platform_operations","parameters":[{"$ref":"#/components/parameters/WebhookId"},{"$ref":"#/components/parameters/WebhookTimestamp"},{"$ref":"#/components/parameters/WebhookSignature"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["type","version","timestamp","mode","data"],"properties":{"type":{"type":"string","enum":["store_review.access.disabled"]},"version":{"type":"integer","enum":[1],"description":"The version of `data`; a breaking change is a new version."},"timestamp":{"type":"string","format":"date-time","description":"When the event happened (UTC)."},"mode":{"type":"string","enum":["live","test"],"description":"`test` for events of the API test space, `live` otherwise."},"data":{"type":"object","properties":{"organization_id":{"type":"string","format":"uuid","description":"The organization the event happened in."},"access_id":{"type":"string","format":"uuid"},"email":{"type":"string"},"by_membership_id":{"type":"string","format":"uuid"},"replaced":{"type":"boolean","description":"Retired: `true` only in events from earlier releases, when a new access replaced it; always `false` now."}},"required":["organization_id","access_id","email","by_membership_id","replaced"],"additionalProperties":false}}}}}},"responses":{"2XX":{"description":"Received. Any other answer, or none within the delivery timeout, is retried with exponential backoff; deliveries can be replayed from the delivery log."}}}},"store_review.access.window_changed":{"post":{"summary":"store_review.access.window_changed","description":"Retired: never sent any more (the review window was removed: an enabled, unexpired access always signs in). Rabt platform organization only: the Rabt team opened a store review access for a review (its code signs in until `open_until`) or closed it (`open_until` null).","tags":["webhooks"],"x-rabt-module":"platform_operations","parameters":[{"$ref":"#/components/parameters/WebhookId"},{"$ref":"#/components/parameters/WebhookTimestamp"},{"$ref":"#/components/parameters/WebhookSignature"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["type","version","timestamp","mode","data"],"properties":{"type":{"type":"string","enum":["store_review.access.window_changed"]},"version":{"type":"integer","enum":[1],"description":"The version of `data`; a breaking change is a new version."},"timestamp":{"type":"string","format":"date-time","description":"When the event happened (UTC)."},"mode":{"type":"string","enum":["live","test"],"description":"`test` for events of the API test space, `live` otherwise."},"data":{"type":"object","properties":{"organization_id":{"type":"string","format":"uuid","description":"The organization the event happened in."},"access_id":{"type":"string","format":"uuid"},"email":{"type":"string"},"open_until":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"Until when the code signs in; `null`: closed, the code does not sign in."},"by_membership_id":{"type":"string","format":"uuid"}},"required":["organization_id","access_id","email","open_until","by_membership_id"],"additionalProperties":false}}}}}},"responses":{"2XX":{"description":"Received. Any other answer, or none within the delivery timeout, is retried with exponential backoff; deliveries can be replayed from the delivery log."}}}},"client_version.policy.set":{"post":{"summary":"client_version.policy.set","description":"Rabt platform organization only: the Rabt team set a native platform's minimum supported version, latest version and store page.","tags":["webhooks"],"x-rabt-module":"platform_operations","parameters":[{"$ref":"#/components/parameters/WebhookId"},{"$ref":"#/components/parameters/WebhookTimestamp"},{"$ref":"#/components/parameters/WebhookSignature"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["type","version","timestamp","mode","data"],"properties":{"type":{"type":"string","enum":["client_version.policy.set"]},"version":{"type":"integer","enum":[1],"description":"The version of `data`; a breaking change is a new version."},"timestamp":{"type":"string","format":"date-time","description":"When the event happened (UTC)."},"mode":{"type":"string","enum":["live","test"],"description":"`test` for events of the API test space, `live` otherwise."},"data":{"type":"object","properties":{"organization_id":{"type":"string","format":"uuid","description":"The organization the event happened in."},"policy_id":{"type":"string","format":"uuid"},"platform":{"type":"string","enum":["windows","macos","ios","android"]},"minimum_version":{"type":"string"},"latest_version":{"type":"string"},"store_url":{"type":"string"},"by_membership_id":{"type":"string","format":"uuid"}},"required":["organization_id","policy_id","platform","minimum_version","latest_version","store_url","by_membership_id"],"additionalProperties":false}}}}}},"responses":{"2XX":{"description":"Received. Any other answer, or none within the delivery timeout, is retried with exponential backoff; deliveries can be replayed from the delivery log."}}}},"organization.security_policy.updated":{"post":{"summary":"organization.security_policy.updated","description":"The organization's security policy changed: sign-in with the device's code in the desktop app, with its app lock (`require_passkeys`), and a profile photo for every member (`require_profile_photo`), both on/off. Version 3 dropped the address ranges and the separate app unlock; version 2 the session and unlock times.","tags":["webhooks"],"x-rabt-module":"organization","parameters":[{"$ref":"#/components/parameters/WebhookId"},{"$ref":"#/components/parameters/WebhookTimestamp"},{"$ref":"#/components/parameters/WebhookSignature"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["type","version","timestamp","mode","data"],"properties":{"type":{"type":"string","enum":["organization.security_policy.updated"]},"version":{"type":"integer","enum":[3],"description":"The version of `data`; a breaking change is a new version."},"timestamp":{"type":"string","format":"date-time","description":"When the event happened (UTC)."},"mode":{"type":"string","enum":["live","test"],"description":"`test` for events of the API test space, `live` otherwise."},"data":{"type":"object","properties":{"organization_id":{"type":"string","format":"uuid","description":"The organization the event happened in."},"require_passkeys":{"type":"boolean"},"require_profile_photo":{"type":"boolean"},"by_membership_id":{"type":"string","format":"uuid"}},"required":["organization_id","require_passkeys","require_profile_photo","by_membership_id"],"additionalProperties":false}}}}}},"responses":{"2XX":{"description":"Received. Any other answer, or none within the delivery timeout, is retried with exponential backoff; deliveries can be replayed from the delivery log."}}}},"passkey_recovery.requested":{"post":{"summary":"passkey_recovery.requested","description":"Retired (AUTH-passkeys-desktop: the sign-in code always works, so there is no recovery). A member who lost their passkeys asked to replace them (after a code on their second channel); the owner approves or refuses.","tags":["webhooks"],"x-rabt-module":"members","parameters":[{"$ref":"#/components/parameters/WebhookId"},{"$ref":"#/components/parameters/WebhookTimestamp"},{"$ref":"#/components/parameters/WebhookSignature"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["type","version","timestamp","mode","data"],"properties":{"type":{"type":"string","enum":["passkey_recovery.requested"]},"version":{"type":"integer","enum":[1],"description":"The version of `data`; a breaking change is a new version."},"timestamp":{"type":"string","format":"date-time","description":"When the event happened (UTC)."},"mode":{"type":"string","enum":["live","test"],"description":"`test` for events of the API test space, `live` otherwise."},"data":{"type":"object","properties":{"organization_id":{"type":"string","format":"uuid","description":"The organization the event happened in."},"recovery_id":{"type":"string","format":"uuid"},"account_id":{"type":"string","format":"uuid"},"membership_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"channel":{"type":"string","enum":["email","sms"]},"expires_at":{"type":"string","format":"date-time"}},"required":["organization_id","recovery_id","account_id","membership_id","channel","expires_at"],"additionalProperties":false}}}}}},"responses":{"2XX":{"description":"Received. Any other answer, or none within the delivery timeout, is retried with exponential backoff; deliveries can be replayed from the delivery log."}}}},"passkey_recovery.decided":{"post":{"summary":"passkey_recovery.decided","description":"Retired (AUTH-passkeys-desktop: the sign-in code always works, so there is no recovery). The owner approved or refused a member's passkey recovery; after an approval the member registers a new passkey at their next sign-in.","tags":["webhooks"],"x-rabt-module":"members","parameters":[{"$ref":"#/components/parameters/WebhookId"},{"$ref":"#/components/parameters/WebhookTimestamp"},{"$ref":"#/components/parameters/WebhookSignature"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["type","version","timestamp","mode","data"],"properties":{"type":{"type":"string","enum":["passkey_recovery.decided"]},"version":{"type":"integer","enum":[1],"description":"The version of `data`; a breaking change is a new version."},"timestamp":{"type":"string","format":"date-time","description":"When the event happened (UTC)."},"mode":{"type":"string","enum":["live","test"],"description":"`test` for events of the API test space, `live` otherwise."},"data":{"type":"object","properties":{"organization_id":{"type":"string","format":"uuid","description":"The organization the event happened in."},"recovery_id":{"type":"string","format":"uuid"},"account_id":{"type":"string","format":"uuid"},"status":{"type":"string","enum":["approved","refused"]},"by_membership_id":{"type":"string","format":"uuid"}},"required":["organization_id","recovery_id","account_id","status","by_membership_id"],"additionalProperties":false}}}}}},"responses":{"2XX":{"description":"Received. Any other answer, or none within the delivery timeout, is retried with exponential backoff; deliveries can be replayed from the delivery log."}}}},"security_incident.recorded":{"post":{"summary":"security_incident.recorded","description":"Rabt platform organization only: a personal data breach was recorded; `deadline_at` is 72 hours after Rabt became aware of it.","tags":["webhooks"],"x-rabt-module":"platform_operations","parameters":[{"$ref":"#/components/parameters/WebhookId"},{"$ref":"#/components/parameters/WebhookTimestamp"},{"$ref":"#/components/parameters/WebhookSignature"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["type","version","timestamp","mode","data"],"properties":{"type":{"type":"string","enum":["security_incident.recorded"]},"version":{"type":"integer","enum":[1],"description":"The version of `data`; a breaking change is a new version."},"timestamp":{"type":"string","format":"date-time","description":"When the event happened (UTC)."},"mode":{"type":"string","enum":["live","test"],"description":"`test` for events of the API test space, `live` otherwise."},"data":{"type":"object","properties":{"organization_id":{"type":"string","format":"uuid","description":"The Rabt platform organization."},"incident_id":{"type":"string","format":"uuid"},"deadline_at":{"type":"string","format":"date-time"},"by_membership_id":{"type":"string","format":"uuid"}},"required":["organization_id","incident_id","deadline_at","by_membership_id"],"additionalProperties":false}}}}}},"responses":{"2XX":{"description":"Received. Any other answer, or none within the delivery timeout, is retried with exponential backoff; deliveries can be replayed from the delivery log."}}}},"security_incident.changed":{"post":{"summary":"security_incident.changed","description":"Rabt platform organization only: what a breach record says changed (its deadline may have moved with its detection time).","tags":["webhooks"],"x-rabt-module":"platform_operations","parameters":[{"$ref":"#/components/parameters/WebhookId"},{"$ref":"#/components/parameters/WebhookTimestamp"},{"$ref":"#/components/parameters/WebhookSignature"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["type","version","timestamp","mode","data"],"properties":{"type":{"type":"string","enum":["security_incident.changed"]},"version":{"type":"integer","enum":[1],"description":"The version of `data`; a breaking change is a new version."},"timestamp":{"type":"string","format":"date-time","description":"When the event happened (UTC)."},"mode":{"type":"string","enum":["live","test"],"description":"`test` for events of the API test space, `live` otherwise."},"data":{"type":"object","properties":{"organization_id":{"type":"string","format":"uuid","description":"The Rabt platform organization."},"incident_id":{"type":"string","format":"uuid"},"deadline_at":{"type":"string","format":"date-time"},"by_membership_id":{"type":"string","format":"uuid"}},"required":["organization_id","incident_id","deadline_at","by_membership_id"],"additionalProperties":false}}}}}},"responses":{"2XX":{"description":"Received. Any other answer, or none within the delivery timeout, is retried with exponential backoff; deliveries can be replayed from the delivery log."}}}},"security_incident.action_added":{"post":{"summary":"security_incident.action_added","description":"Rabt platform organization only: an action taken was added to a breach record.","tags":["webhooks"],"x-rabt-module":"platform_operations","parameters":[{"$ref":"#/components/parameters/WebhookId"},{"$ref":"#/components/parameters/WebhookTimestamp"},{"$ref":"#/components/parameters/WebhookSignature"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["type","version","timestamp","mode","data"],"properties":{"type":{"type":"string","enum":["security_incident.action_added"]},"version":{"type":"integer","enum":[1],"description":"The version of `data`; a breaking change is a new version."},"timestamp":{"type":"string","format":"date-time","description":"When the event happened (UTC)."},"mode":{"type":"string","enum":["live","test"],"description":"`test` for events of the API test space, `live` otherwise."},"data":{"type":"object","properties":{"organization_id":{"type":"string","format":"uuid","description":"The Rabt platform organization."},"incident_id":{"type":"string","format":"uuid"},"entry_id":{"type":"string","format":"uuid"},"by_membership_id":{"type":"string","format":"uuid"}},"required":["organization_id","incident_id","entry_id","by_membership_id"],"additionalProperties":false}}}}}},"responses":{"2XX":{"description":"Received. Any other answer, or none within the delivery timeout, is retried with exponential backoff; deliveries can be replayed from the delivery log."}}}},"security_incident.notice_recorded":{"post":{"summary":"security_incident.notice_recorded","description":"Rabt platform organization only: the notice of a breach to the regulator or to the affected organizations was recorded as sent.","tags":["webhooks"],"x-rabt-module":"platform_operations","parameters":[{"$ref":"#/components/parameters/WebhookId"},{"$ref":"#/components/parameters/WebhookTimestamp"},{"$ref":"#/components/parameters/WebhookSignature"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["type","version","timestamp","mode","data"],"properties":{"type":{"type":"string","enum":["security_incident.notice_recorded"]},"version":{"type":"integer","enum":[1],"description":"The version of `data`; a breaking change is a new version."},"timestamp":{"type":"string","format":"date-time","description":"When the event happened (UTC)."},"mode":{"type":"string","enum":["live","test"],"description":"`test` for events of the API test space, `live` otherwise."},"data":{"type":"object","properties":{"organization_id":{"type":"string","format":"uuid","description":"The Rabt platform organization."},"incident_id":{"type":"string","format":"uuid"},"entry_id":{"type":"string","format":"uuid"},"recipient":{"type":"string","enum":["regulator","organizations"]},"sent_at":{"type":"string","format":"date-time"},"by_membership_id":{"type":"string","format":"uuid"}},"required":["organization_id","incident_id","entry_id","recipient","sent_at","by_membership_id"],"additionalProperties":false}}}}}},"responses":{"2XX":{"description":"Received. Any other answer, or none within the delivery timeout, is retried with exponential backoff; deliveries can be replayed from the delivery log."}}}},"security_incident.closed":{"post":{"summary":"security_incident.closed","description":"Rabt platform organization only: a breach record was closed (final).","tags":["webhooks"],"x-rabt-module":"platform_operations","parameters":[{"$ref":"#/components/parameters/WebhookId"},{"$ref":"#/components/parameters/WebhookTimestamp"},{"$ref":"#/components/parameters/WebhookSignature"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["type","version","timestamp","mode","data"],"properties":{"type":{"type":"string","enum":["security_incident.closed"]},"version":{"type":"integer","enum":[1],"description":"The version of `data`; a breaking change is a new version."},"timestamp":{"type":"string","format":"date-time","description":"When the event happened (UTC)."},"mode":{"type":"string","enum":["live","test"],"description":"`test` for events of the API test space, `live` otherwise."},"data":{"type":"object","properties":{"organization_id":{"type":"string","format":"uuid","description":"The Rabt platform organization."},"incident_id":{"type":"string","format":"uuid"},"by_membership_id":{"type":"string","format":"uuid"}},"required":["organization_id","incident_id","by_membership_id"],"additionalProperties":false}}}}}},"responses":{"2XX":{"description":"Received. Any other answer, or none within the delivery timeout, is retried with exponential backoff; deliveries can be replayed from the delivery log."}}}},"security_incident.deadline_alert":{"post":{"summary":"security_incident.deadline_alert","description":"Rabt platform organization only: a breach record has no regulator notice yet (`stage`: just recorded, 24 or 6 hours left, or the 72-hour deadline passed).","tags":["webhooks"],"x-rabt-module":"platform_operations","parameters":[{"$ref":"#/components/parameters/WebhookId"},{"$ref":"#/components/parameters/WebhookTimestamp"},{"$ref":"#/components/parameters/WebhookSignature"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["type","version","timestamp","mode","data"],"properties":{"type":{"type":"string","enum":["security_incident.deadline_alert"]},"version":{"type":"integer","enum":[1],"description":"The version of `data`; a breaking change is a new version."},"timestamp":{"type":"string","format":"date-time","description":"When the event happened (UTC)."},"mode":{"type":"string","enum":["live","test"],"description":"`test` for events of the API test space, `live` otherwise."},"data":{"type":"object","properties":{"organization_id":{"type":"string","format":"uuid","description":"The Rabt platform organization."},"incident_id":{"type":"string","format":"uuid"},"stage":{"type":"string","enum":["recorded","hours_24","hours_6","overdue"]},"deadline_at":{"type":"string","format":"date-time"}},"required":["organization_id","incident_id","stage","deadline_at"],"additionalProperties":false}}}}}},"responses":{"2XX":{"description":"Received. Any other answer, or none within the delivery timeout, is retried with exponential backoff; deliveries can be replayed from the delivery log."}}}},"security.alert_raised":{"post":{"summary":"security.alert_raised","description":"A rule-based security check raised an alert: a sign-in from a new country, 5 failed sign-ins within 15 minutes, an unusually large export, a bulk read of contacts, an API key or app used from a new network, or a break in the audit log’s chain.","tags":["webhooks"],"x-rabt-module":"security","parameters":[{"$ref":"#/components/parameters/WebhookId"},{"$ref":"#/components/parameters/WebhookTimestamp"},{"$ref":"#/components/parameters/WebhookSignature"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["type","version","timestamp","mode","data"],"properties":{"type":{"type":"string","enum":["security.alert_raised"]},"version":{"type":"integer","enum":[1],"description":"The version of `data`; a breaking change is a new version."},"timestamp":{"type":"string","format":"date-time","description":"When the event happened (UTC)."},"mode":{"type":"string","enum":["live","test"],"description":"`test` for events of the API test space, `live` otherwise."},"data":{"type":"object","properties":{"organization_id":{"type":"string","format":"uuid","description":"The organization the event happened in."},"alert_id":{"type":"string","format":"uuid"},"rule":{"type":"string","enum":["sign_in_new_country","sign_in_failures","large_export","bulk_read","api_key_new_network","audit_chain_broken"]},"subject_type":{"type":"string"},"subject_id":{"type":["string","null"]},"detail":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":["string","number","boolean","null"]},"description":"The facts of the rule (country, network, counts, thresholds)."},"occurred_at":{"type":"string","format":"date-time"}},"required":["organization_id","alert_id","rule","subject_type","subject_id","detail","occurred_at"],"additionalProperties":false}}}}}},"responses":{"2XX":{"description":"Received. Any other answer, or none within the delivery timeout, is retried with exponential backoff; deliveries can be replayed from the delivery log."}}}},"security.sensitive_access_recorded":{"post":{"summary":"security.sensitive_access_recorded","description":"A sensitive access was recorded: a call recording or voicemail played or downloaded, an export asked for or downloaded, or a bulk read of contacts; who, what, when and from where.","tags":["webhooks"],"x-rabt-module":"security","parameters":[{"$ref":"#/components/parameters/WebhookId"},{"$ref":"#/components/parameters/WebhookTimestamp"},{"$ref":"#/components/parameters/WebhookSignature"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["type","version","timestamp","mode","data"],"properties":{"type":{"type":"string","enum":["security.sensitive_access_recorded"]},"version":{"type":"integer","enum":[1],"description":"The version of `data`; a breaking change is a new version."},"timestamp":{"type":"string","format":"date-time","description":"When the event happened (UTC)."},"mode":{"type":"string","enum":["live","test"],"description":"`test` for events of the API test space, `live` otherwise."},"data":{"type":"object","properties":{"organization_id":{"type":"string","format":"uuid","description":"The organization the event happened in."},"access_id":{"type":"string","format":"uuid"},"action":{"type":"string","enum":["call_recording.accessed","organization_export.requested","organization_export.downloaded","crm_export.requested","crm_export.downloaded","contact_export.downloaded","wallet_export.downloaded","invoice_export.downloaded","contacts.bulk_read","ticket_conversation.exported","ticket_export.downloaded","data_export.downloaded"]},"target_type":{"type":"string"},"target_id":{"type":["string","null"]},"membership_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"api_key_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"oauth_grant_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"ip":{"type":["string","null"]},"country":{"type":["string","null"]},"occurred_at":{"type":"string","format":"date-time"}},"required":["organization_id","access_id","action","target_type","target_id","membership_id","api_key_id","oauth_grant_id","ip","country","occurred_at"],"additionalProperties":false}}}}}},"responses":{"2XX":{"description":"Received. Any other answer, or none within the delivery timeout, is retried with exponential backoff; deliveries can be replayed from the delivery log."}}}},"platform.security_alert":{"post":{"summary":"platform.security_alert","description":"Rabt platform organization only: an organization's security alert (its id and facts), a break in the platform audit log's chain, an environment secret overdue for rotation, a break-glass passkey recovery of the platform owner (`platform_owner_recovery`, retired by AUTH-passkeys-desktop), or a store review access set with the break-glass command (`store_review_break_glass`, retired with that command).","tags":["webhooks"],"x-rabt-module":"platform_security","parameters":[{"$ref":"#/components/parameters/WebhookId"},{"$ref":"#/components/parameters/WebhookTimestamp"},{"$ref":"#/components/parameters/WebhookSignature"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["type","version","timestamp","mode","data"],"properties":{"type":{"type":"string","enum":["platform.security_alert"]},"version":{"type":"integer","enum":[1],"description":"The version of `data`; a breaking change is a new version."},"timestamp":{"type":"string","format":"date-time","description":"When the event happened (UTC)."},"mode":{"type":"string","enum":["live","test"],"description":"`test` for events of the API test space, `live` otherwise."},"data":{"type":"object","properties":{"organization_id":{"type":"string","format":"uuid","description":"The Rabt platform organization."},"alert_organization_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"description":"The organization the alert is about."},"alert_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"rule":{"type":"string","enum":["sign_in_new_country","sign_in_failures","large_export","bulk_read","api_key_new_network","audit_chain_broken","secret_rotation_overdue","platform_owner_recovery","store_review_break_glass"]},"subject_type":{"type":"string"},"subject_id":{"type":["string","null"]},"detail":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":["string","number","boolean","null"]},"description":"The facts of the rule (country, network, counts, thresholds)."},"occurred_at":{"type":"string","format":"date-time"}},"required":["organization_id","alert_organization_id","alert_id","rule","subject_type","subject_id","detail","occurred_at"],"additionalProperties":false}}}}}},"responses":{"2XX":{"description":"Received. Any other answer, or none within the delivery timeout, is retried with exponential backoff; deliveries can be replayed from the delivery log."}}}},"chat.message.created":{"post":{"summary":"chat.message.created","description":"A member, or an incoming webhook of the room, posted a message in an internal chat room; it names the members it mentions and whether it used @all. A message of an incoming webhook has no author and names its hook.","tags":["webhooks"],"x-rabt-module":"chat","parameters":[{"$ref":"#/components/parameters/WebhookId"},{"$ref":"#/components/parameters/WebhookTimestamp"},{"$ref":"#/components/parameters/WebhookSignature"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["type","version","timestamp","mode","data"],"properties":{"type":{"type":"string","enum":["chat.message.created"]},"version":{"type":"integer","enum":[2],"description":"The version of `data`; a breaking change is a new version."},"timestamp":{"type":"string","format":"date-time","description":"When the event happened (UTC)."},"mode":{"type":"string","enum":["live","test"],"description":"`test` for events of the API test space, `live` otherwise."},"data":{"type":"object","properties":{"organization_id":{"type":"string","format":"uuid","description":"The organization the event happened in."},"chat_message_id":{"type":"string","format":"uuid"},"room_id":{"type":"string","format":"uuid"},"author_membership_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"incoming_webhook_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"mentioned_membership_ids":{"type":"array","items":{"type":"string","format":"uuid"}},"mentions_all":{"type":"boolean"}},"required":["organization_id","chat_message_id","room_id","author_membership_id","incoming_webhook_id","mentioned_membership_ids","mentions_all"],"additionalProperties":false}}}}}},"responses":{"2XX":{"description":"Received. Any other answer, or none within the delivery timeout, is retried with exponential backoff; deliveries can be replayed from the delivery log."}}}},"chat.incoming_webhook.created":{"post":{"summary":"chat.incoming_webhook.created","description":"A room manager created an incoming webhook for an internal chat room: another system can post in the room through its secret URL.","tags":["webhooks"],"x-rabt-module":"chat","parameters":[{"$ref":"#/components/parameters/WebhookId"},{"$ref":"#/components/parameters/WebhookTimestamp"},{"$ref":"#/components/parameters/WebhookSignature"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["type","version","timestamp","mode","data"],"properties":{"type":{"type":"string","enum":["chat.incoming_webhook.created"]},"version":{"type":"integer","enum":[1],"description":"The version of `data`; a breaking change is a new version."},"timestamp":{"type":"string","format":"date-time","description":"When the event happened (UTC)."},"mode":{"type":"string","enum":["live","test"],"description":"`test` for events of the API test space, `live` otherwise."},"data":{"type":"object","properties":{"organization_id":{"type":"string","format":"uuid","description":"The organization the event happened in."},"incoming_webhook_id":{"type":"string","format":"uuid"},"room_id":{"type":"string","format":"uuid"}},"required":["organization_id","incoming_webhook_id","room_id"],"additionalProperties":false}}}}}},"responses":{"2XX":{"description":"Received. Any other answer, or none within the delivery timeout, is retried with exponential backoff; deliveries can be replayed from the delivery log."}}}},"chat.incoming_webhook.revoked":{"post":{"summary":"chat.incoming_webhook.revoked","description":"A room manager revoked an incoming webhook of an internal chat room: its URL no longer posts; its messages stay.","tags":["webhooks"],"x-rabt-module":"chat","parameters":[{"$ref":"#/components/parameters/WebhookId"},{"$ref":"#/components/parameters/WebhookTimestamp"},{"$ref":"#/components/parameters/WebhookSignature"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["type","version","timestamp","mode","data"],"properties":{"type":{"type":"string","enum":["chat.incoming_webhook.revoked"]},"version":{"type":"integer","enum":[1],"description":"The version of `data`; a breaking change is a new version."},"timestamp":{"type":"string","format":"date-time","description":"When the event happened (UTC)."},"mode":{"type":"string","enum":["live","test"],"description":"`test` for events of the API test space, `live` otherwise."},"data":{"type":"object","properties":{"organization_id":{"type":"string","format":"uuid","description":"The organization the event happened in."},"incoming_webhook_id":{"type":"string","format":"uuid"},"room_id":{"type":"string","format":"uuid"}},"required":["organization_id","incoming_webhook_id","room_id"],"additionalProperties":false}}}}}},"responses":{"2XX":{"description":"Received. Any other answer, or none within the delivery timeout, is retried with exponential backoff; deliveries can be replayed from the delivery log."}}}},"chat.message.updated":{"post":{"summary":"chat.message.updated","description":"An internal chat message changed: edited by its author, a reaction added or removed, or pinned or unpinned.","tags":["webhooks"],"x-rabt-module":"chat","parameters":[{"$ref":"#/components/parameters/WebhookId"},{"$ref":"#/components/parameters/WebhookTimestamp"},{"$ref":"#/components/parameters/WebhookSignature"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["type","version","timestamp","mode","data"],"properties":{"type":{"type":"string","enum":["chat.message.updated"]},"version":{"type":"integer","enum":[1],"description":"The version of `data`; a breaking change is a new version."},"timestamp":{"type":"string","format":"date-time","description":"When the event happened (UTC)."},"mode":{"type":"string","enum":["live","test"],"description":"`test` for events of the API test space, `live` otherwise."},"data":{"type":"object","properties":{"organization_id":{"type":"string","format":"uuid","description":"The organization the event happened in."},"chat_message_id":{"type":"string","format":"uuid"},"room_id":{"type":"string","format":"uuid"}},"required":["organization_id","chat_message_id","room_id"],"additionalProperties":false}}}}}},"responses":{"2XX":{"description":"Received. Any other answer, or none within the delivery timeout, is retried with exponential backoff; deliveries can be replayed from the delivery log."}}}},"chat.message.deleted":{"post":{"summary":"chat.message.deleted","description":"An internal chat message was deleted by its author (it shows as deleted).","tags":["webhooks"],"x-rabt-module":"chat","parameters":[{"$ref":"#/components/parameters/WebhookId"},{"$ref":"#/components/parameters/WebhookTimestamp"},{"$ref":"#/components/parameters/WebhookSignature"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["type","version","timestamp","mode","data"],"properties":{"type":{"type":"string","enum":["chat.message.deleted"]},"version":{"type":"integer","enum":[1],"description":"The version of `data`; a breaking change is a new version."},"timestamp":{"type":"string","format":"date-time","description":"When the event happened (UTC)."},"mode":{"type":"string","enum":["live","test"],"description":"`test` for events of the API test space, `live` otherwise."},"data":{"type":"object","properties":{"organization_id":{"type":"string","format":"uuid","description":"The organization the event happened in."},"chat_message_id":{"type":"string","format":"uuid"},"room_id":{"type":"string","format":"uuid"}},"required":["organization_id","chat_message_id","room_id"],"additionalProperties":false}}}}}},"responses":{"2XX":{"description":"Received. Any other answer, or none within the delivery timeout, is retried with exponential backoff; deliveries can be replayed from the delivery log."}}}},"chat.room.updated":{"post":{"summary":"chat.room.updated","description":"An internal chat room was created, renamed or archived.","tags":["webhooks"],"x-rabt-module":"chat","parameters":[{"$ref":"#/components/parameters/WebhookId"},{"$ref":"#/components/parameters/WebhookTimestamp"},{"$ref":"#/components/parameters/WebhookSignature"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["type","version","timestamp","mode","data"],"properties":{"type":{"type":"string","enum":["chat.room.updated"]},"version":{"type":"integer","enum":[1],"description":"The version of `data`; a breaking change is a new version."},"timestamp":{"type":"string","format":"date-time","description":"When the event happened (UTC)."},"mode":{"type":"string","enum":["live","test"],"description":"`test` for events of the API test space, `live` otherwise."},"data":{"type":"object","properties":{"organization_id":{"type":"string","format":"uuid","description":"The organization the event happened in."},"room_id":{"type":"string","format":"uuid"}},"required":["organization_id","room_id"],"additionalProperties":false}}}}}},"responses":{"2XX":{"description":"Received. Any other answer, or none within the delivery timeout, is retried with exponential backoff; deliveries can be replayed from the delivery log."}}}},"chat.room.member_added":{"post":{"summary":"chat.room.member_added","description":"A member joined an internal chat room.","tags":["webhooks"],"x-rabt-module":"chat","parameters":[{"$ref":"#/components/parameters/WebhookId"},{"$ref":"#/components/parameters/WebhookTimestamp"},{"$ref":"#/components/parameters/WebhookSignature"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["type","version","timestamp","mode","data"],"properties":{"type":{"type":"string","enum":["chat.room.member_added"]},"version":{"type":"integer","enum":[1],"description":"The version of `data`; a breaking change is a new version."},"timestamp":{"type":"string","format":"date-time","description":"When the event happened (UTC)."},"mode":{"type":"string","enum":["live","test"],"description":"`test` for events of the API test space, `live` otherwise."},"data":{"type":"object","properties":{"organization_id":{"type":"string","format":"uuid","description":"The organization the event happened in."},"room_id":{"type":"string","format":"uuid"},"membership_id":{"type":"string","format":"uuid"}},"required":["organization_id","room_id","membership_id"],"additionalProperties":false}}}}}},"responses":{"2XX":{"description":"Received. Any other answer, or none within the delivery timeout, is retried with exponential backoff; deliveries can be replayed from the delivery log."}}}},"chat.room.member_removed":{"post":{"summary":"chat.room.member_removed","description":"A member left an internal chat room.","tags":["webhooks"],"x-rabt-module":"chat","parameters":[{"$ref":"#/components/parameters/WebhookId"},{"$ref":"#/components/parameters/WebhookTimestamp"},{"$ref":"#/components/parameters/WebhookSignature"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["type","version","timestamp","mode","data"],"properties":{"type":{"type":"string","enum":["chat.room.member_removed"]},"version":{"type":"integer","enum":[1],"description":"The version of `data`; a breaking change is a new version."},"timestamp":{"type":"string","format":"date-time","description":"When the event happened (UTC)."},"mode":{"type":"string","enum":["live","test"],"description":"`test` for events of the API test space, `live` otherwise."},"data":{"type":"object","properties":{"organization_id":{"type":"string","format":"uuid","description":"The organization the event happened in."},"room_id":{"type":"string","format":"uuid"},"membership_id":{"type":"string","format":"uuid"}},"required":["organization_id","room_id","membership_id"],"additionalProperties":false}}}}}},"responses":{"2XX":{"description":"Received. Any other answer, or none within the delivery timeout, is retried with exponential backoff; deliveries can be replayed from the delivery log."}}}},"chat.attachment.scanned":{"post":{"summary":"chat.attachment.scanned","description":"The malware scan of a file of an internal chat room finished (OP21): clean, infected (quarantined: kept, never served, never deleted), scan_failed (it can be scanned again), or not scanned when no scanner is configured; an infected file carries its signature and the recorded error.","tags":["webhooks"],"x-rabt-module":"chat","parameters":[{"$ref":"#/components/parameters/WebhookId"},{"$ref":"#/components/parameters/WebhookTimestamp"},{"$ref":"#/components/parameters/WebhookSignature"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["type","version","timestamp","mode","data"],"properties":{"type":{"type":"string","enum":["chat.attachment.scanned"]},"version":{"type":"integer","enum":[2],"description":"The version of `data`; a breaking change is a new version."},"timestamp":{"type":"string","format":"date-time","description":"When the event happened (UTC)."},"mode":{"type":"string","enum":["live","test"],"description":"`test` for events of the API test space, `live` otherwise."},"data":{"type":"object","properties":{"organization_id":{"type":"string","format":"uuid","description":"The organization the event happened in."},"attachment_id":{"type":"string","format":"uuid"},"room_id":{"type":"string","format":"uuid"},"result":{"type":"string","enum":["clean","infected","scan_failed","not_scanned"]},"signature":{"type":["string","null"]},"error_code":{"type":["string","null"]},"reference":{"type":["string","null"]}},"required":["organization_id","attachment_id","room_id","result","signature","error_code","reference"],"additionalProperties":false}}}}}},"responses":{"2XX":{"description":"Received. Any other answer, or none within the delivery timeout, is retried with exponential backoff; deliveries can be replayed from the delivery log."}}}},"webchat.widget.created":{"post":{"summary":"webchat.widget.created","description":"A web chat widget was created.","tags":["webhooks"],"x-rabt-module":"channels","parameters":[{"$ref":"#/components/parameters/WebhookId"},{"$ref":"#/components/parameters/WebhookTimestamp"},{"$ref":"#/components/parameters/WebhookSignature"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["type","version","timestamp","mode","data"],"properties":{"type":{"type":"string","enum":["webchat.widget.created"]},"version":{"type":"integer","enum":[1],"description":"The version of `data`; a breaking change is a new version."},"timestamp":{"type":"string","format":"date-time","description":"When the event happened (UTC)."},"mode":{"type":"string","enum":["live","test"],"description":"`test` for events of the API test space, `live` otherwise."},"data":{"type":"object","properties":{"organization_id":{"type":"string","format":"uuid","description":"The organization the event happened in."},"widget_id":{"type":"string","format":"uuid"},"name":{"type":"string"}},"required":["organization_id","widget_id","name"],"additionalProperties":false}}}}}},"responses":{"2XX":{"description":"Received. Any other answer, or none within the delivery timeout, is retried with exponential backoff; deliveries can be replayed from the delivery log."}}}},"webchat.widget.updated":{"post":{"summary":"webchat.widget.updated","description":"A web chat widget changed: its settings, its logo, or it was switched off or on (`status`).","tags":["webhooks"],"x-rabt-module":"channels","parameters":[{"$ref":"#/components/parameters/WebhookId"},{"$ref":"#/components/parameters/WebhookTimestamp"},{"$ref":"#/components/parameters/WebhookSignature"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["type","version","timestamp","mode","data"],"properties":{"type":{"type":"string","enum":["webchat.widget.updated"]},"version":{"type":"integer","enum":[1],"description":"The version of `data`; a breaking change is a new version."},"timestamp":{"type":"string","format":"date-time","description":"When the event happened (UTC)."},"mode":{"type":"string","enum":["live","test"],"description":"`test` for events of the API test space, `live` otherwise."},"data":{"type":"object","properties":{"organization_id":{"type":"string","format":"uuid","description":"The organization the event happened in."},"widget_id":{"type":"string","format":"uuid"},"fields":{"type":"array","items":{"type":"string","enum":["name","status","allowed_domains","business_name","greeting","default_locale","position","header_color","pre_chat","privacy_policy_url","logo"]}},"status":{"type":"string","enum":["active","disabled"]}},"required":["organization_id","widget_id","fields","status"],"additionalProperties":false}}}}}},"responses":{"2XX":{"description":"Received. Any other answer, or none within the delivery timeout, is retried with exponential backoff; deliveries can be replayed from the delivery log."}}}},"webchat.widget.secret_rotated":{"post":{"summary":"webchat.widget.secret_rotated","description":"A web chat widget's identity-verification secret was issued or replaced; the previous one works until `previous_valid_until` (the time of issue when there was none).","tags":["webhooks"],"x-rabt-module":"channels","parameters":[{"$ref":"#/components/parameters/WebhookId"},{"$ref":"#/components/parameters/WebhookTimestamp"},{"$ref":"#/components/parameters/WebhookSignature"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["type","version","timestamp","mode","data"],"properties":{"type":{"type":"string","enum":["webchat.widget.secret_rotated"]},"version":{"type":"integer","enum":[1],"description":"The version of `data`; a breaking change is a new version."},"timestamp":{"type":"string","format":"date-time","description":"When the event happened (UTC)."},"mode":{"type":"string","enum":["live","test"],"description":"`test` for events of the API test space, `live` otherwise."},"data":{"type":"object","properties":{"organization_id":{"type":"string","format":"uuid","description":"The organization the event happened in."},"widget_id":{"type":"string","format":"uuid"},"previous_valid_until":{"type":"string","format":"date-time"}},"required":["organization_id","widget_id","previous_valid_until"],"additionalProperties":false}}}}}},"responses":{"2XX":{"description":"Received. Any other answer, or none within the delivery timeout, is retried with exponential backoff; deliveries can be replayed from the delivery log."}}}},"webchat.widget.deleted":{"post":{"summary":"webchat.widget.deleted","description":"A web chat widget was removed: it no longer loads on websites.","tags":["webhooks"],"x-rabt-module":"channels","parameters":[{"$ref":"#/components/parameters/WebhookId"},{"$ref":"#/components/parameters/WebhookTimestamp"},{"$ref":"#/components/parameters/WebhookSignature"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["type","version","timestamp","mode","data"],"properties":{"type":{"type":"string","enum":["webchat.widget.deleted"]},"version":{"type":"integer","enum":[1],"description":"The version of `data`; a breaking change is a new version."},"timestamp":{"type":"string","format":"date-time","description":"When the event happened (UTC)."},"mode":{"type":"string","enum":["live","test"],"description":"`test` for events of the API test space, `live` otherwise."},"data":{"type":"object","properties":{"organization_id":{"type":"string","format":"uuid","description":"The organization the event happened in."},"widget_id":{"type":"string","format":"uuid"}},"required":["organization_id","widget_id"],"additionalProperties":false}}}}}},"responses":{"2XX":{"description":"Received. Any other answer, or none within the delivery timeout, is retried with exponential backoff; deliveries can be replayed from the delivery log."}}}},"sms.sender_name.requested":{"post":{"summary":"sms.sender_name.requested","description":"A sender name was requested; it is pending until the platform team registers it with the operators.","tags":["webhooks"],"x-rabt-module":"sms","parameters":[{"$ref":"#/components/parameters/WebhookId"},{"$ref":"#/components/parameters/WebhookTimestamp"},{"$ref":"#/components/parameters/WebhookSignature"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["type","version","timestamp","mode","data"],"properties":{"type":{"type":"string","enum":["sms.sender_name.requested"]},"version":{"type":"integer","enum":[1],"description":"The version of `data`; a breaking change is a new version."},"timestamp":{"type":"string","format":"date-time","description":"When the event happened (UTC)."},"mode":{"type":"string","enum":["live","test"],"description":"`test` for events of the API test space, `live` otherwise."},"data":{"type":"object","properties":{"organization_id":{"type":"string","format":"uuid","description":"The organization the event happened in."},"sender_name_id":{"type":"string","format":"uuid"},"name":{"type":"string","description":"The sender name as registered, e.g. `RABT` or `RABT-AD`."},"classification":{"type":"string","enum":["service","promotional","awareness"]},"requested_by_membership_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]}},"required":["organization_id","sender_name_id","name","classification","requested_by_membership_id"],"additionalProperties":false}}}}}},"responses":{"2XX":{"description":"Received. Any other answer, or none within the delivery timeout, is retried with exponential backoff; deliveries can be replayed from the delivery log."}}}},"sms.sender_name.updated":{"post":{"summary":"sms.sender_name.updated","description":"A sender name's purpose changed, or it became (or stopped being) the default for SMS from tickets and the API.","tags":["webhooks"],"x-rabt-module":"sms","parameters":[{"$ref":"#/components/parameters/WebhookId"},{"$ref":"#/components/parameters/WebhookTimestamp"},{"$ref":"#/components/parameters/WebhookSignature"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["type","version","timestamp","mode","data"],"properties":{"type":{"type":"string","enum":["sms.sender_name.updated"]},"version":{"type":"integer","enum":[1],"description":"The version of `data`; a breaking change is a new version."},"timestamp":{"type":"string","format":"date-time","description":"When the event happened (UTC)."},"mode":{"type":"string","enum":["live","test"],"description":"`test` for events of the API test space, `live` otherwise."},"data":{"type":"object","properties":{"organization_id":{"type":"string","format":"uuid","description":"The organization the event happened in."},"sender_name_id":{"type":"string","format":"uuid"},"name":{"type":"string","description":"The sender name as registered, e.g. `RABT` or `RABT-AD`."},"classification":{"type":"string","enum":["service","promotional","awareness"]},"fields":{"type":"array","items":{"type":"string","enum":["is_default","purpose"]}}},"required":["organization_id","sender_name_id","name","classification","fields"],"additionalProperties":false}}}}}},"responses":{"2XX":{"description":"Received. Any other answer, or none within the delivery timeout, is retried with exponential backoff; deliveries can be replayed from the delivery log."}}}},"sms.sender_name.document_added":{"post":{"summary":"sms.sender_name.document_added","description":"A registration document was uploaded for a sender name.","tags":["webhooks"],"x-rabt-module":"sms","parameters":[{"$ref":"#/components/parameters/WebhookId"},{"$ref":"#/components/parameters/WebhookTimestamp"},{"$ref":"#/components/parameters/WebhookSignature"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["type","version","timestamp","mode","data"],"properties":{"type":{"type":"string","enum":["sms.sender_name.document_added"]},"version":{"type":"integer","enum":[1],"description":"The version of `data`; a breaking change is a new version."},"timestamp":{"type":"string","format":"date-time","description":"When the event happened (UTC)."},"mode":{"type":"string","enum":["live","test"],"description":"`test` for events of the API test space, `live` otherwise."},"data":{"type":"object","properties":{"organization_id":{"type":"string","format":"uuid","description":"The organization the event happened in."},"sender_name_id":{"type":"string","format":"uuid"},"name":{"type":"string","description":"The sender name as registered, e.g. `RABT` or `RABT-AD`."},"classification":{"type":"string","enum":["service","promotional","awareness"]},"document_id":{"type":"string","format":"uuid"},"kind":{"type":"string"}},"required":["organization_id","sender_name_id","name","classification","document_id","kind"],"additionalProperties":false}}}}}},"responses":{"2XX":{"description":"Received. Any other answer, or none within the delivery timeout, is retried with exponential backoff; deliveries can be replayed from the delivery log."}}}},"sms.sender_name.document_removed":{"post":{"summary":"sms.sender_name.document_removed","description":"A registration document of a sender name was withdrawn.","tags":["webhooks"],"x-rabt-module":"sms","parameters":[{"$ref":"#/components/parameters/WebhookId"},{"$ref":"#/components/parameters/WebhookTimestamp"},{"$ref":"#/components/parameters/WebhookSignature"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["type","version","timestamp","mode","data"],"properties":{"type":{"type":"string","enum":["sms.sender_name.document_removed"]},"version":{"type":"integer","enum":[1],"description":"The version of `data`; a breaking change is a new version."},"timestamp":{"type":"string","format":"date-time","description":"When the event happened (UTC)."},"mode":{"type":"string","enum":["live","test"],"description":"`test` for events of the API test space, `live` otherwise."},"data":{"type":"object","properties":{"organization_id":{"type":"string","format":"uuid","description":"The organization the event happened in."},"sender_name_id":{"type":"string","format":"uuid"},"name":{"type":"string","description":"The sender name as registered, e.g. `RABT` or `RABT-AD`."},"classification":{"type":"string","enum":["service","promotional","awareness"]},"document_id":{"type":"string","format":"uuid"}},"required":["organization_id","sender_name_id","name","classification","document_id"],"additionalProperties":false}}}}}},"responses":{"2XX":{"description":"Received. Any other answer, or none within the delivery timeout, is retried with exponential backoff; deliveries can be replayed from the delivery log."}}}},"sms.sender_name.submitted":{"post":{"summary":"sms.sender_name.submitted","description":"The platform team submitted the sender name to the operators for registration.","tags":["webhooks"],"x-rabt-module":"sms","parameters":[{"$ref":"#/components/parameters/WebhookId"},{"$ref":"#/components/parameters/WebhookTimestamp"},{"$ref":"#/components/parameters/WebhookSignature"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["type","version","timestamp","mode","data"],"properties":{"type":{"type":"string","enum":["sms.sender_name.submitted"]},"version":{"type":"integer","enum":[1],"description":"The version of `data`; a breaking change is a new version."},"timestamp":{"type":"string","format":"date-time","description":"When the event happened (UTC)."},"mode":{"type":"string","enum":["live","test"],"description":"`test` for events of the API test space, `live` otherwise."},"data":{"type":"object","properties":{"organization_id":{"type":"string","format":"uuid","description":"The organization the event happened in."},"sender_name_id":{"type":"string","format":"uuid"},"name":{"type":"string","description":"The sender name as registered, e.g. `RABT` or `RABT-AD`."},"classification":{"type":"string","enum":["service","promotional","awareness"]}},"required":["organization_id","sender_name_id","name","classification"],"additionalProperties":false}}}}}},"responses":{"2XX":{"description":"Received. Any other answer, or none within the delivery timeout, is retried with exponential backoff; deliveries can be replayed from the delivery log."}}}},"sms.sender_name.status_changed":{"post":{"summary":"sms.sender_name.status_changed","description":"The registration outcome: the sender name was approved (sending allowed) or rejected with its reason.","tags":["webhooks"],"x-rabt-module":"sms","parameters":[{"$ref":"#/components/parameters/WebhookId"},{"$ref":"#/components/parameters/WebhookTimestamp"},{"$ref":"#/components/parameters/WebhookSignature"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["type","version","timestamp","mode","data"],"properties":{"type":{"type":"string","enum":["sms.sender_name.status_changed"]},"version":{"type":"integer","enum":[1],"description":"The version of `data`; a breaking change is a new version."},"timestamp":{"type":"string","format":"date-time","description":"When the event happened (UTC)."},"mode":{"type":"string","enum":["live","test"],"description":"`test` for events of the API test space, `live` otherwise."},"data":{"type":"object","properties":{"organization_id":{"type":"string","format":"uuid","description":"The organization the event happened in."},"sender_name_id":{"type":"string","format":"uuid"},"name":{"type":"string","description":"The sender name as registered, e.g. `RABT` or `RABT-AD`."},"classification":{"type":"string","enum":["service","promotional","awareness"]},"from":{"type":"string","enum":["pending","approved","rejected"]},"to":{"type":"string","enum":["pending","approved","rejected"]},"reason":{"type":["string","null"]}},"required":["organization_id","sender_name_id","name","classification","from","to","reason"],"additionalProperties":false}}}}}},"responses":{"2XX":{"description":"Received. Any other answer, or none within the delivery timeout, is retried with exponential backoff; deliveries can be replayed from the delivery log."}}}},"sms.sender_name.suspended":{"post":{"summary":"sms.sender_name.suspended","description":"The platform team suspended the sender name after spam complaints, with its reason: SMS under it are refused (SMS-4022).","tags":["webhooks"],"x-rabt-module":"sms","parameters":[{"$ref":"#/components/parameters/WebhookId"},{"$ref":"#/components/parameters/WebhookTimestamp"},{"$ref":"#/components/parameters/WebhookSignature"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["type","version","timestamp","mode","data"],"properties":{"type":{"type":"string","enum":["sms.sender_name.suspended"]},"version":{"type":"integer","enum":[1],"description":"The version of `data`; a breaking change is a new version."},"timestamp":{"type":"string","format":"date-time","description":"When the event happened (UTC)."},"mode":{"type":"string","enum":["live","test"],"description":"`test` for events of the API test space, `live` otherwise."},"data":{"type":"object","properties":{"organization_id":{"type":"string","format":"uuid","description":"The organization the event happened in."},"sender_name_id":{"type":"string","format":"uuid"},"name":{"type":"string","description":"The sender name as registered, e.g. `RABT` or `RABT-AD`."},"classification":{"type":"string","enum":["service","promotional","awareness"]},"reason":{"type":"string"}},"required":["organization_id","sender_name_id","name","classification","reason"],"additionalProperties":false}}}}}},"responses":{"2XX":{"description":"Received. Any other answer, or none within the delivery timeout, is retried with exponential backoff; deliveries can be replayed from the delivery log."}}}},"sms.sender_name.suspension_lifted":{"post":{"summary":"sms.sender_name.suspension_lifted","description":"The platform team lifted the sender name's suspension, with its reason.","tags":["webhooks"],"x-rabt-module":"sms","parameters":[{"$ref":"#/components/parameters/WebhookId"},{"$ref":"#/components/parameters/WebhookTimestamp"},{"$ref":"#/components/parameters/WebhookSignature"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["type","version","timestamp","mode","data"],"properties":{"type":{"type":"string","enum":["sms.sender_name.suspension_lifted"]},"version":{"type":"integer","enum":[1],"description":"The version of `data`; a breaking change is a new version."},"timestamp":{"type":"string","format":"date-time","description":"When the event happened (UTC)."},"mode":{"type":"string","enum":["live","test"],"description":"`test` for events of the API test space, `live` otherwise."},"data":{"type":"object","properties":{"organization_id":{"type":"string","format":"uuid","description":"The organization the event happened in."},"sender_name_id":{"type":"string","format":"uuid"},"name":{"type":"string","description":"The sender name as registered, e.g. `RABT` or `RABT-AD`."},"classification":{"type":"string","enum":["service","promotional","awareness"]},"reason":{"type":"string"}},"required":["organization_id","sender_name_id","name","classification","reason"],"additionalProperties":false}}}}}},"responses":{"2XX":{"description":"Received. Any other answer, or none within the delivery timeout, is retried with exponential backoff; deliveries can be replayed from the delivery log."}}}},"sms.sender_name.complaint_logged":{"post":{"summary":"sms.sender_name.complaint_logged","description":"The platform team logged a spam complaint against the sender name (from the regulator, an operator or a recipient).","tags":["webhooks"],"x-rabt-module":"sms","parameters":[{"$ref":"#/components/parameters/WebhookId"},{"$ref":"#/components/parameters/WebhookTimestamp"},{"$ref":"#/components/parameters/WebhookSignature"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["type","version","timestamp","mode","data"],"properties":{"type":{"type":"string","enum":["sms.sender_name.complaint_logged"]},"version":{"type":"integer","enum":[1],"description":"The version of `data`; a breaking change is a new version."},"timestamp":{"type":"string","format":"date-time","description":"When the event happened (UTC)."},"mode":{"type":"string","enum":["live","test"],"description":"`test` for events of the API test space, `live` otherwise."},"data":{"type":"object","properties":{"organization_id":{"type":"string","format":"uuid","description":"The organization the event happened in."},"sender_name_id":{"type":"string","format":"uuid"},"name":{"type":"string","description":"The sender name as registered, e.g. `RABT` or `RABT-AD`."},"classification":{"type":"string","enum":["service","promotional","awareness"]},"complaint_id":{"type":"string","format":"uuid"},"source":{"type":"string","enum":["regulator","operator","recipient"]}},"required":["organization_id","sender_name_id","name","classification","complaint_id","source"],"additionalProperties":false}}}}}},"responses":{"2XX":{"description":"Received. Any other answer, or none within the delivery timeout, is retried with exponential backoff; deliveries can be replayed from the delivery log."}}}},"sms.opt_out.created":{"post":{"summary":"sms.opt_out.created","description":"A number was added to the SMS opt-out list.","tags":["webhooks"],"x-rabt-module":"sms","parameters":[{"$ref":"#/components/parameters/WebhookId"},{"$ref":"#/components/parameters/WebhookTimestamp"},{"$ref":"#/components/parameters/WebhookSignature"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["type","version","timestamp","mode","data"],"properties":{"type":{"type":"string","enum":["sms.opt_out.created"]},"version":{"type":"integer","enum":[1],"description":"The version of `data`; a breaking change is a new version."},"timestamp":{"type":"string","format":"date-time","description":"When the event happened (UTC)."},"mode":{"type":"string","enum":["live","test"],"description":"`test` for events of the API test space, `live` otherwise."},"data":{"type":"object","properties":{"organization_id":{"type":"string","format":"uuid","description":"The organization the event happened in."},"opt_out_id":{"type":"string","format":"uuid"},"phone":{"type":"string","description":"E.164."},"source":{"type":"string","enum":["recipient_request","member","api"]}},"required":["organization_id","opt_out_id","phone","source"],"additionalProperties":false}}}}}},"responses":{"2XX":{"description":"Received. Any other answer, or none within the delivery timeout, is retried with exponential backoff; deliveries can be replayed from the delivery log."}}}},"sms.opt_out.lifted":{"post":{"summary":"sms.opt_out.lifted","description":"A number was taken off the SMS opt-out list.","tags":["webhooks"],"x-rabt-module":"sms","parameters":[{"$ref":"#/components/parameters/WebhookId"},{"$ref":"#/components/parameters/WebhookTimestamp"},{"$ref":"#/components/parameters/WebhookSignature"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["type","version","timestamp","mode","data"],"properties":{"type":{"type":"string","enum":["sms.opt_out.lifted"]},"version":{"type":"integer","enum":[1],"description":"The version of `data`; a breaking change is a new version."},"timestamp":{"type":"string","format":"date-time","description":"When the event happened (UTC)."},"mode":{"type":"string","enum":["live","test"],"description":"`test` for events of the API test space, `live` otherwise."},"data":{"type":"object","properties":{"organization_id":{"type":"string","format":"uuid","description":"The organization the event happened in."},"opt_out_id":{"type":"string","format":"uuid"},"phone":{"type":"string"}},"required":["organization_id","opt_out_id","phone"],"additionalProperties":false}}}}}},"responses":{"2XX":{"description":"Received. Any other answer, or none within the delivery timeout, is retried with exponential backoff; deliveries can be replayed from the delivery log."}}}},"sms.settings.updated":{"post":{"summary":"sms.settings.updated","description":"The SMS settings changed: allowed destination countries or allowed link domains.","tags":["webhooks"],"x-rabt-module":"sms","parameters":[{"$ref":"#/components/parameters/WebhookId"},{"$ref":"#/components/parameters/WebhookTimestamp"},{"$ref":"#/components/parameters/WebhookSignature"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["type","version","timestamp","mode","data"],"properties":{"type":{"type":"string","enum":["sms.settings.updated"]},"version":{"type":"integer","enum":[1],"description":"The version of `data`; a breaking change is a new version."},"timestamp":{"type":"string","format":"date-time","description":"When the event happened (UTC)."},"mode":{"type":"string","enum":["live","test"],"description":"`test` for events of the API test space, `live` otherwise."},"data":{"type":"object","properties":{"organization_id":{"type":"string","format":"uuid","description":"The organization the event happened in."},"fields":{"type":"array","items":{"type":"string","enum":["allowed_countries","allowed_link_domains"]}}},"required":["organization_id","fields"],"additionalProperties":false}}}}}},"responses":{"2XX":{"description":"Received. Any other answer, or none within the delivery timeout, is retried with exponential backoff; deliveries can be replayed from the delivery log."}}}},"sms.queued":{"post":{"summary":"sms.queued","description":"An SMS passed every check and waits in Rabt's SMS gateway; `not_before` is when a promotional one may leave.","tags":["webhooks"],"x-rabt-module":"sms","parameters":[{"$ref":"#/components/parameters/WebhookId"},{"$ref":"#/components/parameters/WebhookTimestamp"},{"$ref":"#/components/parameters/WebhookSignature"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["type","version","timestamp","mode","data"],"properties":{"type":{"type":"string","enum":["sms.queued"]},"version":{"type":"integer","enum":[1],"description":"The version of `data`; a breaking change is a new version."},"timestamp":{"type":"string","format":"date-time","description":"When the event happened (UTC)."},"mode":{"type":"string","enum":["live","test"],"description":"`test` for events of the API test space, `live` otherwise."},"data":{"type":"object","properties":{"organization_id":{"type":"string","format":"uuid","description":"The organization the event happened in."},"sms_id":{"type":"string","format":"uuid"},"category":{"type":"string","enum":["service","otp","promotional","awareness"]},"source":{"type":"string","enum":["ticket","api","system","campaign"]},"sender_name_id":{"type":"string","format":"uuid"},"ticket_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"description":"The ticket it was sent from (source `ticket`)."},"message_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"description":"The ticket's timeline item that shows it."},"segments":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"not_before":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]}},"required":["organization_id","sms_id","category","source","sender_name_id","ticket_id","message_id","segments","not_before"],"additionalProperties":false}}}}}},"responses":{"2XX":{"description":"Received. Any other answer, or none within the delivery timeout, is retried with exponential backoff; deliveries can be replayed from the delivery log."}}}},"sms.status_changed":{"post":{"summary":"sms.status_changed","description":"An SMS moved on: submitted to an operator, delivered, failed (`error_code` says why) or unknown (no delivery report in time).","tags":["webhooks"],"x-rabt-module":"sms","parameters":[{"$ref":"#/components/parameters/WebhookId"},{"$ref":"#/components/parameters/WebhookTimestamp"},{"$ref":"#/components/parameters/WebhookSignature"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["type","version","timestamp","mode","data"],"properties":{"type":{"type":"string","enum":["sms.status_changed"]},"version":{"type":"integer","enum":[1],"description":"The version of `data`; a breaking change is a new version."},"timestamp":{"type":"string","format":"date-time","description":"When the event happened (UTC)."},"mode":{"type":"string","enum":["live","test"],"description":"`test` for events of the API test space, `live` otherwise."},"data":{"type":"object","properties":{"organization_id":{"type":"string","format":"uuid","description":"The organization the event happened in."},"sms_id":{"type":"string","format":"uuid"},"category":{"type":"string","enum":["service","otp","promotional","awareness"]},"source":{"type":"string","enum":["ticket","api","system","campaign"]},"sender_name_id":{"type":"string","format":"uuid"},"ticket_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"description":"The ticket it was sent from (source `ticket`)."},"message_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"description":"The ticket's timeline item that shows it."},"from":{"type":"string","enum":["queued","submitting","submitted","delivered","failed","unknown"]},"to":{"type":"string","enum":["queued","submitting","submitted","delivered","failed","unknown"]},"error_code":{"type":["string","null"]}},"required":["organization_id","sms_id","category","source","sender_name_id","ticket_id","message_id","from","to","error_code"],"additionalProperties":false}}}}}},"responses":{"2XX":{"description":"Received. Any other answer, or none within the delivery timeout, is retried with exponential backoff; deliveries can be replayed from the delivery log."}}}},"sms.verified":{"post":{"summary":"sms.verified","description":"The one-time code of an SMS was reported as used.","tags":["webhooks"],"x-rabt-module":"sms","parameters":[{"$ref":"#/components/parameters/WebhookId"},{"$ref":"#/components/parameters/WebhookTimestamp"},{"$ref":"#/components/parameters/WebhookSignature"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["type","version","timestamp","mode","data"],"properties":{"type":{"type":"string","enum":["sms.verified"]},"version":{"type":"integer","enum":[1],"description":"The version of `data`; a breaking change is a new version."},"timestamp":{"type":"string","format":"date-time","description":"When the event happened (UTC)."},"mode":{"type":"string","enum":["live","test"],"description":"`test` for events of the API test space, `live` otherwise."},"data":{"type":"object","properties":{"organization_id":{"type":"string","format":"uuid","description":"The organization the event happened in."},"sms_id":{"type":"string","format":"uuid"}},"required":["organization_id","sms_id"],"additionalProperties":false}}}}}},"responses":{"2XX":{"description":"Received. Any other answer, or none within the delivery timeout, is retried with exponential backoff; deliveries can be replayed from the delivery log."}}}},"platform.provider_balance.account_created":{"post":{"summary":"platform.provider_balance.account_created","description":"Rabt platform organization only: a provider account whose balance Rabt watches was added.","tags":["webhooks"],"x-rabt-module":"platform_operations","parameters":[{"$ref":"#/components/parameters/WebhookId"},{"$ref":"#/components/parameters/WebhookTimestamp"},{"$ref":"#/components/parameters/WebhookSignature"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["type","version","timestamp","mode","data"],"properties":{"type":{"type":"string","enum":["platform.provider_balance.account_created"]},"version":{"type":"integer","enum":[1],"description":"The version of `data`; a breaking change is a new version."},"timestamp":{"type":"string","format":"date-time","description":"When the event happened (UTC)."},"mode":{"type":"string","enum":["live","test"],"description":"`test` for events of the API test space, `live` otherwise."},"data":{"type":"object","properties":{"organization_id":{"type":"string","format":"uuid","description":"The organization the event happened in (the Rabt organization)."},"account_id":{"type":"string","format":"uuid"},"provider":{"type":"string","enum":["meta","openai","x","taqnyat","mobile_net","sms_operator","voice_operator"]},"name":{"type":"string"},"source":{"type":"string","enum":["api","manual"]},"currency":{"type":"string","enum":["USD","SAR"]},"low_balance_micros":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Millionths of the currency."},{"type":"null"}],"description":"Alert when the balance goes below this; null: no alert."},"thresholds_micros":{"type":"array","items":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Millionths of the currency."},"description":"Deprecated: `low_balance_micros` as a list (none or one)."},"spike_ratio_bps":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Deprecated: always 20000 (a spike is fixed at 2×)."},"by_membership_id":{"type":"string","format":"uuid"}},"required":["organization_id","account_id","provider","name","source","currency","low_balance_micros","thresholds_micros","spike_ratio_bps","by_membership_id"],"additionalProperties":false}}}}}},"responses":{"2XX":{"description":"Received. Any other answer, or none within the delivery timeout, is retried with exponential backoff; deliveries can be replayed from the delivery log."}}}},"platform.provider_balance.account_updated":{"post":{"summary":"platform.provider_balance.account_updated","description":"Rabt platform organization only: a provider account's name or low-balance amount changed (`fields` names what).","tags":["webhooks"],"x-rabt-module":"platform_operations","parameters":[{"$ref":"#/components/parameters/WebhookId"},{"$ref":"#/components/parameters/WebhookTimestamp"},{"$ref":"#/components/parameters/WebhookSignature"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["type","version","timestamp","mode","data"],"properties":{"type":{"type":"string","enum":["platform.provider_balance.account_updated"]},"version":{"type":"integer","enum":[1],"description":"The version of `data`; a breaking change is a new version."},"timestamp":{"type":"string","format":"date-time","description":"When the event happened (UTC)."},"mode":{"type":"string","enum":["live","test"],"description":"`test` for events of the API test space, `live` otherwise."},"data":{"type":"object","properties":{"organization_id":{"type":"string","format":"uuid","description":"The organization the event happened in (the Rabt organization)."},"account_id":{"type":"string","format":"uuid"},"provider":{"type":"string","enum":["meta","openai","x","taqnyat","mobile_net","sms_operator","voice_operator"]},"name":{"type":"string"},"fields":{"minItems":1,"type":"array","items":{"type":"string","enum":["name","low_balance","thresholds","spike_ratio"]}},"by_membership_id":{"type":"string","format":"uuid"}},"required":["organization_id","account_id","provider","name","fields","by_membership_id"],"additionalProperties":false}}}}}},"responses":{"2XX":{"description":"Received. Any other answer, or none within the delivery timeout, is retried with exponential backoff; deliveries can be replayed from the delivery log."}}}},"platform.provider_balance.account_archived":{"post":{"summary":"platform.provider_balance.account_archived","description":"Rabt platform organization only: a provider account was archived with its reason (no longer watched).","tags":["webhooks"],"x-rabt-module":"platform_operations","parameters":[{"$ref":"#/components/parameters/WebhookId"},{"$ref":"#/components/parameters/WebhookTimestamp"},{"$ref":"#/components/parameters/WebhookSignature"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["type","version","timestamp","mode","data"],"properties":{"type":{"type":"string","enum":["platform.provider_balance.account_archived"]},"version":{"type":"integer","enum":[1],"description":"The version of `data`; a breaking change is a new version."},"timestamp":{"type":"string","format":"date-time","description":"When the event happened (UTC)."},"mode":{"type":"string","enum":["live","test"],"description":"`test` for events of the API test space, `live` otherwise."},"data":{"type":"object","properties":{"organization_id":{"type":"string","format":"uuid","description":"The organization the event happened in (the Rabt organization)."},"account_id":{"type":"string","format":"uuid"},"provider":{"type":"string","enum":["meta","openai","x","taqnyat","mobile_net","sms_operator","voice_operator"]},"name":{"type":"string"},"reason":{"type":"string"},"by_membership_id":{"type":"string","format":"uuid"}},"required":["organization_id","account_id","provider","name","reason","by_membership_id"],"additionalProperties":false}}}}}},"responses":{"2XX":{"description":"Received. Any other answer, or none within the delivery timeout, is retried with exponential backoff; deliveries can be replayed from the delivery log."}}}},"platform.provider_balance.recorded":{"post":{"summary":"platform.provider_balance.recorded","description":"Rabt platform organization only: a platform member entered the balance of a provider account by hand.","tags":["webhooks"],"x-rabt-module":"platform_operations","parameters":[{"$ref":"#/components/parameters/WebhookId"},{"$ref":"#/components/parameters/WebhookTimestamp"},{"$ref":"#/components/parameters/WebhookSignature"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["type","version","timestamp","mode","data"],"properties":{"type":{"type":"string","enum":["platform.provider_balance.recorded"]},"version":{"type":"integer","enum":[1],"description":"The version of `data`; a breaking change is a new version."},"timestamp":{"type":"string","format":"date-time","description":"When the event happened (UTC)."},"mode":{"type":"string","enum":["live","test"],"description":"`test` for events of the API test space, `live` otherwise."},"data":{"type":"object","properties":{"organization_id":{"type":"string","format":"uuid","description":"The organization the event happened in (the Rabt organization)."},"account_id":{"type":"string","format":"uuid"},"provider":{"type":"string","enum":["meta","openai","x","taqnyat","mobile_net","sms_operator","voice_operator"]},"name":{"type":"string"},"reading_id":{"type":"string","format":"uuid"},"balance_micros":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Millionths of the currency."},"currency":{"type":"string","enum":["USD","SAR"]},"read_at":{"type":"string","format":"date-time"},"by_membership_id":{"type":"string","format":"uuid"}},"required":["organization_id","account_id","provider","name","reading_id","balance_micros","currency","read_at","by_membership_id"],"additionalProperties":false}}}}}},"responses":{"2XX":{"description":"Received. Any other answer, or none within the delivery timeout, is retried with exponential backoff; deliveries can be replayed from the delivery log."}}}},"platform.provider_balance.low":{"post":{"summary":"platform.provider_balance.low","description":"Rabt platform organization only: a provider account's estimated balance fell below one of its thresholds (once per crossing), with the days of runway at the current burn.","tags":["webhooks"],"x-rabt-module":"platform_operations","parameters":[{"$ref":"#/components/parameters/WebhookId"},{"$ref":"#/components/parameters/WebhookTimestamp"},{"$ref":"#/components/parameters/WebhookSignature"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["type","version","timestamp","mode","data"],"properties":{"type":{"type":"string","enum":["platform.provider_balance.low"]},"version":{"type":"integer","enum":[1],"description":"The version of `data`; a breaking change is a new version."},"timestamp":{"type":"string","format":"date-time","description":"When the event happened (UTC)."},"mode":{"type":"string","enum":["live","test"],"description":"`test` for events of the API test space, `live` otherwise."},"data":{"type":"object","properties":{"organization_id":{"type":"string","format":"uuid","description":"The organization the event happened in (the Rabt organization)."},"account_id":{"type":"string","format":"uuid"},"provider":{"type":"string","enum":["meta","openai","x","taqnyat","mobile_net","sms_operator","voice_operator"]},"name":{"type":"string"},"currency":{"type":"string","enum":["USD","SAR"]},"balance_micros":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Millionths of the currency."},"threshold_micros":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Millionths of the currency."},"runway_days":{"anyOf":[{"type":"number","minimum":0},{"type":"null"}]}},"required":["organization_id","account_id","provider","name","currency","balance_micros","threshold_micros","runway_days"],"additionalProperties":false}}}}}},"responses":{"2XX":{"description":"Received. Any other answer, or none within the delivery timeout, is retried with exponential backoff; deliveries can be replayed from the delivery log."}}}},"platform.provider_balance.burn_spike":{"post":{"summary":"platform.provider_balance.burn_spike","description":"Rabt platform organization only: the last 24 hours spent at the provider at least the account's spike ratio of a usual day (once per spike).","tags":["webhooks"],"x-rabt-module":"platform_operations","parameters":[{"$ref":"#/components/parameters/WebhookId"},{"$ref":"#/components/parameters/WebhookTimestamp"},{"$ref":"#/components/parameters/WebhookSignature"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["type","version","timestamp","mode","data"],"properties":{"type":{"type":"string","enum":["platform.provider_balance.burn_spike"]},"version":{"type":"integer","enum":[1],"description":"The version of `data`; a breaking change is a new version."},"timestamp":{"type":"string","format":"date-time","description":"When the event happened (UTC)."},"mode":{"type":"string","enum":["live","test"],"description":"`test` for events of the API test space, `live` otherwise."},"data":{"type":"object","properties":{"organization_id":{"type":"string","format":"uuid","description":"The organization the event happened in (the Rabt organization)."},"account_id":{"type":"string","format":"uuid"},"provider":{"type":"string","enum":["meta","openai","x","taqnyat","mobile_net","sms_operator","voice_operator"]},"name":{"type":"string"},"currency":{"type":"string","enum":["USD","SAR"]},"last_24h_micros":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Millionths of the currency."},"usual_daily_micros":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Millionths of the currency."},"runway_days":{"anyOf":[{"type":"number","minimum":0},{"type":"null"}]}},"required":["organization_id","account_id","provider","name","currency","last_24h_micros","usual_daily_micros","runway_days"],"additionalProperties":false}}}}}},"responses":{"2XX":{"description":"Received. Any other answer, or none within the delivery timeout, is retried with exponential backoff; deliveries can be replayed from the delivery log."}}}},"platform.provider_balance.read_failed":{"post":{"summary":"platform.provider_balance.read_failed","description":"Rabt platform organization only: reading a provider account's balance from its API started failing (once until a read succeeds), with the error's code and reference.","tags":["webhooks"],"x-rabt-module":"platform_operations","parameters":[{"$ref":"#/components/parameters/WebhookId"},{"$ref":"#/components/parameters/WebhookTimestamp"},{"$ref":"#/components/parameters/WebhookSignature"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["type","version","timestamp","mode","data"],"properties":{"type":{"type":"string","enum":["platform.provider_balance.read_failed"]},"version":{"type":"integer","enum":[1],"description":"The version of `data`; a breaking change is a new version."},"timestamp":{"type":"string","format":"date-time","description":"When the event happened (UTC)."},"mode":{"type":"string","enum":["live","test"],"description":"`test` for events of the API test space, `live` otherwise."},"data":{"type":"object","properties":{"organization_id":{"type":"string","format":"uuid","description":"The organization the event happened in (the Rabt organization)."},"account_id":{"type":"string","format":"uuid"},"provider":{"type":"string","enum":["meta","openai","x","taqnyat","mobile_net","sms_operator","voice_operator"]},"name":{"type":"string"},"error_code":{"type":"string"},"error_reference":{"type":"string"}},"required":["organization_id","account_id","provider","name","error_code","error_reference"],"additionalProperties":false}}}}}},"responses":{"2XX":{"description":"Received. Any other answer, or none within the delivery timeout, is retried with exponential backoff; deliveries can be replayed from the delivery log."}}}},"ai_block.created":{"post":{"summary":"ai_block.created","description":"A Markdown block for the AI agent was added at one level.","tags":["webhooks"],"x-rabt-module":"ai","parameters":[{"$ref":"#/components/parameters/WebhookId"},{"$ref":"#/components/parameters/WebhookTimestamp"},{"$ref":"#/components/parameters/WebhookSignature"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["type","version","timestamp","mode","data"],"properties":{"type":{"type":"string","enum":["ai_block.created"]},"version":{"type":"integer","enum":[1],"description":"The version of `data`; a breaking change is a new version."},"timestamp":{"type":"string","format":"date-time","description":"When the event happened (UTC)."},"mode":{"type":"string","enum":["live","test"],"description":"`test` for events of the API test space, `live` otherwise."},"data":{"type":"object","properties":{"organization_id":{"type":"string","format":"uuid","description":"The organization the event happened in."},"level":{"type":"string","enum":["organization","channel_type","channel","kind","address"],"description":"organization, channel_type (every connection of a type), channel (a connection: its account), address (an address or phone number: its account) or kind (an account side: private or public)."},"channel_type":{"description":"For `channel_type`: the channel type.","type":["string","null"]},"channel_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"kind":{"anyOf":[{"type":"string","enum":["private","public"]},{"type":"null"}]},"channel_address_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"phone_number_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"block_id":{"type":"string","format":"uuid"}},"required":["organization_id","level","channel_type","channel_id","kind","channel_address_id","phone_number_id","block_id"],"additionalProperties":false}}}}}},"responses":{"2XX":{"description":"Received. Any other answer, or none within the delivery timeout, is retried with exponential backoff; deliveries can be replayed from the delivery log."}}}},"ai_block.updated":{"post":{"summary":"ai_block.updated","description":"A block of the AI agent changed: its title, content, 'always include' flag, active flag or order.","tags":["webhooks"],"x-rabt-module":"ai","parameters":[{"$ref":"#/components/parameters/WebhookId"},{"$ref":"#/components/parameters/WebhookTimestamp"},{"$ref":"#/components/parameters/WebhookSignature"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["type","version","timestamp","mode","data"],"properties":{"type":{"type":"string","enum":["ai_block.updated"]},"version":{"type":"integer","enum":[1],"description":"The version of `data`; a breaking change is a new version."},"timestamp":{"type":"string","format":"date-time","description":"When the event happened (UTC)."},"mode":{"type":"string","enum":["live","test"],"description":"`test` for events of the API test space, `live` otherwise."},"data":{"type":"object","properties":{"organization_id":{"type":"string","format":"uuid","description":"The organization the event happened in."},"level":{"type":"string","enum":["organization","channel_type","channel","kind","address"],"description":"organization, channel_type (every connection of a type), channel (a connection: its account), address (an address or phone number: its account) or kind (an account side: private or public)."},"channel_type":{"description":"For `channel_type`: the channel type.","type":["string","null"]},"channel_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"kind":{"anyOf":[{"type":"string","enum":["private","public"]},{"type":"null"}]},"channel_address_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"phone_number_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"block_id":{"type":"string","format":"uuid"},"changed":{"type":"array","items":{"type":"string","enum":["title","content_markdown","always_include","internal","active","sort_order"]}}},"required":["organization_id","level","channel_type","channel_id","kind","channel_address_id","phone_number_id","block_id","changed"],"additionalProperties":false}}}}}},"responses":{"2XX":{"description":"Received. Any other answer, or none within the delivery timeout, is retried with exponential backoff; deliveries can be replayed from the delivery log."}}}},"ai_block.archived":{"post":{"summary":"ai_block.archived","description":"A block of the AI agent was archived: it is no longer used.","tags":["webhooks"],"x-rabt-module":"ai","parameters":[{"$ref":"#/components/parameters/WebhookId"},{"$ref":"#/components/parameters/WebhookTimestamp"},{"$ref":"#/components/parameters/WebhookSignature"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["type","version","timestamp","mode","data"],"properties":{"type":{"type":"string","enum":["ai_block.archived"]},"version":{"type":"integer","enum":[1],"description":"The version of `data`; a breaking change is a new version."},"timestamp":{"type":"string","format":"date-time","description":"When the event happened (UTC)."},"mode":{"type":"string","enum":["live","test"],"description":"`test` for events of the API test space, `live` otherwise."},"data":{"type":"object","properties":{"organization_id":{"type":"string","format":"uuid","description":"The organization the event happened in."},"level":{"type":"string","enum":["organization","channel_type","channel","kind","address"],"description":"organization, channel_type (every connection of a type), channel (a connection: its account), address (an address or phone number: its account) or kind (an account side: private or public)."},"channel_type":{"description":"For `channel_type`: the channel type.","type":["string","null"]},"channel_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"kind":{"anyOf":[{"type":"string","enum":["private","public"]},{"type":"null"}]},"channel_address_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"phone_number_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"block_id":{"type":"string","format":"uuid"}},"required":["organization_id","level","channel_type","channel_id","kind","channel_address_id","phone_number_id","block_id"],"additionalProperties":false}}}}}},"responses":{"2XX":{"description":"Received. Any other answer, or none within the delivery timeout, is retried with exponential backoff; deliveries can be replayed from the delivery log."}}}},"ai_block.file_added":{"post":{"summary":"ai_block.file_added","description":"An admin added a file to a knowledge block; it is scanned for malware next (`ai_block.file_scanned`), and the AI agent may send it once it is clean.","tags":["webhooks"],"x-rabt-module":"ai","parameters":[{"$ref":"#/components/parameters/WebhookId"},{"$ref":"#/components/parameters/WebhookTimestamp"},{"$ref":"#/components/parameters/WebhookSignature"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["type","version","timestamp","mode","data"],"properties":{"type":{"type":"string","enum":["ai_block.file_added"]},"version":{"type":"integer","enum":[1],"description":"The version of `data`; a breaking change is a new version."},"timestamp":{"type":"string","format":"date-time","description":"When the event happened (UTC)."},"mode":{"type":"string","enum":["live","test"],"description":"`test` for events of the API test space, `live` otherwise."},"data":{"type":"object","properties":{"organization_id":{"type":"string","format":"uuid"},"block_id":{"type":"string","format":"uuid"},"file_id":{"type":"string","format":"uuid"}},"required":["organization_id","block_id","file_id"],"additionalProperties":false}}}}}},"responses":{"2XX":{"description":"Received. Any other answer, or none within the delivery timeout, is retried with exponential backoff; deliveries can be replayed from the delivery log."}}}},"ai_block.file_scanned":{"post":{"summary":"ai_block.file_scanned","description":"The malware scan of a knowledge block's file finished: clean (the AI agent may send it), infected (quarantined: kept, never served or sent), scan_failed, or not scanned when no scanner is configured; an infected file carries its signature and the recorded error.","tags":["webhooks"],"x-rabt-module":"ai","parameters":[{"$ref":"#/components/parameters/WebhookId"},{"$ref":"#/components/parameters/WebhookTimestamp"},{"$ref":"#/components/parameters/WebhookSignature"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["type","version","timestamp","mode","data"],"properties":{"type":{"type":"string","enum":["ai_block.file_scanned"]},"version":{"type":"integer","enum":[1],"description":"The version of `data`; a breaking change is a new version."},"timestamp":{"type":"string","format":"date-time","description":"When the event happened (UTC)."},"mode":{"type":"string","enum":["live","test"],"description":"`test` for events of the API test space, `live` otherwise."},"data":{"type":"object","properties":{"organization_id":{"type":"string","format":"uuid"},"block_id":{"type":"string","format":"uuid"},"file_id":{"type":"string","format":"uuid"},"result":{"type":"string","enum":["clean","infected","scan_failed","not_scanned"]},"signature":{"type":["string","null"]},"error_code":{"type":["string","null"]},"reference":{"type":["string","null"]}},"required":["organization_id","block_id","file_id","result","signature","error_code","reference"],"additionalProperties":false}}}}}},"responses":{"2XX":{"description":"Received. Any other answer, or none within the delivery timeout, is retried with exponential backoff; deliveries can be replayed from the delivery log."}}}},"ai_block.file_removed":{"post":{"summary":"ai_block.file_removed","description":"An admin removed a file from a knowledge block (kept, never deleted): the AI agent no longer sends it and its link stops working.","tags":["webhooks"],"x-rabt-module":"ai","parameters":[{"$ref":"#/components/parameters/WebhookId"},{"$ref":"#/components/parameters/WebhookTimestamp"},{"$ref":"#/components/parameters/WebhookSignature"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["type","version","timestamp","mode","data"],"properties":{"type":{"type":"string","enum":["ai_block.file_removed"]},"version":{"type":"integer","enum":[1],"description":"The version of `data`; a breaking change is a new version."},"timestamp":{"type":"string","format":"date-time","description":"When the event happened (UTC)."},"mode":{"type":"string","enum":["live","test"],"description":"`test` for events of the API test space, `live` otherwise."},"data":{"type":"object","properties":{"organization_id":{"type":"string","format":"uuid"},"block_id":{"type":"string","format":"uuid"},"file_id":{"type":"string","format":"uuid"}},"required":["organization_id","block_id","file_id"],"additionalProperties":false}}}}}},"responses":{"2XX":{"description":"Received. Any other answer, or none within the delivery timeout, is retried with exponential backoff; deliveries can be replayed from the delivery log."}}}},"ai_settings.updated":{"post":{"summary":"ai_settings.updated","description":"The AI agent was turned on or off at one level.","tags":["webhooks"],"x-rabt-module":"ai","parameters":[{"$ref":"#/components/parameters/WebhookId"},{"$ref":"#/components/parameters/WebhookTimestamp"},{"$ref":"#/components/parameters/WebhookSignature"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["type","version","timestamp","mode","data"],"properties":{"type":{"type":"string","enum":["ai_settings.updated"]},"version":{"type":"integer","enum":[2],"description":"The version of `data`; a breaking change is a new version."},"timestamp":{"type":"string","format":"date-time","description":"When the event happened (UTC)."},"mode":{"type":"string","enum":["live","test"],"description":"`test` for events of the API test space, `live` otherwise."},"data":{"type":"object","properties":{"organization_id":{"type":"string","format":"uuid","description":"The organization the event happened in."},"level":{"type":"string","enum":["organization","channel_type","channel","kind","address"],"description":"organization, channel_type (every connection of a type), channel (a connection: its account), address (an address or phone number: its account) or kind (an account side: private or public)."},"channel_type":{"description":"For `channel_type`: the channel type.","type":["string","null"]},"channel_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"kind":{"anyOf":[{"type":"string","enum":["private","public"]},{"type":"null"}]},"channel_address_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"phone_number_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"settings_id":{"type":"string","format":"uuid"},"enabled":{"type":"boolean"},"changed":{"type":"array","items":{"type":"string","enum":["enabled"]}}},"required":["organization_id","level","channel_type","channel_id","kind","channel_address_id","phone_number_id","settings_id","enabled","changed"],"additionalProperties":false}}}}}},"responses":{"2XX":{"description":"Received. Any other answer, or none within the delivery timeout, is retried with exponential backoff; deliveries can be replayed from the delivery log."}}}},"ai_knowledge.embedding_failed":{"post":{"summary":"ai_knowledge.embedding_failed","description":"Preparing the organization's large knowledge blocks failed; the blocks listed are sent whole until a run succeeds. Sent once per new failure.","tags":["webhooks"],"x-rabt-module":"ai","parameters":[{"$ref":"#/components/parameters/WebhookId"},{"$ref":"#/components/parameters/WebhookTimestamp"},{"$ref":"#/components/parameters/WebhookSignature"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["type","version","timestamp","mode","data"],"properties":{"type":{"type":"string","enum":["ai_knowledge.embedding_failed"]},"version":{"type":"integer","enum":[1],"description":"The version of `data`; a breaking change is a new version."},"timestamp":{"type":"string","format":"date-time","description":"When the event happened (UTC)."},"mode":{"type":"string","enum":["live","test"],"description":"`test` for events of the API test space, `live` otherwise."},"data":{"type":"object","properties":{"organization_id":{"type":"string","format":"uuid","description":"The organization the event happened in."},"block_ids":{"type":"array","items":{"type":"string","format":"uuid"},"description":"The blocks the failure is attached to."},"code":{"type":"string","description":"The error code (docs: error catalog)."},"reference":{"type":"string","description":"The error reference, for support."}},"required":["organization_id","block_ids","code","reference"],"additionalProperties":false}}}}}},"responses":{"2XX":{"description":"Received. Any other answer, or none within the delivery timeout, is retried with exponential backoff; deliveries can be replayed from the delivery log."}}}},"ai_agent.status_changed":{"post":{"summary":"ai_agent.status_changed","description":"The AI agent's status in a conversation changed: it started replying, handed the conversation to the members (the customer asked for a person or a case the organization's instructions name, switching itself off in the ticket; or it could not reply: a failure with its code, zero balance, the kill switch or its channel off) or stopped because a member switched it off. A member's reply or an assignment never stops it. `released_to_queue`: the ticket now waits for a member of its space.","tags":["webhooks"],"x-rabt-module":"tickets","parameters":[{"$ref":"#/components/parameters/WebhookId"},{"$ref":"#/components/parameters/WebhookTimestamp"},{"$ref":"#/components/parameters/WebhookSignature"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["type","version","timestamp","mode","data"],"properties":{"type":{"type":"string","enum":["ai_agent.status_changed"]},"version":{"type":"integer","enum":[1],"description":"The version of `data`; a breaking change is a new version."},"timestamp":{"type":"string","format":"date-time","description":"When the event happened (UTC)."},"mode":{"type":"string","enum":["live","test"],"description":"`test` for events of the API test space, `live` otherwise."},"data":{"type":"object","properties":{"organization_id":{"type":"string","format":"uuid","description":"The organization the event happened in."},"ticket_id":{"type":"string","format":"uuid"},"number":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"previous_status":{"anyOf":[{"type":"string","enum":["replying","handed_off","stopped"]},{"type":"null"}]},"status":{"type":"string","enum":["replying","handed_off","stopped"]},"reason":{"type":"string","enum":["engaged","switched_on","instructions","customer_asked","negative_sentiment","no_answer","customer_stuck","failed","balance","kill_switch","disabled","human_replied","assigned","switched_off","sender_limit"]},"released_to_queue":{"type":"boolean"},"error_code":{"description":"The error code of a failure, else null.","type":["string","null"]},"error_reference":{"description":"The error reference, for support.","type":["string","null"]},"by_membership_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"description":"The member who switched it or took over."}},"required":["organization_id","ticket_id","number","previous_status","status","reason","released_to_queue","error_code","error_reference","by_membership_id"],"additionalProperties":false}}}}}},"responses":{"2XX":{"description":"Received. Any other answer, or none within the delivery timeout, is retried with exponential backoff; deliveries can be replayed from the delivery log."}}}},"ai_interaction.recorded":{"post":{"summary":"ai_interaction.recorded","description":"The AI agent took a turn in a conversation: replied (with `handed_off` true it also handed off, its reply the last sentence), handed off without a reply, failed (with its error code), its answer was not sent (discarded) or it left that one message to the members and stays on (skipped, with `skip_reason`); with the tools it called.","tags":["webhooks"],"x-rabt-module":"ai","parameters":[{"$ref":"#/components/parameters/WebhookId"},{"$ref":"#/components/parameters/WebhookTimestamp"},{"$ref":"#/components/parameters/WebhookSignature"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["type","version","timestamp","mode","data"],"properties":{"type":{"type":"string","enum":["ai_interaction.recorded"]},"version":{"type":"integer","enum":[2],"description":"The version of `data`; a breaking change is a new version."},"timestamp":{"type":"string","format":"date-time","description":"When the event happened (UTC)."},"mode":{"type":"string","enum":["live","test"],"description":"`test` for events of the API test space, `live` otherwise."},"data":{"type":"object","properties":{"organization_id":{"type":"string","format":"uuid","description":"The organization the event happened in."},"interaction_id":{"type":"string","format":"uuid"},"ticket_id":{"type":"string","format":"uuid"},"outcome":{"type":"string","enum":["replied","handed_off","failed","discarded","skipped"]},"trigger_message_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"reply_message_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"tools_called":{"type":"array","items":{"type":"string","enum":["hand_off_to_human"]}},"handed_off":{"type":"boolean"},"model":{"type":"null","description":"Deprecated, always null: the model is not shown (owner decision)."},"error_code":{"type":["string","null"]},"skip_reason":{"anyOf":[{"type":"string","enum":["encrypted","unproven_sender","member_address","sender_limit"]},{"type":"null"}],"description":"`skipped` only: `encrypted`, `unproven_sender` (an email the contact did not prove), `member_address` (an email thread a member answers from their own address) or `sender_limit` (the sender used up their AI answers of the hour)."}},"required":["organization_id","interaction_id","ticket_id","outcome","trigger_message_id","reply_message_id","tools_called","handed_off","model","error_code","skip_reason"],"additionalProperties":false}}}}}},"responses":{"2XX":{"description":"Received. Any other answer, or none within the delivery timeout, is retried with exponential backoff; deliveries can be replayed from the delivery log."}}}},"ai_agent.switch_changed":{"post":{"summary":"ai_agent.switch_changed","description":"An admin stopped the AI agent everywhere in the organization (its conversations went to the members), or started it again.","tags":["webhooks"],"x-rabt-module":"ai","parameters":[{"$ref":"#/components/parameters/WebhookId"},{"$ref":"#/components/parameters/WebhookTimestamp"},{"$ref":"#/components/parameters/WebhookSignature"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["type","version","timestamp","mode","data"],"properties":{"type":{"type":"string","enum":["ai_agent.switch_changed"]},"version":{"type":"integer","enum":[1],"description":"The version of `data`; a breaking change is a new version."},"timestamp":{"type":"string","format":"date-time","description":"When the event happened (UTC)."},"mode":{"type":"string","enum":["live","test"],"description":"`test` for events of the API test space, `live` otherwise."},"data":{"type":"object","properties":{"organization_id":{"type":"string","format":"uuid","description":"The organization the event happened in."},"stopped":{"type":"boolean"},"changed_by_membership_id":{"type":"string","format":"uuid"}},"required":["organization_id","stopped","changed_by_membership_id"],"additionalProperties":false}}}}}},"responses":{"2XX":{"description":"Received. Any other answer, or none within the delivery timeout, is retried with exponential backoff; deliveries can be replayed from the delivery log."}}}},"ai_knowledge.embedding_requested":{"post":{"summary":"ai_knowledge.embedding_requested","description":"An admin asked to embed the organization's knowledge blocks again now.","tags":["webhooks"],"x-rabt-module":"ai","parameters":[{"$ref":"#/components/parameters/WebhookId"},{"$ref":"#/components/parameters/WebhookTimestamp"},{"$ref":"#/components/parameters/WebhookSignature"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["type","version","timestamp","mode","data"],"properties":{"type":{"type":"string","enum":["ai_knowledge.embedding_requested"]},"version":{"type":"integer","enum":[1],"description":"The version of `data`; a breaking change is a new version."},"timestamp":{"type":"string","format":"date-time","description":"When the event happened (UTC)."},"mode":{"type":"string","enum":["live","test"],"description":"`test` for events of the API test space, `live` otherwise."},"data":{"type":"object","properties":{"organization_id":{"type":"string","format":"uuid","description":"The organization the event happened in."},"requested_by_membership_id":{"type":"string","format":"uuid"}},"required":["organization_id","requested_by_membership_id"],"additionalProperties":false}}}}}},"responses":{"2XX":{"description":"Received. Any other answer, or none within the delivery timeout, is retried with exponential backoff; deliveries can be replayed from the delivery log."}}}},"campaign.created":{"post":{"summary":"campaign.created","description":"A campaign was created as a draft.","tags":["webhooks"],"x-rabt-module":"campaigns","parameters":[{"$ref":"#/components/parameters/WebhookId"},{"$ref":"#/components/parameters/WebhookTimestamp"},{"$ref":"#/components/parameters/WebhookSignature"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["type","version","timestamp","mode","data"],"properties":{"type":{"type":"string","enum":["campaign.created"]},"version":{"type":"integer","enum":[1],"description":"The version of `data`; a breaking change is a new version."},"timestamp":{"type":"string","format":"date-time","description":"When the event happened (UTC)."},"mode":{"type":"string","enum":["live","test"],"description":"`test` for events of the API test space, `live` otherwise."},"data":{"type":"object","properties":{"organization_id":{"type":"string","format":"uuid","description":"The organization the event happened in."},"campaign_id":{"type":"string","format":"uuid"},"channel_type":{"type":"string","enum":["whatsapp","sms","voice","email","whatsapp_web"]},"created_by_membership_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]}},"required":["organization_id","campaign_id","channel_type","created_by_membership_id"],"additionalProperties":false}}}}}},"responses":{"2XX":{"description":"Received. Any other answer, or none within the delivery timeout, is retried with exponential backoff; deliveries can be replayed from the delivery log."}}}},"campaign.updated":{"post":{"summary":"campaign.updated","description":"A draft campaign changed: its name, audience, channel, content or schedule (`changes` names the fields), or its voice audio was added.","tags":["webhooks"],"x-rabt-module":"campaigns","parameters":[{"$ref":"#/components/parameters/WebhookId"},{"$ref":"#/components/parameters/WebhookTimestamp"},{"$ref":"#/components/parameters/WebhookSignature"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["type","version","timestamp","mode","data"],"properties":{"type":{"type":"string","enum":["campaign.updated"]},"version":{"type":"integer","enum":[1],"description":"The version of `data`; a breaking change is a new version."},"timestamp":{"type":"string","format":"date-time","description":"When the event happened (UTC)."},"mode":{"type":"string","enum":["live","test"],"description":"`test` for events of the API test space, `live` otherwise."},"data":{"type":"object","properties":{"organization_id":{"type":"string","format":"uuid","description":"The organization the event happened in."},"campaign_id":{"type":"string","format":"uuid"},"channel_type":{"type":"string","enum":["whatsapp","sms","voice","email","whatsapp_web"]},"changes":{"type":"array","items":{"type":"string"}},"by_membership_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]}},"required":["organization_id","campaign_id","channel_type","changes","by_membership_id"],"additionalProperties":false}}}}}},"responses":{"2XX":{"description":"Received. Any other answer, or none within the delivery timeout, is retried with exponential backoff; deliveries can be replayed from the delivery log."}}}},"campaign.removed":{"post":{"summary":"campaign.removed","description":"A draft campaign was removed (kept by Rabt, no longer listed).","tags":["webhooks"],"x-rabt-module":"campaigns","parameters":[{"$ref":"#/components/parameters/WebhookId"},{"$ref":"#/components/parameters/WebhookTimestamp"},{"$ref":"#/components/parameters/WebhookSignature"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["type","version","timestamp","mode","data"],"properties":{"type":{"type":"string","enum":["campaign.removed"]},"version":{"type":"integer","enum":[1],"description":"The version of `data`; a breaking change is a new version."},"timestamp":{"type":"string","format":"date-time","description":"When the event happened (UTC)."},"mode":{"type":"string","enum":["live","test"],"description":"`test` for events of the API test space, `live` otherwise."},"data":{"type":"object","properties":{"organization_id":{"type":"string","format":"uuid","description":"The organization the event happened in."},"campaign_id":{"type":"string","format":"uuid"},"channel_type":{"type":"string","enum":["whatsapp","sms","voice","email","whatsapp_web"]},"by_membership_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]}},"required":["organization_id","campaign_id","channel_type","by_membership_id"],"additionalProperties":false}}}}}},"responses":{"2XX":{"description":"Received. Any other answer, or none within the delivery timeout, is retried with exponential backoff; deliveries can be replayed from the delivery log."}}}},"campaign.launched":{"post":{"summary":"campaign.launched","description":"A campaign was launched: its recipients were snapshot (`recipients` to send, `excluded` left out), to send now (`sending`) or at `scheduled_at` (`scheduled`). `estimated_minor` is the estimated cost in halalas (nothing is reserved).","tags":["webhooks"],"x-rabt-module":"campaigns","parameters":[{"$ref":"#/components/parameters/WebhookId"},{"$ref":"#/components/parameters/WebhookTimestamp"},{"$ref":"#/components/parameters/WebhookSignature"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["type","version","timestamp","mode","data"],"properties":{"type":{"type":"string","enum":["campaign.launched"]},"version":{"type":"integer","enum":[1],"description":"The version of `data`; a breaking change is a new version."},"timestamp":{"type":"string","format":"date-time","description":"When the event happened (UTC)."},"mode":{"type":"string","enum":["live","test"],"description":"`test` for events of the API test space, `live` otherwise."},"data":{"type":"object","properties":{"organization_id":{"type":"string","format":"uuid","description":"The organization the event happened in."},"campaign_id":{"type":"string","format":"uuid"},"channel_type":{"type":"string","enum":["whatsapp","sms","voice","email","whatsapp_web"]},"status":{"type":"string","enum":["scheduled","sending"]},"scheduled_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"recipients":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"excluded":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"estimated_minor":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"launched_by_membership_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]}},"required":["organization_id","campaign_id","channel_type","status","scheduled_at","recipients","excluded","estimated_minor","launched_by_membership_id"],"additionalProperties":false}}}}}},"responses":{"2XX":{"description":"Received. Any other answer, or none within the delivery timeout, is retried with exponential backoff; deliveries can be replayed from the delivery log."}}}},"campaign.started":{"post":{"summary":"campaign.started","description":"A campaign started sending (at launch, or when its scheduled time came).","tags":["webhooks"],"x-rabt-module":"campaigns","parameters":[{"$ref":"#/components/parameters/WebhookId"},{"$ref":"#/components/parameters/WebhookTimestamp"},{"$ref":"#/components/parameters/WebhookSignature"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["type","version","timestamp","mode","data"],"properties":{"type":{"type":"string","enum":["campaign.started"]},"version":{"type":"integer","enum":[1],"description":"The version of `data`; a breaking change is a new version."},"timestamp":{"type":"string","format":"date-time","description":"When the event happened (UTC)."},"mode":{"type":"string","enum":["live","test"],"description":"`test` for events of the API test space, `live` otherwise."},"data":{"type":"object","properties":{"organization_id":{"type":"string","format":"uuid","description":"The organization the event happened in."},"campaign_id":{"type":"string","format":"uuid"},"channel_type":{"type":"string","enum":["whatsapp","sms","voice","email","whatsapp_web"]}},"required":["organization_id","campaign_id","channel_type"],"additionalProperties":false}}}}}},"responses":{"2XX":{"description":"Received. Any other answer, or none within the delivery timeout, is retried with exponential backoff; deliveries can be replayed from the delivery log."}}}},"campaign.paused":{"post":{"summary":"campaign.paused","description":"A campaign paused: by a member (`member`), outside the KSA sending hours (`sending_hours`: resumes by itself at `resume_at`), because its channel cannot send (`channel`: `error_code` says why), or because the wallet could not pay the next recipient (`no_balance`: resumes after a top-up).","tags":["webhooks"],"x-rabt-module":"campaigns","parameters":[{"$ref":"#/components/parameters/WebhookId"},{"$ref":"#/components/parameters/WebhookTimestamp"},{"$ref":"#/components/parameters/WebhookSignature"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["type","version","timestamp","mode","data"],"properties":{"type":{"type":"string","enum":["campaign.paused"]},"version":{"type":"integer","enum":[1],"description":"The version of `data`; a breaking change is a new version."},"timestamp":{"type":"string","format":"date-time","description":"When the event happened (UTC)."},"mode":{"type":"string","enum":["live","test"],"description":"`test` for events of the API test space, `live` otherwise."},"data":{"type":"object","properties":{"organization_id":{"type":"string","format":"uuid","description":"The organization the event happened in."},"campaign_id":{"type":"string","format":"uuid"},"channel_type":{"type":"string","enum":["whatsapp","sms","voice","email","whatsapp_web"]},"reason":{"type":"string","enum":["member","sending_hours","channel","no_balance"]},"resume_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"error_code":{"type":["string","null"]},"by_membership_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]}},"required":["organization_id","campaign_id","channel_type","reason","resume_at","error_code","by_membership_id"],"additionalProperties":false}}}}}},"responses":{"2XX":{"description":"Received. Any other answer, or none within the delivery timeout, is retried with exponential backoff; deliveries can be replayed from the delivery log."}}}},"campaign.resumed":{"post":{"summary":"campaign.resumed","description":"A paused campaign resumed from where it stopped: by a member, at the next allowed sending time, or after a top-up.","tags":["webhooks"],"x-rabt-module":"campaigns","parameters":[{"$ref":"#/components/parameters/WebhookId"},{"$ref":"#/components/parameters/WebhookTimestamp"},{"$ref":"#/components/parameters/WebhookSignature"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["type","version","timestamp","mode","data"],"properties":{"type":{"type":"string","enum":["campaign.resumed"]},"version":{"type":"integer","enum":[1],"description":"The version of `data`; a breaking change is a new version."},"timestamp":{"type":"string","format":"date-time","description":"When the event happened (UTC)."},"mode":{"type":"string","enum":["live","test"],"description":"`test` for events of the API test space, `live` otherwise."},"data":{"type":"object","properties":{"organization_id":{"type":"string","format":"uuid","description":"The organization the event happened in."},"campaign_id":{"type":"string","format":"uuid"},"channel_type":{"type":"string","enum":["whatsapp","sms","voice","email","whatsapp_web"]},"from":{"type":"string","enum":["paused","paused_no_balance"]},"by_membership_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]}},"required":["organization_id","campaign_id","channel_type","from","by_membership_id"],"additionalProperties":false}}}}}},"responses":{"2XX":{"description":"Received. Any other answer, or none within the delivery timeout, is retried with exponential backoff; deliveries can be replayed from the delivery log."}}}},"campaign.cancelled":{"post":{"summary":"campaign.cancelled","description":"A campaign was cancelled: its recipients not reached yet are not sent to (the campaign and its results stay).","tags":["webhooks"],"x-rabt-module":"campaigns","parameters":[{"$ref":"#/components/parameters/WebhookId"},{"$ref":"#/components/parameters/WebhookTimestamp"},{"$ref":"#/components/parameters/WebhookSignature"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["type","version","timestamp","mode","data"],"properties":{"type":{"type":"string","enum":["campaign.cancelled"]},"version":{"type":"integer","enum":[1],"description":"The version of `data`; a breaking change is a new version."},"timestamp":{"type":"string","format":"date-time","description":"When the event happened (UTC)."},"mode":{"type":"string","enum":["live","test"],"description":"`test` for events of the API test space, `live` otherwise."},"data":{"type":"object","properties":{"organization_id":{"type":"string","format":"uuid","description":"The organization the event happened in."},"campaign_id":{"type":"string","format":"uuid"},"channel_type":{"type":"string","enum":["whatsapp","sms","voice","email","whatsapp_web"]},"by_membership_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]}},"required":["organization_id","campaign_id","channel_type","by_membership_id"],"additionalProperties":false}}}}}},"responses":{"2XX":{"description":"Received. Any other answer, or none within the delivery timeout, is retried with exponential backoff; deliveries can be replayed from the delivery log."}}}},"campaign.completed":{"post":{"summary":"campaign.completed","description":"A campaign finished sending to all its recipients.","tags":["webhooks"],"x-rabt-module":"campaigns","parameters":[{"$ref":"#/components/parameters/WebhookId"},{"$ref":"#/components/parameters/WebhookTimestamp"},{"$ref":"#/components/parameters/WebhookSignature"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["type","version","timestamp","mode","data"],"properties":{"type":{"type":"string","enum":["campaign.completed"]},"version":{"type":"integer","enum":[1],"description":"The version of `data`; a breaking change is a new version."},"timestamp":{"type":"string","format":"date-time","description":"When the event happened (UTC)."},"mode":{"type":"string","enum":["live","test"],"description":"`test` for events of the API test space, `live` otherwise."},"data":{"type":"object","properties":{"organization_id":{"type":"string","format":"uuid","description":"The organization the event happened in."},"campaign_id":{"type":"string","format":"uuid"},"channel_type":{"anyOf":[{"type":"string","enum":["whatsapp","sms","voice","email","whatsapp_web"]},{"type":"null"}]}},"required":["organization_id","campaign_id","channel_type"],"additionalProperties":false}}}}}},"responses":{"2XX":{"description":"Received. Any other answer, or none within the delivery timeout, is retried with exponential backoff; deliveries can be replayed from the delivery log."}}}},"campaign.recipient_changed":{"post":{"summary":"campaign.recipient_changed","description":"A campaign recipient moved on: sent (`error_code`: what it was sent with, e.g. EM-3753 for an email without some of its images), delivered (a call: answered), read, failed (`error_code`), replied (`ticket_id`: the ticket their reply opened), opted out (an SMS campaign’s link), or excluded before its send (an SMS number suppressed, or the contact opted out of SMS, after launch: never sent to nor charged).","tags":["webhooks"],"x-rabt-module":"campaigns","parameters":[{"$ref":"#/components/parameters/WebhookId"},{"$ref":"#/components/parameters/WebhookTimestamp"},{"$ref":"#/components/parameters/WebhookSignature"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["type","version","timestamp","mode","data"],"properties":{"type":{"type":"string","enum":["campaign.recipient_changed"]},"version":{"type":"integer","enum":[1],"description":"The version of `data`; a breaking change is a new version."},"timestamp":{"type":"string","format":"date-time","description":"When the event happened (UTC)."},"mode":{"type":"string","enum":["live","test"],"description":"`test` for events of the API test space, `live` otherwise."},"data":{"type":"object","properties":{"organization_id":{"type":"string","format":"uuid","description":"The organization the event happened in."},"campaign_id":{"type":"string","format":"uuid"},"recipient_id":{"type":"string","format":"uuid"},"contact_id":{"type":"string","format":"uuid"},"from":{"type":"string","enum":["pending","excluded","sending","sent","delivered","read","failed","replied","opted_out"]},"to":{"type":"string","enum":["pending","excluded","sending","sent","delivered","read","failed","replied","opted_out"]},"error_code":{"type":["string","null"]},"ticket_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]}},"required":["organization_id","campaign_id","recipient_id","contact_id","from","to","error_code","ticket_id"],"additionalProperties":false}}}}}},"responses":{"2XX":{"description":"Received. Any other answer, or none within the delivery timeout, is retried with exponential backoff; deliveries can be replayed from the delivery log."}}}},"sender.quarantined":{"post":{"summary":"sender.quarantined","description":"A sender went over the organization’s threshold (messages per minute or new tickets per hour) and was quarantined: what they send is kept in one ticket, with no notifications, AI answers or charges, until a member releases or blocks them.","tags":["webhooks"],"x-rabt-module":"abuse","parameters":[{"$ref":"#/components/parameters/WebhookId"},{"$ref":"#/components/parameters/WebhookTimestamp"},{"$ref":"#/components/parameters/WebhookSignature"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["type","version","timestamp","mode","data"],"properties":{"type":{"type":"string","enum":["sender.quarantined"]},"version":{"type":"integer","enum":[1],"description":"The version of `data`; a breaking change is a new version."},"timestamp":{"type":"string","format":"date-time","description":"When the event happened (UTC)."},"mode":{"type":"string","enum":["live","test"],"description":"`test` for events of the API test space, `live` otherwise."},"data":{"type":"object","properties":{"organization_id":{"type":"string","format":"uuid","description":"The organization the event happened in."},"quarantine_id":{"type":"string","format":"uuid"},"contact_id":{"type":"string","format":"uuid","description":"The sender."},"ticket_id":{"type":"string","format":"uuid","description":"The quarantined ticket that keeps what they send."},"reason":{"type":"string","enum":["messages","tickets"]},"count":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991,"description":"The count that went over the threshold."},"threshold":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["organization_id","quarantine_id","contact_id","ticket_id","reason","count","threshold"],"additionalProperties":false}}}}}},"responses":{"2XX":{"description":"Received. Any other answer, or none within the delivery timeout, is retried with exponential backoff; deliveries can be replayed from the delivery log."}}}},"sender.released":{"post":{"summary":"sender.released","description":"A member released a quarantined sender: they are treated as usual again.","tags":["webhooks"],"x-rabt-module":"abuse","parameters":[{"$ref":"#/components/parameters/WebhookId"},{"$ref":"#/components/parameters/WebhookTimestamp"},{"$ref":"#/components/parameters/WebhookSignature"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["type","version","timestamp","mode","data"],"properties":{"type":{"type":"string","enum":["sender.released"]},"version":{"type":"integer","enum":[1],"description":"The version of `data`; a breaking change is a new version."},"timestamp":{"type":"string","format":"date-time","description":"When the event happened (UTC)."},"mode":{"type":"string","enum":["live","test"],"description":"`test` for events of the API test space, `live` otherwise."},"data":{"type":"object","properties":{"organization_id":{"type":"string","format":"uuid","description":"The organization the event happened in."},"quarantine_id":{"type":"string","format":"uuid"},"contact_id":{"type":"string","format":"uuid","description":"The sender."},"ticket_id":{"type":"string","format":"uuid","description":"The quarantined ticket that keeps what they send."}},"required":["organization_id","quarantine_id","contact_id","ticket_id"],"additionalProperties":false}}}}}},"responses":{"2XX":{"description":"Received. Any other answer, or none within the delivery timeout, is retried with exponential backoff; deliveries can be replayed from the delivery log."}}}},"sender.blocked":{"post":{"summary":"sender.blocked","description":"A member blocked a quarantined sender: their phone numbers, email addresses and handles are on the block list.","tags":["webhooks"],"x-rabt-module":"abuse","parameters":[{"$ref":"#/components/parameters/WebhookId"},{"$ref":"#/components/parameters/WebhookTimestamp"},{"$ref":"#/components/parameters/WebhookSignature"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["type","version","timestamp","mode","data"],"properties":{"type":{"type":"string","enum":["sender.blocked"]},"version":{"type":"integer","enum":[1],"description":"The version of `data`; a breaking change is a new version."},"timestamp":{"type":"string","format":"date-time","description":"When the event happened (UTC)."},"mode":{"type":"string","enum":["live","test"],"description":"`test` for events of the API test space, `live` otherwise."},"data":{"type":"object","properties":{"organization_id":{"type":"string","format":"uuid","description":"The organization the event happened in."},"quarantine_id":{"type":"string","format":"uuid"},"contact_id":{"type":"string","format":"uuid","description":"The sender."},"ticket_id":{"type":"string","format":"uuid","description":"The quarantined ticket that keeps what they send."},"block_ids":{"type":"array","items":{"type":"string","format":"uuid"}}},"required":["organization_id","quarantine_id","contact_id","ticket_id","block_ids"],"additionalProperties":false}}}}}},"responses":{"2XX":{"description":"Received. Any other answer, or none within the delivery timeout, is retried with exponential backoff; deliveries can be replayed from the delivery log."}}}},"sender_block.created":{"post":{"summary":"sender_block.created","description":"An entry was added to the block list.","tags":["webhooks"],"x-rabt-module":"abuse","parameters":[{"$ref":"#/components/parameters/WebhookId"},{"$ref":"#/components/parameters/WebhookTimestamp"},{"$ref":"#/components/parameters/WebhookSignature"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["type","version","timestamp","mode","data"],"properties":{"type":{"type":"string","enum":["sender_block.created"]},"version":{"type":"integer","enum":[1],"description":"The version of `data`; a breaking change is a new version."},"timestamp":{"type":"string","format":"date-time","description":"When the event happened (UTC)."},"mode":{"type":"string","enum":["live","test"],"description":"`test` for events of the API test space, `live` otherwise."},"data":{"type":"object","properties":{"organization_id":{"type":"string","format":"uuid","description":"The organization the event happened in."},"block_id":{"type":"string","format":"uuid"},"kind":{"type":"string","enum":["phone","email","handle","ip"]},"channel_type":{"description":"For a handle: its channel.","type":["string","null"]},"value":{"type":"string"}},"required":["organization_id","block_id","kind","channel_type","value"],"additionalProperties":false}}}}}},"responses":{"2XX":{"description":"Received. Any other answer, or none within the delivery timeout, is retried with exponential backoff; deliveries can be replayed from the delivery log."}}}},"sender_block.removed":{"post":{"summary":"sender_block.removed","description":"An entry was removed from the block list.","tags":["webhooks"],"x-rabt-module":"abuse","parameters":[{"$ref":"#/components/parameters/WebhookId"},{"$ref":"#/components/parameters/WebhookTimestamp"},{"$ref":"#/components/parameters/WebhookSignature"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["type","version","timestamp","mode","data"],"properties":{"type":{"type":"string","enum":["sender_block.removed"]},"version":{"type":"integer","enum":[1],"description":"The version of `data`; a breaking change is a new version."},"timestamp":{"type":"string","format":"date-time","description":"When the event happened (UTC)."},"mode":{"type":"string","enum":["live","test"],"description":"`test` for events of the API test space, `live` otherwise."},"data":{"type":"object","properties":{"organization_id":{"type":"string","format":"uuid","description":"The organization the event happened in."},"block_id":{"type":"string","format":"uuid"},"kind":{"type":"string","enum":["phone","email","handle","ip"]}},"required":["organization_id","block_id","kind"],"additionalProperties":false}}}}}},"responses":{"2XX":{"description":"Received. Any other answer, or none within the delivery timeout, is retried with exponential backoff; deliveries can be replayed from the delivery log."}}}},"spam_entry.created":{"post":{"summary":"spam_entry.created","description":"An entry was added to the Spam list: that sender’s messages go to Spam from now on, and their open and in-progress tickets move there.","tags":["webhooks"],"x-rabt-module":"abuse","parameters":[{"$ref":"#/components/parameters/WebhookId"},{"$ref":"#/components/parameters/WebhookTimestamp"},{"$ref":"#/components/parameters/WebhookSignature"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["type","version","timestamp","mode","data"],"properties":{"type":{"type":"string","enum":["spam_entry.created"]},"version":{"type":"integer","enum":[1],"description":"The version of `data`; a breaking change is a new version."},"timestamp":{"type":"string","format":"date-time","description":"When the event happened (UTC)."},"mode":{"type":"string","enum":["live","test"],"description":"`test` for events of the API test space, `live` otherwise."},"data":{"type":"object","properties":{"organization_id":{"type":"string","format":"uuid","description":"The organization the event happened in."},"entry_id":{"type":"string","format":"uuid"},"kind":{"type":"string","enum":["email","domain","phone","handle"]},"channel_type":{"description":"For a handle: its channel.","type":["string","null"]},"value":{"type":"string"},"by_membership_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"description":"The member who added it."}},"required":["organization_id","entry_id","kind","channel_type","value","by_membership_id"],"additionalProperties":false}}}}}},"responses":{"2XX":{"description":"Received. Any other answer, or none within the delivery timeout, is retried with exponential backoff; deliveries can be replayed from the delivery log."}}}},"spam_entry.removed":{"post":{"summary":"spam_entry.removed","description":"An entry was removed from the Spam list: that sender’s new messages are handled as usual; tickets already in Spam stay there.","tags":["webhooks"],"x-rabt-module":"abuse","parameters":[{"$ref":"#/components/parameters/WebhookId"},{"$ref":"#/components/parameters/WebhookTimestamp"},{"$ref":"#/components/parameters/WebhookSignature"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["type","version","timestamp","mode","data"],"properties":{"type":{"type":"string","enum":["spam_entry.removed"]},"version":{"type":"integer","enum":[1],"description":"The version of `data`; a breaking change is a new version."},"timestamp":{"type":"string","format":"date-time","description":"When the event happened (UTC)."},"mode":{"type":"string","enum":["live","test"],"description":"`test` for events of the API test space, `live` otherwise."},"data":{"type":"object","properties":{"organization_id":{"type":"string","format":"uuid","description":"The organization the event happened in."},"entry_id":{"type":"string","format":"uuid"},"kind":{"type":"string","enum":["email","domain","phone","handle"]}},"required":["organization_id","entry_id","kind"],"additionalProperties":false}}}}}},"responses":{"2XX":{"description":"Received. Any other answer, or none within the delivery timeout, is retried with exponential backoff; deliveries can be replayed from the delivery log."}}}},"ticket.spam":{"post":{"summary":"ticket.spam","description":"A ticket went to Spam: its sender is on the Spam list (a new message, or an entry added) or a member marked it as spam. It leaves every list, space and counter, with no notifications, routing or AI answers.","tags":["webhooks"],"x-rabt-module":"tickets","parameters":[{"$ref":"#/components/parameters/WebhookId"},{"$ref":"#/components/parameters/WebhookTimestamp"},{"$ref":"#/components/parameters/WebhookSignature"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["type","version","timestamp","mode","data"],"properties":{"type":{"type":"string","enum":["ticket.spam"]},"version":{"type":"integer","enum":[1],"description":"The version of `data`; a breaking change is a new version."},"timestamp":{"type":"string","format":"date-time","description":"When the event happened (UTC)."},"mode":{"type":"string","enum":["live","test"],"description":"`test` for events of the API test space, `live` otherwise."},"data":{"type":"object","properties":{"organization_id":{"type":"string","format":"uuid","description":"The organization the event happened in."},"ticket_id":{"type":"string","format":"uuid"},"number":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"contact_id":{"type":"string","format":"uuid"},"entry_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"description":"The Spam list entry that matched or was added."},"by_membership_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"description":"The member; null for a new message."}},"required":["organization_id","ticket_id","number","contact_id","entry_id","by_membership_id"],"additionalProperties":false}}}}}},"responses":{"2XX":{"description":"Received. Any other answer, or none within the delivery timeout, is retried with exponential backoff; deliveries can be replayed from the delivery log."}}}},"ticket.not_spam":{"post":{"summary":"ticket.not_spam","description":"A member took a ticket out of Spam: it is routed and distributed as a new arrival, and the sender’s exact Spam list entries were removed.","tags":["webhooks"],"x-rabt-module":"tickets","parameters":[{"$ref":"#/components/parameters/WebhookId"},{"$ref":"#/components/parameters/WebhookTimestamp"},{"$ref":"#/components/parameters/WebhookSignature"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["type","version","timestamp","mode","data"],"properties":{"type":{"type":"string","enum":["ticket.not_spam"]},"version":{"type":"integer","enum":[1],"description":"The version of `data`; a breaking change is a new version."},"timestamp":{"type":"string","format":"date-time","description":"When the event happened (UTC)."},"mode":{"type":"string","enum":["live","test"],"description":"`test` for events of the API test space, `live` otherwise."},"data":{"type":"object","properties":{"organization_id":{"type":"string","format":"uuid","description":"The organization the event happened in."},"ticket_id":{"type":"string","format":"uuid"},"number":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"contact_id":{"type":"string","format":"uuid"},"space_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"description":"The space it went to; null for All."},"by_membership_id":{"type":"string","format":"uuid"},"removed_entry_ids":{"type":"array","items":{"type":"string","format":"uuid"}}},"required":["organization_id","ticket_id","number","contact_id","space_id","by_membership_id","removed_entry_ids"],"additionalProperties":false}}}}}},"responses":{"2XX":{"description":"Received. Any other answer, or none within the delivery timeout, is retried with exponential backoff; deliveries can be replayed from the delivery log."}}}},"abuse_settings.updated":{"post":{"summary":"abuse_settings.updated","description":"Retired (the thresholds are fixed for every organization): listed for subscriptions that name it, never sent any more.","tags":["webhooks"],"x-rabt-module":"abuse","parameters":[{"$ref":"#/components/parameters/WebhookId"},{"$ref":"#/components/parameters/WebhookTimestamp"},{"$ref":"#/components/parameters/WebhookSignature"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["type","version","timestamp","mode","data"],"properties":{"type":{"type":"string","enum":["abuse_settings.updated"]},"version":{"type":"integer","enum":[1],"description":"The version of `data`; a breaking change is a new version."},"timestamp":{"type":"string","format":"date-time","description":"When the event happened (UTC)."},"mode":{"type":"string","enum":["live","test"],"description":"`test` for events of the API test space, `live` otherwise."},"data":{"type":"object","properties":{"organization_id":{"type":"string","format":"uuid","description":"The organization the event happened in."},"fields":{"minItems":1,"type":"array","items":{"type":"string","enum":["sender_messages_per_minute","sender_tickets_per_hour","sender_ai_replies_per_hour","webchat_challenge"]}}},"required":["organization_id","fields"],"additionalProperties":false}}}}}},"responses":{"2XX":{"description":"Received. Any other answer, or none within the delivery timeout, is retried with exponential backoff; deliveries can be replayed from the delivery log."}}}},"problem.detected":{"post":{"summary":"problem.detected","description":"A new problem appeared in the Problems log (Rabt team only).","tags":["webhooks"],"x-rabt-module":"platform_problems","parameters":[{"$ref":"#/components/parameters/WebhookId"},{"$ref":"#/components/parameters/WebhookTimestamp"},{"$ref":"#/components/parameters/WebhookSignature"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["type","version","timestamp","mode","data"],"properties":{"type":{"type":"string","enum":["problem.detected"]},"version":{"type":"integer","enum":[1],"description":"The version of `data`; a breaking change is a new version."},"timestamp":{"type":"string","format":"date-time","description":"When the event happened (UTC)."},"mode":{"type":"string","enum":["live","test"],"description":"`test` for events of the API test space, `live` otherwise."},"data":{"type":"object","properties":{"organization_id":{"type":"string","format":"uuid","description":"The organization the event happened in (the platform organization)."},"problem_id":{"type":"string","format":"uuid"},"kind":{"type":"string","enum":["server","provider","browser"]},"code":{"type":"string","description":"The error code, e.g. `WA-2047`."},"place":{"type":"string","description":"Where in Rabt: route, job, page or item type."},"occurrences":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["organization_id","problem_id","kind","code","place","occurrences"],"additionalProperties":false}}}}}},"responses":{"2XX":{"description":"Received. Any other answer, or none within the delivery timeout, is retried with exponential backoff; deliveries can be replayed from the delivery log."}}}},"problem.spiking":{"post":{"summary":"problem.spiking","description":"A known problem is spiking (Rabt team only).","tags":["webhooks"],"x-rabt-module":"platform_problems","parameters":[{"$ref":"#/components/parameters/WebhookId"},{"$ref":"#/components/parameters/WebhookTimestamp"},{"$ref":"#/components/parameters/WebhookSignature"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["type","version","timestamp","mode","data"],"properties":{"type":{"type":"string","enum":["problem.spiking"]},"version":{"type":"integer","enum":[1],"description":"The version of `data`; a breaking change is a new version."},"timestamp":{"type":"string","format":"date-time","description":"When the event happened (UTC)."},"mode":{"type":"string","enum":["live","test"],"description":"`test` for events of the API test space, `live` otherwise."},"data":{"type":"object","properties":{"organization_id":{"type":"string","format":"uuid","description":"The organization the event happened in (the platform organization)."},"problem_id":{"type":"string","format":"uuid"},"kind":{"type":"string","enum":["server","provider","browser"]},"code":{"type":"string","description":"The error code, e.g. `WA-2047`."},"place":{"type":"string","description":"Where in Rabt: route, job, page or item type."},"last_hour":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"hourly_baseline":{"type":"number","description":"Usual occurrences per hour over the 7 days before."}},"required":["organization_id","problem_id","kind","code","place","last_hour","hourly_baseline"],"additionalProperties":false}}}}}},"responses":{"2XX":{"description":"Received. Any other answer, or none within the delivery timeout, is retried with exponential backoff; deliveries can be replayed from the delivery log."}}}},"problem.status_changed":{"post":{"summary":"problem.status_changed","description":"A problem's state changed (`ignored` while it is marked expected): by a member, after a fix was deployed, on a regression, or on a spike of an expected fault (Rabt team only).","tags":["webhooks"],"x-rabt-module":"platform_problems","parameters":[{"$ref":"#/components/parameters/WebhookId"},{"$ref":"#/components/parameters/WebhookTimestamp"},{"$ref":"#/components/parameters/WebhookSignature"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["type","version","timestamp","mode","data"],"properties":{"type":{"type":"string","enum":["problem.status_changed"]},"version":{"type":"integer","enum":[1],"description":"The version of `data`; a breaking change is a new version."},"timestamp":{"type":"string","format":"date-time","description":"When the event happened (UTC)."},"mode":{"type":"string","enum":["live","test"],"description":"`test` for events of the API test space, `live` otherwise."},"data":{"type":"object","properties":{"organization_id":{"type":"string","format":"uuid","description":"The organization the event happened in (the platform organization)."},"problem_id":{"type":"string","format":"uuid"},"kind":{"type":"string","enum":["server","provider","browser"]},"code":{"type":"string","description":"The error code, e.g. `WA-2047`."},"place":{"type":"string","description":"Where in Rabt: route, job, page or item type."},"from":{"type":"string","enum":["new","investigating","resolved","ignored"]},"to":{"type":"string","enum":["new","investigating","resolved","ignored"]},"reason":{"type":"string","enum":["member","fix_deployed","regression","spike"]},"changed_by_membership_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"release":{"type":["string","null"]}},"required":["organization_id","problem_id","kind","code","place","from","to","reason","changed_by_membership_id","release"],"additionalProperties":false}}}}}},"responses":{"2XX":{"description":"Received. Any other answer, or none within the delivery timeout, is retried with exponential backoff; deliveries can be replayed from the delivery log."}}}},"problem.resolution_edited":{"post":{"summary":"problem.resolution_edited","description":"A resolved problem's current resolution was edited in place (Rabt team only); read the problem for the new text.","tags":["webhooks"],"x-rabt-module":"platform_problems","parameters":[{"$ref":"#/components/parameters/WebhookId"},{"$ref":"#/components/parameters/WebhookTimestamp"},{"$ref":"#/components/parameters/WebhookSignature"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["type","version","timestamp","mode","data"],"properties":{"type":{"type":"string","enum":["problem.resolution_edited"]},"version":{"type":"integer","enum":[1],"description":"The version of `data`; a breaking change is a new version."},"timestamp":{"type":"string","format":"date-time","description":"When the event happened (UTC)."},"mode":{"type":"string","enum":["live","test"],"description":"`test` for events of the API test space, `live` otherwise."},"data":{"type":"object","properties":{"organization_id":{"type":"string","format":"uuid","description":"The organization the event happened in (the platform organization)."},"problem_id":{"type":"string","format":"uuid"},"kind":{"type":"string","enum":["server","provider","browser"]},"code":{"type":"string","description":"The error code, e.g. `WA-2047`."},"place":{"type":"string","description":"Where in Rabt: route, job, page or item type."},"resolution_id":{"type":"string","format":"uuid"},"fields":{"type":"array","items":{"type":"string","enum":["cause","fix","fix_commit","extra","related_problem_ids","summary","regression_test","external_evidence","why_previous"]},"description":"The fields that changed."},"edited_by_membership_id":{"type":"string","format":"uuid"}},"required":["organization_id","problem_id","kind","code","place","resolution_id","fields","edited_by_membership_id"],"additionalProperties":false}}}}}},"responses":{"2XX":{"description":"Received. Any other answer, or none within the delivery timeout, is retried with exponential backoff; deliveries can be replayed from the delivery log."}}}},"problem.described":{"post":{"summary":"problem.described","description":"A problem's title or description in plain words was set or cleared (Rabt team only); read the problem for the new text.","tags":["webhooks"],"x-rabt-module":"platform_problems","parameters":[{"$ref":"#/components/parameters/WebhookId"},{"$ref":"#/components/parameters/WebhookTimestamp"},{"$ref":"#/components/parameters/WebhookSignature"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["type","version","timestamp","mode","data"],"properties":{"type":{"type":"string","enum":["problem.described"]},"version":{"type":"integer","enum":[1],"description":"The version of `data`; a breaking change is a new version."},"timestamp":{"type":"string","format":"date-time","description":"When the event happened (UTC)."},"mode":{"type":"string","enum":["live","test"],"description":"`test` for events of the API test space, `live` otherwise."},"data":{"type":"object","properties":{"organization_id":{"type":"string","format":"uuid","description":"The organization the event happened in (the platform organization)."},"problem_id":{"type":"string","format":"uuid"},"kind":{"type":"string","enum":["server","provider","browser"]},"code":{"type":"string","description":"The error code, e.g. `WA-2047`."},"place":{"type":"string","description":"Where in Rabt: route, job, page or item type."},"fields":{"type":"array","items":{"type":"string","enum":["title","description"]},"description":"The texts that changed."},"described_by_membership_id":{"type":"string","format":"uuid"}},"required":["organization_id","problem_id","kind","code","place","fields","described_by_membership_id"],"additionalProperties":false}}}}}},"responses":{"2XX":{"description":"Received. Any other answer, or none within the delivery timeout, is retried with exponential backoff; deliveries can be replayed from the delivery log."}}}},"malware.detected":{"post":{"summary":"malware.detected","description":"The malware scan found malware in a file from outside: a ticket or chat file is quarantined (kept, never served, never deleted; `attachment_id` names it), an upload (contacts import, SMS sender name document, campaign recording) is refused, a link preview image is left out. Carries the signature and the recorded error (code and reference).","tags":["webhooks"],"x-rabt-module":"audit","parameters":[{"$ref":"#/components/parameters/WebhookId"},{"$ref":"#/components/parameters/WebhookTimestamp"},{"$ref":"#/components/parameters/WebhookSignature"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["type","version","timestamp","mode","data"],"properties":{"type":{"type":"string","enum":["malware.detected"]},"version":{"type":"integer","enum":[1],"description":"The version of `data`; a breaking change is a new version."},"timestamp":{"type":"string","format":"date-time","description":"When the event happened (UTC)."},"mode":{"type":"string","enum":["live","test"],"description":"`test` for events of the API test space, `live` otherwise."},"data":{"type":"object","properties":{"organization_id":{"type":"string","format":"uuid","description":"The organization the event happened in."},"source":{"type":"string","enum":["ticket_attachment","chat_attachment","crm_import","sms_sender_document","campaign_audio","campaign_media","link_preview_image","webchat_widget_logo","profile_image","email_image","ai_block_file"]},"attachment_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"target_type":{"type":"string"},"target_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"file_name":{"type":"string"},"size":{"type":"integer","minimum":0,"maximum":9007199254740991},"signature":{"type":"string"},"error_code":{"type":"string"},"reference":{"type":"string"}},"required":["organization_id","source","attachment_id","target_type","target_id","file_name","size","signature","error_code","reference"],"additionalProperties":false}}}}}},"responses":{"2XX":{"description":"Received. Any other answer, or none within the delivery timeout, is retried with exponential backoff; deliveries can be replayed from the delivery log."}}}},"contact.erasure_requested":{"post":{"summary":"contact.erasure_requested","description":"A member asked to erase a contact's personal data: the contact is in the trash, restorable, until `erase_after`, then its personal data is erased for good.","tags":["webhooks"],"x-rabt-module":"erasure","parameters":[{"$ref":"#/components/parameters/WebhookId"},{"$ref":"#/components/parameters/WebhookTimestamp"},{"$ref":"#/components/parameters/WebhookSignature"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["type","version","timestamp","mode","data"],"properties":{"type":{"type":"string","enum":["contact.erasure_requested"]},"version":{"type":"integer","enum":[1],"description":"The version of `data`; a breaking change is a new version."},"timestamp":{"type":"string","format":"date-time","description":"When the event happened (UTC)."},"mode":{"type":"string","enum":["live","test"],"description":"`test` for events of the API test space, `live` otherwise."},"data":{"type":"object","properties":{"organization_id":{"type":"string","format":"uuid","description":"The organization the event happened in."},"contact_erasure_id":{"type":"string","format":"uuid","description":"The erasure request (GET /v1/contact-erasures/{erasure_id})."},"contact_id":{"type":"string","format":"uuid"},"erase_after":{"type":"string","format":"date-time"},"by_membership_id":{"type":"string","format":"uuid","description":"The member who asked (the owner, for a deletion)."},"organization_deletion_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"description":"Set when it is part of the deletion of the whole organization."}},"required":["organization_id","contact_erasure_id","contact_id","erase_after","by_membership_id","organization_deletion_id"],"additionalProperties":false}}}}}},"responses":{"2XX":{"description":"Received. Any other answer, or none within the delivery timeout, is retried with exponential backoff; deliveries can be replayed from the delivery log."}}}},"contact.erasure_withdrawn":{"post":{"summary":"contact.erasure_withdrawn","description":"An erasure request ended without erasing anything: the contact came back inside the window (restored from the trash, revived by a new message or an import).","tags":["webhooks"],"x-rabt-module":"erasure","parameters":[{"$ref":"#/components/parameters/WebhookId"},{"$ref":"#/components/parameters/WebhookTimestamp"},{"$ref":"#/components/parameters/WebhookSignature"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["type","version","timestamp","mode","data"],"properties":{"type":{"type":"string","enum":["contact.erasure_withdrawn"]},"version":{"type":"integer","enum":[1],"description":"The version of `data`; a breaking change is a new version."},"timestamp":{"type":"string","format":"date-time","description":"When the event happened (UTC)."},"mode":{"type":"string","enum":["live","test"],"description":"`test` for events of the API test space, `live` otherwise."},"data":{"type":"object","properties":{"organization_id":{"type":"string","format":"uuid","description":"The organization the event happened in."},"contact_erasure_id":{"type":"string","format":"uuid","description":"The erasure request (GET /v1/contact-erasures/{erasure_id})."},"contact_id":{"type":"string","format":"uuid"},"reason":{"type":"string","enum":["restored","organization_deletion_withdrawn"]}},"required":["organization_id","contact_erasure_id","contact_id","reason"],"additionalProperties":false}}}}}},"responses":{"2XX":{"description":"Received. Any other answer, or none within the delivery timeout, is retried with exponential backoff; deliveries can be replayed from the delivery log."}}}},"contact.erasure_failed":{"post":{"summary":"contact.erasure_failed","description":"An erasure stopped at a step (its code and reference name the failure); a member with `contacts.delete` retries it (POST /v1/contact-erasures/{erasure_id}/retry) and it resumes there.","tags":["webhooks"],"x-rabt-module":"erasure","parameters":[{"$ref":"#/components/parameters/WebhookId"},{"$ref":"#/components/parameters/WebhookTimestamp"},{"$ref":"#/components/parameters/WebhookSignature"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["type","version","timestamp","mode","data"],"properties":{"type":{"type":"string","enum":["contact.erasure_failed"]},"version":{"type":"integer","enum":[1],"description":"The version of `data`; a breaking change is a new version."},"timestamp":{"type":"string","format":"date-time","description":"When the event happened (UTC)."},"mode":{"type":"string","enum":["live","test"],"description":"`test` for events of the API test space, `live` otherwise."},"data":{"type":"object","properties":{"organization_id":{"type":"string","format":"uuid","description":"The organization the event happened in."},"contact_erasure_id":{"type":"string","format":"uuid","description":"The erasure request (GET /v1/contact-erasures/{erasure_id})."},"contact_id":{"type":"string","format":"uuid"},"step":{"type":"string"},"code":{"type":"string","description":"The catalog code (CRM-6047)."},"reference":{"type":"string","description":"The reference of the recorded error."}},"required":["organization_id","contact_erasure_id","contact_id","step","code","reference"],"additionalProperties":false}}}}}},"responses":{"2XX":{"description":"Received. Any other answer, or none within the delivery timeout, is retried with exponential backoff; deliveries can be replayed from the delivery log."}}}},"contact.erased":{"post":{"summary":"contact.erased","description":"A contact's personal data was erased for good. The contact stays as an erased marker; its tickets, their timeline and counts, ledger and audit entries stay. Remove what your systems copied of it.","tags":["webhooks"],"x-rabt-module":"erasure","parameters":[{"$ref":"#/components/parameters/WebhookId"},{"$ref":"#/components/parameters/WebhookTimestamp"},{"$ref":"#/components/parameters/WebhookSignature"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["type","version","timestamp","mode","data"],"properties":{"type":{"type":"string","enum":["contact.erased"]},"version":{"type":"integer","enum":[1],"description":"The version of `data`; a breaking change is a new version."},"timestamp":{"type":"string","format":"date-time","description":"When the event happened (UTC)."},"mode":{"type":"string","enum":["live","test"],"description":"`test` for events of the API test space, `live` otherwise."},"data":{"type":"object","properties":{"organization_id":{"type":"string","format":"uuid","description":"The organization the event happened in."},"contact_erasure_id":{"type":"string","format":"uuid","description":"The erasure request (GET /v1/contact-erasures/{erasure_id})."},"contact_id":{"type":"string","format":"uuid"},"contact_ids":{"type":"array","items":{"type":"string","format":"uuid"},"description":"The contact and every contact merged into it, all erased."},"organization_deletion_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]}},"required":["organization_id","contact_erasure_id","contact_id","contact_ids","organization_deletion_id"],"additionalProperties":false}}}}}},"responses":{"2XX":{"description":"Received. Any other answer, or none within the delivery timeout, is retried with exponential backoff; deliveries can be replayed from the delivery log."}}}},"organization.deletion_requested":{"post":{"summary":"organization.deletion_requested","description":"The owner asked to delete the organization: it keeps working until `delete_after` (the owner may withdraw it), then it closes and every contact’s personal data is erased.","tags":["webhooks"],"x-rabt-module":"organization","parameters":[{"$ref":"#/components/parameters/WebhookId"},{"$ref":"#/components/parameters/WebhookTimestamp"},{"$ref":"#/components/parameters/WebhookSignature"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["type","version","timestamp","mode","data"],"properties":{"type":{"type":"string","enum":["organization.deletion_requested"]},"version":{"type":"integer","enum":[1],"description":"The version of `data`; a breaking change is a new version."},"timestamp":{"type":"string","format":"date-time","description":"When the event happened (UTC)."},"mode":{"type":"string","enum":["live","test"],"description":"`test` for events of the API test space, `live` otherwise."},"data":{"type":"object","properties":{"organization_id":{"type":"string","format":"uuid","description":"The organization the event happened in."},"organization_deletion_id":{"type":"string","format":"uuid","description":"The deletion request (GET /v1/organization/deletion)."},"delete_after":{"type":"string","format":"date-time"},"by_membership_id":{"type":"string","format":"uuid"}},"required":["organization_id","organization_deletion_id","delete_after","by_membership_id"],"additionalProperties":false}}}}}},"responses":{"2XX":{"description":"Received. Any other answer, or none within the delivery timeout, is retried with exponential backoff; deliveries can be replayed from the delivery log."}}}},"organization.deletion_withdrawn":{"post":{"summary":"organization.deletion_withdrawn","description":"The owner withdrew the deletion of the organization inside its window.","tags":["webhooks"],"x-rabt-module":"organization","parameters":[{"$ref":"#/components/parameters/WebhookId"},{"$ref":"#/components/parameters/WebhookTimestamp"},{"$ref":"#/components/parameters/WebhookSignature"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["type","version","timestamp","mode","data"],"properties":{"type":{"type":"string","enum":["organization.deletion_withdrawn"]},"version":{"type":"integer","enum":[1],"description":"The version of `data`; a breaking change is a new version."},"timestamp":{"type":"string","format":"date-time","description":"When the event happened (UTC)."},"mode":{"type":"string","enum":["live","test"],"description":"`test` for events of the API test space, `live` otherwise."},"data":{"type":"object","properties":{"organization_id":{"type":"string","format":"uuid","description":"The organization the event happened in."},"organization_deletion_id":{"type":"string","format":"uuid","description":"The deletion request (GET /v1/organization/deletion)."},"by_membership_id":{"type":"string","format":"uuid"}},"required":["organization_id","organization_deletion_id","by_membership_id"],"additionalProperties":false}}}}}},"responses":{"2XX":{"description":"Received. Any other answer, or none within the delivery timeout, is retried with exponential backoff; deliveries can be replayed from the delivery log."}}}},"organization.deletion_failed":{"post":{"summary":"organization.deletion_failed","description":"The deletion of the organization stopped (its code and reference name the failure); the Rabt team retries it and it resumes where it stopped.","tags":["webhooks"],"x-rabt-module":"organization","parameters":[{"$ref":"#/components/parameters/WebhookId"},{"$ref":"#/components/parameters/WebhookTimestamp"},{"$ref":"#/components/parameters/WebhookSignature"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["type","version","timestamp","mode","data"],"properties":{"type":{"type":"string","enum":["organization.deletion_failed"]},"version":{"type":"integer","enum":[1],"description":"The version of `data`; a breaking change is a new version."},"timestamp":{"type":"string","format":"date-time","description":"When the event happened (UTC)."},"mode":{"type":"string","enum":["live","test"],"description":"`test` for events of the API test space, `live` otherwise."},"data":{"type":"object","properties":{"organization_id":{"type":"string","format":"uuid","description":"The organization the event happened in."},"organization_deletion_id":{"type":"string","format":"uuid","description":"The deletion request (GET /v1/organization/deletion)."},"code":{"type":"string"},"reference":{"type":"string"}},"required":["organization_id","organization_deletion_id","code","reference"],"additionalProperties":false}}}}}},"responses":{"2XX":{"description":"Received. Any other answer, or none within the delivery timeout, is retried with exponential backoff; deliveries can be replayed from the delivery log."}}}},"organization.deleted":{"post":{"summary":"organization.deleted","description":"The organization was closed and every contact's personal data erased; its records, ledger and audit entries stay.","tags":["webhooks"],"x-rabt-module":"organization","parameters":[{"$ref":"#/components/parameters/WebhookId"},{"$ref":"#/components/parameters/WebhookTimestamp"},{"$ref":"#/components/parameters/WebhookSignature"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["type","version","timestamp","mode","data"],"properties":{"type":{"type":"string","enum":["organization.deleted"]},"version":{"type":"integer","enum":[1],"description":"The version of `data`; a breaking change is a new version."},"timestamp":{"type":"string","format":"date-time","description":"When the event happened (UTC)."},"mode":{"type":"string","enum":["live","test"],"description":"`test` for events of the API test space, `live` otherwise."},"data":{"type":"object","properties":{"organization_id":{"type":"string","format":"uuid","description":"The organization the event happened in."},"organization_deletion_id":{"type":"string","format":"uuid","description":"The deletion request (GET /v1/organization/deletion)."},"contacts_erased":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["organization_id","organization_deletion_id","contacts_erased"],"additionalProperties":false}}}}}},"responses":{"2XX":{"description":"Received. Any other answer, or none within the delivery timeout, is retried with exponential backoff; deliveries can be replayed from the delivery log."}}}}}}