POST
/
api
/
send-email
PHP
<?php
$client = new isend('YOUR_API_KEY');
$client->emails->send([
  'from' => 'your@email.com',
  'to' => 'delivered@isend.dev',
  'template' => 'welcome_emailer',
  'data_mapping' => [
    'name' => 'John Doe',
    'email' => 'john@example.com'
  ]
]);

Send Email

Send templated emails through the iSend API using dynamic placeholders with a single API call.

Endpoint

POST https://api.isend.ai/emails/send

Headers

  • Authorization (string, required): Bearer token using your API key.
    Example: Authorization: Bearer is_xxxxxxx
  • Content-Type: application/json

Request Body Parameters

FieldTypeRequiredDescription
fromstringSender’s email. Use name <email@domain.com> format if needed.
tostring or arrayEmail or array of emails for recipients.
templatestringIdentifier or name of the template to send.
data_mappingobjectDynamic placeholder values to inject into the template.

Sample Request

{
  "from": "your@email.com",
  "to": "delivered@isend.dev",
  "template": "welcome_emailer",
  "data_mapping": {
    "name": "John Doe",
    "email": "john@example.com"
  }
}

Sample Response

{
  "id": "abc1234-def5-6789-xyz-00000000",
  "status": "success"
}

PHP SDK Example

<?php
$client = new isend('YOUR_API_KEY');
$client->emails->send([
  'from' => 'your@email.com',
  'to' => 'delivered@isend.dev',
  'template' => 'welcome_emailer',
  'data_mapping' => [
    'name' => 'John Doe',
    'email' => 'john@example.com'
  ]
]);

Notes

  • Ensure the template exists and is active on your account.
  • data_mapping must match the placeholders used in your template.
  • You may use an array for to if you want to send to multiple recipients.

Response

200

Successful response