Skip to main content

Update an API key

PATCH 
/auth/api_keys/:id

Updates the specified API key with the values of the parameters passed. Any parameters not included in the request will be left unchanged.

Request

Path Parameters

    id stringrequired

    The id of the API Key

Body

required

    description string

    Human readable identifier.

    permission_groups string[]

    Array of ids of Permission Groups on the API Key.

    status string

    Status of the API Key.

Responses

200: Successful response

401: Authentication error

403: Authorization error

404: Resource not found

422: Invalid parameters supplied in request. See HTTP response body for details.

Request samples


curl -L -X PATCH 'https://api.telnyx.com/auth/api_keys/:id' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-d '{
"description": "Tommy'\''s Key",
"permission_groups": [
"string"
],
"status": "active"
}'

Response samples


{
"data": {
"id": "f30e7596-586e-44e1-ae7d-53db10f144d3",
"description": "Tommy's Key",
"secret": "XXXXXXXXXXXXX",
"backup_secret": "XXXXXXXXXXXXX",
"status": "active",
"permission_groups": [
"string"
],
"admin": true,
"record_type": "api_key",
"created_at": "2018-02-08T18:49:22.998023Z",
"updated_at": "2018-02-08T18:49:22.998023Z"
}
}