Send Agent Checkout Message
curl --request POST \
--url https://staging.crossmint.com/api/unstable/agent-checkouts/{id}/messages \
--header 'Content-Type: application/json' \
--header 'X-API-KEY: <x-api-key>' \
--data '
{
"id": "<string>",
"parts": [
{
"action": "alternative",
"requestId": "<string>",
"text": "<string>",
"type": "input_response"
}
]
}
'import requests
url = "https://staging.crossmint.com/api/unstable/agent-checkouts/{id}/messages"
payload = {
"id": "<string>",
"parts": [
{
"action": "alternative",
"requestId": "<string>",
"text": "<string>",
"type": "input_response"
}
]
}
headers = {
"X-API-KEY": "<x-api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-API-KEY': '<x-api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
id: '<string>',
parts: [
{
action: 'alternative',
requestId: '<string>',
text: '<string>',
type: 'input_response'
}
]
})
};
fetch('https://staging.crossmint.com/api/unstable/agent-checkouts/{id}/messages', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://staging.crossmint.com/api/unstable/agent-checkouts/{id}/messages",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'id' => '<string>',
'parts' => [
[
'action' => 'alternative',
'requestId' => '<string>',
'text' => '<string>',
'type' => 'input_response'
]
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-API-KEY: <x-api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://staging.crossmint.com/api/unstable/agent-checkouts/{id}/messages"
payload := strings.NewReader("{\n \"id\": \"<string>\",\n \"parts\": [\n {\n \"action\": \"alternative\",\n \"requestId\": \"<string>\",\n \"text\": \"<string>\",\n \"type\": \"input_response\"\n }\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-API-KEY", "<x-api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://staging.crossmint.com/api/unstable/agent-checkouts/{id}/messages")
.header("X-API-KEY", "<x-api-key>")
.header("Content-Type", "application/json")
.body("{\n \"id\": \"<string>\",\n \"parts\": [\n {\n \"action\": \"alternative\",\n \"requestId\": \"<string>\",\n \"text\": \"<string>\",\n \"type\": \"input_response\"\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://staging.crossmint.com/api/unstable/agent-checkouts/{id}/messages")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-API-KEY"] = '<x-api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"id\": \"<string>\",\n \"parts\": [\n {\n \"action\": \"alternative\",\n \"requestId\": \"<string>\",\n \"text\": \"<string>\",\n \"type\": \"input_response\"\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"messageId": "<string>",
"status": "accepted"
}Agent Checkouts
Send Agent Checkout Message
POST
/
unstable
/
agent-checkouts
/
{id}
/
messages
Send Agent Checkout Message
curl --request POST \
--url https://staging.crossmint.com/api/unstable/agent-checkouts/{id}/messages \
--header 'Content-Type: application/json' \
--header 'X-API-KEY: <x-api-key>' \
--data '
{
"id": "<string>",
"parts": [
{
"action": "alternative",
"requestId": "<string>",
"text": "<string>",
"type": "input_response"
}
]
}
'import requests
url = "https://staging.crossmint.com/api/unstable/agent-checkouts/{id}/messages"
payload = {
"id": "<string>",
"parts": [
{
"action": "alternative",
"requestId": "<string>",
"text": "<string>",
"type": "input_response"
}
]
}
headers = {
"X-API-KEY": "<x-api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-API-KEY': '<x-api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
id: '<string>',
parts: [
{
action: 'alternative',
requestId: '<string>',
text: '<string>',
type: 'input_response'
}
]
})
};
fetch('https://staging.crossmint.com/api/unstable/agent-checkouts/{id}/messages', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://staging.crossmint.com/api/unstable/agent-checkouts/{id}/messages",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'id' => '<string>',
'parts' => [
[
'action' => 'alternative',
'requestId' => '<string>',
'text' => '<string>',
'type' => 'input_response'
]
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-API-KEY: <x-api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://staging.crossmint.com/api/unstable/agent-checkouts/{id}/messages"
payload := strings.NewReader("{\n \"id\": \"<string>\",\n \"parts\": [\n {\n \"action\": \"alternative\",\n \"requestId\": \"<string>\",\n \"text\": \"<string>\",\n \"type\": \"input_response\"\n }\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-API-KEY", "<x-api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://staging.crossmint.com/api/unstable/agent-checkouts/{id}/messages")
.header("X-API-KEY", "<x-api-key>")
.header("Content-Type", "application/json")
.body("{\n \"id\": \"<string>\",\n \"parts\": [\n {\n \"action\": \"alternative\",\n \"requestId\": \"<string>\",\n \"text\": \"<string>\",\n \"type\": \"input_response\"\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://staging.crossmint.com/api/unstable/agent-checkouts/{id}/messages")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-API-KEY"] = '<x-api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"id\": \"<string>\",\n \"parts\": [\n {\n \"action\": \"alternative\",\n \"requestId\": \"<string>\",\n \"text\": \"<string>\",\n \"type\": \"input_response\"\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"messageId": "<string>",
"status": "accepted"
}Headers
Server-side subject to act on behalf of. Ignored for client-side user auth.
Bearer token for client-side user auth.
Crossmint project API key.
Path Parameters
Minimum string length:
1Body
application/json
Was this page helpful?

