Skip to content

Attach or detach a SIP user's application

PATCH
/v1/Accounts/{auth_id}/Sip/endpoint/{endpoint_id}
curl --request PATCH \
--url https://api.siprtc.io/v1/Accounts/example/Sip/endpoint/1 \
--header 'Authorization: Basic <credentials>' \
--header 'Content-Type: application/json' \
--data '{ "action": "sip_app_association", "application_id": 1024 }'

Attaches an application to one of your SIP users with action sip_app_association (the application then handles the user’s calls), or detaches it with sip_app_deassociation. The application must belong to your account or be shared with it. Any other action changes nothing and answers 202 with {“status”: “endpoint updated”}.

auth_id
required
string

Auth ID of your account.

endpoint_id
required
integer

ID of the SIP user.

The association change.

Media type application/json
object
action

Sip_app_association attaches the application; sip_app_deassociation detaches it (application_id is then ignored). Any other value changes nothing.

string
Allowed values: sip_app_association sip_app_deassociation

Example

sip_app_association
application_id
required

ID of the application to attach. It must belong to your account or be shared with it.

integer

Example

1024

The application was attached or detached.

Media type application/json
object
message

Human-readable explanation of the outcome.

string
status

Outcome of the request: “success” or “failed”.

string
Allowed values: success failed

Example

{
"message": "Invalid auth ID",
"status": "success"
}

The action was not recognised; nothing changed.

Media type application/json
object
status

Short description of what happened, for example “endpoint updated”, “endpoint deleted”, “sip domain updated” or “domain deleted”.

string

Example

{
"status": "endpoint updated"
}

The body could not be read.

Media type application/json
object
message

Human-readable explanation of the failure.

string

Example

{
"message": "Parent auth ID does not match"
}

Missing or wrong Basic-auth credentials (returned by the API gateway).

Media type application/json
string

Example generated

example

The application does not belong to your account.

Media type application/json
object
message

Human-readable explanation of the outcome.

string
status

Outcome of the request: “success” or “failed”.

string
Allowed values: success failed

Example

{
"message": "Invalid auth ID",
"status": "success"
}

Endpoint_id is not a positive number (body “Invalid Request”).

Media type application/json
string

Example generated

example

No SIP user with this ID on your account, or the change could not be saved.

Media type application/json
object
errors

The error detail.

object
body

Error text as reported by the data store, for example “record not found”.

string

Example

{
"errors": {
"body": "record not found"
}
}

The application check could not be completed.

Media type application/json
object
message

Human-readable explanation of the outcome.

string
status

Outcome of the request: “success” or “failed”.

string
Allowed values: success failed

Example

{
"message": "Invalid auth ID",
"status": "success"
}