Skip to main content
POST
/
partner
/
v1
/
encryption
/
decrypt
Decrypt ciphertext with the data key
curl --request POST \
  --url https://api.machines.cash/partner/v1/encryption/decrypt \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "value": {
    "v": 1,
    "iv": "Qz4f2m7Hk1P9x0ab",
    "ct": "Hdbb2yT2F4xWZL5m5bJX3eJb4n8wVhjPzqLw2h7i"
  }
}
'
const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
value: {v: 1, iv: 'Qz4f2m7Hk1P9x0ab', ct: 'Hdbb2yT2F4xWZL5m5bJX3eJb4n8wVhjPzqLw2h7i'}
})
};

fetch('https://api.machines.cash/partner/v1/encryption/decrypt', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));
import requests

url = "https://api.machines.cash/partner/v1/encryption/decrypt"

payload = { "value": {
"v": 1,
"iv": "Qz4f2m7Hk1P9x0ab",
"ct": "Hdbb2yT2F4xWZL5m5bJX3eJb4n8wVhjPzqLw2h7i"
} }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.text)
{
  "ok": true,
  "data": {
    "value": "<string>"
  },
  "summary": "<string>",
  "errors": [
    {
      "code": "invalid_request",
      "message": "missing required field",
      "field": "<string>"
    }
  ],
  "next": {
    "pollAfterMs": 1,
    "suggestedTool": "<string>",
    "suggestedArgs": {}
  }
}
{
"ok": true,
"summary": "invalid request",
"errors": [
{
"code": "invalid_request",
"message": "missing required field",
"field": "<string>"
}
],
"next": {
"pollAfterMs": 1,
"suggestedTool": "<string>",
"suggestedArgs": {}
}
}
{
"ok": true,
"summary": "invalid request",
"errors": [
{
"code": "invalid_request",
"message": "missing required field",
"field": "<string>"
}
],
"next": {
"pollAfterMs": 1,
"suggestedTool": "<string>",
"suggestedArgs": {}
}
}
{
"ok": true,
"summary": "invalid request",
"errors": [
{
"code": "invalid_request",
"message": "missing required field",
"field": "<string>"
}
],
"next": {
"pollAfterMs": 1,
"suggestedTool": "<string>",
"suggestedArgs": {}
}
}
{
"ok": true,
"summary": "invalid request",
"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

Body

application/json
value
object
required

Encrypted payload from POST /encryption/encrypt.

Response

Decrypted value

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