curl --request POST \
--url https://api.machines.cash/partner/v1/cards \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{}'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({})
};
fetch('https://api.machines.cash/partner/v1/cards', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.machines.cash/partner/v1/cards"
payload = {}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"ok": true,
"data": {
"cardId": "<string>",
"last4": "<string>",
"expirationMonth": 123,
"expirationYear": 123,
"encryptedName": {
"v": 1,
"iv": "Qz4f2m7Hk1P9x0ab",
"ct": "Hdbb2yT2F4xWZL5m5bJX3eJb4n8wVhjPzqLw2h7i"
},
"isPinned": true,
"sortOrder": 123,
"createdAt": "2023-11-07T05:31:56Z",
"brand": "VISA",
"limit": {
"amountCents": 5000
},
"encryptedColor": {
"v": 1,
"iv": "Qz4f2m7Hk1P9x0ab",
"ct": "Hdbb2yT2F4xWZL5m5bJX3eJb4n8wVhjPzqLw2h7i"
},
"encryptedEmoji": {
"v": 1,
"iv": "Qz4f2m7Hk1P9x0ab",
"ct": "Hdbb2yT2F4xWZL5m5bJX3eJb4n8wVhjPzqLw2h7i"
},
"encryptedMemo": {
"v": 1,
"iv": "Qz4f2m7Hk1P9x0ab",
"ct": "Hdbb2yT2F4xWZL5m5bJX3eJb4n8wVhjPzqLw2h7i"
},
"folderId": "<string>",
"contractId": "<string>"
},
"summary": "<string>",
"errors": [
{
"code": "invalid_request",
"message": "missing required field",
"field": "<string>"
}
],
"next": {
"pollAfterMs": 1,
"suggestedTool": "<string>",
"suggestedArgs": {}
}
}{
"ok": true,
"data": {
"cardId": "<string>",
"last4": "<string>",
"expirationMonth": 123,
"expirationYear": 123,
"encryptedName": {
"v": 1,
"iv": "Qz4f2m7Hk1P9x0ab",
"ct": "Hdbb2yT2F4xWZL5m5bJX3eJb4n8wVhjPzqLw2h7i"
},
"isPinned": true,
"sortOrder": 123,
"createdAt": "2023-11-07T05:31:56Z",
"brand": "VISA",
"limit": {
"amountCents": 5000
},
"encryptedColor": {
"v": 1,
"iv": "Qz4f2m7Hk1P9x0ab",
"ct": "Hdbb2yT2F4xWZL5m5bJX3eJb4n8wVhjPzqLw2h7i"
},
"encryptedEmoji": {
"v": 1,
"iv": "Qz4f2m7Hk1P9x0ab",
"ct": "Hdbb2yT2F4xWZL5m5bJX3eJb4n8wVhjPzqLw2h7i"
},
"encryptedMemo": {
"v": 1,
"iv": "Qz4f2m7Hk1P9x0ab",
"ct": "Hdbb2yT2F4xWZL5m5bJX3eJb4n8wVhjPzqLw2h7i"
},
"folderId": "<string>",
"contractId": "<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": {}
}
}Create a card
Cards are virtual-only. Card labels are optional and can be set with POST /encryption/encrypt. Limits are optional.
curl --request POST \
--url https://api.machines.cash/partner/v1/cards \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{}'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({})
};
fetch('https://api.machines.cash/partner/v1/cards', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.machines.cash/partner/v1/cards"
payload = {}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"ok": true,
"data": {
"cardId": "<string>",
"last4": "<string>",
"expirationMonth": 123,
"expirationYear": 123,
"encryptedName": {
"v": 1,
"iv": "Qz4f2m7Hk1P9x0ab",
"ct": "Hdbb2yT2F4xWZL5m5bJX3eJb4n8wVhjPzqLw2h7i"
},
"isPinned": true,
"sortOrder": 123,
"createdAt": "2023-11-07T05:31:56Z",
"brand": "VISA",
"limit": {
"amountCents": 5000
},
"encryptedColor": {
"v": 1,
"iv": "Qz4f2m7Hk1P9x0ab",
"ct": "Hdbb2yT2F4xWZL5m5bJX3eJb4n8wVhjPzqLw2h7i"
},
"encryptedEmoji": {
"v": 1,
"iv": "Qz4f2m7Hk1P9x0ab",
"ct": "Hdbb2yT2F4xWZL5m5bJX3eJb4n8wVhjPzqLw2h7i"
},
"encryptedMemo": {
"v": 1,
"iv": "Qz4f2m7Hk1P9x0ab",
"ct": "Hdbb2yT2F4xWZL5m5bJX3eJb4n8wVhjPzqLw2h7i"
},
"folderId": "<string>",
"contractId": "<string>"
},
"summary": "<string>",
"errors": [
{
"code": "invalid_request",
"message": "missing required field",
"field": "<string>"
}
],
"next": {
"pollAfterMs": 1,
"suggestedTool": "<string>",
"suggestedArgs": {}
}
}{
"ok": true,
"data": {
"cardId": "<string>",
"last4": "<string>",
"expirationMonth": 123,
"expirationYear": 123,
"encryptedName": {
"v": 1,
"iv": "Qz4f2m7Hk1P9x0ab",
"ct": "Hdbb2yT2F4xWZL5m5bJX3eJb4n8wVhjPzqLw2h7i"
},
"isPinned": true,
"sortOrder": 123,
"createdAt": "2023-11-07T05:31:56Z",
"brand": "VISA",
"limit": {
"amountCents": 5000
},
"encryptedColor": {
"v": 1,
"iv": "Qz4f2m7Hk1P9x0ab",
"ct": "Hdbb2yT2F4xWZL5m5bJX3eJb4n8wVhjPzqLw2h7i"
},
"encryptedEmoji": {
"v": 1,
"iv": "Qz4f2m7Hk1P9x0ab",
"ct": "Hdbb2yT2F4xWZL5m5bJX3eJb4n8wVhjPzqLw2h7i"
},
"encryptedMemo": {
"v": 1,
"iv": "Qz4f2m7Hk1P9x0ab",
"ct": "Hdbb2yT2F4xWZL5m5bJX3eJb4n8wVhjPzqLw2h7i"
},
"folderId": "<string>",
"contractId": "<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": {}
}
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Headers
Unique key to prevent duplicate writes.
8 - 128Return Open Responses-compatible output when set (replaces the default response envelope).
1, true Tool call id used for function_call_output items when Open Responses mode is enabled.
1Body
Optional encrypted card label. Generate with POST /encryption/encrypt.
Show child attributes
Show child attributes
Optional encrypted card color. Generate with POST /encryption/encrypt.
Show child attributes
Show child attributes
Optional encrypted card emoji. Generate with POST /encryption/encrypt.
Show child attributes
Show child attributes
Optional encrypted card memo. Generate with POST /encryption/encrypt.
Show child attributes
Show child attributes
Show child attributes
Show child attributes