Skip to content

Update an auth credential

PUT
/v1/Accounts/{auth_id}/SipTrunk/AuthCredentials/{auth_credential_id}
curl --request PUT \
--url https://api.siprtc.io/v1/Accounts/example/SipTrunk/AuthCredentials/example \
--header 'Authorization: Basic <credentials>' \
--header 'Content-Type: application/json' \
--data '{ "friendly_name": "Main PBX", "password": "S3cretPassw0rd!", "update_list_id": [ "6f1c2b9e-0d4a-4c8e-9b7a-2f5d3e1a0b01" ], "username": "pbx-main" }'

Overwrites an auth credential’s friendly_name, username and password and sets its status to active, so send all three (the current password to keep it). update_list_id replaces the credential lists it belongs to; leave it out to keep them. friendly_name must not be used by any other auth credential. A vendor account can pass customer_id to act on a direct child account’s record.

auth_id
required
string

Auth ID of your account.

auth_credential_id
required
string

ID of the auth credential.

customer_id
string

Vendor accounts only: act on this direct child account instead of your own.

The new values.

Media type application/json
object
friendly_name

Label of the credential.

string

Example

Main PBX
password

SIP digest password. Send the current password to keep it.

string

Example

S3cretPassw0rd!
update_list_id

Replaces the credential list IDs. Leave out or send an empty array to keep the current ones.

Array<string>

Example

[
"6f1c2b9e-0d4a-4c8e-9b7a-2f5d3e1a0b01"
]
username

SIP digest username.

string

Example

pbx-main

Updated (message “Auth Credential updated successfully”).

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 credential does not exist, friendly_name is taken, the change failed, or the gateway did not supply your company (message “company id is empty”).

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"
}

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

Media type application/json
string

Example generated

example

Customer_id is not a direct child of 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"
}

Your account or the customer account could not be looked up.

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"
}