Create a SIP domain
const url = 'https://api.siprtc.io/v1/Accounts/example/Sips/Domains';const options = { method: 'POST', headers: {Authorization: 'Basic <credentials>', 'Content-Type': 'application/json'}, body: '{"acc_id":"AC000000000000000000","application_id":1024,"domain_prefix":"acme","ip_auth":{},"name":"Head office PBX","status":true,"user_auth":{}}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://api.siprtc.io/v1/Accounts/example/Sips/Domains \ --header 'Authorization: Basic <credentials>' \ --header 'Content-Type: application/json' \ --data '{ "acc_id": "AC000000000000000000", "application_id": 1024, "domain_prefix": "acme", "ip_auth": {}, "name": "Head office PBX", "status": true, "user_auth": {} }'Creates the SIP domain <domain_prefix>.
Authorizations
Section titled “ Authorizations ”Parameters
Section titled “ Parameters ”Path Parameters
Section titled “ Path Parameters ”Auth ID of your account.
Request Bodyrequired
Section titled “ Request Bodyrequired ”The SIP domain to create.
object
Account that will own the domain: your own Auth ID or the Auth ID of a direct child account. Defaults to your account.
Example
AC000000000000000000Application that handles calls arriving at the domain. Leave out or 0 for none.
Example
1024Host label of the domain. The full domain becomes
<domain_prefix>.
Example
acmeSource addresses allowed to send calls to the domain: a JSON array of IPv4/IPv6 addresses and CIDR prefixes, or an object {“whitelisted_ips”: […]}. An empty list allows any source.
object
Display name of the domain.
Example
Head office PBXWhether the domain accepts calls. Defaults to true.
Example
trueUser authentication settings stored with the domain, for example {“enabled”: false}.
object
Responses
Section titled “ Responses ”The new SIP domain.
object
Auth ID of the account that owns the domain.
Application that handles calls arriving at the domain; -1 when none.
Name of the attached application, or “-” when none. Only filled in lists.
When the domain was created (RFC 3339).
Full domain name, <domain_prefix>.
Host label the domain was created with. Only present in the create response.
Numeric ID of the SIP domain (domain_id).
Allowed source addresses: a JSON array of addresses and CIDR prefixes, or {“whitelisted_ips”: […]}. An empty list allows any source.
object
Display name.
Auth ID of the owner’s parent (vendor) account.
Whether the domain accepts calls.
When the domain was last changed (RFC 3339).
User authentication settings, for example {“enabled”: false}.
object
Example
{ "acc_id": "AC000000000000000000", "application_id": 1024, "application_name": "IVR main", "created_time": "2026-01-15T10:30:00Z", "domain_name": "acme.sip.siprtc.io", "domain_prefix": "acme", "id": 301, "name": "Head office PBX", "parent_act_id": "AC000000000000000009", "status": true, "updated_time": "2026-01-16T08:00:00Z"}The body could not be read (20404), ip_auth is missing (20421), user_auth is missing (20241) or the domain already exists (20241).
object
SIPRTC error code, for example 21213 (invalid field) or 20404 (not found).
Human-readable description of the error.
Link to more information.
HTTP status the error is meant to map to. It can differ from the actual response status.
Example
{ "code": 21213, "message": "validation failed on field Password is not valid", "more_info": "https://api.siprtc.io", "status": 400}Missing or wrong Basic-auth credentials (returned by the API gateway).
Example generated
exampleAcc_id is not your account or a direct child of it, or the application does not belong to the owning account.
object
Human-readable explanation of the outcome.
Outcome of the request: “success” or “failed”.
Example
{ "message": "Invalid auth ID", "status": "success"}The domain could not be created, for example because domain_prefix is empty (code 20404).
object
SIPRTC error code, for example 21213 (invalid field) or 20404 (not found).
Human-readable description of the error.
Link to more information.
HTTP status the error is meant to map to. It can differ from the actual response status.
Example
{ "code": 21213, "message": "validation failed on field Password is not valid", "more_info": "https://api.siprtc.io", "status": 400}The account or application check could not be completed.
object
Human-readable explanation of the outcome.
Outcome of the request: “success” or “failed”.
Example
{ "message": "Invalid auth ID", "status": "success"}