API Key - Retrieve

GET /api_keys/{merchant_id}/{key_id}

cURL
curl --request GET \
  --url https://sandbox.hyperswitch.io/api_keys/{merchant_id}/{key_id} \
  --header 'api-key: <api-key>'
200 — Example response (application/json)
{
  "key_id": "5hEEqkgJUyuxgSKGArHA4mWSnX",
  "merchant_id": "y3oqhf46pyzuxjbcn2giaqnb44",
  "name": "Sandbox integration key",
  "prefix": "<string>",
  "created": "2022-09-10T10:11:12Z",
  "expiration": "never",
  "description": "Key used by our developers to integrate with the sandbox environment"
}

Authorizations

  • Header: api-key (string) — required

Admin API keys allow privileged actions such as creating a merchant account and Merchant Connector account.

Path parameters

  • merchant_id (string, required) — The unique identifier for the merchant account.

  • key_id (string, required) — The unique identifier for the API Key.

Response: fields (click to expand)
  • key_id (string, required) The identifier for the API Key. Maximum string length: 64 Example: "5hEEqkgJUyuxgSKGArHA4mWSnX"

  • merchant_id (string, required) The identifier for the Merchant Account. Maximum string length: 64 Example: "y3oqhf46pyzuxjbcn2giaqnb44"

  • name (string, required) The unique name for the API Key to help you identify it. Maximum string length: 64 Example: "Sandbox integration key"

  • prefix (string, required) The first few characters of the plaintext API Key to help you identify it. Maximum string length: 64

  • created (string, required) The time at which the API Key was created. Example: "2022-09-10T10:11:12Z"

  • expiration (enum | string, required) Available options include never or an ISO date-time string.

  • description (string | null) The description to provide more context about the API Key. Maximum string length: 256 Example: "Key used by our developers to integrate with the sandbox environment"

Related:

  • API Key — Create: https://api-reference.hyperswitch.io/v1/api-key/api-key--create

  • API Key — Update: https://api-reference.hyperswitch.io/v1/api-key/api-key--update

Suggest edits: https://github.com/juspay/hyperswitch/edit/main/api-reference/v1/api-key/api-key--retrieve.mdx Raise issue: https://github.com/juspay/hyperswitch/issues/new?title=Issue%20on%20docs&body=Path:%20/v1/api-key/api-key--retrieve