Update API Key
Update an API key's name, permissions, or expiration.
POST
https://api.uprails.com/api-keys/:key_idUpdates the specified API key. You can change the name, permissions, or expiration date.
Path Parameters
| Parameter | Type | Description |
|---|---|---|
key_id | string | Required. The ID of the API key. |
Request Example
curl -X POST https://api.uprails.com/api-keys/key_1234567890abcdef \
-H "Content-Type: application/json" \
-H "api-key: snd_YOUR_API_KEY" \
-d '{
"name": "Updated Key Name",
"permissions": ["payments:read"],
"expires_at": "2024-12-31T23:59:59Z"
}'Request Body
namestringUpdated name for the API key
permissionsarrayUpdated list of permissions
expires_atstringUpdated expiration date (ISO 8601)
Response
200OK
{
"key_id": "key_1234567890abcdef",
"merchant_id": "mer_xyz789",
"name": "Updated Key Name",
"prefix": "snd_",
"type": "secret",
"permissions": [
"payments:read"
],
"created": "2024-01-15T10:00:00Z",
"expires_at": "2024-12-31T23:59:59Z"
}