Uprails
API Keys/Retrieve

Retrieve API Key

Retrieve metadata about an existing API key.

GEThttps://api.uprails.com/api-keys/:key_id

Retrieves the metadata for an API key by its ID. Note that the actual key value is never returned - only the prefix and other metadata.

Path Parameters

ParameterTypeDescription
key_idstringRequired. The ID of the API key.

Request Example

curl https://api.uprails.com/api-keys/key_1234567890abcdef \
  -H "api-key: snd_YOUR_API_KEY"

Response

200OK
{
  "key_id": "key_1234567890abcdef",
  "merchant_id": "mer_xyz789",
  "name": "Production API Key",
  "prefix": "snd_",
  "type": "secret",
  "permissions": [
    "payments:write",
    "refunds:write"
  ],
  "created": "2024-01-15T10:00:00Z",
  "expires_at": null,
  "last_used_at": "2024-01-16T14:30:00Z"
}