cURL
curl -X PUT "https://api.superskope.com/api/v1/chats/120000000000@g.us/automation" \
-H "Authorization: Bearer $SUPERSKOPE_API_KEY" \
-H "Content-Type: application/json" \
-d '{"paused":true,"expectedVersion":3}'import { SuperSkope } from '@superskope/sdk';
const client = new SuperSkope({
origin: 'https://api.superskope.com',
apiKey: process.env.SUPERSKOPE_API_KEY,
});
const result = await client.setPaused('120000000000@g.us', true, 3);
console.log(result);
import os
import requests
response = requests.put(
"https://api.superskope.com/api/v1/chats/120000000000@g.us/automation",
headers={"Authorization": f"Bearer {os.environ['SUPERSKOPE_API_KEY']}"},
json={"paused": True, "expectedVersion": 3},
timeout=40,
)
print(response.status_code, response.json())
{
"enabled": true,
"paused": true,
"version": 123
}{
"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>"
}Agents
Pause or resume agent
Pause or resume an already permitted agent. Requires automation:write. Only the key’s selected conversations are accessible.
cURL
curl -X PUT "https://api.superskope.com/api/v1/chats/120000000000@g.us/automation" \
-H "Authorization: Bearer $SUPERSKOPE_API_KEY" \
-H "Content-Type: application/json" \
-d '{"paused":true,"expectedVersion":3}'import { SuperSkope } from '@superskope/sdk';
const client = new SuperSkope({
origin: 'https://api.superskope.com',
apiKey: process.env.SUPERSKOPE_API_KEY,
});
const result = await client.setPaused('120000000000@g.us', true, 3);
console.log(result);
import os
import requests
response = requests.put(
"https://api.superskope.com/api/v1/chats/120000000000@g.us/automation",
headers={"Authorization": f"Bearer {os.environ['SUPERSKOPE_API_KEY']}"},
json={"paused": True, "expectedVersion": 3},
timeout=40,
)
print(response.status_code, response.json())
{
"enabled": true,
"paused": true,
"version": 123
}{
"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>"
}