Receive Emails: Identity
Whoami
Returns which mailbox this credential belongs to and details about the credential itself, without reading any message. Use it to verify that a credential belongs to a specific mailbox.
https://g.sendcorex.com/v1command: whoamiEvery field under token except type is only returned when the credential is a mailbox token (mailbox_token). OAuth access tokens return only token.type.
Arguments
This endpoint takes no arguments.
Quick start
import axios from 'axios';
const response = await axios.post(
'https://g.sendcorex.com/v1',
{
commands: [
{
command: "whoami"
}
]
},
{ headers: { Authorization: process.env.SENDCOREX_TOKEN } },
);
const [result] = response.data.results;
if (result.type !== 'SUCCESS') throw new Error(`${result.code}: ${result.message}`);
console.log(result.data);Response
{
"type": "SUCCESS",
"results": [
{
"command": "whoami",
"id": "0",
"type": "SUCCESS",
"data": {
"mailbox": {
"email": "support@acme.com",
"from_name": "Acme Support",
"sender_ref": "snd_7Kq2Xr9P"
},
"token": {
"type": "mailbox_token",
"id": "mbt_3Fh8LwQ1",
"name": "Helpdesk bot",
"prefix": "scx_mb_4f9a",
"created_at": "2026-10-02T09:14:00.000Z",
"expires_at": null,
"last_used_at": "2026-11-19T00:31:12.000Z"
}
}
}
]
}Response fields
mailbox.emailThe mailbox address this credential belongs to.
mailbox.from_nameThe display name used when sending from this mailbox.
mailbox.sender_refThe reference of the sender profile behind this mailbox.
token.typemailbox_tokenfor a mailbox token,oauthfor an OAuth access token.token.idThe token ID. Only for
mailbox_token.token.nameThe name given to the token. Only for
mailbox_token.token.prefixThe first characters of the token, as shown in the dashboard. Only for
mailbox_token.token.created_atWhen the token was created. Only for
mailbox_token.token.expires_atWhen the token expires, or
nullif it never expires. Only formailbox_token.token.last_used_atThe last time the token was used, or
null. Only formailbox_token.
Errors
HTTP-level errors return type, code and message. Errors marked CMD come back inside the command result, with HTTP 200.
- 401
TOKEN_EXPIREDThe access token has expired. Call Refresh Token and repeat the request.
- 401
INVALID_TOKENThe token is malformed, unknown or revoked.
- 429
RATE_LIMITEDMore than 15 requests/s or 15 in flight for the same IP + mailbox. Wait the number of seconds in Retry-After.
- CMD
INTERNALServer error. The detail is only written to the server log.