# Send SMS — Infobip

> Sends an SMS message to a specified number. See the documentation

- Key: `infobip-send-sms`
- Type: Action (Write)
- Version: 0.0.3
- App: Infobip (`infobip`) — https://pipedream.com/apps/infobip.md
- This page (HTML): https://pipedream.com/apps/infobip/actions/send-sms
- Hints: open-world
- Source: https://github.com/PipedreamHQ/pipedream/blob/master/components/infobip/actions/send-sms/send-sms.mjs

## Description

Sends an SMS message to a specified number. [See the documentation](https://www.infobip.com/docs/api)

## Props

| Prop | Type | Required | Description |
|---|---|---|---|
| `phoneNumber` | `string` | No | Message destination address. Addresses must be in international format (Example: 41793026727). |
| `text` | `string` | No | Content of the message being sent. |
| `from` | `string` | No | The sender ID which can be alphanumeric or numeric (e.g., CompanyName). Make sure you don't exceed character limit. |
| `flash` | `boolean` | No | Allows for sending a flash SMS to automatically appear on recipient devices without interaction. |
| `notifyUrl` | `string` | No | The URL on your call back server on to which a delivery report will be sent. The retry cycle for when your URL becomes unavailable uses the following formula: 1min + (1min * retryNumber * retryNumber). |
| `entityId` | `string` | No | Required for entity use in a send request for outbound traffic. Returned in notification events. For more details, see the Infobip documentation. Options are loaded from the connected account. |
| `applicationId` | `string` | No | Required for application use in a send request for outbound traffic. Returned in notification events. For more details, see the Infobip documentation. Options are loaded from the connected account. |

## 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": "infobip",
      },
    },
  },
)

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: "infobip-send-sms",
  arguments: {
    phoneNumber: "Phone Number",
    text: "Text",
  },
})
```

**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: "infobip-send-sms",
  externalUserId: "{external_user_id}", // any stable ID for this user in your system
  configuredProps: {
    infobip: { authProvisionId: "apn_xxxxxxx" },
    phoneNumber: "Phone Number",
    text: "Text",
  },
})

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": "infobip-send-sms",
    "configured_props": {
      "infobip": { "authProvisionId": "apn_xxxxxxx" },
      "phoneNumber": "Phone Number",
      "text": "Text"
    }
  }'
```

---

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