# Send SMS Messages — InMobile

> Send one or more SMS messages using the InMobile API. See the documentation

- Key: `inmobile-send-sms-messages`
- Type: Action (Write)
- Version: 0.0.2
- App: InMobile (`inmobile`) — https://pipedream.com/apps/inmobile.md
- This page (HTML): https://pipedream.com/apps/inmobile/actions/send-sms-messages
- Hints: destructive · open-world
- Source: https://github.com/PipedreamHQ/pipedream/blob/master/components/inmobile/actions/send-sms-messages/send-sms-messages.mjs

## Description

Send one or more SMS messages using the InMobile API. [See the documentation](https://www.inmobile.com/docs/rest-api)

## Props

| Prop | Type | Required | Description |
|---|---|---|---|
| `messages` | `string[]` | Yes | An array of message objects (1-250 messages). Each message object supports the following properties: Required Fields: to (string): The msisdn (country code and number) to send to. Remember to include country code, e.g. 4512345678 text (string): The text message (1-10000 characters) from (string): The sender. Can be a 3-11 character text sender or up to 14 digit sender number Optional Fields: countryHint (string): Country code for optimal phone number validation, e.g. 44 or GB messageId (string): Optional message ID to identify the message (1-50 characters, must be unique) respectBlacklist (boolean): Block message if target number is blacklisted. Default: true validityPeriodInSeconds (integer): Validity period (60-172800 seconds). Default: 172800 (48 hours) statusCallbackUrl (string): URL for delivery status callbacks sendTime (string): Schedule message for future sending, e.g. 2024-12-31T14:50:23Z (UTC time) msisdnCooldownInMinutes (integer): Prevent sending to same number within period (60-43200 minutes) flash (boolean): Send as flash message (class0). Default: false encoding (string): Message encoding - gsm7 (default, 160 chars), ucs2 (70 chars), or auto Example: [ { "to": "4512345678", "text": "Hello World", "from": "YourSender", "encoding": "gsm7" }, { "to": "4587654321", "text": "Another message", "from": "YourSender", "flash": true } ] |

## Run it

**MCP**

```ts
import { Client } from "@modelcontextprotocol/sdk/client/index.js"
import { StreamableHTTPClientTransport } from "@modelcontextprotocol/sdk/client/streamableHttp.js"
import { PipedreamClient } from "@pipedream/sdk"

const pd = new PipedreamClient({
  projectId: process.env.PIPEDREAM_PROJECT_ID!,
  clientId: process.env.PIPEDREAM_CLIENT_ID!,
  clientSecret: process.env.PIPEDREAM_CLIENT_SECRET!,
  projectEnvironment: "production",
})

const accessToken = await pd.rawAccessToken

const transport = new StreamableHTTPClientTransport(
  new URL("https://remote.mcp.pipedream.net/v3"),
  {
    requestInit: {
      headers: {
        Authorization: `Bearer ${accessToken}`,
        "x-pd-project-id": process.env.PIPEDREAM_PROJECT_ID!,
        "x-pd-environment": "production",
        "x-pd-external-user-id": "{external_user_id}", // any stable ID for this user in your system
        "x-pd-app-slug": "inmobile",
      },
    },
  },
)

const mcp = new Client({ name: "my-agent", version: "1.0.0" })
await mcp.connect(transport)

const { tools } = await mcp.listTools()

// listTools() hands your model this tool's input schema, so it can
// fill the arguments itself:
const result = await mcp.callTool({
  name: "inmobile-send-sms-messages",
  arguments: {
    messages: ["Messages"],
  },
})
```

**TypeScript**

```ts
import { PipedreamClient } from "@pipedream/sdk"

const pd = new PipedreamClient({
  projectId: process.env.PIPEDREAM_PROJECT_ID!,
  clientId: process.env.PIPEDREAM_CLIENT_ID!,
  clientSecret: process.env.PIPEDREAM_CLIENT_SECRET!,
  projectEnvironment: "production",
})

const result = await pd.actions.run({
  id: "inmobile-send-sms-messages",
  externalUserId: "{external_user_id}", // any stable ID for this user in your system
  configuredProps: {
    inmobile: { authProvisionId: "apn_xxxxxxx" },
    messages: ["Messages"],
  },
})

console.log(result)
```

**cURL**

```bash
curl -X POST https://api.pipedream.com/v1/connect/{project_id}/actions/run \
  -H "Content-Type: application/json" \
  -H "X-PD-Environment: production" \
  -H "Authorization: Bearer {access_token}" \
  -d '{
    "external_user_id": "{external_user_id}",
    "id": "inmobile-send-sms-messages",
    "configured_props": {
      "inmobile": { "authProvisionId": "apn_xxxxxxx" },
      "messages": ["Messages"]
    }
  }'
```

---

- App: https://pipedream.com/apps/inmobile.md · All apps: https://pipedream.com/apps
