Loading...
Skip to main content

Update a token

Apply a JSON Patch (RFC 6902) to the specified token.

URL: https://api.courier.com/users/:user_id/tokens/:token

Method: PATCH

Path Parameters

user_idstringrequired
The user's ID. This can be any uniquely identifiable string.
tokenstringrequired
The full token string.

Body Parameters

patcharray
An array of patch operations. Learn more
+ Show Properties

Responses

status: 204 OK

status: 400 Bad Request

messagestring
A message describing the error that occurred.
typestring
[invalid_request_error] The type of error that occurred.

Request Example

curl --request PATCH \
--url https://api.courier.com/users/user-1234/tokens/ABW7HO9Y7XAQXZ7Y \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--data '
{
"patch": [
{
"op": "replace",
"path": "/status",
"value": "revoked"
}
]
}
'

Responses Example

Empty
{
"message": "Error Message",
"type": "invalid_request_error"
}