# SMS sending SMS goes out through an SMS provider (an HTTP gateway) connected to the account; each agent picks a provider and a sender, and the SMS brick sends the message from a scenario. ## 1. Check or add a provider **Setup → SMS providers** lists the HTTP gateways that send SMS for your agents, with their URL, number of senders, who administers them and status. A provider administered by the tenant, such as **Apifonica**, is ready to use. ![SMS providers](https://docs.aiva.apifonica.com/_astro/6546a9a3efe6d2b2054557403678585e.CBJfqCWy_Z2nKxSW.webp) To connect your own gateway, click **+ Add provider**: 1. **General**: a **Name**, the **Send endpoint URL** and the **HTTP method** (POST by default). 2. **Request**: the **Body template**, where `{{from}}`, `{{to}}` and `{{text}}` are replaced at send time, and any **Headers** (for example authorisation). 3. **Senders**: **Alpha senders** (names such as your brand) and **Number senders**. 4. **Status**: Active or not. Click **Save**. ![Adding an SMS provider](https://docs.aiva.apifonica.com/_astro/28b10f9986c14829ddc36f861783aa19.DCwdVxgB_d2XL4.webp) ## 2. Set the agent’s sender Open the agent, click **Edit agent** and turn on **Send SMS** in the **SMS** section. Pick the **SMS provider**, the sender type (an alphanumeric name or a number) and the sender. See [Agents](https://docs.aiva.apifonica.com/guides/deploy/agents/). ![Edit agent: SMS sender](https://docs.aiva.apifonica.com/_astro/0a68aed48afed9efaef58d5ab9918761.DfmbNKbp_qYaDt.webp) ## 3. Send from the scenario Add an **SMS** brick where the message should go out, for example after a booking or when the caller hangs up. Type the message with variables; **Show message details** counts characters and parts. See [SMS](https://docs.aiva.apifonica.com/guides/bricks/sms/). ## Message length | Characters used | Characters per part | | ------------------------------------------------ | ------------------- | | GSM characters only (most count as 1, some as 2) | 160 | | Any character outside GSM | 70 | A variable’s length is unknown until the call, so leave room for it. A longer message is sent in several parts.