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
| Champ | Type | Description |
|---|---|---|
limit (query) | integer | Page size (1 to 100, default 20) |
cursor (query) | string | Opaque cursor from `nextCursor` of the previous page |
status (query) | CallStatus | |
direction (query) | CallDirection | |
contactId (query) | string (uuid) | Resource id (UUIDv7) |
Réponses
200Calls, newest firstCallList400Invalid request (validation error)Error401Missing or invalid API keyError403The API key lacks the required scopeError429Rate limited; retry after `Retry-After` secondsError500Internal errorError
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
| Champ | Type | Description |
|---|---|---|
Idempotency-Key (header) | string | Makes 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
| Champ | Type | Description |
|---|---|---|
to | E164 | Number to call. Exactly one of `to`, `contactId` or `owner` is required |
contactId | string (uuid) | Contact to call (must have the `callable` permission) |
owner | true | Call the account owner on their own phone ("call me") |
prompt (obligatoire) | string | What the assistant must do on this call, in natural language |
language | Language | Defaults to the contact's language, then the assistant's |
voice | string | |
maxMinutes | integer | Default: 10. Range: 1 to 60. |
useContactMemory | boolean | Give the assistant the contact's notes and history Default: true. |
reportToOwner | boolean | Mission: 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. |
webhookUrl | string (uri) | Receives this call's events in addition to the account's webhook endpoints |
metadata | Metadata | Free key/value strings attached by the developer (max 20 keys). Returned as is, never spoken. |
Réponses
201The call, usually `queued`Call400Invalid request (validation error)Error401Missing or invalid API keyError402Minute budget exhausted (`quota_exceeded`)Error403The API key lacks the required scopeError404Contact not foundError409Idempotency key reused with another bodyError422Call policy refused the call (`policy_violation`)Error429Rate limited; retry after `Retry-After` secondsError500Internal errorError
GET/v1/calls/{callId}
Get a call (with transcript)
Portée de la clé: calls:read
Paramètres
| Champ | Type | Description |
|---|---|---|
callId (path) (obligatoire) | string (uuid) | Resource id (UUIDv7) |
Réponses
200The callCall400Invalid request (validation error)Error401Missing or invalid API keyError403The API key lacks the required scopeError404Call not foundError429Rate limited; retry after `Retry-After` secondsError500Internal errorError
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
| Champ | Type | Description |
|---|---|---|
callId (path) (obligatoire) | string (uuid) | Resource id (UUIDv7) |
Réponses
200The callCall400Invalid request (validation error)Error401Missing or invalid API keyError403The API key lacks the required scopeError404Call not foundError429Rate limited; retry after `Retry-After` secondsError500Internal errorError
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
| Champ | Type | Description |
|---|---|---|
callId (path) (obligatoire) | string (uuid) | Resource id (UUIDv7) |
Corps de la requête SayInCallRequest
| Champ | Type | Description |
|---|---|---|
text (obligatoire) | string | What the assistant says now, as information to relay |
interrupt | boolean | Cut the assistant off if it is speaking Default: false. |
Réponses
202Queued for the assistantAccepted400Invalid request (validation error)Error401Missing or invalid API keyError403The API key lacks the required scopeError404Call not foundError409The call is not in progress (`conflict`)Error429Rate limited; retry after `Retry-After` secondsError500Internal errorError
Asks
Ask a human by phone (ask_owner, ask_contact)
GET/v1/asks
List asks
Portée de la clé: asks:read
Paramètres
| Champ | Type | Description |
|---|---|---|
limit (query) | integer | Page size (1 to 100, default 20) |
cursor (query) | string | Opaque cursor from `nextCursor` of the previous page |
status (query) | "pending" | "calling" | "answered" | "unanswered" | "expired" | "failed" | "canceled" |
Réponses
200Asks, newest firstAskList400Invalid request (validation error)Error401Missing or invalid API keyError403The API key lacks the required scopeError429Rate limited; retry after `Retry-After` secondsError500Internal errorError
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
| Champ | Type | Description |
|---|---|---|
Idempotency-Key (header) | string | Makes 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
201The ask, `pending`Ask400Invalid request (validation error)Error401Missing or invalid API keyError403The API key lacks the required scopeError404Contact not foundError409Idempotency key reused with another bodyError422Call policy refused the callError429Rate limited; retry after `Retry-After` secondsError500Internal errorError
GET/v1/asks/{askId}
Get an ask
Portée de la clé: asks:read
Paramètres
| Champ | Type | Description |
|---|---|---|
askId (path) (obligatoire) | string (uuid) | Resource id (UUIDv7) |
Réponses
200The askAsk400Invalid request (validation error)Error401Missing or invalid API keyError403The API key lacks the required scopeError404Ask not foundError429Rate limited; retry after `Retry-After` secondsError500Internal errorError
POST/v1/asks/{askId}/cancel
Cancel an ask
Portée de la clé: asks:write
Paramètres
| Champ | Type | Description |
|---|---|---|
askId (path) (obligatoire) | string (uuid) | Resource id (UUIDv7) |
Réponses
200The ask, `canceled`Ask400Invalid request (validation error)Error401Missing or invalid API keyError403The API key lacks the required scopeError404Ask not foundError429Rate limited; retry after `Retry-After` secondsError500Internal errorError
Schedules
GET/v1/schedules
List schedules
Portée de la clé: schedules:read
Paramètres
| Champ | Type | Description |
|---|---|---|
limit (query) | integer | Page size (1 to 100, default 20) |
cursor (query) | string | Opaque cursor from `nextCursor` of the previous page |
status (query) | ScheduleStatus |
Réponses
200Schedules, newest firstScheduleList400Invalid request (validation error)Error401Missing or invalid API keyError403The API key lacks the required scopeError429Rate limited; retry after `Retry-After` secondsError500Internal errorError
POST/v1/schedules
Schedule a call (one-off or recurring)
Portée de la clé: schedules:write
Paramètres
| Champ | Type | Description |
|---|---|---|
Idempotency-Key (header) | string | Makes 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
| Champ | Type | Description |
|---|---|---|
contactId | string (uuid) | Omit to call the owner |
prompt (obligatoire) | string | |
rrule | string | RFC 5545 recurrence rule, evaluated in `timezone` |
runAt | string (date-time) | RFC 3339 date-time |
timezone | string | IANA time zone Default: "Europe/Paris". |
language | Language | BCP 47 language tag (language, optional region) |
voice | string | |
maxMinutes | integer | Default: 10. Range: 1 to 60. |
metadata | Metadata | Free key/value strings attached by the developer (max 20 keys). Returned as is, never spoken. |
Réponses
201The scheduleSchedule400Invalid request (validation error)Error401Missing or invalid API keyError403The API key lacks the required scopeError404Contact not foundError409Idempotency key reusedError422Schedule refused (rule too frequent, or `runAt` in the past)Error429Rate limited; retry after `Retry-After` secondsError500Internal errorError
GET/v1/schedules/{scheduleId}
Get a schedule
Portée de la clé: schedules:read
Paramètres
| Champ | Type | Description |
|---|---|---|
scheduleId (path) (obligatoire) | string (uuid) | Resource id (UUIDv7) |
Réponses
200The scheduleSchedule400Invalid request (validation error)Error401Missing or invalid API keyError403The API key lacks the required scopeError404Schedule not foundError429Rate limited; retry after `Retry-After` secondsError500Internal errorError
PATCH/v1/schedules/{scheduleId}
Update, pause or resume a schedule
Portée de la clé: schedules:write
Paramètres
| Champ | Type | Description |
|---|---|---|
scheduleId (path) (obligatoire) | string (uuid) | Resource id (UUIDv7) |
Corps de la requête UpdateScheduleRequest
| Champ | Type | Description |
|---|---|---|
status | "active" | "paused" | |
prompt | string | |
rrule | string | null | |
runAt | string (date-time) | null | |
timezone | string | IANA time zone |
language | Language | null | |
voice | string | null | |
maxMinutes | integer | Range: 1 to 60. |
metadata | Metadata | Free key/value strings attached by the developer (max 20 keys). Returned as is, never spoken. |
Réponses
200The scheduleSchedule400Invalid request (validation error)Error401Missing or invalid API keyError403The API key lacks the required scopeError404Schedule not foundError429Rate limited; retry after `Retry-After` secondsError500Internal errorError
DELETE/v1/schedules/{scheduleId}
Delete a schedule
Portée de la clé: schedules:write
Paramètres
| Champ | Type | Description |
|---|---|---|
scheduleId (path) (obligatoire) | string (uuid) | Resource id (UUIDv7) |
Réponses
200DeletedDeleted400Invalid request (validation error)Error401Missing or invalid API keyError403The API key lacks the required scopeError404Schedule not foundError429Rate limited; retry after `Retry-After` secondsError500Internal errorError
Contacts
Contacts with memory: notes and commitments
GET/v1/contacts
List contacts
Portée de la clé: contacts:read
Paramètres
| Champ | Type | Description |
|---|---|---|
limit (query) | integer | Page size (1 to 100, default 20) |
cursor (query) | string | Opaque cursor from `nextCursor` of the previous page |
q (query) | string | Search by name or number |
Réponses
200Contacts, newest firstContactList400Invalid request (validation error)Error401Missing or invalid API keyError403The API key lacks the required scopeError429Rate limited; retry after `Retry-After` secondsError500Internal errorError
POST/v1/contacts
Create a contact
Portée de la clé: contacts:write
Paramètres
| Champ | Type | Description |
|---|---|---|
Idempotency-Key (header) | string | Makes 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
| Champ | Type | Description |
|---|---|---|
name (obligatoire) | string | |
numbers (obligatoire) | E164[] | |
relationship | string | |
language | Language | BCP 47 language tag (language, optional region) Default: "fr". |
formality | "tu" | "vous" | Default: "vous". |
permissions | object |
Réponses
201The contactContact400Invalid request (validation error)Error401Missing or invalid API keyError403The API key lacks the required scopeError409Idempotency key reusedError429Rate limited; retry after `Retry-After` secondsError500Internal errorError
GET/v1/contacts/{contactId}
Get a contact
Portée de la clé: contacts:read
Paramètres
| Champ | Type | Description |
|---|---|---|
contactId (path) (obligatoire) | string (uuid) | Resource id (UUIDv7) |
Réponses
200The contactContact400Invalid request (validation error)Error401Missing or invalid API keyError403The API key lacks the required scopeError404Contact not foundError429Rate limited; retry after `Retry-After` secondsError500Internal errorError
PATCH/v1/contacts/{contactId}
Update a contact
Portée de la clé: contacts:write
Paramètres
| Champ | Type | Description |
|---|---|---|
contactId (path) (obligatoire) | string (uuid) | Resource id (UUIDv7) |
Corps de la requête UpdateContactRequest
| Champ | Type | Description |
|---|---|---|
name | string | |
numbers | E164[] | |
relationship | string | null | |
language | Language | BCP 47 language tag (language, optional region) |
formality | "tu" | "vous" | |
permissions | object |
Réponses
200The contactContact400Invalid request (validation error)Error401Missing or invalid API keyError403The API key lacks the required scopeError404Contact not foundError429Rate limited; retry after `Retry-After` secondsError500Internal errorError
DELETE/v1/contacts/{contactId}
Delete a contact (with its notes and commitments)
Portée de la clé: contacts:write
Paramètres
| Champ | Type | Description |
|---|---|---|
contactId (path) (obligatoire) | string (uuid) | Resource id (UUIDv7) |
Réponses
200DeletedDeleted400Invalid request (validation error)Error401Missing or invalid API keyError403The API key lacks the required scopeError404Contact not foundError429Rate limited; retry after `Retry-After` secondsError500Internal errorError
GET/v1/contacts/{contactId}/notes
List a contact's notes
Portée de la clé: contacts:read
Paramètres
| Champ | Type | Description |
|---|---|---|
contactId (path) (obligatoire) | string (uuid) | Resource id (UUIDv7) |
limit (query) | integer | Page size (1 to 100, default 20) |
cursor (query) | string | Opaque cursor from `nextCursor` of the previous page |
Réponses
200Notes, newest firstContactNoteList400Invalid request (validation error)Error401Missing or invalid API keyError403The API key lacks the required scopeError404Contact not foundError429Rate limited; retry after `Retry-After` secondsError500Internal errorError
POST/v1/contacts/{contactId}/notes
Add a note to a contact
Portée de la clé: contacts:write
Paramètres
| Champ | Type | Description |
|---|---|---|
contactId (path) (obligatoire) | string (uuid) | Resource id (UUIDv7) |
Corps de la requête CreateContactNoteRequest
| Champ | Type | Description |
|---|---|---|
text (obligatoire) | string |
Réponses
201The note, `confirmed`ContactNote400Invalid request (validation error)Error401Missing or invalid API keyError403The API key lacks the required scopeError404Contact not foundError429Rate limited; retry after `Retry-After` secondsError500Internal errorError
PATCH/v1/contacts/{contactId}/notes/{noteId}
Edit, confirm or reject a note
Portée de la clé: contacts:write
Paramètres
| Champ | Type | Description |
|---|---|---|
contactId (path) (obligatoire) | string (uuid) | Resource id (UUIDv7) |
noteId (path) (obligatoire) | string (uuid) | Resource id (UUIDv7) |
Corps de la requête UpdateContactNoteRequest
| Champ | Type | Description |
|---|---|---|
text | string | |
status | "proposed" | "confirmed" | "rejected" |
Réponses
200The noteContactNote400Invalid request (validation error)Error401Missing or invalid API keyError403The API key lacks the required scopeError404Note not foundError429Rate limited; retry after `Retry-After` secondsError500Internal errorError
DELETE/v1/contacts/{contactId}/notes/{noteId}
Delete a note
Portée de la clé: contacts:write
Paramètres
| Champ | Type | Description |
|---|---|---|
contactId (path) (obligatoire) | string (uuid) | Resource id (UUIDv7) |
noteId (path) (obligatoire) | string (uuid) | Resource id (UUIDv7) |
Réponses
200DeletedDeleted400Invalid request (validation error)Error401Missing or invalid API keyError403The API key lacks the required scopeError404Note not foundError429Rate limited; retry after `Retry-After` secondsError500Internal errorError
GET/v1/contacts/{contactId}/commitments
List a contact's commitments
Portée de la clé: contacts:read
Paramètres
| Champ | Type | Description |
|---|---|---|
contactId (path) (obligatoire) | string (uuid) | Resource id (UUIDv7) |
limit (query) | integer | Page size (1 to 100, default 20) |
cursor (query) | string | Opaque cursor from `nextCursor` of the previous page |
Réponses
200Commitments, newest firstCommitmentList400Invalid request (validation error)Error401Missing or invalid API keyError403The API key lacks the required scopeError404Contact not foundError429Rate limited; retry after `Retry-After` secondsError500Internal errorError
POST/v1/contacts/{contactId}/commitments
Add a commitment
Portée de la clé: contacts:write
Paramètres
| Champ | Type | Description |
|---|---|---|
contactId (path) (obligatoire) | string (uuid) | Resource id (UUIDv7) |
Corps de la requête CreateCommitmentRequest
| Champ | Type | Description |
|---|---|---|
text (obligatoire) | string | |
dueAt | string (date-time) | RFC 3339 date-time |
Réponses
201The commitment, `open`Commitment400Invalid request (validation error)Error401Missing or invalid API keyError403The API key lacks the required scopeError404Contact not foundError429Rate limited; retry after `Retry-After` secondsError500Internal errorError
PATCH/v1/contacts/{contactId}/commitments/{commitmentId}
Update or close a commitment
Portée de la clé: contacts:write
Paramètres
| Champ | Type | Description |
|---|---|---|
contactId (path) (obligatoire) | string (uuid) | Resource id (UUIDv7) |
commitmentId (path) (obligatoire) | string (uuid) | Resource id (UUIDv7) |
Corps de la requête UpdateCommitmentRequest
| Champ | Type | Description |
|---|---|---|
text | string | |
dueAt | string (date-time) | null | |
status | "proposed" | "open" | "done" | "canceled" |
Réponses
200The commitmentCommitment400Invalid request (validation error)Error401Missing or invalid API keyError403The API key lacks the required scopeError404Commitment not foundError429Rate limited; retry after `Retry-After` secondsError500Internal errorError
DELETE/v1/contacts/{contactId}/commitments/{commitmentId}
Delete a commitment
Portée de la clé: contacts:write
Paramètres
| Champ | Type | Description |
|---|---|---|
contactId (path) (obligatoire) | string (uuid) | Resource id (UUIDv7) |
commitmentId (path) (obligatoire) | string (uuid) | Resource id (UUIDv7) |
Réponses
200DeletedDeleted400Invalid request (validation error)Error401Missing or invalid API keyError403The API key lacks the required scopeError404Commitment not foundError429Rate limited; retry after `Retry-After` secondsError500Internal errorError
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
| Champ | Type | Description |
|---|---|---|
q (query) (obligatoire) | string | Words to look for |
contactId (query) | string (uuid) | Only search this contact's memory |
limit (query) | integer | Maximum hits (1 to 50, default 10) |
Réponses
200Matches, best firstMemorySearchResult400Invalid request (validation error)Error401Missing or invalid API keyError403The API key lacks the required scopeError429Rate limited; retry after `Retry-After` secondsError500Internal errorError
Assistants
GET/v1/assistants
List assistants
Portée de la clé: assistants:read
One assistant per user in v1.
Paramètres
| Champ | Type | Description |
|---|---|---|
limit (query) | integer | Page size (1 to 100, default 20) |
cursor (query) | string | Opaque cursor from `nextCursor` of the previous page |
Réponses
200AssistantsAssistantList400Invalid request (validation error)Error401Missing or invalid API keyError403The API key lacks the required scopeError429Rate limited; retry after `Retry-After` secondsError500Internal errorError
GET/v1/assistants/{assistantId}
Get an assistant
Portée de la clé: assistants:read
Paramètres
| Champ | Type | Description |
|---|---|---|
assistantId (path) (obligatoire) | string (uuid) | Resource id (UUIDv7) |
Réponses
200The assistantAssistant400Invalid request (validation error)Error401Missing or invalid API keyError403The API key lacks the required scopeError404Assistant not foundError429Rate limited; retry after `Retry-After` secondsError500Internal errorError
PATCH/v1/assistants/{assistantId}
Update an assistant
Portée de la clé: assistants:write
Paramètres
| Champ | Type | Description |
|---|---|---|
assistantId (path) (obligatoire) | string (uuid) | Resource id (UUIDv7) |
Corps de la requête UpdateAssistantRequest
| Champ | Type | Description |
|---|---|---|
name | string | |
voice | string | |
language | Language | BCP 47 language tag (language, optional region) |
persona | string | null | |
instructions | string | null | |
aiDisclosure | boolean | |
recording | boolean | |
unknownCallers | "take_message" | "reject" | |
hours | AssistantHours | null | |
websiteUrl | string (uri) | null |
Réponses
200The assistantAssistant400Invalid request (validation error)Error401Missing or invalid API keyError403The API key lacks the required scopeError404Assistant not foundError422Setting not allowed (AI disclosure cannot be turned off in the cloud)Error429Rate limited; retry after `Retry-After` secondsError500Internal errorError
Numbers
GET/v1/numbers
List phone numbers
Portée de la clé: numbers:read
Paramètres
| Champ | Type | Description |
|---|---|---|
limit (query) | integer | Page size (1 to 100, default 20) |
cursor (query) | string | Opaque cursor from `nextCursor` of the previous page |
Réponses
200NumbersPhoneNumberList400Invalid request (validation error)Error401Missing or invalid API keyError403The API key lacks the required scopeError429Rate limited; retry after `Retry-After` secondsError500Internal errorError
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
| Champ | Type | Description |
|---|---|---|
Idempotency-Key (header) | string | Makes 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
| Champ | Type | Description |
|---|---|---|
country | "FR" | ISO 3166-1 alpha-2 country of the number Default: "FR". |
Réponses
202Request accepted; the number appears as `pending`Accepted400Invalid request (validation error)Error401Missing or invalid API keyError403The API key lacks the required scopeError422Provisioning not available for this account (`policy_violation`)Error429Rate limited; retry after `Retry-After` secondsError500Internal errorError
GET/v1/numbers/{numberId}
Get a phone number
Portée de la clé: numbers:read
Paramètres
| Champ | Type | Description |
|---|---|---|
numberId (path) (obligatoire) | string (uuid) | Resource id (UUIDv7) |
Réponses
200The numberPhoneNumber400Invalid request (validation error)Error401Missing or invalid API keyError403The API key lacks the required scopeError404Number not foundError429Rate limited; retry after `Retry-After` secondsError500Internal errorError
Webhooks
GET/v1/webhook-endpoints
List webhook endpoints
Portée de la clé: webhooks:read
Paramètres
| Champ | Type | Description |
|---|---|---|
limit (query) | integer | Page size (1 to 100, default 20) |
cursor (query) | string | Opaque cursor from `nextCursor` of the previous page |
Réponses
200EndpointsWebhookEndpointList400Invalid request (validation error)Error401Missing or invalid API keyError403The API key lacks the required scopeError429Rate limited; retry after `Retry-After` secondsError500Internal errorError
POST/v1/webhook-endpoints
Create a webhook endpoint
Portée de la clé: webhooks:write
Paramètres
| Champ | Type | Description |
|---|---|---|
Idempotency-Key (header) | string | Makes 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
| Champ | Type | Description |
|---|---|---|
url (obligatoire) | string (uri) | |
description | string | |
events (obligatoire) | WebhookEventType[] | |
enabled | boolean | Default: true. |
Réponses
201The endpoint, with its signing secretWebhookEndpointWithSecret400Invalid request (validation error)Error401Missing or invalid API keyError403The API key lacks the required scopeError409Idempotency key reusedError422The endpoint URL is not a public https URLError429Rate limited; retry after `Retry-After` secondsError500Internal errorError
GET/v1/webhook-endpoints/{endpointId}
Get a webhook endpoint
Portée de la clé: webhooks:read
Paramètres
| Champ | Type | Description |
|---|---|---|
endpointId (path) (obligatoire) | string (uuid) | Resource id (UUIDv7) |
Réponses
200The endpointWebhookEndpoint400Invalid request (validation error)Error401Missing or invalid API keyError403The API key lacks the required scopeError404Endpoint not foundError429Rate limited; retry after `Retry-After` secondsError500Internal errorError
PATCH/v1/webhook-endpoints/{endpointId}
Update a webhook endpoint
Portée de la clé: webhooks:write
Paramètres
| Champ | Type | Description |
|---|---|---|
endpointId (path) (obligatoire) | string (uuid) | Resource id (UUIDv7) |
Corps de la requête UpdateWebhookEndpointRequest
| Champ | Type | Description |
|---|---|---|
url | string (uri) | |
description | string | null | |
events | WebhookEventType[] | |
enabled | boolean |
Réponses
200The endpointWebhookEndpoint400Invalid request (validation error)Error401Missing or invalid API keyError403The API key lacks the required scopeError404Endpoint not foundError429Rate limited; retry after `Retry-After` secondsError500Internal errorError
DELETE/v1/webhook-endpoints/{endpointId}
Delete a webhook endpoint
Portée de la clé: webhooks:write
Paramètres
| Champ | Type | Description |
|---|---|---|
endpointId (path) (obligatoire) | string (uuid) | Resource id (UUIDv7) |
Réponses
200DeletedDeleted400Invalid request (validation error)Error401Missing or invalid API keyError403The API key lacks the required scopeError404Endpoint not foundError429Rate limited; retry after `Retry-After` secondsError500Internal errorError
POST/v1/webhook-endpoints/{endpointId}/rotate-secret
Rotate the signing secret
Portée de la clé: webhooks:write
Paramètres
| Champ | Type | Description |
|---|---|---|
endpointId (path) (obligatoire) | string (uuid) | Resource id (UUIDv7) |
Réponses
200The endpoint, with its new secretWebhookEndpointWithSecret400Invalid request (validation error)Error401Missing or invalid API keyError403The API key lacks the required scopeError404Endpoint not foundError429Rate limited; retry after `Retry-After` secondsError500Internal errorError
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
| Champ | Type | Description |
|---|---|---|
endpointId (path) (obligatoire) | string (uuid) | Resource id (UUIDv7) |
Corps de la requête TestWebhookEndpointRequest
| Champ | Type | Description |
|---|---|---|
type | WebhookEventType | Event type of the sample payload Default: "call.completed". |
Réponses
200The delivery, `succeeded` or `failed`WebhookDelivery400Invalid request (validation error)Error401Missing or invalid API keyError403The API key lacks the required scopeError404Endpoint not foundError422The endpoint URL is not a public https URLError429Rate limited; retry after `Retry-After` secondsError500Internal errorError
GET/v1/webhook-endpoints/{endpointId}/deliveries
List deliveries of an endpoint
Portée de la clé: webhooks:read
Paramètres
| Champ | Type | Description |
|---|---|---|
endpointId (path) (obligatoire) | string (uuid) | Resource id (UUIDv7) |
limit (query) | integer | Page size (1 to 100, default 20) |
cursor (query) | string | Opaque cursor from `nextCursor` of the previous page |
status (query) | "pending" | "succeeded" | "failed" |
Réponses
200Deliveries, newest firstWebhookDeliveryList400Invalid request (validation error)Error401Missing or invalid API keyError403The API key lacks the required scopeError404Endpoint not foundError429Rate limited; retry after `Retry-After` secondsError500Internal errorError
API keys
GET/v1/api-keys
List API keys
Portée de la clé: api_keys:read
Paramètres
| Champ | Type | Description |
|---|---|---|
limit (query) | integer | Page size (1 to 100, default 20) |
cursor (query) | string | Opaque cursor from `nextCursor` of the previous page |
Réponses
200Keys (never the secret)ApiKeyList400Invalid request (validation error)Error401Missing or invalid API keyError403The API key lacks the required scopeError429Rate limited; retry after `Retry-After` secondsError500Internal errorError
POST/v1/api-keys
Create an API key
Portée de la clé: api_keys:write
Paramètres
| Champ | Type | Description |
|---|---|---|
Idempotency-Key (header) | string | Makes 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
| Champ | Type | Description |
|---|---|---|
name (obligatoire) | string | |
mode | "live" | "test" | Default: "live". |
scopes | ApiScope[] | Defaults to every scope |
expiresAt | string (date-time) | RFC 3339 date-time |
Réponses
201The key; `key` is shown only onceCreatedApiKey400Invalid request (validation error)Error401Missing or invalid API keyError403The API key lacks the required scopeError409Idempotency key reusedError429Rate limited; retry after `Retry-After` secondsError500Internal errorError
DELETE/v1/api-keys/{apiKeyId}
Revoke an API key
Portée de la clé: api_keys:write
Paramètres
| Champ | Type | Description |
|---|---|---|
apiKeyId (path) (obligatoire) | string (uuid) | Resource id (UUIDv7) |
Réponses
200RevokedDeleted400Invalid request (validation error)Error401Missing or invalid API keyError403The API key lacks the required scopeError404API key not foundError429Rate limited; retry after `Retry-After` secondsError500Internal errorError
Usage
GET/v1/usage
Minutes used in a billing period
Portée de la clé: usage:read
Paramètres
| Champ | Type | Description |
|---|---|---|
period (query) | string | Month to report, defaults to the current one |
Réponses
200Usage of the periodUsage400Invalid request (validation error)Error401Missing or invalid API keyError403The API key lacks the required scopeError429Rate limited; retry after `Retry-After` secondsError500Internal errorError
É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
| Champ | Type | Description |
|---|---|---|
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
200Any 2xx acknowledges the event
EVENTcall.completed
A call ended normally
Corps de la requête CallCompletedEvent
| Champ | Type | Description |
|---|---|---|
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
200Any 2xx acknowledges the event
EVENTcall.failed
A call failed, was not answered or was canceled
Corps de la requête CallFailedEvent
| Champ | Type | Description |
|---|---|---|
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
200Any 2xx acknowledges the event
EVENTask.answered
An ask got its answer
Corps de la requête AskAnsweredEvent
| Champ | Type | Description |
|---|---|---|
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
200Any 2xx acknowledges the event
EVENTask.expired
An ask expired without answer
Corps de la requête AskExpiredEvent
| Champ | Type | Description |
|---|---|---|
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
200Any 2xx acknowledges the event
EVENTcontact.created
A contact was created
Corps de la requête ContactCreatedEvent
| Champ | Type | Description |
|---|---|---|
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
200Any 2xx acknowledges the event