Skip to content
GET /automation-approval/{id}/next

The caller’s own pending queue, in `sort` order and narrowed by the same filters as the inbox, skipping requests the caller has already voted on or cannot answer. Wraps to the top when nothing is left after this one; `next` is null when nothing is waiting.

Path Parameters

idstring
required·

Resource id

Query Parameters

automation_idstring
owner_user_idstring

Only requests on behalf of this workflow owner.

sortstring

expiring (soonest deadline first), oldest or newest (by when it was raised; the default). A cursor only continues the sort it was made for.

Possible values:
expiringoldestnewest
qstring

Matches the approval title and message. LIKE wildcards are matched literally. Max 200 characters.

Response Body

nextobject,null
idstring
titlestring
curl -X GET 'https://api.elaichi.ai/automation-approval/<id>/next' \
  -H 'Authorization: Bearer $ELAICHI_API_TOKEN' \
  -H 'Content-Type: application/json'
const response = await fetch('https://api.elaichi.ai/automation-approval/<id>/next', {
  method: 'GET',
  headers: {
    'Authorization': 'Bearer ' + process.env.ELAICHI_API_TOKEN,
    'Content-Type': 'application/json',
  },
});

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

url = "https://api.elaichi.ai/automation-approval/<id>/next"
headers = {
    "Authorization": f"Bearer {os.environ['ELAICHI_API_TOKEN']}",
    "Content-Type": "application/json",
}

response = requests.get(url, headers=headers)
print(response.json())