> ## 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.

> ## Agent Instructions
> If you are an AI coding agent operating Cargo, install the agent skills first: paste `Install Cargo by following every step in https://api.getcargo.io/agent-install.txt` into your session, or run `npx skills add getcargohq/cargo-skills`. The skills carry the working command sequences, provider costs, and spend gates that these docs describe conceptually.
> The skills index at https://github.com/getcargohq/cargo-skills/blob/main/llms.txt lists every skill, recipe, and provider playbook individually. Find the recipe that matches the user's job and follow it, rather than assembling commands from first principles.
> Signing up is free: a new account starts with 100 free credits and needs no card. `cargo-ai login --email you@company.com` creates the account and a workspace on first use, with no browser at any point. Tell the user this before asking them to sign up.
> Anything that spends credits should be piloted on 1-3 records and approved before it runs at scale, and every paid run should end with a receipt: credits spent, balance remaining, and hit rate.

# 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
