# SMS API — Stone the Flamin Crows Send a Text (Twilio/Vonage) (`admirable_rough_guts/sms-api`) Actor

Strike me roan! Got somethin' to say but CBF pickin' up the phone? This lil' beauty fires off SMS messages through Twilio or Vonage faster than a kangaroo in a carpark.

- **URL**: https://apify.com/admirable\_rough\_guts/sms-api.md
- **Developed by:** [Marc Davis](https://apify.com/admirable_rough_guts) (community)
- **Categories:** Developer tools
- **Stats:** 1 total users, 0 monthly users, 0.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $10.00 / 1,000 results

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

Learn more: https://docs.apify.com/platform/actors/running/actors-in-store#pay-per-event

## What's an Apify Actor?

Actors are a software tools running on the Apify platform, for all kinds of web data extraction and automation use cases.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.
Actors are written with capital "A".

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.
The best way to integrate Actors is as follows.

In JavaScript/TypeScript projects, use official [JavaScript/TypeScript client](https://docs.apify.com/api/client/js.md):

```bash
npm install apify-client
```

In Python projects, use official [Python client library](https://docs.apify.com/api/client/python.md):

```bash
pip install apify-client
```

In shell scripts, use [Apify CLI](https://docs.apify.com/cli/docs.md):

````bash
# MacOS / Linux
curl -fsSL https://apify.com/install-cli.sh | bash
# Windows
irm https://apify.com/install-cli.ps1 | iex
```bash

In AI frameworks, you might use the [Apify MCP server](https://docs.apify.com/platform/integrations/mcp.md).

If your project is in a different language, use the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).


# README

## SMS API — Stone the Flamin' Crows, Send a Text! 🇦🇺

[![Apify](https://img.shields.io/badge/Apify-Actor-blue)](https://apify.com)
[![Python](https://img.shields.io/badge/Python-3.12-blue)](https://python.org)

> **Need to send a text without the headache? For the price of a text message, automate 'em.**
> Twilio. Vonage. One API. Works every time. She'll be right.

**Strike me roan!** Got somethin' to say but CBF pickin' up the phone? This lil' beauty fires off SMS messages through **Twilio** or **Vonage** faster than a kangaroo in a carpark on a 40° day. 

Chuck in yer creds, whack in a number, type your message, and BANG — it's off. Easy as. She'll be right, mate.

---

### 🔧 How to Use This Beauty

#### Quick Start (No Uni Degree Required, Ya Flamin' Galah)

1. **Pick ya poison** — Twilio or Vonage. Your call, I'm not ya mother.
2. **Dump yer credentials in** — API keys, tokens, all that jazz. Kept dead quiet, on the QT. None of ya business.
3. **Whack in the recipient's number** — gotta be E.164 format, like `+614****5678`. I wasn't born yesterday, it's not that hard.
4. **Type your bloody message** — up to 1600 characters. Keep it tight, I ain't readin' a novel.
5. **Hit run** — you'll get your result in the dataset quicker than a servo pie on a road trip. Wouldn't it be right?

#### Input Fields (The Nitty Gritty)

Stone the flamin' crows, here's what you need:

| Field | Reckon? | What It Is |
|---|---|---|
| `provider` | **Yeah nah, ya need this** | `twilio` or `vonage` — pick a lane, don't muck about |
| `to` | **Dead set required** | Their number in E.164 format. Get it into ya thick skull |
| `message` | **Too right, mate** | What you wanna say (max 1600 chars). Keep it brief, ya magpie |
| `accountSid` | Only if Twilio | Your Twilio Account SID |
| `authToken` | Only if Twilio | Your Twilio Auth Token. Secret squirrel stuff |
| `twilioFrom` | Only if Twilio | Your Twilio number — where the text comes from |
| `apiKey` | Only if Vonage | Vonage API Key |
| `apiSecret` | Only if Vonage | Vonage API Secret |
| `vonageFrom` | Only if Vonage | Sender name or number (e.g. `SMSAPI`) |

> **Your creds are locked up tighter than a Catholic schoolgirl's knickers on a Sunday** — encrypted, secret, never leaked. Safe as the Bank of Summer Bay.

#### What You Get Back (Results, Cobber)

Each run drops a ripper result into the dataset. Fair dinkum:

```json
{
  "success": true,
  "provider": "twilio",
  "messageId": "SMabc123...",
  "to": "+614****5678",
  "status": "sent",
  "cost": 0.095,
  "error": null
}
````

If it's cactus, you'll see `"success": false` and the `error` field will tell ya what went pear-shaped. Don't blame me for your stuffed credentials.

***

### 🐍 Call This Bad Boy From Code

You can ping this Actor from any app via the Apify API. Strike me roan, it's simple.

#### Python (The Fancy Way, For The Young Folk)

```python
from apify_client import ApifyClient

client = ApifyClient("YOUR_API_TOKEN")

result = client.actor("YOUR_USERNAME/sms-api").call(
    run_input={
        "provider": "twilio",
        "accountSid": "AC...",
        "authToken": "your-token",
        "twilioFrom": "+123****7890",
        "to": "+614****5678",
        "message": "Oi, get the beers in!",
    }
)

dataset = client.dataset(result["defaultDatasetId"]).list_items()
print(dataset.items)
```

#### cURL (Old School, I Get It)

```bash
curl -X POST "https://api.apify.com/v2/acts/YOUR_USERNAME~sms-api/runs" \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer ***" \
  -d '{
    "provider": "twilio",
    "accountSid": "AC...",
    "authToken": "your-token",
    "twilioFrom": "+123****7890",
    "to": "+614****5678",
    "message": "Get the barbie fired up!"
  }'
```

#### MCP / AI Agents (What In The Name Of...)

This Actor works as an **MCP tool** — so Claude, Cursor, or whatever flash new-fangled AI agent young people use these days can sniff it out and fire off SMS like it's nothin'. Your bloomin' AI can now send a text. The future's here and I still don't trust it.

***

### 📦 Environment Variables (Set & Forget, She'll Be Right)

CBF enterin' creds every time? Set 'em once at the Actor level and rack off about it.

| Variable | What It Does |
|---|---|
| `TWILIO_ACCOUNT_SID` | Twilio Account SID |
| `TWILIO_AUTH_TOKEN` | Twilio Auth Token |
| `TWILIO_FROM_NUMBER` | Default Twilio sender number |
| `VONAGE_API_KEY` | Vonage API Key |
| `VONAGE_API_SECRET` | Vonage API Secret |
| `VONAGE_FROM` | Default Vonage sender |

Input fields beat env vars if you supply both — so you can have a default and override when needed. Got ya bases covered. Wouldn't be right if we didn't.

***

### 💰 How Much? (Spoiler: Cheap As Chips)

This Actor's on **Pay Per Event** — you only pay when it actually works:

- **$0.01 per successful send** — covers compute + your cut. Bloody bargain.
- Carrier fees from your provider still hit ya. That's between you and them, I'm not gettin' involved.
- Free plan users get $5/mo in credits — that's **500 texts** for nicks. Even a flamin' galah can afford that.

***

### 🛟 Stuffed? Need A Hand?

- **Somethin' cactus?** — [GitHub Issues](https://github.com/YOUR_USERNAME/apify-sms-api-actor/issues)
- **Wanna chinwag with the crew?** — [Discord: Apify Developer Community](https://discord.gg/jyEM2PRvMU)

***

### 📄 Legalese

MIT license — go nuts. Do what you want with it. No wozzas. I'm not ya lawyer, rack off with the fine print.

***

*Strike me roan. Built with 🦘 and XXXX Gold by some bloke who just wanted to send texts without all the carry-on. If ya don't like it, there's the door.*

**Stop typin'. Start textin'.**

# Actor input Schema

## `provider` (type: `string`):

Which SMS service? Twilio or Vonage. Don't just stand there like a stunned mullet, pick one.

## `accountSid` (type: `string`):

Your Twilio Account SID. Starts with AC. Don't lose it.

## `authToken` (type: `string`):

Your Twilio Auth Token. Secret squirrel business. Keep it in ya sock.

## `twilioFrom` (type: `string`):

The number the text comes from. Your Twilio number. E.164 format. Strike me roan, it's not rocket surgery.

## `apiKey` (type: `string`):

Your Vonage API key from the dashboard. Don't go losin' it.

## `apiSecret` (type: `string`):

Your Vonage API secret. Keep it quiet. Loose lips sink ships.

## `vonageFrom` (type: `string`):

The sender name or number. Can be 'MyApp' or '+123\*\*\*\*7890'. Don't overthink it.

## `to` (type: `string`):

Their phone number in E.164 format, e.g. +614\*\*\*\*5678. Get it into ya thick skull — it needs the + and country code.

## `message` (type: `string`):

The message itself. Max 1600 characters. Keep it brief, I ain't got all day. Don't write a bloody novel.

## Actor input object example

```json
{
  "provider": "twilio",
  "twilioFrom": "+1",
  "vonageFrom": "SMSAPI",
  "to": "+61"
}
```

# Actor output Schema

## `success` (type: `string`):

No description

## `provider` (type: `string`):

No description

## `messageId` (type: `string`):

No description

## `to` (type: `string`):

No description

## `status` (type: `string`):

No description

## `cost` (type: `string`):

No description

## `error` (type: `string`):

No description

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "twilioFrom": "+1",
    "vonageFrom": "SMSAPI",
    "to": "+61"
};

// Run the Actor and wait for it to finish
const run = await client.actor("admirable_rough_guts/sms-api").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = {
    "twilioFrom": "+1",
    "vonageFrom": "SMSAPI",
    "to": "+61",
}

# Run the Actor and wait for it to finish
run = client.actor("admirable_rough_guts/sms-api").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print("💾 Check your data here: https://console.apify.com/storage/datasets/" + run["defaultDatasetId"])
for item in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "twilioFrom": "+1",
  "vonageFrom": "SMSAPI",
  "to": "+61"
}' |
apify call admirable_rough_guts/sms-api --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=admirable_rough_guts/sms-api",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "SMS API — Stone the Flamin Crows Send a Text (Twilio/Vonage)",
        "description": "Strike me roan! Got somethin' to say but CBF pickin' up the phone? This lil' beauty fires off SMS messages through Twilio or Vonage faster than a kangaroo in a carpark.",
        "version": "0.0",
        "x-build-id": "hSB1Kv8SHLvEFZRnn"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/admirable_rough_guts~sms-api/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-admirable_rough_guts-sms-api",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        },
        "/acts/admirable_rough_guts~sms-api/runs": {
            "post": {
                "operationId": "runs-sync-admirable_rough_guts-sms-api",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor and returns information about the initiated run in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/runsResponseSchema"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/acts/admirable_rough_guts~sms-api/run-sync": {
            "post": {
                "operationId": "run-sync-admirable_rough_guts-sms-api",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        }
    },
    "components": {
        "schemas": {
            "inputSchema": {
                "type": "object",
                "required": [
                    "provider",
                    "to",
                    "message"
                ],
                "properties": {
                    "provider": {
                        "title": "Pick Ya Poison",
                        "enum": [
                            "twilio",
                            "vonage"
                        ],
                        "type": "string",
                        "description": "Which SMS service? Twilio or Vonage. Don't just stand there like a stunned mullet, pick one.",
                        "default": "twilio"
                    },
                    "accountSid": {
                        "title": "Account SID",
                        "type": "string",
                        "description": "Your Twilio Account SID. Starts with AC. Don't lose it."
                    },
                    "authToken": {
                        "title": "Auth Token",
                        "type": "string",
                        "description": "Your Twilio Auth Token. Secret squirrel business. Keep it in ya sock."
                    },
                    "twilioFrom": {
                        "title": "Your Twilio Number",
                        "type": "string",
                        "description": "The number the text comes from. Your Twilio number. E.164 format. Strike me roan, it's not rocket surgery."
                    },
                    "apiKey": {
                        "title": "API Key",
                        "type": "string",
                        "description": "Your Vonage API key from the dashboard. Don't go losin' it."
                    },
                    "apiSecret": {
                        "title": "API Secret",
                        "type": "string",
                        "description": "Your Vonage API secret. Keep it quiet. Loose lips sink ships."
                    },
                    "vonageFrom": {
                        "title": "Vonage Sender Name/Number",
                        "type": "string",
                        "description": "The sender name or number. Can be 'MyApp' or '+123****7890'. Don't overthink it."
                    },
                    "to": {
                        "title": "Who Ya Textin'?",
                        "type": "string",
                        "description": "Their phone number in E.164 format, e.g. +614****5678. Get it into ya thick skull — it needs the + and country code."
                    },
                    "message": {
                        "title": "What Ya Wanna Say?",
                        "maxLength": 1600,
                        "type": "string",
                        "description": "The message itself. Max 1600 characters. Keep it brief, I ain't got all day. Don't write a bloody novel."
                    }
                }
            },
            "runsResponseSchema": {
                "type": "object",
                "properties": {
                    "data": {
                        "type": "object",
                        "properties": {
                            "id": {
                                "type": "string"
                            },
                            "actId": {
                                "type": "string"
                            },
                            "userId": {
                                "type": "string"
                            },
                            "startedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "finishedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "status": {
                                "type": "string",
                                "example": "READY"
                            },
                            "meta": {
                                "type": "object",
                                "properties": {
                                    "origin": {
                                        "type": "string",
                                        "example": "API"
                                    },
                                    "userAgent": {
                                        "type": "string"
                                    }
                                }
                            },
                            "stats": {
                                "type": "object",
                                "properties": {
                                    "inputBodyLen": {
                                        "type": "integer",
                                        "example": 2000
                                    },
                                    "rebootCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "restartCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "resurrectCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "computeUnits": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "options": {
                                "type": "object",
                                "properties": {
                                    "build": {
                                        "type": "string",
                                        "example": "latest"
                                    },
                                    "timeoutSecs": {
                                        "type": "integer",
                                        "example": 300
                                    },
                                    "memoryMbytes": {
                                        "type": "integer",
                                        "example": 1024
                                    },
                                    "diskMbytes": {
                                        "type": "integer",
                                        "example": 2048
                                    }
                                }
                            },
                            "buildId": {
                                "type": "string"
                            },
                            "defaultKeyValueStoreId": {
                                "type": "string"
                            },
                            "defaultDatasetId": {
                                "type": "string"
                            },
                            "defaultRequestQueueId": {
                                "type": "string"
                            },
                            "buildNumber": {
                                "type": "string",
                                "example": "1.0.0"
                            },
                            "containerUrl": {
                                "type": "string"
                            },
                            "usage": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "integer",
                                        "example": 1
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "usageTotalUsd": {
                                "type": "number",
                                "example": 0.00005
                            },
                            "usageUsd": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "number",
                                        "example": 0.00005
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
