Skip to main content
POST
/
user
/
v1
/
crypto
/
encrypt
Encrypt plaintext values
curl --request POST \
  --url https://api.machines.cash/user/v1/crypto/encrypt \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "items": [
    {
      "id": "card_name",
      "value": "agent.card"
    }
  ]
}
'
const options = {
  method: 'POST',
  headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
  body: JSON.stringify({items: [{id: 'card_name', value: 'agent.card'}]})
};

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

url = "https://api.machines.cash/user/v1/crypto/encrypt"

payload = { "items": [
        {
            "id": "card_name",
            "value": "agent.card"
        }
    ] }
headers = {
    "Authorization": "Bearer <token>",
    "Content-Type": "application/json"
}

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

print(response.text)
{
  "ok": true,
  "data": {},
  "summary": "success"
}
{
  "error": "<string>",
  "message": "<string>"
}
{
  "error": "<string>",
  "message": "<string>"
}
{
  "error": "<string>",
  "message": "<string>"
}
{
  "error": "<string>",
  "message": "<string>"
}
{
  "error": "<string>",
  "message": "<string>"
}

Authorizations

Authorization
string
header
required

Bearer session token for User API operations. Legacy UserSessionBearer naming remains supported.

Body

application/json
items
object[]
required
Required array length: 1 - 50 elements

Response

Success

items
object[]