API Docs
API Keys
API ReferenceApi KeysUpdate

Update API Key

Update an existing API key's name or description.

POST /api_keys/:merchant_id/:key_id

Path Parameters

ParameterTypeDescription
merchant_idstringRequired. Your merchant ID.
key_idstringRequired. The ID of the API key to update.

Body Parameters

ParameterTypeRequiredDescription
namestringNoUpdated name.
descriptionstringNoUpdated description.

Request Example

curl -X POST 'https://api.v2.paychtec.com/api_keys/mer_123456/key_1234567890' \  -H "Content-Type: application/json" \  -H "api-key: admin_YOUR_ADMIN_KEY" \  -d '{  "name": "Updated Production Key",  "description": "Primary production key"}'

Response

{
  "key_id": "key_1234567890",
  "merchant_id": "mer_123456",
  "name": "Updated Production Key",
  "description": "Primary production key",
  "modified_at": "2024-01-22T12:00:00Z"
}