---
layout: article
title: Bird SMS
description: Send SMS messages to your Appwrite users using Bird and Appwrite Messaging.
back: /docs/
---
[Bird](https://bird.com) lets you send customized SMS messages to your users.
These SMS messages can be sent immediately or scheduled.
You can send SMS messages for purposes like reminders, promotions, announcements, and even custom authentication flows.

The Bird SMS provider sends through Bird's SMS API with a Bird API key. To send email through Bird too, add a [Bird email](/docs/products/messaging/bird-email) provider next to it.

## 1. Add provider

To add Bird as an SMS provider, navigate to **Messaging** > **Providers** > **Add provider**.

![Add a Bird provider](/images/docs/messaging/providers/bird/add-bird.avif)

Bird is listed under both **Email** and **SMS**. Choose **Bird** under **SMS** to open the **Configure Bird** step.

## 2. Configure provider

In the **Configure Bird** step, you need a Bird API key and a sender your Bird workspace owns. On Appwrite Cloud, you can let Appwrite create the API key for you with one-click setup, or fill in the fields by hand.

![Configure Bird SMS provider](/images/docs/messaging/providers/bird/configure-bird-sms.avif)

## One-click setup

On Appwrite Cloud, the **Configure Bird** step opens with a **One-click setup** card above the form.

1. Click **Connect with Bird** and authorize Appwrite in Bird. You are returned to this step with your Bird workspace connected.
1. Select a **Sender** from your Bird workspace. Senders that Bird rejected are listed but can't be selected. If your workspace has no sender yet, click **Manage senders**, add one in Bird, and click **Check again**.
1. Click **Generate API key**.
1. Review the fields and click **Create provider**.

![One-click setup card with a Bird sender selected](/images/docs/messaging/providers/bird/one-click-bird-sms.avif)

Appwrite creates an API key in your Bird workspace named `Appwrite SMS: <project name>` with only the `sms:write` scope, and fills it into the **API key** field. It also fills the **Sender** with the one you picked and, if you left it empty, sets the provider **Name** to `One-click Bird SMS`.

If you leave the wizard without creating the provider, Appwrite revokes the key it generated so it doesn't stay unused in your Bird workspace. Clicking **Generate API key** again replaces the key in the form and revokes the previous one.

The Bird connection lives on your Console account and is shared with the [Bird email provider](/docs/products/messaging/bird-email#one-click-setup) and the [one-click SMTP setup](/docs/products/auth/message-templates#smtp-one-click-setup) in project settings. Connecting once covers all three.

## Configure manually

You will need to provide the following information from your **Bird dashboard**.

| Field name | |
| --- | --- |
| Name | A name for the provider in Appwrite. |
| API key | Head to **Platform tools** > **API keys** and create a key with the `sms` scope at the `write` level. Bird keys start with `bk_` and your region, for example `bk_eu1_`, and Appwrite uses that prefix to send to the right regional API. See [Bird's authentication guide](https://bird.com/docs/guides/authentication). |
| Sender | A sender your Bird workspace owns: a phone number with a leading `+` and its country code, such as `+447700900123`, or an alphanumeric sender ID. Manage senders on Bird's **Senders** page. See [Bird's SMS senders guide](https://bird.com/docs/guides/sms/senders). |

After adding the details, click **Create provider** to enable the provider.

## Before your first send

- **Enable destinations.** Bird only sends to countries you enable under **SMS** > **Destinations**. A message to a country that isn't enabled fails.
- **Check sender rules per country.** Some countries require a registered sender, and the US doesn't accept alphanumeric sender IDs. See [Bird's SMS senders guide](https://bird.com/docs/guides/sms/senders) for the requirements.
- **Transactional category.** Messages are sent with Bird's `transactional` category. Appwrite sends several recipients to Bird in batches of up to 100.

## 3. Test provider

Before sending your first message,
make sure you've configured [a topic](/docs/products/messaging/topics) and [a target](/docs/products/messaging/targets) to send messages to.

**Console**

To send a test message, navigate to **Messaging** > **Messages** > **Create message** > **SMS**.

![Create an SMS message](/images/docs/messaging/messages/create-sms-message.avif)

Add your message and in the targets step, select one of your test targets. Set the schedule to **Now** and click **Send**.

Verify that the message arrives on your phone. If not, check for logs in the Appwrite Console or in your Bird workspace.

**Server SDK**

To send a message programmatically, use an [Appwrite Server SDK](/docs/sdks#server).

```server-nodejs
const sdk = require('node-appwrite');

// Init SDK
const client = new sdk.Client();

const messaging = new sdk.Messaging(client);

client
    .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
    .setProject('<PROJECT_ID>') // Your project ID
    .setKey('<API_KEY>')        // Your secret API key
;

const message = await messaging.createSMS({
    messageId: sdk.ID.unique(),
    content: '<CONTENT>',
    topics: ['<TOPIC_ID>']
});
```
```deno
import * as sdk from "npm:node-appwrite";

// Init SDK
let client = new sdk.Client();

let messaging = new sdk.Messaging(client);

client
    .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
    .setProject('<PROJECT_ID>') // Your project ID
    .setKey('<API_KEY>')        // Your secret API key
;

const message = await messaging.createSMS({
    messageId: sdk.ID.unique(),
    content: '<CONTENT>',
    topics: ['<TOPIC_ID>']
});
```
```php
<?php

use Appwrite\Client;
use Appwrite\ID;
use Appwrite\Services\Messaging;

$client = new Client();

$client
    ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
    ->setProject('<PROJECT_ID>') // Your project ID
    ->setKey('<API_KEY>')        // Your secret API key
;

$messaging = new Messaging($client);

$result = $messaging->createSMS(
    messageId: ID::unique(),
    content: '<CONTENT>',
    topics: ['<TOPIC_ID>']
);
```
```python
from appwrite.client import Client
from appwrite.id import ID
from appwrite.services.messaging import Messaging

client = Client()

(client
  .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint
  .set_project('<PROJECT_ID>') # Your project ID
  .set_key('<API_KEY>')        # Your secret API key
)

messaging = Messaging(client)

result = messaging.create_sms(
    message_id = ID.unique(),
    content = '<CONTENT>',
    topics = ['<TOPIC_ID>']
)
```
```ruby
require 'appwrite'

include Appwrite

client = Client.new
    .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint
    .set_project('<PROJECT_ID>') # Your project ID
    .set_key('<API_KEY>')        # Your secret API key

messaging = Messaging.new(client)

response = messaging.create_sms(
    message_id: ID.unique(),
    content: '<CONTENT>',
    topics: ['<TOPIC_ID>']
)

puts response.inspect
```
```csharp
using Appwrite;
using Appwrite.Services;
using Appwrite.Models;

var client = new Client()
    .SetEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint
    .SetProject("<PROJECT_ID>") // Your project ID
    .SetKey("<API_KEY>");       // Your secret API key

var messaging = new Messaging(client);

Message result = await messaging.CreateSMS(
    messageId: ID.Unique(),
    content: "<CONTENT>",
    topics: new List<string> { "<TOPIC_ID>" });
```
```dart
import 'package:dart_appwrite/dart_appwrite.dart';
import 'package:dart_appwrite/models.dart';

void main() async { // Init SDK
  Client client = Client();
  Messaging messaging = Messaging(client);

  client
    .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
    .setProject('<PROJECT_ID>') // Your project ID
    .setKey('<API_KEY>')        // Your secret API key
  ;

  Message message = await messaging.createSMS(
    messageId: ID.unique(),
    content: '<CONTENT>',
    topics: ['<TOPIC_ID>'],
  );
}
```
```kotlin
import io.appwrite.Client
import io.appwrite.ID
import io.appwrite.services.Messaging

val client = Client()
    .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint
    .setProject("<PROJECT_ID>") // Your project ID
    .setKey("<API_KEY>")        // Your secret API key

val messaging = Messaging(client)

val message = messaging.createSMS(
    messageId = ID.unique(),
    content = "<CONTENT>",
    topics = listOf("<TOPIC_ID>"),
)
```
```java
import io.appwrite.Client;
import io.appwrite.ID;
import io.appwrite.coroutines.CoroutineCallback;
import io.appwrite.services.Messaging;
import java.util.List;

Client client = new Client()
    .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint
    .setProject("<PROJECT_ID>") // Your project ID
    .setKey("<API_KEY>");       // Your secret API key

Messaging messaging = new Messaging(client);

messaging.createSMS(
    ID.unique(),               // messageId
    "<CONTENT>",               // content
    List.of("<TOPIC_ID>"),     // topics (optional)
    new CoroutineCallback<>((result, error) -> {
        if (error != null) {
            error.printStackTrace();
            return;
        }

        System.out.println(result);
    })
);
```
```swift
import Appwrite

let client = Client()
    .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint
    .setProject("<PROJECT_ID>") // Your project ID
    .setKey("<API_KEY>")        // Your secret API key

let messaging = Messaging(client)

let message = try await messaging.createSMS(
    messageId: ID.unique(),
    content: "<CONTENT>",
    topics: ["<TOPIC_ID>"]
)
```
```server-rust
use appwrite::Client;
use appwrite::id::ID;
use appwrite::services::messaging::Messaging;

#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
    let client = Client::new()
        .set_endpoint("https://<REGION>.cloud.appwrite.io/v1")
        .set_project("<PROJECT_ID>")
        .set_key("<API_KEY>");

    let messaging = Messaging::new(&client);

    let message = messaging.create_sms(
        ID::unique(),                          // messageId
        "<CONTENT>",                           // content
        Some(vec!["<TOPIC_ID>".to_string()]),  // topics (optional)
        None,                                  // users (optional)
        None,                                  // targets (optional)
        None,                                  // draft (optional)
        None,                                  // scheduledAt (optional)
    ).await?;

    println!("{:?}", message);
    Ok(())
}
```

You can follow the [Send SMS messages](/docs/products/messaging/send-sms-messages) guide to send your first SMS message and test your provider.

## 4. Manage provider

**Console**

You can update or delete a provider in the Appwrite Console.

Navigate to **Messaging** > **Providers** > click your provider.
In the settings, you can update a provider's configuration or delete the provider.

**Server SDK**

To update or delete providers programmatically, use an [Appwrite Server SDK](/docs/sdks#server).

```server-nodejs
const sdk = require('node-appwrite');

// Init SDK
const client = new sdk.Client();

const messaging = new sdk.Messaging(client);

client
    .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
    .setProject('<PROJECT_ID>') // Your project ID
    .setKey('<YOUR_API_KEY>')   // Your secret API key
;

const provider = await messaging.updateBirdSMSProvider({
    providerId: '<PROVIDER_ID>',
    name: '<NAME>',
    enabled: false,
    apiKey: '<BIRD_API_KEY>',
    from: '+12065550100'
});
```
```deno
import * as sdk from "npm:node-appwrite";

// Init SDK
let client = new sdk.Client();

let messaging = new sdk.Messaging(client);

client
    .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
    .setProject('<PROJECT_ID>') // Your project ID
    .setKey('<YOUR_API_KEY>')   // Your secret API key
;

const provider = await messaging.updateBirdSMSProvider({
    providerId: '<PROVIDER_ID>',
    name: '<NAME>',
    enabled: false,
    apiKey: '<BIRD_API_KEY>',
    from: '+12065550100'
});
```
```php
<?php

use Appwrite\Client;
use Appwrite\Services\Messaging;

$client = new Client();

$client
    ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
    ->setProject('<PROJECT_ID>') // Your project ID
    ->setKey('<YOUR_API_KEY>')   // Your secret API key
;

$messaging = new Messaging($client);

$result = $messaging->updateBirdSMSProvider(
    providerId: '<PROVIDER_ID>',
    name: '<NAME>',            // optional
    enabled: false,            // optional
    apiKey: '<BIRD_API_KEY>',  // optional
    from: '+12065550100'       // optional
);
```
```python
from appwrite.client import Client
from appwrite.services.messaging import Messaging

client = Client()

(client
  .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint
  .set_project('<PROJECT_ID>') # Your project ID
  .set_key('<YOUR_API_KEY>')   # Your secret API key
)

messaging = Messaging(client)

result = messaging.update_bird_sms_provider(
    provider_id = '<PROVIDER_ID>',
    name = '<NAME>',            # optional
    enabled = False,            # optional
    api_key = '<BIRD_API_KEY>', # optional
    xfrom = '+12065550100'      # optional
)
```
```ruby
require 'appwrite'

include Appwrite

client = Client.new
    .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint
    .set_project('<PROJECT_ID>') # Your project ID
    .set_key('<YOUR_API_KEY>')   # Your secret API key

messaging = Messaging.new(client)

response = messaging.update_bird_sms_provider(
    provider_id: '<PROVIDER_ID>',
    name: '<NAME>',            # optional
    enabled: false,            # optional
    api_key: '<BIRD_API_KEY>', # optional
    from: '+12065550100'       # optional
)

puts response.inspect
```
```csharp
using Appwrite;
using Appwrite.Services;
using Appwrite.Models;

var client = new Client()
    .SetEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint
    .SetProject("<PROJECT_ID>") // Your project ID
    .SetKey("<YOUR_API_KEY>");  // Your secret API key

var messaging = new Messaging(client);

Provider result = await messaging.UpdateBirdSMSProvider(
    providerId: "<PROVIDER_ID>",
    name: "<NAME>",            // optional
    enabled: false,            // optional
    apiKey: "<BIRD_API_KEY>",  // optional
    @from: "+12065550100");    // optional
```
```dart
import 'package:dart_appwrite/dart_appwrite.dart';
import 'package:dart_appwrite/models.dart';

void main() async { // Init SDK
  Client client = Client();
  Messaging messaging = Messaging(client);

  client
    .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
    .setProject('<PROJECT_ID>') // Your project ID
    .setKey('<YOUR_API_KEY>')   // Your secret API key
  ;

  Provider provider = await messaging.updateBirdSMSProvider(
    providerId: '<PROVIDER_ID>',
    name: '<NAME>',            // optional
    enabled: false,            // optional
    apiKey: '<BIRD_API_KEY>',  // optional
    from: '+12065550100',      // optional
  );
}
```
```kotlin
import io.appwrite.Client
import io.appwrite.services.Messaging

val client = Client()
    .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint
    .setProject("<PROJECT_ID>") // Your project ID
    .setKey("<YOUR_API_KEY>")   // Your secret API key

val messaging = Messaging(client)

val provider = messaging.updateBirdSMSProvider(
    providerId = "<PROVIDER_ID>",
    name = "<NAME>",            // optional
    enabled = false,            // optional
    apiKey = "<BIRD_API_KEY>",  // optional
    from = "+12065550100",      // optional
)
```
```java
import io.appwrite.Client;
import io.appwrite.coroutines.CoroutineCallback;
import io.appwrite.services.Messaging;

Client client = new Client()
    .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint
    .setProject("<PROJECT_ID>") // Your project ID
    .setKey("<YOUR_API_KEY>");  // Your secret API key

Messaging messaging = new Messaging(client);

messaging.updateBirdSMSProvider(
    "<PROVIDER_ID>",   // providerId
    "<NAME>",          // name (optional)
    false,             // enabled (optional)
    "<BIRD_API_KEY>",  // apiKey (optional)
    "+12065550100",    // from (optional)
    new CoroutineCallback<>((result, error) -> {
        if (error != null) {
            error.printStackTrace();
            return;
        }

        System.out.println(result);
    })
);
```
```swift
import Appwrite

let client = Client()
    .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint
    .setProject("<PROJECT_ID>") // Your project ID
    .setKey("<YOUR_API_KEY>")   // Your secret API key

let messaging = Messaging(client)

let provider = try await messaging.updateBirdSMSProvider(
    providerId: "<PROVIDER_ID>",
    name: "<NAME>",            // optional
    enabled: false,            // optional
    apiKey: "<BIRD_API_KEY>",  // optional
    from: "+12065550100"       // optional
)
```
```server-rust
use appwrite::Client;
use appwrite::services::messaging::Messaging;

#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
    let client = Client::new()
        .set_endpoint("https://<REGION>.cloud.appwrite.io/v1")
        .set_project("<PROJECT_ID>")
        .set_key("<YOUR_API_KEY>");

    let messaging = Messaging::new(&client);

    let provider = messaging.update_bird_sms_provider(
        "<PROVIDER_ID>",          // providerId
        Some("<NAME>"),           // name (optional)
        Some(false),              // enabled (optional)
        Some("<BIRD_API_KEY>"),   // apiKey (optional)
        Some("+12065550100"),     // from (optional)
    ).await?;

    println!("{:?}", provider);
    Ok(())
}
```
```http
PATCH /v1/messaging/providers/bird-sms/<PROVIDER_ID> HTTP/1.1
Content-Type: application/json
X-Appwrite-Project: <PROJECT_ID>
X-Appwrite-Key: <API_KEY>

{
  "name": "<NAME>",
  "enabled": false,
  "apiKey": "<BIRD_API_KEY>",
  "from": "+12065550100"
}
```
