Skip to main content
POST
/
partner
/
v1
/
cards
/
{cardId}
/
secrets
Retrieve encrypted card secrets
curl --request POST \
  --url https://api.machines.cash/partner/v1/cards/{cardId}/secrets \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "sessionId": "<string>"
}
'
{
  "ok": true,
  "data": {
    "encryptedPan": {
      "data": "<string>",
      "iv": "<string>"
    },
    "encryptedCvc": {
      "data": "<string>",
      "iv": "<string>"
    },
    "expirationMonth": 123,
    "expirationYear": 123,
    "last4": "<string>",
    "brand": "<string>",
    "keyId": "<string>"
  },
  "summary": "<string>",
  "errors": [
    {
      "code": "invalid_request",
      "message": "missing required field",
      "field": "<string>"
    }
  ],
  "next": {
    "pollAfterMs": 1,
    "suggestedTool": "<string>",
    "suggestedArgs": {}
  }
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Headers

X-Open-Responses
enum<string>

Return Open Responses-compatible output when set (replaces the default response envelope).

Available options:
1,
true
X-Open-Responses-Call-Id
string

Tool call id used for function_call_output items when Open Responses mode is enabled.

Minimum string length: 1

Path Parameters

cardId
string
required

Machines card id.

Minimum string length: 8

Body

application/json
sessionId
string
required

SessionId returned from the secrets session helper.

Response

Encrypted card secrets

ok
boolean
required
data
object
required
summary
string
required
errors
object[]
required
next
object