GET /api/v1/topics
Every topic of the organization. This is the call that gives you the topicId every other topic
call requires, and reading it is open to every role — acting on a topic is not.
The list is complete: there is no pagination and no search on it.
Authorization
| Role in the organization | This endpoint |
|---|---|
OWNER | Allowed |
ADMIN | Allowed |
MEMBER | Allowed |
Example
bash
curl -H "x-api-key: $AGENTMAIL_API_KEY" \
"https://www.agentsmail.io/api/v1/topics"Response
200 OK— the topics, sorted by name. An organization with none answers an empty array.401 Unauthorized— missing or invalid key, or its owner left the organization.429 Too Many Requests— over 120 requests in a minute for this key.
Response fields
| Field | Type | Description |
|---|---|---|
success | boolean | Indicates if the operation was successful |
data | array | The topics |
data[].id | string | Unique identifier — this is the topicId used everywhere else |
data[].name | string | Name of the topic, unique in the organization |
data[].createdAt | string | ISO creation date |
data[].updatedAt | string | ISO date of the last change |
Example response
json
{
"success": true,
"data": [
{
"id": "7c2e4b19",
"name": "freelancing",
"createdAt": "2026-03-04T08:11:00.000Z",
"updatedAt": "2026-08-01T10:42:19.000Z"
}
]
}Notes
- No
?search=and no pagination here. The whole list comes back in one call — filter it on your side. - Renaming a topic is safe: campaigns, sequences and refusals all reference the id, never the name.