Skip to main content
POST
JavaScript

Authorizations

Authorization
string
header
required

Telnyx API key supplied as Authorization: Bearer <token>. In production, auth may be validated by the API gateway and forwarded via Telnyx auth headers.

Headers

Idempotency-Key
string
required

Required. Opaque, unquoted key for safely retrying the same purchase. Keys must contain 1 to 255 letters, numbers, hyphens, or underscores. Generate a unique UUID v4 for each purchase and reuse it only when retrying that purchase with the same request. A missing header, or an invalid one —including duplicate, empty, malformed, or overlong values—returns 400 with error code 10015. A request already in progress with the same key returns 409; reusing the key with a different request returns 422. Only successful responses are replayed, for up to 24 hours. Do not include sensitive data in the key.

Required string length: 1 - 255
Pattern: ^[A-Za-z0-9_-]{1,255}$

Body

application/json

Optional purchase selectors. Each supplied field restricts which stock IP is allocated; neither field is written to the IP. Omit the body or a field to apply no restriction for it. Other fields are ignored.

region
enum<string>

Allocate an IP in this region. Supported value: ewr-nj1. Any other value, including an empty string or null, returns 422.

Available options:
ewr-nj1
ip_version
enum<string>

Allocate an IP of this address family. Supported value: ipv4. Any other value, including ipv6 or null, returns 422.

Available options:
ipv4

Response

Dedicated IP allocated

data
object
required

A dedicated sending IP address owned by the account.