Skip to content

Update a credential list

PUT
/v1/Accounts/{auth_id}/SipTrunk/CredentialList/{credential_list_id}
curl --request PUT \
--url https://api.siprtc.io/v1/Accounts/example/SipTrunk/CredentialList/example \
--header 'Authorization: Basic <credentials>' \
--header 'Content-Type: application/json' \
--data '{ "name": "PBX credentials", "status": "active", "update_username": [ "pbx-main" ] }'

Renames a credential list, sets its status and replaces its members. name and status are overwritten. update_username names the auth credentials that should be in the list afterwards: members not named are removed, named credentials of the account are added, and [“”] empties the list. The name must not be used by any other credential list. 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.

credential_list_id
required
string

ID of the credential list.

customer_id
string

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

The new name, status and members.

Media type application/json
object
name
required

New name of the list.

string

Example

PBX credentials
status

New status, stored as sent (“active” or “inactive”).

string
Allowed values: active inactive

Example

active
update_username

Usernames of the auth credentials that should be in the list after the update. Members not named are removed; [“”] removes every member.

Array<string>

Example

[
"pbx-main"
]

Updated (message “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"
}

Name is missing, the list does not exist, the 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"
}