Skip to main content
POST
Issue a new SIP password
Issues a username-and-password trunk a new SIP password and returns it once, in sip_password. The username stays the same. Use it when a password was lost or may have leaked. Send no body (or an empty JSON object): Yappr issues the password, so it can’t be chosen. Requires sip_endpoints:manage; in the dashboard, only workspace owners and admins can issue a new password. Limit: 10 attempts per trunk in an hour that runs from the first attempt. The limit counts attempts, not new passwords issued; rotations_left in the answer says how many are left this hour (null if Yappr could not read it, which never affects the new password). The trunk’s password_rotated_at is when the password last changed, and updated_at moves with it; every later read of the trunk shows it.
The new password is in this response only. Store it now: neither the API nor the dashboard can show it again.

What happens to calls

  • The old password stops working within seconds. Your phone system’s next call with it is refused with SIP 403 Forbidden, so enter the new password right away.
  • Calls in progress are not dropped.
  • A phone system that registers learns of the change only at its next registration refresh, and that refresh fails until the new password is in.
To switch with no gap at all, create a second trunk on the same agent, move your phone system to it, then delete the old trunk. A SIP address endpoint has no password. Its address can’t be changed either: create a new endpoint, point your phone system at its sip_uri, then delete the old one.

Errors

Authorizations

Authorization
string
header
required

Your Yappr API key (e.g. ypr_live_...). Generate one in the dashboard under Settings → API Keys. No key is 401 MISSING_KEY; a key that is not one of ours, or is revoked, is 401 INVALID_KEY; an expired one is 401 EXPIRED_KEY. A valid key without the scope an operation needs is 403 INSUFFICIENT_SCOPE on every operation, and the message names the scope. Every response, a 401 included, carries X-RateLimit-Limit, X-RateLimit-Remaining and X-RateLimit-Reset: the budget is 60 requests a minute per API key. Every 429, whatever its code, carries Retry-After (whole seconds, never zero): the per-key budget's RATE_LIMIT asks for what is left of the minute, a route's daily cap (RATE_LIMITED) for the time until that cap resets. All four headers are listed in Access-Control-Expose-Headers, so a browser can read them. A path the API does not serve (an unknown sub-path, an id left empty) is 404 ROUTE_NOT_FOUND, and a method a served path does not take is 405 METHOD_NOT_ALLOWED with an Allow header; both are answered before any scope check, and nothing is read or changed. A trailing slash is ignored where it cannot be an id left empty (POST /calls/ is POST /calls) and refused where it can (GET /calls/). A doubled slash inside a path is merged into one before the request reaches the API (GET //calls is GET /calls).

Path Parameters

id
string<uuid>
required

Response

The trunk, with its new password in sip_password. Store it now; it is never shown again.

data
object

A SIP endpoint lets your own phone system (a PBX, a contact-center platform or a SIP provider) send calls to a Yappr agent, without a Yappr phone number. It comes in three kinds, set by auth_mode when you create it:

  • credentials: username and password. Yappr issues a SIP username and password. Your phone system sends calls to sip.telnyx.eu or sip.telnyx.com with them, dialling any number or extension, and the endpoint's agent answers every call. A call with a wrong username or password is refused before it reaches Yappr. The password is returned only once: by create and by rotate-password. Any agent of the workspace can answer, including one that runs a workflow: see inbound_agent_id.
  • uri: SIP address only. Your phone system dials the endpoint's sip_uri, with no username or password. It works with any agent, including one that runs a workflow. The address is the secret: anyone who has it can call the agent, on your workspace's minutes, so treat it like an API key. Calls are not filtered by source address. To replace it, create a new endpoint, point your phone system at it, then delete the old one; calls to a deleted or switched-off endpoint are refused before they are answered.
  • register: register as an extension. For a hosted phone system that only gives you an extension account (server, username, password). Yappr registers to it like a softphone and the agent answers the calls the system routes to that extension. Yappr does not keep or return the extension's password. You send it to create the endpoint and again whenever it changes on your phone system, because Yappr's carrier holds it to keep the extension registered and to place transfers. The register object carries the settings and the registration status. See Register as an extension.

sip_username and sip_connection appear on username-and-password trunks only, max_concurrent_calls on trunks and extension endpoints, register on extension endpoints only, and allowed_source_ips on SIP address endpoints only. List, get and update never return a password. A SIP address endpoint's slug and sip_uri are its credential, and a trunk's sip_username is half of its, so list and get return them only to a key that also holds sip_endpoints:manage; with sip_endpoints:read alone (the Read-only preset) they are null. The setup guide covers the phone system side.

rotations_left
integer | null

How many more attempts at a new password this trunk has in the current hour, which runs from its first attempt. null when it could not be read; the new password is valid either way.

Required range: 0 <= x <= 10
Example:

9