Email ›
Get sandbox email
GET
/v1/sandboxes/{id}/emailWhether mail is on for the sandbox, and the domain its addresses end in. It changes nothing, and is answered whatever state the sandbox is in.
RequestTypeScript
- import { Agental } from "agental-sdk";
- const agental = new Agental();
- const sandbox = await agental.sandboxes.get("sbx_2a9a47e50daec64a");
- const email = await sandbox.email.state();
Answer200 OK · SandboxEmail
- {
- "enabled": boolean,
- "enabledAt": string | null,
- "domain": string | null,
- }
Whether mail is on, and the sandbox's mail domain.
Path
idrequiredstring | e.g. "sbx_0123456789abcdef" |
Headers
AuthorizationrequiredBearer key | An API key that may make this call. |
Returns
200 Whether mail is on, and the sandbox's mail domain.
SandboxEmail3 fields
enabledboolean
Whether mail is on for the sandbox.
More
Off, nothing sent to it is taken and nothing is charged for it. It is off until PUT /v1/sandboxes/{id}/email turns it on.enabledAtstringnull
Since when it is on.
More
Null while it is off.domainstringnull
What every address of the sandbox ends in.
More
Any name before the @ reaches it, and the message says which was used. It is the sandbox's for as long as the sandbox is there and is never given to another. Null where no mail is offered: GET /v1/policy says so as email.Errors and other answers
| 404 | Not found. |
Every error answers { "error": { "code", "message" } }; a key without the action a call needs answers 403 key_action_forbidden, naming it.