cURL
# Persist the key first. Reuse it only to inspect an uncertain result.
curl -X PUT "https://api.superskope.com/api/v1/agents/api-example-agent-id" \
-H "Authorization: Bearer $SUPERSKOPE_API_KEY" \
-H "Idempotency-Key: $IDEMPOTENCY_KEY" \
-H "Content-Type: application/json" \
-d '{"enabled":false,"expectedVersion":1}'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.updateAgent('api-example-agent-id', { enabled: false, expectedVersion: 1 }, { idempotencyKey });
console.log(result);
import os
import requests
response = requests.put(
"https://api.superskope.com/api/v1/agents/api-example-agent-id",
headers={"Authorization": f"Bearer {os.environ['SUPERSKOPE_API_KEY']}", "Idempotency-Key": os.environ["IDEMPOTENCY_KEY"]},
json={"enabled": False, "expectedVersion": 1},
timeout=40,
)
print(response.status_code, response.json())
{
"requestId": "<string>",
"state": "completed",
"agent": {
"id": "<string>",
"name": "<string>",
"enabled": true,
"chats": [
"<string>"
],
"delivery": "pull",
"version": 2
},
"automation": {},
"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>"
}Agents
Update a pull agent
Update an API-owned pull agent. Requires agents:manage. Only API-owned pull agents of this exact key and number may be managed. New agents start with no chats; no callback URL is accepted. Stable Idempotency-Key and current versions are required.
cURL
# Persist the key first. Reuse it only to inspect an uncertain result.
curl -X PUT "https://api.superskope.com/api/v1/agents/api-example-agent-id" \
-H "Authorization: Bearer $SUPERSKOPE_API_KEY" \
-H "Idempotency-Key: $IDEMPOTENCY_KEY" \
-H "Content-Type: application/json" \
-d '{"enabled":false,"expectedVersion":1}'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.updateAgent('api-example-agent-id', { enabled: false, expectedVersion: 1 }, { idempotencyKey });
console.log(result);
import os
import requests
response = requests.put(
"https://api.superskope.com/api/v1/agents/api-example-agent-id",
headers={"Authorization": f"Bearer {os.environ['SUPERSKOPE_API_KEY']}", "Idempotency-Key": os.environ["IDEMPOTENCY_KEY"]},
json={"enabled": False, "expectedVersion": 1},
timeout=40,
)
print(response.status_code, response.json())
{
"requestId": "<string>",
"state": "completed",
"agent": {
"id": "<string>",
"name": "<string>",
"enabled": true,
"chats": [
"<string>"
],
"delivery": "pull",
"version": 2
},
"automation": {},
"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>"
}Authorizations
Body
application/json