# Persist the key first. Reuse it only to inspect an uncertain result.
curl -X POST "https://api.superskope.com/api/v1/chats/120000000000@g.us/messages" \
-H "Authorization: Bearer $SUPERSKOPE_API_KEY" \
-H "Idempotency-Key: $IDEMPOTENCY_KEY" \
-H "Content-Type: application/json" \
-d '{"type":"text","text":"Thanks, we received your order."}'import { SuperSkope } from '@superskope/sdk';
const client = new SuperSkope({
origin: 'https://api.superskope.com',
apiKey: process.env.SUPERSKOPE_API_KEY,
});
// Persist the key first. Reuse it only to inspect an uncertain result.
const idempotencyKey = process.env.IDEMPOTENCY_KEY;
const result = await client.sendText('120000000000@g.us', 'Thanks, we received your order.', { idempotencyKey });
console.log(result);
import os
import requests
response = requests.post(
"https://api.superskope.com/api/v1/chats/120000000000@g.us/messages",
headers={"Authorization": f"Bearer {os.environ['SUPERSKOPE_API_KEY']}", "Idempotency-Key": os.environ["IDEMPOTENCY_KEY"]},
json={"type": "text", "text": "Thanks, we received your order."},
timeout=40,
)
print(response.status_code, response.json())
{
"requestId": "order-1042-reply",
"state": "sent",
"messageId": "true_120000000000@g.us_3EB0C0FFEE",
"replayed": true
}{
"requestId": "order-1042-reply",
"state": "sent",
"messageId": "true_120000000000@g.us_3EB0C0FFEE",
"replayed": false
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}Send a message
Send once to an existing selected conversation. Ordinary messages require messages:write. Output with agent context instead requires messages:bot, agents:use, explicit agentIds delegation, selected-chat authority and a current membership hash. Bot-only keys cannot omit context to bypass takeover. Stable Idempotency-Key required; sent means engine acceptance, not recipient delivery.
# Persist the key first. Reuse it only to inspect an uncertain result.
curl -X POST "https://api.superskope.com/api/v1/chats/120000000000@g.us/messages" \
-H "Authorization: Bearer $SUPERSKOPE_API_KEY" \
-H "Idempotency-Key: $IDEMPOTENCY_KEY" \
-H "Content-Type: application/json" \
-d '{"type":"text","text":"Thanks, we received your order."}'import { SuperSkope } from '@superskope/sdk';
const client = new SuperSkope({
origin: 'https://api.superskope.com',
apiKey: process.env.SUPERSKOPE_API_KEY,
});
// Persist the key first. Reuse it only to inspect an uncertain result.
const idempotencyKey = process.env.IDEMPOTENCY_KEY;
const result = await client.sendText('120000000000@g.us', 'Thanks, we received your order.', { idempotencyKey });
console.log(result);
import os
import requests
response = requests.post(
"https://api.superskope.com/api/v1/chats/120000000000@g.us/messages",
headers={"Authorization": f"Bearer {os.environ['SUPERSKOPE_API_KEY']}", "Idempotency-Key": os.environ["IDEMPOTENCY_KEY"]},
json={"type": "text", "text": "Thanks, we received your order."},
timeout=40,
)
print(response.status_code, response.json())
{
"requestId": "order-1042-reply",
"state": "sent",
"messageId": "true_120000000000@g.us_3EB0C0FFEE",
"replayed": true
}{
"requestId": "order-1042-reply",
"state": "sent",
"messageId": "true_120000000000@g.us_3EB0C0FFEE",
"replayed": false
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}Authorizations
Body
text needs text. File types need base64 data and filename; maximum decoded 5 MiB. replyTo must refer to an available same-chat message. Optional agent context requires explicit agent delegation, agents:use and messages:bot. Bot-only keys cannot omit it to become ordinary senders.
1 - 4000Response
Completed repeat of the same request. The saved result is returned with replayed: true; nothing is sent again.