{"openapi":"3.1.0","info":{"title":"Sendrail Messaging API","description":"Send transactional SMS and read their status. Authenticate with `Authorization: Bearer <API key>`.","version":"1.0"},"paths":{"/v1/messages":{"post":{"tags":["Messages"],"summary":"Send a message","operationId":"v1_send_v1_messages_post","parameters":[{"name":"idempotency-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Idempotency-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SendRequest"}}}},"responses":{"200":{"description":"A dry run (`status: dry_run`, nothing sent), or an earlier message returned instead of sending again (`duplicate: true`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Message"}}}},"202":{"description":"Accepted. Not sent yet: read the final status from the webhook or `GET /v1/messages/{id}`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Message"}}}},"400":{"description":"Error. `error.code`: missing_field, message_too_long, invalid_number, invalid_type, missing_variable.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Error. `error.code`: invalid_api_key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Error. `error.code`: insufficient_credit, trial_exhausted, plan_requires_credit.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Error. `error.code`: account_blocked, phone_not_verified, country_not_allowed, recipient_not_allowed, recipient_opted_out, trial_recipient.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Error. `error.code`: template_not_found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"The request body does not fit the schema (answer `{\"detail\": […]}`). Sending also answers 422 with `{\"error\": {\"code\": \"country_not_supported\"}}`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"429":{"description":"Error. `error.code`: rate_limited, daily_limit_reached, bulk_queue_full.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"502":{"description":"Error. `error.code`: gateway_error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"security":[{"ApiKey":[]}]},"get":{"tags":["Messages"],"summary":"List the messages of this key","description":"Messages sent with this API key, newest first, each with its text. `limit` is 1 to 100.\nFilter by `status` (queued, scheduled, sent, failed, cancelled, rejected) or by recipient `to`.\nFor the next, older page pass the `next_before` of the answer as `before`.","operationId":"v1_list_v1_messages_get","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":20,"title":"Limit"}},{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status"}},{"name":"to","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"To"}},{"name":"before","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Before"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MessageList"}}}},"400":{"description":"Error. `error.code`: invalid_field, invalid_number, invalid_cursor.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Error. `error.code`: invalid_api_key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"The request body does not fit the schema (answer `{\"detail\": […]}`). Sending also answers 422 with `{\"error\": {\"code\": \"country_not_supported\"}}`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"ApiKey":[]}]}},"/v1/messages/batch":{"post":{"tags":["Messages"],"summary":"Hand over a mass mailing (bulk)","description":"Up to 500 recipients per call. Every message is a bulk message: it waits for a free\nmoment of the gateway and is priced by the bulk price list. Each recipient gets its own result.","operationId":"v1_batch_v1_messages_batch_post","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BatchRequest"}}}},"responses":{"200":{"description":"A dry run: nothing sent.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Batch"}}}},"202":{"description":"Handed over; every recipient has its own result.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Batch"}}}},"400":{"description":"Error. `error.code`: missing_field, batch_too_large.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Error. `error.code`: invalid_api_key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Error. `error.code`: template_not_found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"The request body does not fit the schema (answer `{\"detail\": […]}`). Sending also answers 422 with `{\"error\": {\"code\": \"country_not_supported\"}}`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"ApiKey":[]}]}},"/v1/inbound":{"get":{"tags":["Inbound"],"summary":"Replies and missed calls","description":"Messages and calls from people this key has written to. Available on accounts with inbound switched on.","operationId":"v1_inbound_v1_inbound_get","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":50,"title":"Limit"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InboundList"}}}},"401":{"description":"Error. `error.code`: invalid_api_key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Error. `error.code`: inbound_not_enabled.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"The request body does not fit the schema (answer `{\"detail\": […]}`). Sending also answers 422 with `{\"error\": {\"code\": \"country_not_supported\"}}`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"ApiKey":[]}]}},"/v1/messages/{message_id}":{"get":{"tags":["Messages"],"summary":"Get a message and its status","operationId":"v1_get_v1_messages__message_id__get","parameters":[{"name":"message_id","in":"path","required":true,"schema":{"type":"string","title":"Message Id"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Message"}}}},"401":{"description":"Error. `error.code`: invalid_api_key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Error. `error.code`: not_found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"The request body does not fit the schema (answer `{\"detail\": […]}`). Sending also answers 422 with `{\"error\": {\"code\": \"country_not_supported\"}}`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"ApiKey":[]}]}},"/v1/messages/{message_id}/cancel":{"post":{"tags":["Messages"],"summary":"Cancel a message that has not left yet","operationId":"v1_cancel_v1_messages__message_id__cancel_post","parameters":[{"name":"message_id","in":"path","required":true,"schema":{"type":"string","title":"Message Id"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Message"}}}},"401":{"description":"Error. `error.code`: invalid_api_key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Error. `error.code`: not_found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Error. `error.code`: already_final, already_sending.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"The request body does not fit the schema (answer `{\"detail\": […]}`). Sending also answers 422 with `{\"error\": {\"code\": \"country_not_supported\"}}`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"502":{"description":"Error. `error.code`: gateway_error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"security":[{"ApiKey":[]}]}},"/v1/account":{"get":{"tags":["Account"],"summary":"Credit and trial balance","operationId":"v1_account_v1_account_get","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Account"}}}},"401":{"description":"Error. `error.code`: invalid_api_key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"The request body does not fit the schema (answer `{\"detail\": […]}`). Sending also answers 422 with `{\"error\": {\"code\": \"country_not_supported\"}}`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"ApiKey":[]}]}},"/v1/prices":{"get":{"tags":["Account"],"summary":"Price list per segment","operationId":"v1_prices_v1_prices_get","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Prices"}}}}}}},"/v1/numbers/check":{"post":{"tags":["Numbers"],"summary":"Check a phone number without sending","description":"Format, country, kind of number by the numbering plan, price of a segment, and whether this key\nand your opt-out list allow it. Free. It is not a live lookup in the mobile network.","operationId":"v1_numbers_check_v1_numbers_check_post","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NumberCheck"}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/NumberInfo"},{"$ref":"#/components/schemas/NumberList"}]}}}},"400":{"description":"Error. `error.code`: missing_field, batch_too_large.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Error. `error.code`: invalid_api_key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"The request body does not fit the schema (answer `{\"detail\": […]}`). Sending also answers 422 with `{\"error\": {\"code\": \"country_not_supported\"}}`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"ApiKey":[]}]}},"/v1/optouts":{"get":{"tags":["Opt-outs"],"summary":"Numbers you must not write to","operationId":"v1_optouts_v1_optouts_get","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":500,"title":"Limit"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OptoutList"}}}},"401":{"description":"Error. `error.code`: invalid_api_key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"The request body does not fit the schema (answer `{\"detail\": […]}`). Sending also answers 422 with `{\"error\": {\"code\": \"country_not_supported\"}}`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"ApiKey":[]}]},"post":{"tags":["Opt-outs"],"summary":"Add a number to the opt-out list","operationId":"v1_optout_add_v1_optouts_post","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OptoutRequest"}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Optout"}}}},"400":{"description":"Error. `error.code`: invalid_number, invalid_field.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Error. `error.code`: invalid_api_key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"The request body does not fit the schema (answer `{\"detail\": […]}`). Sending also answers 422 with `{\"error\": {\"code\": \"country_not_supported\"}}`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"ApiKey":[]}]}},"/v1/optouts/{number}":{"delete":{"tags":["Opt-outs"],"summary":"Remove a number from the opt-out list","operationId":"v1_optout_remove_v1_optouts__number__delete","parameters":[{"name":"number","in":"path","required":true,"schema":{"type":"string","title":"Number"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OptoutRemoved"}}}},"401":{"description":"Error. `error.code`: invalid_api_key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Error. `error.code`: not_found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"The request body does not fit the schema (answer `{\"detail\": […]}`). Sending also answers 422 with `{\"error\": {\"code\": \"country_not_supported\"}}`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"ApiKey":[]}]}},"/v1/webhook":{"get":{"tags":["Webhook"],"summary":"Webhook address and signing secret of the key","description":"Works only for a key whose owner switched on \"webhook managed through the API\" in the dashboard;\notherwise the answer is `403 webhook_api_disabled`. A key has one webhook address of its own;\nfurther ones are added with `POST /v1/webhooks`.","operationId":"v1_webhook_v1_webhook_get","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Webhook"}}}},"401":{"description":"Error. `error.code`: invalid_api_key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Error. `error.code`: webhook_api_disabled.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"The request body does not fit the schema (answer `{\"detail\": […]}`). Sending also answers 422 with `{\"error\": {\"code\": \"country_not_supported\"}}`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"ApiKey":[]}]},"put":{"tags":["Webhook"],"summary":"Set the webhook address of the key","operationId":"v1_webhook_set_v1_webhook_put","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookRequest"}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Webhook"}}}},"400":{"description":"Error. `error.code`: invalid_url.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Error. `error.code`: invalid_api_key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Error. `error.code`: webhook_api_disabled.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"The request body does not fit the schema (answer `{\"detail\": […]}`). Sending also answers 422 with `{\"error\": {\"code\": \"country_not_supported\"}}`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"ApiKey":[]}]},"delete":{"tags":["Webhook"],"summary":"Remove the webhook address of the key","operationId":"v1_webhook_remove_v1_webhook_delete","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Webhook"}}}},"401":{"description":"Error. `error.code`: invalid_api_key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Error. `error.code`: webhook_api_disabled.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"The request body does not fit the schema (answer `{\"detail\": […]}`). Sending also answers 422 with `{\"error\": {\"code\": \"country_not_supported\"}}`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"ApiKey":[]}]}},"/v1/webhooks":{"get":{"tags":["Webhook"],"summary":"List the further webhook addresses of the key","description":"Addresses added with `POST /v1/webhooks`. The address set in the dashboard or with `PUT /v1/webhook`\nis not among them. Needs the same owner's switch as `/v1/webhook`.","operationId":"v1_hooks_v1_webhooks_get","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookAddressList"}}}},"401":{"description":"Error. `error.code`: invalid_api_key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Error. `error.code`: webhook_api_disabled.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"The request body does not fit the schema (answer `{\"detail\": […]}`). Sending also answers 422 with `{\"error\": {\"code\": \"country_not_supported\"}}`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"ApiKey":[]}]},"post":{"tags":["Webhook"],"summary":"Add a webhook address to the key","description":"For integrations that subscribe by themselves (Make, Zapier, your own services): a key can have up to\n10 such addresses next to its own one, each with its own signing secret and its own choice of events.\nEvery address gets every chosen event once. Adding an address the key already has changes its events\nand answers `200` with the same `id` and `secret`. An address that answers `410 Gone` is removed.","operationId":"v1_hook_add_v1_webhooks_post","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookCreate"}}}},"responses":{"200":{"description":"The key already had this address; its events were replaced.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookAddress"}}}},"201":{"description":"Added.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookAddress"}}}},"400":{"description":"Error. `error.code`: invalid_url, invalid_field.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Error. `error.code`: invalid_api_key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Error. `error.code`: webhook_api_disabled.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Error. `error.code`: webhook_limit.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"The request body does not fit the schema (answer `{\"detail\": […]}`). Sending also answers 422 with `{\"error\": {\"code\": \"country_not_supported\"}}`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"ApiKey":[]}]}},"/v1/webhooks/{webhook_id}":{"delete":{"tags":["Webhook"],"summary":"Remove a webhook address from the key","operationId":"v1_hook_remove_v1_webhooks__webhook_id__delete","parameters":[{"name":"webhook_id","in":"path","required":true,"schema":{"type":"string","title":"Webhook Id"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookAddressRemoved"}}}},"401":{"description":"Error. `error.code`: invalid_api_key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Error. `error.code`: webhook_api_disabled.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Error. `error.code`: not_found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"The request body does not fit the schema (answer `{\"detail\": […]}`). Sending also answers 422 with `{\"error\": {\"code\": \"country_not_supported\"}}`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"ApiKey":[]}]}},"/v1/templates":{"get":{"tags":["Templates"],"summary":"Stored message templates","operationId":"v1_templates_v1_templates_get","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TemplateList"}}}},"401":{"description":"Error. `error.code`: invalid_api_key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"The request body does not fit the schema (answer `{\"detail\": […]}`). Sending also answers 422 with `{\"error\": {\"code\": \"country_not_supported\"}}`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"ApiKey":[]}]}},"/v1/templates/{name}":{"put":{"tags":["Templates"],"summary":"Create or change a template","operationId":"v1_template_put_v1_templates__name__put","parameters":[{"name":"name","in":"path","required":true,"schema":{"type":"string","title":"Name"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TemplateRequest"}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Template"}}}},"400":{"description":"Error. `error.code`: invalid_name, invalid_message, too_many.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Error. `error.code`: invalid_api_key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"The request body does not fit the schema (answer `{\"detail\": […]}`). Sending also answers 422 with `{\"error\": {\"code\": \"country_not_supported\"}}`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"ApiKey":[]}]},"delete":{"tags":["Templates"],"summary":"Delete a template","operationId":"v1_template_delete_v1_templates__name__delete","parameters":[{"name":"name","in":"path","required":true,"schema":{"type":"string","title":"Name"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TemplateRemoved"}}}},"401":{"description":"Error. `error.code`: invalid_api_key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Error. `error.code`: template_not_found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"The request body does not fit the schema (answer `{\"detail\": […]}`). Sending also answers 422 with `{\"error\": {\"code\": \"country_not_supported\"}}`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"ApiKey":[]}]}},"/v1/verify":{"post":{"tags":["Verify"],"summary":"Send a verification code","description":"We make the code, send it by SMS and remember it. Ask `/v1/verify/{id}/check` whether the\ncode your user typed is right. The SMS is charged as an ordinary message; checking is free.","operationId":"v1_verify_v1_verify_post","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VerifyRequest"}}}},"responses":{"202":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Verification"}}}},"400":{"description":"Error. `error.code`: invalid_field, invalid_number, template_without_code, missing_variable.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Error. `error.code`: invalid_api_key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Error. `error.code`: insufficient_credit, trial_exhausted, plan_requires_credit.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Error. `error.code`: account_blocked, phone_not_verified, country_not_allowed, recipient_not_allowed, recipient_opted_out, trial_recipient.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Error. `error.code`: template_not_found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"The request body does not fit the schema (answer `{\"detail\": […]}`). Sending also answers 422 with `{\"error\": {\"code\": \"country_not_supported\"}}`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"429":{"description":"Error. `error.code`: verify_rate_limited, rate_limited, daily_limit_reached.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"502":{"description":"Error. `error.code`: gateway_error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"security":[{"ApiKey":[]}]}},"/v1/verify/{verify_id}/check":{"post":{"tags":["Verify"],"summary":"Check the code the user typed","description":"`valid` is true exactly once: for the right code, in time, within five tries.","operationId":"v1_verify_check_v1_verify__verify_id__check_post","parameters":[{"name":"verify_id","in":"path","required":true,"schema":{"type":"string","title":"Verify Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VerifyCheck"}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Verification"}}}},"401":{"description":"Error. `error.code`: invalid_api_key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Error. `error.code`: not_found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"The request body does not fit the schema (answer `{\"detail\": […]}`). Sending also answers 422 with `{\"error\": {\"code\": \"country_not_supported\"}}`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"ApiKey":[]}]}},"/v1/verify/{verify_id}":{"get":{"tags":["Verify"],"summary":"State of a verification","operationId":"v1_verify_get_v1_verify__verify_id__get","parameters":[{"name":"verify_id","in":"path","required":true,"schema":{"type":"string","title":"Verify Id"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Verification"}}}},"401":{"description":"Error. `error.code`: invalid_api_key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Error. `error.code`: not_found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"The request body does not fit the schema (answer `{\"detail\": […]}`). Sending also answers 422 with `{\"error\": {\"code\": \"country_not_supported\"}}`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"ApiKey":[]}]}}},"components":{"schemas":{"BatchItem":{"properties":{"to":{"type":"string","title":"To"},"message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Message","description":"Text for this recipient; empty = the shared `message` of the batch."},"variables":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Variables","description":"This recipient's values for the batch `template`."},"idempotency_key":{"anyOf":[{"type":"string","maxLength":120},{"type":"null"}],"title":"Idempotency Key"}},"type":"object","required":["to"],"title":"BatchItem"},"BatchRequest":{"properties":{"message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Message","description":"Text shared by all recipients."},"template":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Template","description":"Name of a stored template used for every recipient instead of `message`."},"variables":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Variables","description":"Values shared by all recipients; a recipient's own `variables` win."},"to":{"anyOf":[{"items":{"type":"string"},"type":"array","maxItems":500},{"type":"null"}],"title":"To","description":"Recipients of the shared text."},"messages":{"anyOf":[{"items":{"$ref":"#/components/schemas/BatchItem"},"type":"array","maxItems":500},{"type":"null"}],"title":"Messages","description":"Recipients with their own texts."},"dry_run":{"type":"boolean","title":"Dry Run","default":false}},"type":"object","title":"BatchRequest"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"NumberCheck":{"properties":{"number":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Number","description":"One number to check.","examples":["+420777123456"]},"numbers":{"anyOf":[{"items":{"type":"string"},"type":"array","maxItems":100},{"type":"null"}],"title":"Numbers","description":"Up to 100 numbers to check at once."}},"type":"object","title":"NumberCheck"},"OptoutRequest":{"properties":{"number":{"type":"string","title":"Number","examples":["+420777123456"]},"scope":{"type":"string","title":"Scope","description":"`all` = nothing is sent to the number; `bulk` = only mass mailings are held back.","default":"all","enum":["all","bulk"]},"note":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Note"}},"type":"object","required":["number"],"title":"OptoutRequest"},"SendRequest":{"properties":{"to":{"type":"string","title":"To","description":"Recipient in international format, e.g. +420777123456","examples":["+420777123456"]},"message":{"anyOf":[{"type":"string","maxLength":1530},{"type":"null"}],"title":"Message","description":"Text of the message. Longer texts are split into segments. Leave out when sending a `template`.","examples":["Your code is 482913"]},"template":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Template","description":"Name of a stored template to send instead of `message`."},"variables":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Variables","description":"Values for the {{name}} places of the template."},"idempotency_key":{"anyOf":[{"type":"string","maxLength":120},{"type":"null"}],"title":"Idempotency Key","description":"Your own unique id of this message. A repeat with the same key returns the original message instead of sending again."},"dry_run":{"type":"boolean","title":"Dry Run","description":"Validate and price the message without sending or charging it.","default":false},"type":{"anyOf":[{"type":"string","enum":["normal","bulk"]},{"type":"null"}],"title":"Type","description":"Leave empty for transactional messages. `bulk` marks a mass mailing: lower price list, sent only when the gateway is free, never over the backup operator.","examples":["bulk"]}},"type":"object","required":["to"],"title":"SendRequest"},"TemplateRequest":{"properties":{"message":{"type":"string","title":"Message","description":"Text with {{name}} places.","examples":["Dobrý den {{name}}, vaše objednávka {{order}} je připravena."]}},"type":"object","required":["message"],"title":"TemplateRequest"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"},"VerifyCheck":{"properties":{"code":{"type":"string","title":"Code"}},"type":"object","required":["code"],"title":"VerifyCheck"},"VerifyRequest":{"properties":{"to":{"type":"string","title":"To","examples":["+420777123456"]},"length":{"type":"integer","title":"Length","description":"Digits of the code, 4 to 8.","default":6,"minimum":4,"maximum":8},"ttl":{"type":"integer","title":"Ttl","description":"Seconds the code is valid, 60 to 900.","default":300,"minimum":60,"maximum":900},"lang":{"type":"string","title":"Lang","description":"Language of the standard text: cs, sk or en.","default":"cs","enum":["cs","sk","en"]},"app":{"anyOf":[{"type":"string","maxLength":20},{"type":"null"}],"title":"App","description":"Name put in front of the standard text, e.g. your shop."},"template":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Template","description":"Your own stored template instead of the standard text. It must contain {{code}}; {{minutes}} and {{app}} are filled too."}},"type":"object","required":["to"],"title":"VerifyRequest"},"WebhookCreate":{"properties":{"url":{"type":"string","title":"Url","description":"Public https:// address that receives the events.","maxLength":500,"format":"uri"},"events":{"anyOf":[{"items":{"type":"string","enum":["message.final","message.received","call.missed","optout.created"]},"type":"array","maxItems":4},{"type":"null"}],"title":"Events","description":"Events to receive; all of them when left out."}},"type":"object","required":["url"],"title":"WebhookCreate"},"WebhookRequest":{"properties":{"url":{"type":"string","title":"Url","description":"Public https:// address that receives the events of this key.","maxLength":500,"format":"uri"}},"type":"object","required":["url"],"title":"WebhookRequest"},"ErrorBody":{"properties":{"code":{"description":"Stable machine-readable code, e.g. `invalid_number`, `insufficient_credit`, `rate_limited`.","title":"Code","type":"string"},"message":{"description":"Explanation in English for the developer.","title":"Message","type":"string"}},"required":["code","message"],"title":"ErrorBody","type":"object"},"Error":{"properties":{"error":{"$ref":"#/components/schemas/ErrorBody"}},"required":["error"],"title":"Error","type":"object"},"Message":{"properties":{"id":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"description":"`msg_…` (`msg_test_…` for a test key); null for a dry run.","title":"Id"},"status":{"description":"`queued` or `scheduled` (bulk waiting for a free moment) until the message is final: `sent`, `failed`, `cancelled` or `rejected`. `sent` means handed to the mobile network; there are no delivery receipts. A dry run answers `dry_run`.","enum":["queued","scheduled","sent","failed","cancelled","rejected","dry_run"],"title":"Status","type":"string"},"to":{"description":"Recipient in international format.","title":"To","type":"string"},"country":{"description":"ISO code of the recipient's country.","title":"Country","type":"string"},"segments":{"title":"Segments","type":"integer"},"encoding":{"description":"`GSM-7` or `UCS-2` (a text with characters outside the GSM alphabet has shorter segments).","title":"Encoding","type":"string"},"tier":{"description":"Plan the message was priced by: `standard`, `garance` or `bulk`.","title":"Tier","type":"string"},"type":{"description":"`normal` or `bulk`.","title":"Type","type":"string"},"price":{"description":"Price of the whole message in CZK without VAT; 0 for a trial message.","title":"Price","type":"number"},"currency":{"title":"Currency","type":"string"},"trial":{"title":"Trial","type":"boolean"},"via_backup_route":{"anyOf":[{"type":"boolean"},{"type":"null"}],"default":null,"description":"True when the message left through the backup operator (Garance plan).","title":"Via Backup Route"},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"description":"Why a message failed or was rejected.","title":"Error"},"test":{"anyOf":[{"type":"boolean"},{"type":"null"}],"default":null,"description":"True for a message of a test key: nothing was sent or charged.","title":"Test"},"created_at":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Created At"},"final_at":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Final At"},"duplicate":{"anyOf":[{"type":"boolean"},{"type":"null"}],"default":null,"description":"True when this is an earlier message returned instead of sending again (same `idempotency_key`, or the same text to the same number within five minutes).","title":"Duplicate"},"message":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"description":"Text of the message. Present only in `GET /v1/messages`.","title":"Message"}},"required":["status","to","country","segments","encoding","tier","type","price","currency","trial"],"title":"Message","type":"object"},"MessageList":{"properties":{"items":{"items":{"$ref":"#/components/schemas/Message"},"title":"Items","type":"array"},"next_before":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"description":"Pass as `before` to get the next, older page; null on the last page.","title":"Next Before"}},"required":["items"],"title":"MessageList","type":"object"},"BatchResult":{"properties":{"to":{"title":"To","type":"string"},"id":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Id"},"status":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Status"},"segments":{"anyOf":[{"type":"integer"},{"type":"null"}],"default":null,"title":"Segments"},"price":{"anyOf":[{"type":"number"},{"type":"null"}],"default":null,"title":"Price"},"error":{"anyOf":[{"$ref":"#/components/schemas/ErrorBody"},{"type":"null"}],"default":null}},"required":["to"],"title":"BatchResult","type":"object"},"Batch":{"properties":{"accepted":{"title":"Accepted","type":"integer"},"rejected":{"title":"Rejected","type":"integer"},"results":{"items":{"$ref":"#/components/schemas/BatchResult"},"title":"Results","type":"array"}},"required":["accepted","rejected","results"],"title":"Batch","type":"object"},"InboundItem":{"properties":{"type":{"description":"`message` or `missed_call`.","title":"Type","type":"string"},"id":{"title":"Id","type":"integer"},"from":{"description":"Number of the person.","title":"From","type":"string"},"message":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"description":"Text of the reply; null for a missed call.","title":"Message"},"received_at":{"title":"Received At","type":"string"}},"required":["type","id","from","received_at"],"title":"InboundItem","type":"object"},"InboundList":{"properties":{"items":{"items":{"$ref":"#/components/schemas/InboundItem"},"title":"Items","type":"array"}},"required":["items"],"title":"InboundList","type":"object"},"KeyInfo":{"properties":{"tier":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Tier"},"allowed_countries":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"description":"Comma-separated ISO codes; null = any country.","title":"Allowed Countries"},"limits":{"$ref":"#/components/schemas/KeyLimits"}},"required":["limits"],"title":"KeyInfo","type":"object"},"KeyLimits":{"properties":{"messages_per_day":{"anyOf":[{"type":"integer"},{"type":"null"}],"default":null,"title":"Messages Per Day"},"spend_per_day":{"anyOf":[{"type":"number"},{"type":"null"}],"default":null,"title":"Spend Per Day"},"allowed_recipients":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"default":null,"title":"Allowed Recipients"},"messages_last_24h":{"title":"Messages Last 24H","type":"integer"},"spend_last_24h":{"title":"Spend Last 24H","type":"number"}},"required":["messages_last_24h","spend_last_24h"],"title":"KeyLimits","type":"object"},"Account":{"properties":{"credit":{"title":"Credit","type":"number"},"bonus_credit":{"title":"Bonus Credit","type":"number"},"currency":{"title":"Currency","type":"string"},"trial_messages_left":{"title":"Trial Messages Left","type":"integer"},"trial_mode":{"description":"True until the first top-up: messages go only to the account's own verified number.","title":"Trial Mode","type":"boolean"},"key":{"$ref":"#/components/schemas/KeyInfo"}},"required":["credit","bonus_credit","currency","trial_messages_left","trial_mode","key"],"title":"Account","type":"object"},"Price":{"properties":{"country":{"title":"Country","type":"string"},"tier":{"title":"Tier","type":"string"},"price":{"description":"Price of one segment in CZK without VAT.","title":"Price","type":"number"}},"required":["country","tier","price"],"title":"Price","type":"object"},"Prices":{"properties":{"currency":{"title":"Currency","type":"string"},"vat_included":{"title":"Vat Included","type":"boolean"},"prices":{"items":{"$ref":"#/components/schemas/Price"},"title":"Prices","type":"array"}},"required":["currency","vat_included","prices"],"title":"Prices","type":"object"},"NumberInfo":{"properties":{"input":{"title":"Input","type":"string"},"valid":{"title":"Valid","type":"boolean"},"number":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"description":"The number in international format. This and the fields below are present only for a valid number.","title":"Number"},"country":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Country"},"type":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"description":"Kind of number by the numbering plan, `mobile`, `landline`, `special` or `unknown`.","title":"Type"},"sms_capable":{"anyOf":[{"type":"boolean"},{"type":"null"}],"default":null,"title":"Sms Capable"},"supported":{"anyOf":[{"type":"boolean"},{"type":"null"}],"default":null,"description":"Whether the key's plan can send to this country.","title":"Supported"},"price_per_segment":{"anyOf":[{"type":"number"},{"type":"null"}],"default":null,"title":"Price Per Segment"},"tier":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Tier"},"currency":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Currency"},"allowed_by_key":{"anyOf":[{"type":"boolean"},{"type":"null"}],"default":null,"title":"Allowed By Key"},"opted_out":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"description":"Scope of the opt-out (`all` or `bulk`) when the number is on the opt-out list.","title":"Opted Out"}},"required":["input","valid"],"title":"NumberInfo","type":"object"},"NumberList":{"description":"Answer when `numbers` (a list) was sent.","properties":{"results":{"items":{"$ref":"#/components/schemas/NumberInfo"},"title":"Results","type":"array"}},"required":["results"],"title":"NumberList","type":"object"},"Optout":{"properties":{"number":{"title":"Number","type":"string"},"scope":{"description":"`all` or `bulk`.","title":"Scope","type":"string"},"source":{"description":"`api`, `stop` (the person replied STOP) or `manual` (added in the dashboard).","title":"Source","type":"string"},"note":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Note"},"created_at":{"title":"Created At","type":"string"}},"required":["number","scope","source","created_at"],"title":"Optout","type":"object"},"OptoutList":{"properties":{"items":{"items":{"$ref":"#/components/schemas/Optout"},"title":"Items","type":"array"}},"required":["items"],"title":"OptoutList","type":"object"},"OptoutRemoved":{"properties":{"number":{"title":"Number","type":"string"},"removed":{"title":"Removed","type":"boolean"}},"required":["number","removed"],"title":"OptoutRemoved","type":"object"},"Template":{"properties":{"name":{"title":"Name","type":"string"},"message":{"title":"Message","type":"string"},"variables":{"items":{"type":"string"},"title":"Variables","type":"array"},"updated_at":{"title":"Updated At","type":"string"}},"required":["name","message","variables","updated_at"],"title":"Template","type":"object"},"TemplateList":{"properties":{"items":{"items":{"$ref":"#/components/schemas/Template"},"title":"Items","type":"array"}},"required":["items"],"title":"TemplateList","type":"object"},"TemplateRemoved":{"properties":{"name":{"title":"Name","type":"string"},"removed":{"title":"Removed","type":"boolean"}},"required":["name","removed"],"title":"TemplateRemoved","type":"object"},"Verification":{"properties":{"id":{"description":"`ver_…`","title":"Id","type":"string"},"status":{"description":"`pending`, `approved`, `failed` (five wrong tries), `expired` or `replaced` (a newer code was sent).","title":"Status","type":"string"},"to":{"title":"To","type":"string"},"expires_at":{"title":"Expires At","type":"string"},"attempts_left":{"title":"Attempts Left","type":"integer"},"message_id":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Message Id"},"created_at":{"title":"Created At","type":"string"},"segments":{"anyOf":[{"type":"integer"},{"type":"null"}],"default":null,"description":"Only in the answer to `POST /v1/verify`.","title":"Segments"},"price":{"anyOf":[{"type":"number"},{"type":"null"}],"default":null,"description":"Only in the answer to `POST /v1/verify`.","title":"Price"},"currency":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Currency"},"test_code":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"description":"The code itself, only for a test key (which sends nothing).","title":"Test Code"},"valid":{"anyOf":[{"type":"boolean"},{"type":"null"}],"default":null,"description":"Only in the answer to a check: true exactly once, for the right code in time.","title":"Valid"}},"required":["id","status","to","expires_at","attempts_left","created_at"],"title":"Verification","type":"object"},"Webhook":{"properties":{"url":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"description":"Address the events of this key are posted to; null when none is set.","title":"Url"},"secret":{"description":"Signing secret: `X-Sendrail-Signature` is `sha256=` + hex HMAC-SHA256 of the raw body keyed with it.","title":"Secret","type":"string"},"events":{"description":"Events a webhook receives.","items":{"type":"string"},"title":"Events","type":"array"}},"required":["secret","events"],"title":"Webhook","type":"object"},"WebhookAddress":{"properties":{"id":{"description":"`wh_…`","title":"Id","type":"string"},"url":{"title":"Url","type":"string"},"secret":{"description":"Signing secret of this address (`whsec_…`); events sent to it are signed with it, not with the key's secret.","title":"Secret","type":"string"},"events":{"description":"Events this address receives.","items":{"type":"string"},"title":"Events","type":"array"},"created_at":{"title":"Created At","type":"string"}},"required":["id","url","secret","events","created_at"],"title":"WebhookAddress","type":"object"},"WebhookAddressList":{"properties":{"items":{"items":{"$ref":"#/components/schemas/WebhookAddress"},"title":"Items","type":"array"}},"required":["items"],"title":"WebhookAddressList","type":"object"},"WebhookAddressRemoved":{"properties":{"id":{"title":"Id","type":"string"},"deleted":{"title":"Deleted","type":"boolean"}},"required":["id","deleted"],"title":"WebhookAddressRemoved","type":"object"},"WebhookEvent":{"description":"Body we POST to the key's webhook. `message.final` carries `message`, the other events `data`.","properties":{"id":{"description":"`evt_…`, the same for every repeat of one event. Use it to drop repeats.","title":"Id","type":"string"},"timestamp":{"description":"Unix time of this delivery attempt. Refuse bodies older than a few minutes to stop replays.","title":"Timestamp","type":"integer"},"event":{"enum":["message.final","message.received","call.missed","optout.created"],"title":"Event","type":"string"},"message":{"anyOf":[{"$ref":"#/components/schemas/Message"},{"type":"null"}],"default":null},"data":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"default":null,"title":"Data"}},"required":["id","timestamp","event"],"title":"WebhookEvent","type":"object"}},"securitySchemes":{"ApiKey":{"type":"http","scheme":"bearer","description":"API key from the dashboard: `Authorization: Bearer sr_live_…`. A key starting with `sr_test_` answers the same way but sends nothing and charges nothing. `X-API-Key: <key>` is accepted too."}}},"servers":[{"url":"https://api.sendrail.cz"}],"webhooks":{"event":{"post":{"summary":"Event posted to the webhook address of a key","description":"Signed with `X-Sendrail-Signature: sha256=<hex HMAC-SHA256 of the raw body, keyed with the key's signing secret>`. `X-Sendrail-Event-Id` and `X-Sendrail-Timestamp` repeat `id` and `timestamp` of the body. Answer 2xx within 5 seconds; otherwise the event is repeated after 1, 5, 15 minutes, 1 hour and 6 hours.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEvent"}}}},"responses":{"200":{"description":"Any 2xx acknowledges the event."}}}}}}