---
title: "POST Action"
method: POST
path: "/skynet/subscribe"
tags: ["Tracking_Subscribe"]
---

# POST Action

`POST /skynet/subscribe`

## Request body

- object
  - `id` string — Specify a custom ID for the subscription. It can be used to reference a given subscription in the downstream applications / systems.
  - `action` 'TRIP_SUBSCRIBE' | 'TRIP_UNSUBSCRIBE' | 'HEARTBEAT', required — Specify the behavior that needs to be achieved for the subscription. Following values are accepted: * TRIP\_SUBSCRIBE: Enable a trip subscription. * TRIP\_UNSUBSCRIBE: Unsubscribe from a trip * HEARTBEAT: Enable heartbeat mechanism for a web-socket connection. The action message need to be sent at a frequency higher than every 5 mins to keep the connection alive. Alternatively, users can chose to respond to the ping frame sent by web socket server to keep the connection alive. Refer to [connection details](https://188--nbai-docs-stg.netlify.app/docs/tracking/api/live-tracking-api#connect-to-web-socket-server) for more details.
  - `params` object
    - `id` string, required — Specify the ID of an active trip that needs to be subscribed. The ID of a trip is returned in the response when _Start A Trip_ request is acknowledged. This attribute is mandatory when action is set to either "TRIP\_SUBSCRIBE" or "TRIP\_UNSUBSCRIBE"

## Response `200`

- object
  - `id` string — Subscription ID as provided in the input action message.
  - `status` string — Status of the action. It can have only two values - "success" or "error".
  - `error` string — Returns the error message when status: error. Otherwise, response doesn't contain this field.
  - `timestamp` integer — Returns the UNIX timestamp, in milliseconds format, when the web-socket returns the action response.

---

[API](https://skmtc.net/nextbillion-ai/apis/one-spec-service.md) · [All operations](https://skmtc.net/nextbillion-ai/apis/one-spec-service/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/nextbillion-ai/one-spec-service/versions/b647f1808dda/schema)
