Skip to content
POST /automation/{id}/options

target.kind input needs can_use, config needs can_manage, step_model (the AI models an agent step can use: value is the model ref) needs can_manage, version draft needs can_manage. Errors: 400 options_not_searchable, 400 invalid_cursor, 404 option_target_not_found, 403 tool_restricted, 502 option_source_failed.

Path Parameters

idstring
required·

Resource id

Request Body

cursorstring
depsobject

Values of the fields this lookup depends on.

limitinteger
qstring

Substring search. Honored only when the page reports searchable.

targetobject
versionstring
Possible values:
publisheddraft

Response Body

next_cursorstring,null
prev_cursornull
resultobject[]
labelstring
subtextstring,null
value
searchableboolean
curl -X POST 'https://api.elaichi.ai/automation/<id>/options' \
  -H 'Authorization: Bearer $ELAICHI_API_TOKEN' \
  -H 'Content-Type: application/json' \
  -d '{"q":"your_q","cursor":"your_cursor","limit":0,"deps":{},"target":{},"version":"published"}'
const body = {
  "q": "your_q",
  "cursor": "your_cursor",
  "limit": 0,
  "deps": {},
  "target": {},
  "version": "published"
};

const response = await fetch('https://api.elaichi.ai/automation/<id>/options', {
  method: 'POST',
  headers: {
    'Authorization': 'Bearer ' + process.env.ELAICHI_API_TOKEN,
    'Content-Type': 'application/json',
  },
  body: JSON.stringify(body),
});

const data = await response.json();
console.log(data);
import os
import requests

url = "https://api.elaichi.ai/automation/<id>/options"
headers = {
    "Authorization": f"Bearer {os.environ['ELAICHI_API_TOKEN']}",
    "Content-Type": "application/json",
}
payload = {
    "q": "your_q",
    "cursor": "your_cursor",
    "limit": 0,
    "deps": {},
    "target": {},
    "version": "published"
}

response = requests.post(url, headers=headers, json=payload)
print(response.json())