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

# OneSignal

> Connect OneSignal to send SMS messages in your workflows.

## How to set up OneSignal

### Authentication

OneSignal requires App credentials:

1. Log in to your OneSignal account
2. Navigate to **Settings** → **Keys & IDs**
3. Obtain your credentials:
   * **App ID**: Your OneSignal App ID
   * **REST API Key**: Your REST API key
4. Enter both in Cargo when connecting

## OneSignal actions

### Send SMS

Send an SMS message using OneSignal's messaging platform.

**Required fields:**

* **SMS Identifier**: Tracking identifier for the message
* **From**: Sending phone number (Twilio number in E.164 format)
* **To**: Recipient phone number
* **Content**: SMS message content (supports expressions)

**Optional fields:**

* **Media URLs**: Attach media to the message (MMS)

## Message formatting

SMS content supports dynamic expressions:

```
Hi {{first_name}}, your order {{order_id}} has shipped!
Track it here: {{tracking_url}}
```

## Example messages

### Appointment reminder:

```
Hi {{first_name}}, this is a reminder of your appointment 
tomorrow at {{time}}. Reply CONFIRM to confirm or call 
us to reschedule.
```

### Welcome message:

```
Welcome to {{company_name}}, {{first_name}}! Your account 
is ready. Get started: {{onboarding_url}}
```

### Alert notification:

```
🔔 {{alert_type}}: {{message}}
View details: {{dashboard_url}}
```

## E.164 phone format

Phone numbers must be in E.164 format:

| Country | Format        | Example       |
| ------- | ------------- | ------------- |
| US      | +1XXXXXXXXXX  | +14155551234  |
| UK      | +44XXXXXXXXXX | +442071234567 |
| France  | +33XXXXXXXXX  | +33123456789  |

## Best practices

* Use unique SMS identifiers for tracking
* Keep messages concise (SMS has 160 character limit)
* Include clear call-to-action
* Respect opt-out preferences
* Use MMS for rich media when appropriate
* Test phone number formatting before campaigns

## Compliance

* Ensure recipients have opted in to SMS
* Include opt-out instructions when required
* Follow local SMS regulations (TCPA, GDPR, etc.)
* Respect quiet hours for non-urgent messages

## Use cases

* **Transactional alerts**: Order updates, shipping notifications
* **Reminders**: Appointments, renewals, deadlines
* **Engagement**: Welcome messages, re-engagement
* **Support**: Ticket updates, resolution notices
* **Sales**: Direct outreach, meeting reminders
