Printago API
PATCH /v1/api-keys/{id}

Update an API key

Update an API key's configuration including name, status, permissions, roles, and IP restrictions

Requires: apiKey.edit

Path Parameters

id required
string
The API key's unique identifier

Request Body

Fields to update

UpdateApiKeyRequest
activeoptional
boolean
fullAccessoptional
boolean
ipAllowlistoptionalnullable
string[]
nameoptional
string
permissionsoptional
enum[]
roleIdsoptional
string[]

Example Request

application/json
{
  "active": true,
  "name": "string",
  "fullAccess": true,
  "ipAllowlist": [
    "string"
  ],
  "permissions": [
    "organization.owner"
  ],
  "roleIds": [
    "string"
  ]
}

Response Schema

ApiKey
activerequired
boolean
createdAtrequired
string
format: date-time
createdByoptionalnullable
string
expiresAtoptionalnullable
string
format: date-time
externalRefoptionalnullable
string
fullAccessrequired
boolean
hashrequired
string
idrequired
string
pattern: ^[a-z0-9]{24}$
integrationIdoptionalnullable
string
Optional link to integration - when integration is deleted, this API key is also deleted
pattern: ^[a-z0-9]{24}$
ipAllowlistoptionalnullable
string[]
lastUsedAtoptionalnullable
string
format: date-time
managedrequired
boolean
managedByoptionalnullable
string
namerequired
string
saltrequired
string
storeIdrequired
string
pattern: ^[a-z0-9]{24}$
updatedAtrequired
string
format: date-time

Example Response

200 OK — application/json
{
  "hash": "string",
  "salt": "string",
  "name": "string",
  "active": true,
  "managed": true,
  "managedBy": "string",
  "externalRef": "string",
  "integrationId": "string",
  "fullAccess": true,
  "ipAllowlist": [
    "string"
  ],
  "createdBy": "string",
  "lastUsedAt": "2025-01-15T12:00:00.000Z",
  "expiresAt": "2025-01-15T12:00:00.000Z",
  "id": "string",
  "storeId": "string",
  "createdAt": "2025-01-15T12:00:00.000Z",
  "updatedAt": "2025-01-15T12:00:00.000Z"
}