latestOpenAPI 3.0.32026-08-20146131.7 MB

672b1916ba61

API Keys

Get API key

Gets API key details by id.

get/v1/api-keys/{keyId}

Path parameters

keyIdstring required

API key identifier.

Example:key_example

API key identifier.

Headers

x-project-idstring

Selects the active project for this request. Required for session/dashboard callers. Ignored when authenticating with an API key, whose scope is fixed to the key's project.

Example:prj_example

Selects the active project for this request. Required for session/dashboard callers. Ignored when authenticating with an API key, whose scope is fixed to the key's project.

Response

API key details

Example response

{
  "data": {
    "id": "key_example",
    "name": "Primary Key",
    "description": "Used by backend service.",
    "keyPrefix": "sk_test_abc",
    "role": "api_developer",
    "permissions": [
      "tokens:read",
      "tokens:write"
    ],
    "environment": "sandbox",
    "status": "active",
    "projectId": "prj_example",
    "allowedIps": [
      "203.0.113.0/24"
    ],
    "walletScope": "selected",
    "signingWalletId": "privy_wallet_123",
    "signingWalletIds": [
      "privy_wallet_123",
      "dfns_wallet_456"
    ],
    "walletBindings": [
      {
        "walletId": "privy_wallet_123",
        "permissions": [
          "payments:write",
          "tokens:write"
        ]
      }
    ],
    "policyBindings": [
      {
        "id": "akwpol_123",
        "bindingScope": "selected",
        "walletId": "privy_wallet_123",
        "custodyWalletId": "cwlt_123",
        "walletControlProfileId": "wcp_123",
        "walletControlProfileRevisionId": "wcpr_123",
        "apiKeyControlProfileId": "akcp_123",
        "apiKeyControlProfileRevisionId": "akcpr_123",
        "createdAt": "2025-01-01T00:00:00.000Z",
        "updatedAt": "2025-01-02T00:00:00.000Z"
      }
    ],
    "lastUsedAt": "2025-01-10T12:00:00.000Z",
    "expiresAt": "2025-12-31T00:00:00.000Z",
    "rotatedFrom": "key_example",
    "rotationDeadline": "2025-02-01T00:00:00.000Z",
    "createdAt": "2025-01-01T00:00:00.000Z"
  },
  "meta": {
    "requestId": "req_example",
    "timestamp": "2025-01-01T00:00:00.000Z"
  }
}