For AI agents: a documentation index is available at the root level at /llms.txt and /llms-full.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
contact@agentmail.ccDiscord
DocumentationAPI ReferenceKnowledge BaseChangelog
DocumentationAPI ReferenceKnowledge BaseChangelog
  • API Reference
      • GETList Entries
      • GETGet List Entry
      • POSTCreate List Entry
      • DELDelete List Entry
LogoLogo
contact@agentmail.ccDiscord
API ReferenceLists

List Entries

GET
/v0/lists/:direction/:type
GET
/v0/lists/:direction/:type
1from agentmail import AgentMail
2
3client = AgentMail(
4 api_key="YOUR_TOKEN_HERE",
5)
6
7client.lists.list(
8 direction="send",
9 type="allow",
10)
200Retrieved
1{
2 "count": 1,
3 "entries": [
4 {
5 "created_at": "2024-01-15T09:30:00Z",
6 "direction": "send",
7 "entry": "entry",
8 "entry_type": "email",
9 "list_type": "allow",
10 "organization_id": "organization_id",
11 "read_only": true,
12 "reason": "reason"
13 },
14 {
15 "created_at": "2024-01-15T09:30:00Z",
16 "direction": "send",
17 "entry": "entry",
18 "entry_type": "email",
19 "list_type": "allow",
20 "organization_id": "organization_id",
21 "read_only": true,
22 "reason": "reason"
23 }
24 ],
25 "limit": 1,
26 "next_page_token": "next_page_token"
27}
**CLI:** ```bash agentmail lists list --direction <direction> --type <type> ```
Was this page helpful?
Previous

Get List Entry

Next
Built with

CLI:

$agentmail lists list --direction <direction> --type <type>

Authentication

AuthorizationBearer

Bearer authentication of the form Bearer <token>, where token is your auth token.

Path parameters

directionenumRequired
Direction of list entry.
Allowed values:
typeenumRequired
Type of list entry.
Allowed values:

Query parameters

limitintegerOptional
Limit of number of items returned.
page_tokenstringOptional
Page token for pagination.

Response

This endpoint returns an object.
countinteger
Number of items returned.
entrieslist of objects
Ordered by entry ascending.
limitinteger
Limit of number of items returned.
next_page_tokenstring
Page token for pagination.