Trillet AI logo

Register your own number

Trillet OEM API: Registers a number you or your customer already own, over a SIP trunk or a Twilio account.

POSThttps://api.trillet.ai/partner/v1/tenants/{tenantId}/numbers/external

Registers a number you or your customer already own, over a SIP trunk or a Twilio account. Trillet does not bill these numbers. Needs numbers:write. Idempotency-Key is required.

Loading code example
Loading code example

Authorizations

Authorizationstringheaderrequired

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

tenantIdstringrequired

The tenant ID.

Pattern: ^[a-fA-F0-9]{24}$

Header Parameters

Idempotency-Keystringrequired

1 to 255 printable ASCII characters, no spaces. A retry with the same key and request returns the stored response for 24 hours instead of running again. Failed responses are stored too, except 5xx, 401, 403, 409 and 429: after fixing the cause of a 4xx such as 402 insufficient_funds, retry with a new key.

Length: >= 1, <= 255

Body

phoneNumberstringrequired

E.164 format. A number can be registered only once across Trillet.

Pattern: ^\+[1-9]\d{6,14}$
provider"sip" | "twilio"required
Allowed values: "sip" | "twilio"
credentialsobjectrequired

For sip: sipUri (where Trillet sends outbound calls), optional username and password, and optional ipAddresses your carrier sends calls from. Each entry in ipAddresses is an object: id (required, any string you choose, unique in the list), ip, and subnetMask (the prefix length as a string, for example "32"). A plain list of IP strings is refused with 400 number_registration_failed. For twilio: accountSid and authToken.

Response

application/json

The number.

objectstringrequired
idstringrequired

Use it as phoneNumberId when binding the number to an agent.

Pattern: ^[a-fA-F0-9]{24}$
tenantIdstringrequired
Pattern: ^[a-fA-F0-9]{24}$
phoneNumberstringrequired

E.164 format.

providerstring | null
typestring | null
externalbooleanrequired

true for numbers you registered yourself.

statusstring | null
agentIdstring | null
callFlowIdstring | null
billingany

Present for numbers bought through Trillet OEM, null for your own numbers.

createdAtstring | null<date-time>

Last updated on