Reference
Approvals
What an agent asked that only a person may do, and the sends a person wanted to see first.
Calls go to https://address.seleya.ai/api. A refusal is {"error": {"code", "message"}} with its status; every code is in Errors.
Waiting for a person
GET /v1/approvals
Called with a key or a person signed in.
What waits for a person: sends held for approval, and person-only actions agents asked for.
Parameters
-
addressstring, in query - One address.
-
allstring, in query - true includes those already decided.
Answers
- 200
- Done
- 401
- No valid key, session or token
- 404
- Not found, or not yours to see
Fields of the 200 answer
-
approvalsarray of Approval
curl https://address.seleya.ai/api/v1/approvals \
-H "Authorization: Bearer $SELEYA_KEY"import os, requests
r = requests.get(
"https://address.seleya.ai/api/v1/approvals",
headers={"Authorization": f"Bearer {os.environ['SELEYA_KEY']}"},
)
print(r.status_code, r.json())const r = await fetch("https://address.seleya.ai/api/v1/approvals", {
method: "GET",
headers: { Authorization: `Bearer ${process.env.SELEYA_KEY}` },
});
console.log(r.status, await r.json());{
"approvals": [
{
"id": "7f3c9a2e-0000-4000-8000-000000000001",
"kind": "send",
"summary": "send a meeting invitation to sam@beta.example",
"address": "desk@acme.seleya.email",
"company": "Acme",
"asked_by": "The app Example agent",
"status": "pending",
"decided_at": null,
"created_at": "2026-10-22T12:00:00Z",
"request": {
"to": [
"sam@beta.example"
],
"cc": [],
"subject": "Meeting",
"text": "Can we meet on Tuesday?",
"transport": "auto"
}
}
]
}An ask from its emailed link
POST /v1/approvals/by-link
Called by address.seleya.ai, signed in.
What an emailed link asks, as the confirm page shows it.
Body
-
tokenstring required - The token from the emailed link's fragment.
Answers
- 200
- Done
- 404
- Not found, or not yours to see
Fields of the 200 answer
-
idstring -
kindsend | release | allow_sender | unblock_sender | screening | approvals_mode | set_holder | retire | add_admin | remove_admin | add_contacts | hard_stop_off -
summarystring, or null -
addressstring, or null -
companystring, or null -
asked_bystring -
statuspending | sending | approving | approved | rejected | failed | prepared -
decided_atstring, or null -
created_atstring -
requestobject
Decide from the link
POST /v1/approvals/by-link/decide
Called by address.seleya.ai, signed in.
The confirm page's button. Opening the link decides nothing.
Body
-
tokenstring required - The token from the emailed link's fragment.
-
decisionapprove | reject required - approve carries it out; reject drops it.
Answers
- 200
- Done
- 403
- Not allowed for this caller
- 404
- Not found, or not yours to see
- 409
- Conflicts with the current state
- 422
- A value is refused; the message says which
One ask
GET /v1/approvals/{id}
Called with a key or a person signed in.
One ask, with what was asked and where it stands.
Parameters
-
idstring, in path required - Its id.
Answers
- 200
- Done
- 401
- No valid key, session or token
- 404
- Not found, or not yours to see
Fields of the 200 answer
-
idstring -
kindsend | release | allow_sender | unblock_sender | screening | approvals_mode | set_holder | retire | add_admin | remove_admin | add_contacts | hard_stop_off -
summarystring, or null -
addressstring, or null -
companystring, or null -
asked_bystring -
statuspending | sending | approving | approved | rejected | failed | prepared -
decided_atstring, or null -
created_atstring -
requestobject
curl https://address.seleya.ai/api/v1/approvals/ID \
-H "Authorization: Bearer $SELEYA_KEY"import os, requests
r = requests.get(
"https://address.seleya.ai/api/v1/approvals/ID",
headers={"Authorization": f"Bearer {os.environ['SELEYA_KEY']}"},
)
print(r.status_code, r.json())const r = await fetch("https://address.seleya.ai/api/v1/approvals/ID", {
method: "GET",
headers: { Authorization: `Bearer ${process.env.SELEYA_KEY}` },
});
console.log(r.status, await r.json());{
"id": "7f3c9a2e-0000-4000-8000-000000000001",
"kind": "send",
"summary": "send a meeting invitation to sam@beta.example",
"address": "desk@acme.seleya.email",
"company": "Acme",
"asked_by": "The app Example agent",
"status": "pending",
"decided_at": null,
"created_at": "2026-10-22T12:00:00Z",
"request": {
"to": [
"sam@beta.example"
],
"cc": [],
"subject": "Meeting",
"text": "Can we meet on Tuesday?",
"transport": "auto"
}
}Approve
POST /v1/approvals/{id}/approve
Called by address.seleya.ai, signed in.
Approves and carries it out. A person only.
Parameters
-
idstring, in path required - Its id.
Answers
- 200
- Done
- 401
- No valid key, session or token
- 403
- Not allowed for this caller
- 404
- Not found, or not yours to see
- 409
- Conflicts with the current state
Reject
POST /v1/approvals/{id}/reject
Called by address.seleya.ai, signed in.
Refuses it; nothing is done. A person only.
Parameters
-
idstring, in path required - Its id.
Answers
- 200
- Done
- 401
- No valid key, session or token
- 403
- Not allowed for this caller
- 404
- Not found, or not yours to see
- 409
- Conflicts with the current state
Fields of the 200 answer
-
idstring -
kindsend | release | allow_sender | unblock_sender | screening | approvals_mode | set_holder | retire | add_admin | remove_admin | add_contacts | hard_stop_off -
summarystring, or null -
addressstring, or null -
companystring, or null -
asked_bystring -
statuspending | sending | approving | approved | rejected | failed | prepared -
decided_atstring, or null -
created_atstring -
requestobject