Test inbox
In a dev environment, a project’s email to an address at .test, such as a sign-in code, waits here for an hour instead of being sent, so tests and agents sign in with made-up addresses and no mailbox. Agentpost’s own email, such as a workspace invitation, is always sent to its address.
Paths are from https://api.agentpost.tools, and every route follows the API basics. The examples send the first credential the route takes; Credentials explains each one.
Read the test inbox
GET /v1/test-inbox
The project’s dev messages from the last hour, oldest first, at most the newest 100.
- Who may call: Your server, with a secret key.
- Access: The project’s
devsecret key,sk_test_…, only. - Credential: the examples send your project’s
devsecret key,sk_test_…, asAuthorization: Bearer <token>.
Query parameters
| Name | Type | Required | Description |
|---|---|---|---|
to |
string |
No | Only the messages to this address. |
Response
200 OK, with:
| Name | Type | Present | Description |
|---|---|---|---|
messages |
TestMessage array |
Always |
Errors
forbidden(403)
Any operation can also answer with the codes Conventions lists.
The TestMessage object
A message a dev environment sent to a .test address.
| Name | Type | Present | Description |
|---|---|---|---|
template |
string |
Always | What the message is, such as sign_in_code or invitation. |
to |
string |
Always | Lowercased. |
data |
object |
Always | The message’s fields, such as code or link. |
at |
string |
Always | An ISO 8601 date and time. |