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

# Send SMS

> This endpoint send an sms via your personal gateway.

This API endpoint allows you to send an SMS message to a specified recipient.

## Body

<ParamField body="to" type="array" required>
  A list of phone numbers of the recipient in E.164 international format.
</ParamField>

<ParamField body="message" type="string" required>
  The content of the SMS message.
</ParamField>

<ParamField body="sim" type="string">
  Sim slot id to manage the sending sim in setups with multiple carrier connections. Ignore if your phone only has one sim installed or if you just want to use the default.
</ParamField>

<ParamField body="metadata" type="object">
  Additional metadata associated with the message. This can be used to create powerful two-way messaging applications without having to store persistent data in the application.
</ParamField>

<RequestExample>
  ```bash Example Request theme={null}
  curl --location 'https://api.sbmg.app/sms' \
  --header 'x-api-key: YOUR_API_KEY'
  --data '{
      "to": ["+6421#######"],
      "message": "Hello, this SMS has been sent via SBMG!",
      "sim": "1",
      "metadata": {
          "key1": "value1"
      }
  }'
  ```
</RequestExample>

## Response

<ResponseField name="message" type="string">
  Message of submission attempt.
</ResponseField>

<ResponseField name="message_id" type="array">
  Array of UUIDs of the messages from submission as it will appear in webhook callbacks and reporting. Ordered to match the destinations of the send request.
</ResponseField>

<ResponseExample>
  ```json Response theme={null}
  {
    "message": "Sending sms",
    "message_id": ["aa1a2a34-5678-9c01-d23d-abcdef4abc5"]
  }
  ```
</ResponseExample>
