Miracle Docs
Api keys

Update API key

Updates mutable fields of an active API key (name, permissions, expiresAt). Only fields included in the body are changed. Cannot update revoked or expired keys (returns 409).

PATCH
/v1/api-keys/{id}
AuthorizationBearer <token>

In: header

Path Parameters

id*string

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

curl -X PATCH "https://<api-host>/v1/api-keys/string" \  -H "Content-Type: application/json" \  -d '{}'
{
  "data": {
    "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
    "tenantId": "f97df110-f4de-492e-8849-4a6af68026b0",
    "livemode": true,
    "owner": {
      "type": "merchant",
      "merchantId": "c3073b9d-edd0-49f2-a28d-b7ded8ff9a8b",
      "tenantId": "f97df110-f4de-492e-8849-4a6af68026b0"
    },
    "environment": "test",
    "keyType": "public",
    "inboundFormat": "miracle_native",
    "publicKey": "string",
    "name": "string",
    "status": "active",
    "permissions": [
      "string"
    ],
    "ipAllowlist": [
      "string"
    ],
    "expiresAt": "string",
    "createdAt": "string",
    "updatedAt": "string",
    "deletedAt": null,
    "revokedAt": "string",
    "rotatedFromKeyId": "398ea6c9-3802-4188-a0cb-054a865227fd",
    "createdBy": "25a02396-1048-48f9-bf93-102d2fb7895e",
    "createdByType": "user"
  }
}
Empty
Empty
Empty

On this page