Skip to main content

What is a SIM webhook?

You can use webhooks to send TCP/UDP messages to a SIM from external services using the Embedded API.

How do I create a SIM webhook?

1

Find the SIM

First find the SIM’s details page from the SIMs pages or using global search.
2

Open the Webhooks tab

Open the Webhooks tab for the SIM, and in the Configure inbound webhook card, click the Generate webhook button.Generate a webhook card
3

Configure the webhook

In the card that appears, enter the port number that will receive messages using the Embedded API, and the protocol (TCP or UDP).Configure a new webhook
After your webhoook is created, you can find the generated URL and port to use listed in the Configure inbound webhook card. Generated webhook card

Where do I find the SIM’s webhook key?

Your Hologram webhook key is a device-specific identifier used to authenticate your SIM when using the Hologram embedded API. This key is included in the JSON message body when sending messages to the webhook.
1

Open the Webhooks tab

From the SIM’s details page, open the Webhooks tab and click the Show key button in the Webhook key card.
Webhooks tab showing the Show key button in the Webhook key card
2

View and manage the key

The key will display in the modal that appears. Here you can also copy the key or generate a new one. Webhook keys do not expire.
Modal displaying the webhook key with options to copy or generate a new key

How do I send a message to a SIM’s webhook?

After generating a webhook and getting your device’s webhook key, use the following HTTP request to send a message to your SIM. The body is a JSON object with the following fields:
  • k or devicekey – The device’s webhook key
  • d or data – The message data
  • t or tags – The custom tag name
The custom tag name is optional and can be used to add custom tags (topics) to the event.

HTTP Request

POST https://dashboard.hologram.io/api/1/devices/messages/YOUR_DEVICE_ID/UNIQUE_GENERATED_WEBHOOK_ID

Request Body

{"k":"DEVICE_KEY","d":"Your message data goes here.","t":"YOUR_CUSTOM_TAG_NAME"}

How to configure webhooks using the REST API

REST API endpoints

Configure device webhooks GET/POST/PUT/DELETE /devices//webhook

Send messages to SIMs

Send TCP, UDP, or SMS messages to your devices

Troubleshooting webhooks

Fix common webhook configuration issues