Perform activate or deactivate action on provided Credential
POST/telephony_credentials/:id/actions/:action
Perform activate or deactivate action on provided Credential. Activate action will change the status to active, making it possible to connect calls with the credential. Deactivate action will change the status to inactive, making it impossible to connect calls with the credential.
Request
Path Parameters
id stringrequired
Identifies the resource.
action stringrequired
Possible values: [activate
, deactivate
]
Identifies the action to be taken.
Responses
200: Successful response with details about a credential
- application/json
400: Bad request
401: Unauthorized
404: Resource not found
Request samples
curl -L -X POST 'https://api.telnyx.com/v2/telephony_credentials/:id/actions/:action' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer <TOKEN>'
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"
}
}