APG PayAPG Paydocs

Identity

Get API key

GET/api-keys/{apiKeyId}
Request
GEThttps://api.tst.au.apgpay.dev/api-keys/{apiKeyId}
curl -X GET https://api.tst.au.apgpay.dev/api-keys/{apiKeyId} \
  -H "Authorization: Bearer $API_KEY"

Return one service token. The secret is never included.

Permissions

Required permission
serviceTokens:query

Requires the `query` action on `serviceTokens` for the supplied runtime context

Path parameters

apiKeyIdstring
required

Responses

The response is a tagged shape: type is always "ApiKeyViewAttributes". Switch on it; subtypes can be added, and a client that already reads it will not break.

Discriminated by type
type = "ApiKeyViewAttributes"
apiKeyIdApiKeyIdrequired

Identifier of a service token.

Example key_9f2Kd8QpLzXw

descriptionstringrequired

What the token is for, in words. This is how you tell two secrets apart, there is nothing else.

statusApiKeyStatusrequired
EnabledDisabledUnknown
valuestring

The token itself, where the platform holds it in the clear, always for a publishable key, and for a merchant secret key too, which is how a dashboard shows a merchant its own. A token stored as a salted hash is never returned. Treat this field as sensitive on every read.

expiresAtstring (date-time)

Example 2026-08-19T04:21:07Z

createdBystring

The user who created it. Absent for tokens the platform generated itself.

createdAtstring (date-time)required

Example 2026-08-19T04:21:07Z

updatedAtstring (date-time)required

Example 2026-08-19T04:21:07Z

Example
{
  "type": "ApiKeyViewAttributes",
  "apiKeyId": "key_9f2Kd8QpLzXw",
  "description": "string",
  "scope": {
    "type": "ApiKeyScopeEnterprise",
    "enterpriseId": "ent_9f2Kd8QpLzXw"
  },
  "permissions": {
    "type": "ApiKeyPermissionsExplicit",
    "grants": [
      {
        "type": "ApiKeyGrantAttributes",
        "resource": "BlockedCard",
        "actions": [
          "Query"
        ]
      }
    ]
  },
  "status": "Enabled",
  "value": "string",
  "expiresAt": "2026-08-19T04:21:07Z",
  "createdBy": "string",
  "createdAt": "2026-08-19T04:21:07Z",
  "updatedAt": "2026-08-19T04:21:07Z"
}

Error responses