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

Create List Entry

POST
/v0/lists/:direction/:type
POST
/v0/lists/:direction/:type
1from agentmail import AgentMail
2
3client = AgentMail(
4 api_key="YOUR_TOKEN_HERE",
5)
6
7client.lists.create(
8 direction="send",
9 type="allow",
10 entry="entry",
11)
1{
2 "created_at": "2024-01-15T09:30:00Z",
3 "direction": "send",
4 "entry": "entry",
5 "entry_type": "email",
6 "list_type": "allow",
7 "organization_id": "organization_id",
8 "read_only": true,
9 "reason": "reason"
10}
**CLI:** ```bash agentmail lists create --direction <direction> --type <type> --entry user@example.com ```
Was this page helpful?
Previous

Delete List Entry

Next
Built with

CLI:

$agentmail lists create --direction <direction> --type <type> --entry user@example.com

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:

Request

This endpoint expects an object.
entrystringRequired
Email address or domain to add.
reasonstringOptional
Reason for adding the entry.

Response

This endpoint returns an object.
created_atdatetime
Time at which entry was created.
directionenum
Direction of list entry.
Allowed values:
entrystring
Email address or domain of list entry.
entry_typeenum
Whether the entry is an email address or domain.
Allowed values:
list_typeenum
Type of list entry.
Allowed values:
organization_idstring
ID of organization.
read_onlyboolean

Whether the entry is read-only and cannot be deleted via the API.

reasonstring
Reason for adding the entry.

Errors

400
Validation Error