SMS

Provision a US local number for an inbox

Requires inbox_update. A verified owner is required (HTTP 409 owner_required). One active number per inbox (HTTP 409 inbox_has_number). Free includes 0 numbers and returns HTTP 402 plan_limit_exceeded. Starter can hold up to 3. Pro includes 3 and caps at 25. A number past the included ones is $3/month and includes 100 segments. The same account can provision at most 3 numbers per 24 hours (HTTP 409 provision_limit) and waits 30 days before provisioning an E.164 it released (HTTP 409 number_cooldown). A paused inbox is HTTP 403 inbox_paused. With COOPER_SMS_BILLING=stripe, a billable number is added to the Stripe subscription (prorated) before Cooper buys it. If Stripe refuses, nothing is bought and the call returns HTTP 503 sms_billing_failed. billing.status is included or billed. Without that setting, billing.status is stub and this route does not call Stripe. Releasing later lowers the subscription quantity when billing is on. A grandfathered account is treated as Free for numbers unless it has a Starter or Pro subscription while SMS billing is on. Operators are not capped and are not billed. Idempotency-Key replays the same number. HTTP 404 not_found when SMS is off.

post/api/v1/inboxes/{id}/phone-number

Request

  • Base URL: https://cooperemail.com
  • URL: https://cooperemail.com/api/v1/inboxes/{id}/phone-number
  • Auth: HTTP bearer

Path parameters

idstring required

Headers

Idempotency-Keystring

Optional. 1 to 256 characters: letters, digits, and - . _ ~. The same key and the same request within 24 hours returns the stored message with HTTP 200, idempotent true, and Idempotent-Replayed: true, and does not send again. A different request is 409 idempotency_key_conflict. A second call while the first is still running is 409 idempotency_request_in_progress. An empty or invalid value is 400 invalid_idempotency_key. A failed send removes the key. When client_id is also set, client_id is checked first. Keys expire after 24 hours.

Request body

area_codestring

3-digit US area code.

phone_numberstring

E.164 US or Canada number.

Response

Idempotency-Key replay of the same request.

Changes

No recorded changes to this operation across all 1 revision of this API.