Senders
Create Sender
Create a new sender identity. The email address is generated as emailUsername@domain.
https://graph.sendcorex.com/v3.0/sendersThe domain must be verified in your account. A shared domain also works: see Shared Domains for the list.
A sender is also a mailbox. To read the emails it receives, generate a token for it in the webmail and use the Receive Emails API.
Body parameters
emailUsernamestringrequiredThe username part of the email address, before the
@.e.g.
"john.smith"fromPrefixstringrequiredThe display name shown to recipients.
e.g.
"John Smith"replyTostringrequiredFull email address where replies should be sent.
e.g.
"john.smith@sendcorex.com"domainstringrequiredDomain name. It must be verified in your account, or be a shared domain.
e.g.
"sendcorex.com"
Quick start
import axios from 'axios';
const response = await axios.post(
'https://graph.sendcorex.com/v3.0/senders',
{
emailUsername: "john.smith",
fromPrefix: "John Smith",
replyTo: "john.smith@sendcorex.com",
domain: "sendcorex.com"
},
{ headers: { Authorization: process.env.SENDCOREX_API_KEY } },
);
console.log(response.data);Response
{
"success": true,
"code": "SENDER_CREATED",
"sender": {
"id": "N4U292XC2ZD9W79UF4X4PSY0",
"from": "John Smith",
"username": "john.smith",
"replyTo": "john.smith@sendcorex.com"
}
}Response fields
codeSENDER_CREATEDwhen the sender was created.sender.idThe new sender ID.
sender.fromThe display name.
sender.usernameThe username part of the email address.
sender.replyToThe reply-to address.
Errors
HTTP-level errors return type, code and message. Errors marked CMD come back inside the command result, with HTTP 200.
- 401
INVALID_API_KEYThe API key is invalid or revoked.