Add device to webhook subscription

Add a device to the webhook subscription.
Note: If a webhook with the same URL already exists, this API call updates its configuration. If a webhook with the same URL does not exist, this call creates a new webhook entry.

Request
Security:
path Parameters
orgId
required
string

The ID of the organization. Obtain this from GET /organizations.

Example: 62
Request Body schema: application/json
Any of:
imei
required
string (IMEI)

The IMEI number of the device. The IMEI number can be found on a sticker on the device itself or on the back of the device box.

url
required
string

The URL where the webhook is posted.

type
required
string

The type of the webhook. For the event type, every event triggered for this device is posted using the webhook. For the GPS type, all GPS information is posted. For the alarms type, every alarm is posted. For the systemMessages type, every system message triggered for this device is posted using the webhook based on config settings.

Enum: "gps" "event" "alarms" "systemMessages"
Responses
200

Successful operation

400

Bad request error

401

Unauthorized error

403

Forbidden error

404

Not found error

500

Internal server error

post/organizations/{orgId}/webhooks
Request samples
application/json
{}
Response samples
application/json
{
  • "requestId": "df5fg-45fgfdsg-45fg-45454",
  • "webhookId": 217
}