---
type: "docs"
translationKey: "docs-send-messages"
title: "Send messages from your own system"
description: "Let your own system send WhatsApp messages and emails through Fulldev Message: with a workflow or directly with a template."
intro: "Let your own system, such as a webshop or a planning tool, send WhatsApp messages and emails through Fulldev Message, from your organization's numbers and addresses."
---

## What you need

- Fulldev Message in your organization, with the account that sends: a
  WhatsApp number or a Gmail address.
- For WhatsApp: a template Meta approved. You make and submit templates in
  Message, under Templates. WhatsApp allows a free text only within 24 hours of
  the customer's last message.
- An API key of your organization.

## 1. Make an API key

Make an API key as the [introduction](/en/docs/api/#making-an-api-key) describes,
with **Send messages** as its access. Such a key sends WhatsApp messages and
emails through Message, starts Message's workflows and reads the templates and
the runs it started. It reads and changes nothing else in your organization.

Keep the key on your server and give each system its own key, so you can
revoke one without touching the rest. A key reads only the runs it started
itself: when you replace it, also by renewing it, the new key does not read
the old one's runs. Fulldev keeps a run for 90 days.

A retry sends nothing twice as long as you send the same reference, also with
a new key: the same `reference` for a workflow and the same `clientKey` when
you send directly. An `Idempotency-Key` holds only for the key that sent it.
When you start a workflow again with a new key, nothing new goes out, but the
API answers `NOT_FOUND`, as the new key does not read the old key's run.
Whether the message arrived is then in the run if you read it before the old
key stopped, and otherwise in Message in Fulldev, signed in.

That holds as long as Fulldev still has the first send or run: a send through
WhatsApp or Gmail until 90 days after its last change, an ended run until 90
days after it started. After that, the same `clientKey` or `reference` sends
again. An email from Fulldev's own address, without `accountId`, does keep its
`clientKey` for good.

## 2. Send with a workflow

With a workflow you set in Message what is sent: the account, the template or
the text. Your system sends only the values, such as the name and the order
number. To change the text, you change it in Message, without changing your
system. This is the simplest way.

1. In Message, open **Workflows** and choose **New workflow**. Owners and
   admins make workflows.
2. Choose the kind: **API WhatsApp message** or **API email**.
3. Give the workflow a name and a key, such as `order-confirmation`. The key
   goes into the address.
4. Choose the account that sends. For WhatsApp you also give the WhatsApp
   number ID, as Meta shows it in WhatsApp Manager, and choose an approved
   template. For email you write the subject and the text, with a value of the
   request as `{{order_number}}`.
5. To see each message first, turn on **Ask for approval before each
   message**. Turn the workflow **On** and save it.

The workflow then shows the **Address for other systems** and the **Fields to
send**. Your system sends those fields as text to that address:

```sh
curl -X POST https://app.full.dev/api/v1/triggers/order-confirmation \
  -H "Authorization: Bearer $FULLDEV_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "reference": "order-1042",
    "to": "+31612345678",
    "name": "Sam",
    "order_number": "1042"
  }'
```

- `reference` is your own reference for this message, such as the order
  number. When you send the same `reference` again, you get the same run back
  and no second message goes out. With other fields that gives
  `IDEMPOTENCY_CONFLICT`. So `reference` already makes the call safe to
  repeat; it needs no `Idempotency-Key`.
- `to` is the phone number in international format, such as `+31612345678`,
  or for email the email address.
- Each variable of the template or the text gets a field of the same name.

The answer is the run, once it has ended or waits. After 20 seconds you get
the run as it is then, also when it is still `running`. For example:

```json
{
  "id": "3f0c2a8e-6b1d-4e0f-9a52-7c1e8d4b2f60",
  "workflowId": "a2d45b1e-8c3f-4e7a-9b20-5d6c7e8f9a01",
  "status": "finished",
  "currentStep": "send",
  "waitingUntil": null,
  "errorCode": null,
  "createdAt": "2026-12-01T09:00:00.000Z",
  "updatedAt": "2026-12-01T09:00:02.000Z",
  "finishedAt": "2026-12-01T09:00:02.000Z",
  "approvals": [],
  "sends": [
    {
      "step": "send",
      "action": "send_whatsapp",
      "messageId": null,
      "status": "sent"
    }
  ]
}
```

- `status` says how far the run is. `running`: it is still going. `waiting`:
  it waits for approval. `ended`: approval was declined. `failed`: it stopped,
  with the cause in `errorCode`. `finished`: every step is done.
- `sends` says for each send whether the message arrived, also to a **Send
  messages** key. Its `messageId` is there only for whoever may read the
  conversation in Message; such a key reads no conversations. The status: `sent`, `delivered`
  or `read` once it went out, `failed` when it did not, and `unconfirmed` when
  WhatsApp's or Gmail's answer was lost, or the message record is gone and its
  delivery status is unknown, so it may or may not have gone out. A run that is `finished` can have such a send too. So check
  `sends` before you mark something as sent.
- When the run is not done yet, or to learn later whether the message
  arrived, read it again with `GET /api/v1/data/runs/<id>`, with the `id` of
  the answer.

Every field is at
[Trigger a webhook workflow](/en/docs/api/workflows/#triggers-start) in the
reference.

## 3. Send directly

To choose what is sent per message yourself, use the actions `send_whatsapp`
and `send_email`.

The id of the account that sends is in the address of its page in Message,
under Integrations: `https://app.full.dev/message/integrations/<id>`. An
account's WhatsApp templates, with their variables and Meta's review, are at
`GET /api/v1/data/templates?filter.accountId=<id>&filter.status=approved`.

Make one UUID per message, keep it with the message and send it as
`clientKey` and as `Idempotency-Key`, the same one on every retry. With the
same `clientKey` the message goes out once, also when you retry with a new
API key. A WhatsApp message with a template:

```sh
# Once per message, kept with it: the same on every retry, also with a new
# API key.
MESSAGE_KEY=$(uuidgen)

curl -X POST https://app.full.dev/api/v1/actions/send_whatsapp \
  -H "Authorization: Bearer $FULLDEV_API_KEY" \
  -H "Idempotency-Key: $MESSAGE_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "clientKey": "'"$MESSAGE_KEY"'",
    "accountId": "<the account id>",
    "phoneNumberId": "<the WhatsApp number ID>",
    "to": "+31612345678",
    "category": "utility",
    "template": {
      "name": "order_confirmation",
      "language": "en",
      "parameters": { "name": "Sam", "order_number": "1042" }
    }
  }'
```

An email, with a UUID of its own:

```sh
MESSAGE_KEY=$(uuidgen)

curl -X POST https://app.full.dev/api/v1/actions/send_email \
  -H "Authorization: Bearer $FULLDEV_API_KEY" \
  -H "Idempotency-Key: $MESSAGE_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "clientKey": "'"$MESSAGE_KEY"'",
    "accountId": "<the Gmail account id>",
    "to": "sam@example.com",
    "subject": "Your order 1042",
    "text": "Hi Sam, your order is on its way.",
    "category": "utility"
  }'
```

Without `accountId`, Fulldev sends the email from its own address.

- `category` is `service`, `utility` or `marketing`. Nobody who opted out gets
  anything; nobody who opted out of marketing gets marketing. The action then
  answers `OPTED_OUT`.
- A free text on WhatsApp, with `text` instead of `template`, goes only within
  24 hours of the customer's last message. Otherwise the action answers
  `WHATSAPP_WINDOW_CLOSED`.
- Send the same `clientKey` and `Idempotency-Key` on a retry, so the message
  goes out once.
- The answer gives the message's `status`: `sent`, `delivered` or `read` once
  it went out, `failed` when it did not, and `unconfirmed` when WhatsApp's or
  Gmail's answer was lost. Mark something as sent only on `sent`, `delivered`
  or `read`, as with a workflow.

Both actions' fields are in Message's reference:
[send_whatsapp](/en/docs/api/message/#send_whatsapp) and
[send_email](/en/docs/api/message/#send_email).
