Documentation

Référence de l'API

Toutes les ressources, les paramètres et les erreurs de l'API REST /v1.

L'API REST vit sous https://api.allomi.ai/v1 (ou sur ton propre serveur si tu t'auto-héberges). Le fichier OpenAPI 3.1 est packages/contracts/openapi.yaml dans le dépôt, et cette page en est générée. Les descriptions des opérations sont en anglais.

Authentification

Envoie une clé d'API comme jeton « bearer ». Les clés se créent dans l'application (Connecteurs et API) ou avec POST /v1/api-keys, et ont des portées. Chaque opération ci-dessous indique celle qu'elle exige.

Authorization: Bearer alm_live_…

Erreurs

Toute réponse hors 2xx a le même corps, et un en-tête Request-Id à citer au support.

{ "error": { "type": "invalid_request", "code": "validation_error", "message": "prompt is required", "param": "prompt", "requestId": "req_…" } }

Pagination

Les endpoints de liste renvoient { "data": [...], "nextCursor": "…" | null }, du plus récent au plus ancien. Passe cursor avec le nextCursor précédent pour la page suivante, et limit (1 à 100, 20 par défaut) pour sa taille.

Idempotence

Les POST qui créent une ressource acceptent un en-tête Idempotency-Key. La même clé avec le même corps renvoie la première réponse pendant 24 heures (avec Idempotent-Replayed: true). La même clé avec un autre corps renvoie 409 idempotency_conflict.

Endpoints

Allomi API 0.1.0 · généré depuis openapi.yaml (en anglais)

Calls

GET/v1/calls

List calls

Portée de la clé: calls:read

Paramètres
ChampTypeDescription
limit (query)integerPage size (1 to 100, default 20)
cursor (query)stringOpaque cursor from `nextCursor` of the previous page
status (query)CallStatus
direction (query)CallDirection
contactId (query)string (uuid)Resource id (UUIDv7)
Réponses
  • 200 Calls, newest first CallList
  • 400 Invalid request (validation error) Error
  • 401 Missing or invalid API key Error
  • 403 The API key lacks the required scope Error
  • 429 Rate limited; retry after `Retry-After` seconds Error
  • 500 Internal error Error

POST/v1/calls

Create a call

Portée de la clé: calls:write

Places an outbound call driven by a free `prompt`. Calls to contacts need the `callable` permission; calls to other numbers need a number the account verified. Hourly, daily and minute caps apply. The result (status, duration, transcript, summary) arrives by webhook and on `GET /v1/calls/{callId}`.

Paramètres
ChampTypeDescription
Idempotency-Key (header)stringMakes the POST safe to retry: the same key with the same body returns the first response for 24 hours (with `Idempotent-Replayed: true`); the same key with another body returns 409 `idempotency_conflict`.
Corps de la requête CreateCallRequest
ChampTypeDescription
toE164Number to call. Exactly one of `to`, `contactId` or `owner` is required
contactIdstring (uuid)Contact to call (must have the `callable` permission)
ownertrueCall the account owner on their own phone ("call me")
prompt (obligatoire)stringWhat the assistant must do on this call, in natural language
languageLanguageDefaults to the contact's language, then the assistant's
voicestring
maxMinutesintegerDefault: 10. Range: 1 to 60.
useContactMemorybooleanGive the assistant the contact's notes and history Default: true.
reportToOwnerbooleanMission: when the call ends, report the result to the owner (in their ongoing call if they are on the line, otherwise by calling them back). Needs `contactId` with the `missionsAllowed` permission Default: false.
webhookUrlstring (uri)Receives this call's events in addition to the account's webhook endpoints
metadataMetadataFree key/value strings attached by the developer (max 20 keys). Returned as is, never spoken.
Réponses
  • 201 The call, usually `queued` Call
  • 400 Invalid request (validation error) Error
  • 401 Missing or invalid API key Error
  • 402 Minute budget exhausted (`quota_exceeded`) Error
  • 403 The API key lacks the required scope Error
  • 404 Contact not found Error
  • 409 Idempotency key reused with another body Error
  • 422 Call policy refused the call (`policy_violation`) Error
  • 429 Rate limited; retry after `Retry-After` seconds Error
  • 500 Internal error Error

GET/v1/calls/{callId}

Get a call (with transcript)

Portée de la clé: calls:read

Paramètres
ChampTypeDescription
callId (path) (obligatoire)string (uuid)Resource id (UUIDv7)
Réponses
  • 200 The call Call
  • 400 Invalid request (validation error) Error
  • 401 Missing or invalid API key Error
  • 403 The API key lacks the required scope Error
  • 404 Call not found Error
  • 429 Rate limited; retry after `Retry-After` seconds Error
  • 500 Internal error Error

POST/v1/calls/{callId}/hangup

Hang up a call

Portée de la clé: calls:write

Ends a ringing or ongoing call. A no-op on a call that already ended.

Paramètres
ChampTypeDescription
callId (path) (obligatoire)string (uuid)Resource id (UUIDv7)
Réponses
  • 200 The call Call
  • 400 Invalid request (validation error) Error
  • 401 Missing or invalid API key Error
  • 403 The API key lacks the required scope Error
  • 404 Call not found Error
  • 429 Rate limited; retry after `Retry-After` seconds Error
  • 500 Internal error Error

POST/v1/calls/{callId}/say

Say something in an ongoing call

Portée de la clé: calls:write

Injects information the assistant relays in its own words. Treated as data, never as instructions.

Paramètres
ChampTypeDescription
callId (path) (obligatoire)string (uuid)Resource id (UUIDv7)
Corps de la requête SayInCallRequest
ChampTypeDescription
text (obligatoire)stringWhat the assistant says now, as information to relay
interruptbooleanCut the assistant off if it is speaking Default: false.
Réponses
  • 202 Queued for the assistant Accepted
  • 400 Invalid request (validation error) Error
  • 401 Missing or invalid API key Error
  • 403 The API key lacks the required scope Error
  • 404 Call not found Error
  • 409 The call is not in progress (`conflict`) Error
  • 429 Rate limited; retry after `Retry-After` seconds Error
  • 500 Internal error Error

Asks

Ask a human by phone (ask_owner, ask_contact)

GET/v1/asks

List asks

Portée de la clé: asks:read

Paramètres
ChampTypeDescription
limit (query)integerPage size (1 to 100, default 20)
cursor (query)stringOpaque cursor from `nextCursor` of the previous page
status (query)"pending" | "calling" | "answered" | "unanswered" | "expired" | "failed" | "canceled"
Réponses
  • 200 Asks, newest first AskList
  • 400 Invalid request (validation error) Error
  • 401 Missing or invalid API key Error
  • 403 The API key lacks the required scope Error
  • 429 Rate limited; retry after `Retry-After` seconds Error
  • 500 Internal error Error

POST/v1/asks

Ask a human by phone (ask_owner / ask_contact)

Portée de la clé: asks:write

Calls the owner (`target: owner`) or a contact (`target: contact`), reads the question, collects the answer and returns it by webhook (`ask.answered` / `ask.expired`) and on `GET /v1/asks/{askId}`.

Paramètres
ChampTypeDescription
Idempotency-Key (header)stringMakes the POST safe to retry: the same key with the same body returns the first response for 24 hours (with `Idempotent-Replayed: true`); the same key with another body returns 409 `idempotency_conflict`.
Corps de la requête CreateAskRequest
Réponses
  • 201 The ask, `pending` Ask
  • 400 Invalid request (validation error) Error
  • 401 Missing or invalid API key Error
  • 403 The API key lacks the required scope Error
  • 404 Contact not found Error
  • 409 Idempotency key reused with another body Error
  • 422 Call policy refused the call Error
  • 429 Rate limited; retry after `Retry-After` seconds Error
  • 500 Internal error Error

GET/v1/asks/{askId}

Get an ask

Portée de la clé: asks:read

Paramètres
ChampTypeDescription
askId (path) (obligatoire)string (uuid)Resource id (UUIDv7)
Réponses
  • 200 The ask Ask
  • 400 Invalid request (validation error) Error
  • 401 Missing or invalid API key Error
  • 403 The API key lacks the required scope Error
  • 404 Ask not found Error
  • 429 Rate limited; retry after `Retry-After` seconds Error
  • 500 Internal error Error

POST/v1/asks/{askId}/cancel

Cancel an ask

Portée de la clé: asks:write

Paramètres
ChampTypeDescription
askId (path) (obligatoire)string (uuid)Resource id (UUIDv7)
Réponses
  • 200 The ask, `canceled` Ask
  • 400 Invalid request (validation error) Error
  • 401 Missing or invalid API key Error
  • 403 The API key lacks the required scope Error
  • 404 Ask not found Error
  • 429 Rate limited; retry after `Retry-After` seconds Error
  • 500 Internal error Error

Schedules

GET/v1/schedules

List schedules

Portée de la clé: schedules:read

Paramètres
ChampTypeDescription
limit (query)integerPage size (1 to 100, default 20)
cursor (query)stringOpaque cursor from `nextCursor` of the previous page
status (query)ScheduleStatus
Réponses
  • 200 Schedules, newest first ScheduleList
  • 400 Invalid request (validation error) Error
  • 401 Missing or invalid API key Error
  • 403 The API key lacks the required scope Error
  • 429 Rate limited; retry after `Retry-After` seconds Error
  • 500 Internal error Error

POST/v1/schedules

Schedule a call (one-off or recurring)

Portée de la clé: schedules:write

Paramètres
ChampTypeDescription
Idempotency-Key (header)stringMakes the POST safe to retry: the same key with the same body returns the first response for 24 hours (with `Idempotent-Replayed: true`); the same key with another body returns 409 `idempotency_conflict`.
Corps de la requête CreateScheduleRequest
ChampTypeDescription
contactIdstring (uuid)Omit to call the owner
prompt (obligatoire)string
rrulestringRFC 5545 recurrence rule, evaluated in `timezone`
runAtstring (date-time)RFC 3339 date-time
timezonestringIANA time zone Default: "Europe/Paris".
languageLanguageBCP 47 language tag (language, optional region)
voicestring
maxMinutesintegerDefault: 10. Range: 1 to 60.
metadataMetadataFree key/value strings attached by the developer (max 20 keys). Returned as is, never spoken.
Réponses
  • 201 The schedule Schedule
  • 400 Invalid request (validation error) Error
  • 401 Missing or invalid API key Error
  • 403 The API key lacks the required scope Error
  • 404 Contact not found Error
  • 409 Idempotency key reused Error
  • 422 Schedule refused (rule too frequent, or `runAt` in the past) Error
  • 429 Rate limited; retry after `Retry-After` seconds Error
  • 500 Internal error Error

GET/v1/schedules/{scheduleId}

Get a schedule

Portée de la clé: schedules:read

Paramètres
ChampTypeDescription
scheduleId (path) (obligatoire)string (uuid)Resource id (UUIDv7)
Réponses
  • 200 The schedule Schedule
  • 400 Invalid request (validation error) Error
  • 401 Missing or invalid API key Error
  • 403 The API key lacks the required scope Error
  • 404 Schedule not found Error
  • 429 Rate limited; retry after `Retry-After` seconds Error
  • 500 Internal error Error

PATCH/v1/schedules/{scheduleId}

Update, pause or resume a schedule

Portée de la clé: schedules:write

Paramètres
ChampTypeDescription
scheduleId (path) (obligatoire)string (uuid)Resource id (UUIDv7)
Corps de la requête UpdateScheduleRequest
ChampTypeDescription
status"active" | "paused"
promptstring
rrulestring | null
runAtstring (date-time) | null
timezonestringIANA time zone
languageLanguage | null
voicestring | null
maxMinutesintegerRange: 1 to 60.
metadataMetadataFree key/value strings attached by the developer (max 20 keys). Returned as is, never spoken.
Réponses
  • 200 The schedule Schedule
  • 400 Invalid request (validation error) Error
  • 401 Missing or invalid API key Error
  • 403 The API key lacks the required scope Error
  • 404 Schedule not found Error
  • 429 Rate limited; retry after `Retry-After` seconds Error
  • 500 Internal error Error

DELETE/v1/schedules/{scheduleId}

Delete a schedule

Portée de la clé: schedules:write

Paramètres
ChampTypeDescription
scheduleId (path) (obligatoire)string (uuid)Resource id (UUIDv7)
Réponses
  • 200 Deleted Deleted
  • 400 Invalid request (validation error) Error
  • 401 Missing or invalid API key Error
  • 403 The API key lacks the required scope Error
  • 404 Schedule not found Error
  • 429 Rate limited; retry after `Retry-After` seconds Error
  • 500 Internal error Error

Contacts

Contacts with memory: notes and commitments

GET/v1/contacts

List contacts

Portée de la clé: contacts:read

Paramètres
ChampTypeDescription
limit (query)integerPage size (1 to 100, default 20)
cursor (query)stringOpaque cursor from `nextCursor` of the previous page
q (query)stringSearch by name or number
Réponses
  • 200 Contacts, newest first ContactList
  • 400 Invalid request (validation error) Error
  • 401 Missing or invalid API key Error
  • 403 The API key lacks the required scope Error
  • 429 Rate limited; retry after `Retry-After` seconds Error
  • 500 Internal error Error

POST/v1/contacts

Create a contact

Portée de la clé: contacts:write

Paramètres
ChampTypeDescription
Idempotency-Key (header)stringMakes the POST safe to retry: the same key with the same body returns the first response for 24 hours (with `Idempotent-Replayed: true`); the same key with another body returns 409 `idempotency_conflict`.
Corps de la requête CreateContactRequest
ChampTypeDescription
name (obligatoire)string
numbers (obligatoire)E164[]
relationshipstring
languageLanguageBCP 47 language tag (language, optional region) Default: "fr".
formality"tu" | "vous"Default: "vous".
permissionsobject
Réponses
  • 201 The contact Contact
  • 400 Invalid request (validation error) Error
  • 401 Missing or invalid API key Error
  • 403 The API key lacks the required scope Error
  • 409 Idempotency key reused Error
  • 429 Rate limited; retry after `Retry-After` seconds Error
  • 500 Internal error Error

GET/v1/contacts/{contactId}

Get a contact

Portée de la clé: contacts:read

Paramètres
ChampTypeDescription
contactId (path) (obligatoire)string (uuid)Resource id (UUIDv7)
Réponses
  • 200 The contact Contact
  • 400 Invalid request (validation error) Error
  • 401 Missing or invalid API key Error
  • 403 The API key lacks the required scope Error
  • 404 Contact not found Error
  • 429 Rate limited; retry after `Retry-After` seconds Error
  • 500 Internal error Error

PATCH/v1/contacts/{contactId}

Update a contact

Portée de la clé: contacts:write

Paramètres
ChampTypeDescription
contactId (path) (obligatoire)string (uuid)Resource id (UUIDv7)
Corps de la requête UpdateContactRequest
ChampTypeDescription
namestring
numbersE164[]
relationshipstring | null
languageLanguageBCP 47 language tag (language, optional region)
formality"tu" | "vous"
permissionsobject
Réponses
  • 200 The contact Contact
  • 400 Invalid request (validation error) Error
  • 401 Missing or invalid API key Error
  • 403 The API key lacks the required scope Error
  • 404 Contact not found Error
  • 429 Rate limited; retry after `Retry-After` seconds Error
  • 500 Internal error Error

DELETE/v1/contacts/{contactId}

Delete a contact (with its notes and commitments)

Portée de la clé: contacts:write

Paramètres
ChampTypeDescription
contactId (path) (obligatoire)string (uuid)Resource id (UUIDv7)
Réponses
  • 200 Deleted Deleted
  • 400 Invalid request (validation error) Error
  • 401 Missing or invalid API key Error
  • 403 The API key lacks the required scope Error
  • 404 Contact not found Error
  • 429 Rate limited; retry after `Retry-After` seconds Error
  • 500 Internal error Error

GET/v1/contacts/{contactId}/notes

List a contact's notes

Portée de la clé: contacts:read

Paramètres
ChampTypeDescription
contactId (path) (obligatoire)string (uuid)Resource id (UUIDv7)
limit (query)integerPage size (1 to 100, default 20)
cursor (query)stringOpaque cursor from `nextCursor` of the previous page
Réponses
  • 200 Notes, newest first ContactNoteList
  • 400 Invalid request (validation error) Error
  • 401 Missing or invalid API key Error
  • 403 The API key lacks the required scope Error
  • 404 Contact not found Error
  • 429 Rate limited; retry after `Retry-After` seconds Error
  • 500 Internal error Error

POST/v1/contacts/{contactId}/notes

Add a note to a contact

Portée de la clé: contacts:write

Paramètres
ChampTypeDescription
contactId (path) (obligatoire)string (uuid)Resource id (UUIDv7)
Corps de la requête CreateContactNoteRequest
ChampTypeDescription
text (obligatoire)string
Réponses
  • 201 The note, `confirmed` ContactNote
  • 400 Invalid request (validation error) Error
  • 401 Missing or invalid API key Error
  • 403 The API key lacks the required scope Error
  • 404 Contact not found Error
  • 429 Rate limited; retry after `Retry-After` seconds Error
  • 500 Internal error Error

PATCH/v1/contacts/{contactId}/notes/{noteId}

Edit, confirm or reject a note

Portée de la clé: contacts:write

Paramètres
ChampTypeDescription
contactId (path) (obligatoire)string (uuid)Resource id (UUIDv7)
noteId (path) (obligatoire)string (uuid)Resource id (UUIDv7)
Corps de la requête UpdateContactNoteRequest
ChampTypeDescription
textstring
status"proposed" | "confirmed" | "rejected"
Réponses
  • 200 The note ContactNote
  • 400 Invalid request (validation error) Error
  • 401 Missing or invalid API key Error
  • 403 The API key lacks the required scope Error
  • 404 Note not found Error
  • 429 Rate limited; retry after `Retry-After` seconds Error
  • 500 Internal error Error

DELETE/v1/contacts/{contactId}/notes/{noteId}

Delete a note

Portée de la clé: contacts:write

Paramètres
ChampTypeDescription
contactId (path) (obligatoire)string (uuid)Resource id (UUIDv7)
noteId (path) (obligatoire)string (uuid)Resource id (UUIDv7)
Réponses
  • 200 Deleted Deleted
  • 400 Invalid request (validation error) Error
  • 401 Missing or invalid API key Error
  • 403 The API key lacks the required scope Error
  • 404 Note not found Error
  • 429 Rate limited; retry after `Retry-After` seconds Error
  • 500 Internal error Error

GET/v1/contacts/{contactId}/commitments

List a contact's commitments

Portée de la clé: contacts:read

Paramètres
ChampTypeDescription
contactId (path) (obligatoire)string (uuid)Resource id (UUIDv7)
limit (query)integerPage size (1 to 100, default 20)
cursor (query)stringOpaque cursor from `nextCursor` of the previous page
Réponses
  • 200 Commitments, newest first CommitmentList
  • 400 Invalid request (validation error) Error
  • 401 Missing or invalid API key Error
  • 403 The API key lacks the required scope Error
  • 404 Contact not found Error
  • 429 Rate limited; retry after `Retry-After` seconds Error
  • 500 Internal error Error

POST/v1/contacts/{contactId}/commitments

Add a commitment

Portée de la clé: contacts:write

Paramètres
ChampTypeDescription
contactId (path) (obligatoire)string (uuid)Resource id (UUIDv7)
Corps de la requête CreateCommitmentRequest
ChampTypeDescription
text (obligatoire)string
dueAtstring (date-time)RFC 3339 date-time
Réponses
  • 201 The commitment, `open` Commitment
  • 400 Invalid request (validation error) Error
  • 401 Missing or invalid API key Error
  • 403 The API key lacks the required scope Error
  • 404 Contact not found Error
  • 429 Rate limited; retry after `Retry-After` seconds Error
  • 500 Internal error Error

PATCH/v1/contacts/{contactId}/commitments/{commitmentId}

Update or close a commitment

Portée de la clé: contacts:write

Paramètres
ChampTypeDescription
contactId (path) (obligatoire)string (uuid)Resource id (UUIDv7)
commitmentId (path) (obligatoire)string (uuid)Resource id (UUIDv7)
Corps de la requête UpdateCommitmentRequest
ChampTypeDescription
textstring
dueAtstring (date-time) | null
status"proposed" | "open" | "done" | "canceled"
Réponses
  • 200 The commitment Commitment
  • 400 Invalid request (validation error) Error
  • 401 Missing or invalid API key Error
  • 403 The API key lacks the required scope Error
  • 404 Commitment not found Error
  • 429 Rate limited; retry after `Retry-After` seconds Error
  • 500 Internal error Error

DELETE/v1/contacts/{contactId}/commitments/{commitmentId}

Delete a commitment

Portée de la clé: contacts:write

Paramètres
ChampTypeDescription
contactId (path) (obligatoire)string (uuid)Resource id (UUIDv7)
commitmentId (path) (obligatoire)string (uuid)Resource id (UUIDv7)
Réponses
  • 200 Deleted Deleted
  • 400 Invalid request (validation error) Error
  • 401 Missing or invalid API key Error
  • 403 The API key lacks the required scope Error
  • 404 Commitment not found Error
  • 429 Rate limited; retry after `Retry-After` seconds Error
  • 500 Internal error Error

GET/v1/memory/search

Search the assistant's memory

Portée de la clé: contacts:read

Full-text search across contacts, confirmed and proposed notes, commitments and call summaries. Returns the best matches first.

Paramètres
ChampTypeDescription
q (query) (obligatoire)stringWords to look for
contactId (query)string (uuid)Only search this contact's memory
limit (query)integerMaximum hits (1 to 50, default 10)
Réponses
  • 200 Matches, best first MemorySearchResult
  • 400 Invalid request (validation error) Error
  • 401 Missing or invalid API key Error
  • 403 The API key lacks the required scope Error
  • 429 Rate limited; retry after `Retry-After` seconds Error
  • 500 Internal error Error

Assistants

GET/v1/assistants

List assistants

Portée de la clé: assistants:read

One assistant per user in v1.

Paramètres
ChampTypeDescription
limit (query)integerPage size (1 to 100, default 20)
cursor (query)stringOpaque cursor from `nextCursor` of the previous page
Réponses
  • 200 Assistants AssistantList
  • 400 Invalid request (validation error) Error
  • 401 Missing or invalid API key Error
  • 403 The API key lacks the required scope Error
  • 429 Rate limited; retry after `Retry-After` seconds Error
  • 500 Internal error Error

GET/v1/assistants/{assistantId}

Get an assistant

Portée de la clé: assistants:read

Paramètres
ChampTypeDescription
assistantId (path) (obligatoire)string (uuid)Resource id (UUIDv7)
Réponses
  • 200 The assistant Assistant
  • 400 Invalid request (validation error) Error
  • 401 Missing or invalid API key Error
  • 403 The API key lacks the required scope Error
  • 404 Assistant not found Error
  • 429 Rate limited; retry after `Retry-After` seconds Error
  • 500 Internal error Error

PATCH/v1/assistants/{assistantId}

Update an assistant

Portée de la clé: assistants:write

Paramètres
ChampTypeDescription
assistantId (path) (obligatoire)string (uuid)Resource id (UUIDv7)
Corps de la requête UpdateAssistantRequest
ChampTypeDescription
namestring
voicestring
languageLanguageBCP 47 language tag (language, optional region)
personastring | null
instructionsstring | null
aiDisclosureboolean
recordingboolean
unknownCallers"take_message" | "reject"
hoursAssistantHours | null
websiteUrlstring (uri) | null
Réponses
  • 200 The assistant Assistant
  • 400 Invalid request (validation error) Error
  • 401 Missing or invalid API key Error
  • 403 The API key lacks the required scope Error
  • 404 Assistant not found Error
  • 422 Setting not allowed (AI disclosure cannot be turned off in the cloud) Error
  • 429 Rate limited; retry after `Retry-After` seconds Error
  • 500 Internal error Error

Numbers

GET/v1/numbers

List phone numbers

Portée de la clé: numbers:read

Paramètres
ChampTypeDescription
limit (query)integerPage size (1 to 100, default 20)
cursor (query)stringOpaque cursor from `nextCursor` of the previous page
Réponses
  • 200 Numbers PhoneNumberList
  • 400 Invalid request (validation error) Error
  • 401 Missing or invalid API key Error
  • 403 The API key lacks the required scope Error
  • 429 Rate limited; retry after `Retry-After` seconds Error
  • 500 Internal error Error

POST/v1/numbers

Request an own phone number

Portée de la clé: numbers:write

Cloud only. Own numbers need an identity check (KYC) with the carrier; until it is automated this returns 422 `number_provisioning_unavailable` and the request is handled by support.

Paramètres
ChampTypeDescription
Idempotency-Key (header)stringMakes the POST safe to retry: the same key with the same body returns the first response for 24 hours (with `Idempotent-Replayed: true`); the same key with another body returns 409 `idempotency_conflict`.
Corps de la requête ProvisionNumberRequest
ChampTypeDescription
country"FR"ISO 3166-1 alpha-2 country of the number Default: "FR".
Réponses
  • 202 Request accepted; the number appears as `pending` Accepted
  • 400 Invalid request (validation error) Error
  • 401 Missing or invalid API key Error
  • 403 The API key lacks the required scope Error
  • 422 Provisioning not available for this account (`policy_violation`) Error
  • 429 Rate limited; retry after `Retry-After` seconds Error
  • 500 Internal error Error

GET/v1/numbers/{numberId}

Get a phone number

Portée de la clé: numbers:read

Paramètres
ChampTypeDescription
numberId (path) (obligatoire)string (uuid)Resource id (UUIDv7)
Réponses
  • 200 The number PhoneNumber
  • 400 Invalid request (validation error) Error
  • 401 Missing or invalid API key Error
  • 403 The API key lacks the required scope Error
  • 404 Number not found Error
  • 429 Rate limited; retry after `Retry-After` seconds Error
  • 500 Internal error Error

Webhooks

GET/v1/webhook-endpoints

List webhook endpoints

Portée de la clé: webhooks:read

Paramètres
ChampTypeDescription
limit (query)integerPage size (1 to 100, default 20)
cursor (query)stringOpaque cursor from `nextCursor` of the previous page
Réponses
  • 200 Endpoints WebhookEndpointList
  • 400 Invalid request (validation error) Error
  • 401 Missing or invalid API key Error
  • 403 The API key lacks the required scope Error
  • 429 Rate limited; retry after `Retry-After` seconds Error
  • 500 Internal error Error

POST/v1/webhook-endpoints

Create a webhook endpoint

Portée de la clé: webhooks:write

Paramètres
ChampTypeDescription
Idempotency-Key (header)stringMakes the POST safe to retry: the same key with the same body returns the first response for 24 hours (with `Idempotent-Replayed: true`); the same key with another body returns 409 `idempotency_conflict`.
Corps de la requête CreateWebhookEndpointRequest
ChampTypeDescription
url (obligatoire)string (uri)
descriptionstring
events (obligatoire)WebhookEventType[]
enabledbooleanDefault: true.
Réponses
  • 201 The endpoint, with its signing secret WebhookEndpointWithSecret
  • 400 Invalid request (validation error) Error
  • 401 Missing or invalid API key Error
  • 403 The API key lacks the required scope Error
  • 409 Idempotency key reused Error
  • 422 The endpoint URL is not a public https URL Error
  • 429 Rate limited; retry after `Retry-After` seconds Error
  • 500 Internal error Error

GET/v1/webhook-endpoints/{endpointId}

Get a webhook endpoint

Portée de la clé: webhooks:read

Paramètres
ChampTypeDescription
endpointId (path) (obligatoire)string (uuid)Resource id (UUIDv7)
Réponses
  • 200 The endpoint WebhookEndpoint
  • 400 Invalid request (validation error) Error
  • 401 Missing or invalid API key Error
  • 403 The API key lacks the required scope Error
  • 404 Endpoint not found Error
  • 429 Rate limited; retry after `Retry-After` seconds Error
  • 500 Internal error Error

PATCH/v1/webhook-endpoints/{endpointId}

Update a webhook endpoint

Portée de la clé: webhooks:write

Paramètres
ChampTypeDescription
endpointId (path) (obligatoire)string (uuid)Resource id (UUIDv7)
Corps de la requête UpdateWebhookEndpointRequest
ChampTypeDescription
urlstring (uri)
descriptionstring | null
eventsWebhookEventType[]
enabledboolean
Réponses
  • 200 The endpoint WebhookEndpoint
  • 400 Invalid request (validation error) Error
  • 401 Missing or invalid API key Error
  • 403 The API key lacks the required scope Error
  • 404 Endpoint not found Error
  • 429 Rate limited; retry after `Retry-After` seconds Error
  • 500 Internal error Error

DELETE/v1/webhook-endpoints/{endpointId}

Delete a webhook endpoint

Portée de la clé: webhooks:write

Paramètres
ChampTypeDescription
endpointId (path) (obligatoire)string (uuid)Resource id (UUIDv7)
Réponses
  • 200 Deleted Deleted
  • 400 Invalid request (validation error) Error
  • 401 Missing or invalid API key Error
  • 403 The API key lacks the required scope Error
  • 404 Endpoint not found Error
  • 429 Rate limited; retry after `Retry-After` seconds Error
  • 500 Internal error Error

POST/v1/webhook-endpoints/{endpointId}/rotate-secret

Rotate the signing secret

Portée de la clé: webhooks:write

Paramètres
ChampTypeDescription
endpointId (path) (obligatoire)string (uuid)Resource id (UUIDv7)
Réponses
  • 200 The endpoint, with its new secret WebhookEndpointWithSecret
  • 400 Invalid request (validation error) Error
  • 401 Missing or invalid API key Error
  • 403 The API key lacks the required scope Error
  • 404 Endpoint not found Error
  • 429 Rate limited; retry after `Retry-After` seconds Error
  • 500 Internal error Error

POST/v1/webhook-endpoints/{endpointId}/test

Send a test event

Portée de la clé: webhooks:write

Sends one signed sample event to the endpoint and waits for the answer (10 seconds). The delivery is recorded and listed with the others.

Paramètres
ChampTypeDescription
endpointId (path) (obligatoire)string (uuid)Resource id (UUIDv7)
Corps de la requête TestWebhookEndpointRequest
ChampTypeDescription
typeWebhookEventTypeEvent type of the sample payload Default: "call.completed".
Réponses
  • 200 The delivery, `succeeded` or `failed` WebhookDelivery
  • 400 Invalid request (validation error) Error
  • 401 Missing or invalid API key Error
  • 403 The API key lacks the required scope Error
  • 404 Endpoint not found Error
  • 422 The endpoint URL is not a public https URL Error
  • 429 Rate limited; retry after `Retry-After` seconds Error
  • 500 Internal error Error

GET/v1/webhook-endpoints/{endpointId}/deliveries

List deliveries of an endpoint

Portée de la clé: webhooks:read

Paramètres
ChampTypeDescription
endpointId (path) (obligatoire)string (uuid)Resource id (UUIDv7)
limit (query)integerPage size (1 to 100, default 20)
cursor (query)stringOpaque cursor from `nextCursor` of the previous page
status (query)"pending" | "succeeded" | "failed"
Réponses
  • 200 Deliveries, newest first WebhookDeliveryList
  • 400 Invalid request (validation error) Error
  • 401 Missing or invalid API key Error
  • 403 The API key lacks the required scope Error
  • 404 Endpoint not found Error
  • 429 Rate limited; retry after `Retry-After` seconds Error
  • 500 Internal error Error

API keys

GET/v1/api-keys

List API keys

Portée de la clé: api_keys:read

Paramètres
ChampTypeDescription
limit (query)integerPage size (1 to 100, default 20)
cursor (query)stringOpaque cursor from `nextCursor` of the previous page
Réponses
  • 200 Keys (never the secret) ApiKeyList
  • 400 Invalid request (validation error) Error
  • 401 Missing or invalid API key Error
  • 403 The API key lacks the required scope Error
  • 429 Rate limited; retry after `Retry-After` seconds Error
  • 500 Internal error Error

POST/v1/api-keys

Create an API key

Portée de la clé: api_keys:write

Paramètres
ChampTypeDescription
Idempotency-Key (header)stringMakes the POST safe to retry: the same key with the same body returns the first response for 24 hours (with `Idempotent-Replayed: true`); the same key with another body returns 409 `idempotency_conflict`.
Corps de la requête CreateApiKeyRequest
ChampTypeDescription
name (obligatoire)string
mode"live" | "test"Default: "live".
scopesApiScope[]Defaults to every scope
expiresAtstring (date-time)RFC 3339 date-time
Réponses
  • 201 The key; `key` is shown only once CreatedApiKey
  • 400 Invalid request (validation error) Error
  • 401 Missing or invalid API key Error
  • 403 The API key lacks the required scope Error
  • 409 Idempotency key reused Error
  • 429 Rate limited; retry after `Retry-After` seconds Error
  • 500 Internal error Error

DELETE/v1/api-keys/{apiKeyId}

Revoke an API key

Portée de la clé: api_keys:write

Paramètres
ChampTypeDescription
apiKeyId (path) (obligatoire)string (uuid)Resource id (UUIDv7)
Réponses
  • 200 Revoked Deleted
  • 400 Invalid request (validation error) Error
  • 401 Missing or invalid API key Error
  • 403 The API key lacks the required scope Error
  • 404 API key not found Error
  • 429 Rate limited; retry after `Retry-After` seconds Error
  • 500 Internal error Error

Usage

GET/v1/usage

Minutes used in a billing period

Portée de la clé: usage:read

Paramètres
ChampTypeDescription
period (query)stringMonth to report, defaults to the current one
Réponses
  • 200 Usage of the period Usage
  • 400 Invalid request (validation error) Error
  • 401 Missing or invalid API key Error
  • 403 The API key lacks the required scope Error
  • 429 Rate limited; retry after `Retry-After` seconds Error
  • 500 Internal error Error

Événements webhook

Les charges envoyées à tes endpoints webhook. La réception et la vérification sont expliquées dans Webhooks.

Allomi API 0.1.0 · généré depuis openapi.yaml (en anglais)

Webhook events

Payloads POSTed to your webhook endpoints

EVENTcall.started

A call was answered

Corps de la requête CallStartedEvent
ChampTypeDescription
id (obligatoire)string (uuid)Event id; the same event is delivered with the same id on every retry
type (obligatoire)"call.started"
apiVersion (obligatoire)"2026-11-01"
createdAt (obligatoire)string (date-time)RFC 3339 date-time
data (obligatoire)object
Réponses
  • 200 Any 2xx acknowledges the event

EVENTcall.completed

A call ended normally

Corps de la requête CallCompletedEvent
ChampTypeDescription
id (obligatoire)string (uuid)Event id; the same event is delivered with the same id on every retry
type (obligatoire)"call.completed"
apiVersion (obligatoire)"2026-11-01"
createdAt (obligatoire)string (date-time)RFC 3339 date-time
data (obligatoire)object
Réponses
  • 200 Any 2xx acknowledges the event

EVENTcall.failed

A call failed, was not answered or was canceled

Corps de la requête CallFailedEvent
ChampTypeDescription
id (obligatoire)string (uuid)Event id; the same event is delivered with the same id on every retry
type (obligatoire)"call.failed"
apiVersion (obligatoire)"2026-11-01"
createdAt (obligatoire)string (date-time)RFC 3339 date-time
data (obligatoire)object
Réponses
  • 200 Any 2xx acknowledges the event

EVENTask.answered

An ask got its answer

Corps de la requête AskAnsweredEvent
ChampTypeDescription
id (obligatoire)string (uuid)Event id; the same event is delivered with the same id on every retry
type (obligatoire)"ask.answered"
apiVersion (obligatoire)"2026-11-01"
createdAt (obligatoire)string (date-time)RFC 3339 date-time
data (obligatoire)object
Réponses
  • 200 Any 2xx acknowledges the event

EVENTask.expired

An ask expired without answer

Corps de la requête AskExpiredEvent
ChampTypeDescription
id (obligatoire)string (uuid)Event id; the same event is delivered with the same id on every retry
type (obligatoire)"ask.expired"
apiVersion (obligatoire)"2026-11-01"
createdAt (obligatoire)string (date-time)RFC 3339 date-time
data (obligatoire)object
Réponses
  • 200 Any 2xx acknowledges the event

EVENTcontact.created

A contact was created

Corps de la requête ContactCreatedEvent
ChampTypeDescription
id (obligatoire)string (uuid)Event id; the same event is delivered with the same id on every retry
type (obligatoire)"contact.created"
apiVersion (obligatoire)"2026-11-01"
createdAt (obligatoire)string (date-time)RFC 3339 date-time
data (obligatoire)object
Réponses
  • 200 Any 2xx acknowledges the event