Update a credential
PATCH/telephony_credentials/:id
Update an existing credential.
Request
Path Parameters
id stringrequired
Identifies the resource.
- application/json
Body
required
Parameters that can be updated in a credential
name string
tag string
Tags a credential. A single tag can hold at maximum 1000 credentials.
connection_id string
Identifies the Credential Connection this credential is associated with.
expires_at string
ISO-8601 formatted date indicating when the credential will expire.
Responses
200: Successful response with details about a credential
- application/json
401: Unauthorized
404: Resource not found
422: Bad request
Request samples
curl -L -X PATCH 'https://api.telnyx.com/v2/telephony_credentials/:id' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer <TOKEN>' \
-d '{
"name": "My-new-updated-credential",
"connection_id": "987654321"
}'
Response samples
{
"data": {
"id": "c215ade3-0d39-418e-94be-c5f780760199",
"record_type": "credential",
"name": "2020-06-18 21:32:38.917732Z",
"expired": "false",
"user_id": "user-id",
"resource_id": "connection:804252963366242252",
"sip_password": "a92dbcfb60184a8cb330b0acb2f7617b",
"sip_username": "gencrednCvHU5IYpSBPPsXI2iQsDX",
"created_at": "2020-06-18T21:32:38",
"expires_at": "2042-06-18T21:32:38",
"updated_at": "2020-06-18T21:32:38.000Z"
}
}