Resource

Messages

Flashy is an omnichannel platform that lets you send email, SMS and push notifications. Utilize our API to communicate with your customers via the channel that you choose.

Endpoints

Send an email

POST /messages/email

Using our Drag & Drop editor, you can design and maintain your email templates, and pass the template ID in the API to send beautiful responsive email templates.

As an alternative to using one of your email templates, you can pass the HTML as part of the request — set either html or template on the message.

Body parameters

  • message object required
  • message.html string
    Raw HTML of the email. Use this or template.
  • message.template string
    Template ID designed in the Flashy editor. Use this or html.
  • message.subject string required
  • message.from object required
  • message.from.name string required
  • message.from.email string (email) required
  • message.to object required
  • message.to.name string required
  • message.to.email string (email) required
  • message.vars object
    Any key/value variables to use inside the template.
Request
curl -X POST "https://api.flashy.app/messages/email" \
  -H "x-api-key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "message": {
        "html": "<html><head><title>Email Page Title</title></head><body><h1>Hello World!</h1><p>Sent from Flashyapp.</p></body></html>",
        "subject": "Anything",
        "from": {
            "name": "Flashy API Test",
            "email": "dev@flashyapp.com"
        },
        "to": {
            "name": "Test User",
            "email": "hello@flashyapp.com"
        },
        "vars": {
            "unique_hash": "somethinghere"
        }
    }
}'
Send your API key in the x-api-key header. Authentication
$flashy = new Flashy\Flashy(['api_key' => 'YOUR_API_KEY']);

$flashy->messages->email([
    'html' => '<html><head><title>Email Page Title</title></head><body><h1>Hello World!</h1><p>Sent from Flashyapp.</p></body></html>',
    'subject' => 'Anything',
    'from' => ['name' => 'Flashy API Test', 'email' => 'dev@flashyapp.com'],
    'to' => ['name' => 'Test User', 'email' => 'hello@flashyapp.com'],
    'vars' => ['unique_hash' => 'somethinghere'],
]);
composer require flashy/flashy-php PHP SDK setup
has no method for this endpoint — showing REST.
Response 200 Email queued for delivery.
{
    "success": true,
    "data": null
}

Send an SMS

POST /messages/sms

SMS messages can be sent worldwide through the Flashy platform. Make sure you include the country prefix on the phone number — for example, a United Kingdom number must include the 44 country code (list of country codes).

You must have credits on your account in order to send SMS messages.

Body parameters

  • message object required
  • message.from string required
    Sender name or number
  • message.to string required
    Recipient phone number, incl. country code
  • message.message string required
  • message.transactional boolean default: false
Request
curl -X POST "https://api.flashy.app/messages/sms" \
  -H "x-api-key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "message": {
        "from": "Flashyapp",
        "to": "972526845430",
        "message": "Hello World!",
        "transactional": false
    }
}'
Send your API key in the x-api-key header. Authentication
$flashy = new Flashy\Flashy(['api_key' => 'YOUR_API_KEY']);

$flashy->messages->sms([
    'from' => 'Flashyapp',
    'to' => '972526845430',
    'message' => 'Hello World!',
    'transactional' => false,
]);
composer require flashy/flashy-php PHP SDK setup
has no method for this endpoint — showing REST.
Response 200 SMS queued for delivery.
{
    "success": true,
    "data": null
}