Skip to main content
POST
/
api
/
apps
/
{app_id}
/
regenerate-key
Regenerate an app API key (invalidates the old one) Or generate initial key if app doesn't have one yet POST /api/apps/:app_id/regenerate-key
curl --request POST \
  --url https://api.example.com/api/apps/{app_id}/regenerate-key \
  --header 'Content-Type: application/json' \
  --data '
{
  "name": "<string>",
  "pay_limits": {
    "allowed_target_apps": [
      "<string>"
    ],
    "expires_at": "2023-11-07T05:31:56Z",
    "max_payment_per_tx": 1,
    "spend_allowance": 1
  },
  "permissions": [
    "Read"
  ]
}
'

Path Parameters

app_id
string
required

Application ID

Body

application/json

Request body for generating a new app API key.

To create an Agent Key (for autonomous wallet-to-wallet payments), set permissions: ["Pay"] and optionally populate the pay_limits block.

name
string | null
pay_limits
object

Spend-limit constraints. Only enforced when the key has the Pay permission. All sub-fields default to null (unlimited / no expiry).

permissions
enum<string>[]
Available options:
Read,
Write,
Admin,
Pay

Response

App API key regenerated successfully