Skip to Content
Pouch
Keys

Update a key

PATCH
/v1/keys/{id}

Auth: Bearer key with no domain scope.

Name, rate limit and domain scope. Never the secret: a leaked key is revoked and re-minted, not patched. A revoked key can't be edited.

Authorization

bearer
headerAuthorizationBearer <token>

An API key in the Authorization header.

Path Parameters

id*string

An opaque, type-prefixed id.

Request Body

application/json
  1. body
name?string

New name for the key.

Match^[a-zA-Z0-9-]+$
Length1 <= length <= 64
domain_ids?array<>

Domains this key may send from. Empty means every domain in the organization.

rate_limit?integer

Requests a minute this key is allowed, 1-10000.

Range1 <= value <= 10000

Response Body

The updated key.

application/json
  1. response
id?string

Opaque id, prefixed key_.

name?string

Name the key was created with.

mode?string

test routes every send to the mock provider.

Value in"live""test"
secret_prefix?string

Leading characters of the secret, enough to tell two keys apart. Never the secret.

domain_ids?array<string>

Domains the key may send from. Empty means every domain in the organization.

rate_limit?integer

Requests a minute this key is allowed.

last_used_at?|

ISO 8601 timestamp of the last request that authenticated with it, over HTTP or SMTP, written at most once a minute. Null until the key's first request.

revoked_at?|

ISO 8601 timestamp, or null while the key works.

created_at?string

ISO 8601 timestamp.

Example Request
curl -X PATCH 'https://pouch.example.com/v1/keys/string' \  -H 'Content-Type: application/json' \  -d '{}'
Example Response
{  "id": "string",  "name": "string",  "mode": "live",  "secret_prefix": "string",  "domain_ids": [    "string"  ],  "rate_limit": 0,  "last_used_at": "string",  "revoked_at": "string",  "created_at": "string"}