> ## Documentation Index
> Fetch the complete documentation index at: https://docs.sendo.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Send message

> Send SMS/MMS to a recipient.

<Tip>Before sending messages, you must [create a campaign](/knowledge-base/campaigns). Once approved, use the `campaign ID` on your dashboard when sending API calls.</Tip>

### Body

<ParamField body="campaign" type="string" required>
  The ID of the [campaign](/knowledge-base/campaigns) you are sending from.
</ParamField>

<ParamField body="body" type="string" required>
  Body of the text message to send [(max 1500 characters)](/knowledge-base/segments).
</ParamField>

<ParamField body="to" type="string" required>
  Phone number of the recipient. <b>Must be <Tooltip tip="I.e. +14155552671. Must start with +1 and be followed by the 10 digit number with no spaces or special characters.">E.164</Tooltip> format.</b>
</ParamField>

<ParamField body="from" type="string">
  Phone number to send from [(optional)](/api-reference/senders). <b>Must be <Tooltip tip="I.e. +14155552671. Must start with +1 and be followed by the 10 digit number with no spaces or special characters.">E.164</Tooltip> format.</b>
</ParamField>

<ParamField body="mediaUrls" type="[string]">
  Array of media file URLs to send as MMS. [Guide here.](/api-reference/media)
</ParamField>

<ParamField body="metadata" type="object">
  Object with custom string key-value pairs. [Guide here.](/api-reference/metadata)
</ParamField>

### Response

<ResponseField name="success" type="boolean" required>
  Whether the message was sent successfully.
</ResponseField>

<ResponseField name="id" type="string">
  The ID of the message that was sent.
</ResponseField>

<ResponseField name="error" type="string">
  Error message if the request fails.
</ResponseField>

#### Errors

If the request fails, it will return an HTTP error status code and an `error` field in the response body with details. Full list of status codes [here](/api-reference/introduction).

<Note>[Click here](/knowledge-base/deliverability) to read our full message deliverability guide</Note>

<ResponseExample>
  ```json Success theme={null}
  {
    "success": true,
    "id": "f7d258bd-f697-4840-b8a6-165707e12345"
  }
  ```

  ```json Error theme={null}
  {
    "success": false,
    "error": "Message body required"
  }
  ```
</ResponseExample>
