Send carrier sms on a secret version
Sends one SMS with a pinned same-environment carrier credential in Secrets.
Sends one SMS with a pinned same-environment carrier credential in Secrets. Requires an exact-version broker:sms:send grant and an Idempotency-Key. Returns only a carrier receipt; never exports credentials or retries on a different carrier. The credential is a JSON secret payload with provider "telnyx" and an api_key string. Receipts are retained for 24 hours. If the outcome is unknown, reconcile with the carrier before attempting a new send.
- Path
POST https://api.sylphx.com/v1/orgs/acme/projects/shop/envs/production/secrets/secret/secret_versions/secret-version:sendCarrierSms - Scope
broker:sms:send - Effect
write— a successful call changes state. - Collection secret_versions
Request
| Field | Type | What it is |
|---|---|---|
name | string | Exact SecretVersion name; the "latest" alias is not accepted. Required. |
sender_number | string | Sending number, in E.164 form. Required. Never returned again. |
recipient_number | string | Recipient number, in E.164 form. Required. Never returned again. |
text | string | Text to send, at most 1,600 UTF-8 bytes. Required. Never returned again. |
Response
| Field | Type | What it is |
|---|---|---|
receipt | string | Opaque carrier-assigned receipt, qualified with the carrier name. |
Errors
UNAUTHENTICATED— No valid key or token was presented.PERMISSION_DENIED— The key lacks the method's permission.RESOURCE_NOT_FOUND— The named Resource does not exist or is not visible.INVALID_FIELD— A field failed validation.INVALID_STATE— The Resource is in a state that forbids the call.RATE_LIMITED— The rate limit is reached; see Retry-After.UNAVAILABLE— The Resource store, the owning service's backend, or the key verifier's snapshot is unavailable; retry after Retry-After.IDEMPOTENCY_KEY_REUSED— An Idempotency-Key was reused with another body.IDEMPOTENCY_IN_PROGRESS— The first call with this Idempotency-Key is still running.
Every error arrives in the body Errors describes.
Examples
curl -X POST "https://api.sylphx.com/v1/orgs/acme/projects/shop/envs/production/secrets/secret/secret_versions/secret-version:sendCarrierSms" \
-H "Authorization: Bearer $SYLPHX_API_KEY" \
-H "Content-Type: application/json" \
-d '{"recipient_number":"…","sender_number":"…","text":"…"}'