Update a SIP user
const url = 'https://api.siprtc.io/v1/Accounts/example/Sip/endpoint/1';const options = { method: 'PUT', headers: {Authorization: 'Basic <credentials>', 'Content-Type': 'application/json'}, body: '{"codec_list":"PCMU,PCMA,OPUS","name":"Reception","password":"S3cretPassw0rd!","presence":false,"status":true}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request PUT \ --url https://api.siprtc.io/v1/Accounts/example/Sip/endpoint/1 \ --header 'Authorization: Basic <credentials>' \ --header 'Content-Type: application/json' \ --data '{ "codec_list": "PCMU,PCMA,OPUS", "name": "Reception", "password": "S3cretPassw0rd!", "presence": false, "status": true }'Changes the display name, password or status of one of your SIP users. Fields you leave out keep their current values; codec_list and presence are accepted but not saved. A new password is also written to the SIP registrar, so registered devices must re-register with it.
Authorizations
Section titled “ Authorizations ”Parameters
Section titled “ Parameters ”Path Parameters
Section titled “ Path Parameters ”Auth ID of your account.
ID of the SIP user.
Request Bodyrequired
Section titled “ Request Bodyrequired ”Fields to change.
object
Accepted but not saved: the codec list cannot be changed after creation.
Example
PCMU,PCMA,OPUSNew display name: letters and digits only. Leave out to keep the current name.
Example
ReceptionNew SIP digest password, at least 6 characters. Leave out to keep the current password.
Example
S3cretPassw0rd!Accepted but not saved: presence cannot be changed after creation.
Example
falseWhether the SIP user may register and place calls. Leave out to keep the current value.
Example
trueResponses
Section titled “ Responses ”Updated ({“status”: “endpoint updated”}).
object
Short description of what happened, for example “endpoint updated”, “endpoint deleted”, “sip domain updated” or “domain deleted”.
Example
{ "status": "endpoint updated"}Missing or wrong Basic-auth credentials (returned by the API gateway).
Example generated
exampleEndpoint_id is not a positive number (body “Invalid Request”).
Example generated
exampleA field failed validation or the change could not be saved; the body is the error text.
Example generated
exampleNo SIP user with this ID on your account (errors.body “record not found”).
object
The error detail.
object
Error text as reported by the data store, for example “record not found”.
Example
{ "errors": { "body": "record not found" }}