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
| Parameter | Type | Description |
|---|---|---|
merchant_id | string | Required. Your merchant ID. |
key_id | string | Required. The ID of the API key to update. |
Body Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
name | string | No | Updated name. |
description | string | No | Updated 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"
}