Manage a Bot's routines
curl --request POST \
--url https://omnicommerce.ai/api/v1/bots/{botId}/routines \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"requestId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"mutation": {
"routines": [
{
"name": "<string>",
"instruction": "<string>",
"triggers": [
{
"type": "schedule",
"expression": "<string>",
"timezone": "<string>",
"id": "<string>",
"enabled": true,
"name": "<string>"
}
]
}
],
"action": "create"
}
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
requestId: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
mutation: {
routines: [
{
name: '<string>',
instruction: '<string>',
triggers: [
{
type: 'schedule',
expression: '<string>',
timezone: '<string>',
id: '<string>',
enabled: true,
name: '<string>'
}
]
}
],
action: 'create'
}
})
};
fetch('https://omnicommerce.ai/api/v1/bots/{botId}/routines', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://omnicommerce.ai/api/v1/bots/{botId}/routines"
payload = {
"requestId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"mutation": {
"routines": [
{
"name": "<string>",
"instruction": "<string>",
"triggers": [
{
"type": "schedule",
"expression": "<string>",
"timezone": "<string>",
"id": "<string>",
"enabled": True,
"name": "<string>"
}
]
}
],
"action": "create"
}
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"success": true,
"routineIds": [
"<string>"
],
"succeededCount": 4503599627370495,
"failedCount": 4503599627370495,
"results": [
{
"index": 4503599627370495,
"routineId": "<string>",
"success": true,
"result": "<unknown>"
}
]
}Bots
Manage a Bot's routines
Requires agents:invoke and assistant.use. Use a signed-in member session or a member’s CLI token. Organization OAuth and Computer credentials cannot access personal Bots.
Create, edit, link, pause, resume, delete, test, or run a batch of routines. New personal routines start paused. Reuse the same requestId only when retrying the same request. Inspect every ordered result before retrying failed targets.
POST
/
api
/
v1
/
bots
/
{botId}
/
routines
Manage a Bot's routines
curl --request POST \
--url https://omnicommerce.ai/api/v1/bots/{botId}/routines \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"requestId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"mutation": {
"routines": [
{
"name": "<string>",
"instruction": "<string>",
"triggers": [
{
"type": "schedule",
"expression": "<string>",
"timezone": "<string>",
"id": "<string>",
"enabled": true,
"name": "<string>"
}
]
}
],
"action": "create"
}
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
requestId: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
mutation: {
routines: [
{
name: '<string>',
instruction: '<string>',
triggers: [
{
type: 'schedule',
expression: '<string>',
timezone: '<string>',
id: '<string>',
enabled: true,
name: '<string>'
}
]
}
],
action: 'create'
}
})
};
fetch('https://omnicommerce.ai/api/v1/bots/{botId}/routines', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://omnicommerce.ai/api/v1/bots/{botId}/routines"
payload = {
"requestId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"mutation": {
"routines": [
{
"name": "<string>",
"instruction": "<string>",
"triggers": [
{
"type": "schedule",
"expression": "<string>",
"timezone": "<string>",
"id": "<string>",
"enabled": True,
"name": "<string>"
}
]
}
],
"action": "create"
}
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"success": true,
"routineIds": [
"<string>"
],
"succeededCount": 4503599627370495,
"failedCount": 4503599627370495,
"results": [
{
"index": 4503599627370495,
"routineId": "<string>",
"success": true,
"result": "<unknown>"
}
]
}Authorizations
Query Parameters
Body
application/json
Response
Results in request order, including individual failures.