HostingDelivery
Update Delivery API token
PUT
/api/delivery/accounts/{id}/api_tokens/{token_id}Updates allow-listed networks for a Delivery API token.
Authorization
api_key X-Api-Token<token>
API token used to authenticate requests.
In: header
Path Parameters
token_id*integer
Format
int32id*integer
Format
int32Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
allow_nets*string[]
Allowed IP addresses or networks for this API token.
Response Body
application/json
application/json
application/json
application/json
application/json
curl -X PUT "https://example.com/api/delivery/accounts/0/api_tokens/0" \ -H "X-Api-Token: YOUR_API_TOKEN" \ -H "Accept: application/json" \ -H "Content-Type: application/json" \ -d '{ "allow_nets": [ "string" ] }'{
"resources": [
{
"id": "string",
"label": "string",
"token_preview": "string",
"allow_nets": "string",
"created_at": "string",
"last_used_at": "string"
}
],
"pagination": {}
}{
"message": "Unauthorized",
"errors": []
}{
"message": "Forbidden",
"errors": []
}{
"message": "Not found",
"errors": []
}{
"message": "Validation failed",
"errors": [
{
"field": "name",
"description": "is not valid"
}
]
}