---
title: "Send TCP/UDP cloud message to a SIM"
method: POST
path: "/devices/messages"
tags: ["SIMs (Devices)"]
---

# Send TCP/UDP cloud message to a SIM

`POST /devices/messages`

## Request

- Base URL: `https://dashboard.hologram.io/api/1`
- URL: `https://dashboard.hologram.io/api/1/devices/messages`
- Auth: HTTP basic
- TypeScript: <https://skmtc.dev/hologram/apis/hologram-rest-api-v1/docs/devices/messages/post.ts> (a function with typed inputs; its response is checked against the schema)

Send a cloud message (data) to one or more SIMs using device IDs. Messages can be sent as plain text using the `data` parameter or as base64-encoded content using the `base64data` parameter. Port must be between 1 and 65535. Protocol must be TCP or UDP. Max data size is 10K.

## Request body

- object
  - `deviceids` integer[], required: List of device IDs to send the message to
  - `port` integer, required: Destination port number (1–65535)
  - `protocol` 'TCP' | 'UDP', required: Transport protocol for the message
  - `data` string: Data to send (plain text). Max 10K
  - `base64data` string: Data to send encoded in base64. Max 10K
  - `encrypted` boolean: When true (default), encrypt the message payload

## Response `200`

OK

- PostDeviceMessageResponse
  - `success` boolean: Indicates whether the request was successful.
  - `data` PostDeviceMessageResult[]: One entry per device the message was queued for
    - `deviceid` integer: Device ID the message was sent to
    - `messageid` string: UUID assigned to the queued message

## Other responses

- `400`: Bad request
- `401`: Unauthorized

---

[API](https://skmtc.dev/hologram/apis/hologram-rest-api-v1.md) - [All operations](https://skmtc.dev/hologram/apis/hologram-rest-api-v1/llms.txt) - [OpenAPI document](https://skmtc.dev/hologram/apis/hologram-rest-api-v1/revisions/1bc07dcd1631?raw)
