Address

Reference

Approvals

What an agent asked that only a person may do, and the sends a person wanted to see first.

Markdown

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. Results are paginated with limit (1-100, default 100). Pass next_cursor as cursor with the same filters; null means the end. Each page checks current access. Held mail is oldest first; approvals are newest first. Equal timestamps use the unique id as a stable tiebreaker.

Parameters

address string, in query
One address.
all string, in query
true includes those already decided.
limit integer, in query
cursor string, in query
The previous page's next_cursor.

Answers

200
Done
401
No valid key, session or token
404
Not found, or not yours to see
422
bad_cursor or bad_query: invalid continuation or page size
503
content_unavailable: retained message content is temporarily unavailable
Fields of the 200 answer
approvals array of Approval
next_cursor string, or null
Continuation position, or null at the end. It is not an authorization credential.
curl https://address.seleya.ai/api/v1/approvals \
  -H "Authorization: Bearer $SELEYA_KEY"

Answer 200
{
  "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

token string required
The token from the emailed link's fragment.
download file
part string

Answers

200
Done
403
Current person no longer controls this request
404
Not found, or not yours to see
422
bad_query: select a file
503
content_unavailable: retained message content is temporarily unavailable
Fields of the 200 answer
id string
kind send | release | allow_sender | unblock_sender | screening | approvals_mode | set_holder | retire | add_admin | remove_admin | add_contacts | hard_stop_off | use_address
summary string, or null
address string, or null
company string, or null
asked_by string
status pending | sending | approving | approved | rejected | failed | prepared
decided_at string, or null
created_at string
request object

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

token string required
The token from the emailed link's fragment.
decision approve | 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
503
content_unavailable: retained message content is temporarily unavailable

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. Full content is a JSON manifest with stable text/HTML/file part ids. File retrieval requires this delivery or approval, not an uploader id. Refresh checks current authority and held-mail restrictions. Issued URLs remain bearer capabilities for five minutes after issuance.

Parameters

id string, in path required
Its id.
download file, in query
Retrieve a fresh capability after current authorization.
part string, in query
Stable file part id with download=file.

Answers

200
Done
401
No valid key, session or token
404
Not found, or not yours to see
422
bad_query: invalid download selection
503
content_unavailable: retained content unavailable; retry later
Fields of the 200 answer
id string
kind send | release | allow_sender | unblock_sender | screening | approvals_mode | set_holder | retire | add_admin | remove_admin | add_contacts | hard_stop_off | use_address
summary string, or null
address string, or null
company string, or null
asked_by string
status pending | sending | approving | approved | rejected | failed | prepared
decided_at string, or null
created_at string
request object
curl https://address.seleya.ai/api/v1/approvals/ID \
  -H "Authorization: Bearer $SELEYA_KEY"

Answer 200
{
  "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

id string, 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
503
content_unavailable: retained message content is temporarily unavailable

Reject

POST /v1/approvals/{id}/reject

Called by address.seleya.ai, signed in.

Refuses it; nothing is done. A person only.

Parameters

id string, 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
id string
kind send | release | allow_sender | unblock_sender | screening | approvals_mode | set_holder | retire | add_admin | remove_admin | add_contacts | hard_stop_off | use_address
summary string, or null
address string, or null
company string, or null
asked_by string
status pending | sending | approving | approved | rejected | failed | prepared
decided_at string, or null
created_at string
request object

Docs