List inboxes

by AgentMail

agentmail/list-inboxes

List the email inboxes on the account, newest first.

Billed per
call
Price
Price:
Provider
AgentMail
Timeout
5 min

Overview

Returns the account's inboxes ordered by when they were created, each with its inbox identifier, email address, timestamps, and any display name or metadata set when it was created. A page size caps how many come back per call, and when more remain the response carries an opaque token to pass on the next request. The order can be flipped to oldest first.

A count and a list of inboxes with their id, address, and timestamps, plus a token when more remain.

Input

These go in the input object of the run request.

FieldTypeRequiredDescription
limitintegerNoHow many inboxes to return.
page_tokenstringNoThe token from a previous response, to continue the listing.
ascendingbooleanNoReturn oldest first instead of newest first.
Default: false

Requests up to 1 MB.

Example

Use your own API key and a saved idempotency key for each new job. Replace image or media placeholders with your own publicly reachable HTTPS URLs. Keep the same key and request body when recovering a timeout.

# Set once per job; reuse this key and the identical body after a timeout.
: "${AGENTSKY_IDEMPOTENCY_KEY:?Set a unique, saved key for this job}"
curl --fail-with-body https://gateway.agentsky.dev/v1/run \
  -H "authorization: Bearer $AGENTSKY_API_KEY" \
  -H "content-type: application/json" \
  -H "Idempotency-Key: $AGENTSKY_IDEMPOTENCY_KEY" \
  -d '{"provider":"agentmail","endpoint":"list-inboxes","input":{"limit":20}}'
# If status is READY/RUNNING, poll GET /v1/runs/{runId} with the same API key.

Pricing

— per call using your plan when signed in. Read the final customer charge from price.amount.value after the run finishes. A RUNNING response is not the final bill.

Questions