cURL
# 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/false_120000000000@g.us_EXAMPLE/actions" \
-H "Authorization: Bearer $SUPERSKOPE_API_KEY" \
-H "Idempotency-Key: $IDEMPOTENCY_KEY" \
-H "Content-Type: application/json" \
-d '{"action":"pin","days":7}'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.messageAction('120000000000@g.us', 'false_120000000000@g.us_EXAMPLE', { action: 'pin', days: 7 }, { idempotencyKey });
console.log(result);
import os
import requests
response = requests.post(
"https://api.superskope.com/api/v1/chats/120000000000@g.us/messages/false_120000000000@g.us_EXAMPLE/actions",
headers={"Authorization": f"Bearer {os.environ['SUPERSKOPE_API_KEY']}", "Idempotency-Key": os.environ["IDEMPOTENCY_KEY"]},
json={"action": "pin", "days": 7},
timeout=40,
)
print(response.status_code, response.json())
{
"requestId": "<string>",
"state": "completed",
"messageId": "<string>",
"action": "<string>",
"targetChatId": "<string>",
"replayed": true,
"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>"
}{
"error": "<string>"
}Messages
Run a message action
Edit, delete, forward, pin or unpin one exact message. Requires messages:edit, messages:delete, messages:forward or messages:pin according to action. Forward also requires messages:write on its selected target. Edit/delete apply only to linked-account own sent messages. Groups and DMs are supported with full current account/chat/message proof. Unknown effects remain locked; never automatically retry.
cURL
# 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/false_120000000000@g.us_EXAMPLE/actions" \
-H "Authorization: Bearer $SUPERSKOPE_API_KEY" \
-H "Idempotency-Key: $IDEMPOTENCY_KEY" \
-H "Content-Type: application/json" \
-d '{"action":"pin","days":7}'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.messageAction('120000000000@g.us', 'false_120000000000@g.us_EXAMPLE', { action: 'pin', days: 7 }, { idempotencyKey });
console.log(result);
import os
import requests
response = requests.post(
"https://api.superskope.com/api/v1/chats/120000000000@g.us/messages/false_120000000000@g.us_EXAMPLE/actions",
headers={"Authorization": f"Bearer {os.environ['SUPERSKOPE_API_KEY']}", "Idempotency-Key": os.environ["IDEMPOTENCY_KEY"]},
json={"action": "pin", "days": 7},
timeout=40,
)
print(response.status_code, response.json())
{
"requestId": "<string>",
"state": "completed",
"messageId": "<string>",
"action": "<string>",
"targetChatId": "<string>",
"replayed": true,
"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>"
}{
"error": "<string>"
}Authorizations
Body
application/json
edit requires text and an own sent message; delete also requires own sent message; forward requires a selected targetChatId and independent target messages:write. All require full exact same-chat message proof.