---
title: "Start a trip"
method: POST
path: "/skynet/trip/start"
tags: ["Tracking_Trip"]
---

# Start a trip

`POST /skynet/trip/start`

Add a new trip to the system with the provided data.

## Query parameters

- `key` string, 32 character alphanumeric string, required

## Request body

- object
  - `custom_id` string — Set a unique ID for the new trip. If not provided, an ID will be automatically generated in UUID format. A valid custom_id can contain letters, numbers, “-”, & “\_” only. Please note that the ID of a trip can not be changed once it is created.
  - `asset_id` string, required — Specify the ID of the asset which is making this trip. The asset will be linked to this trip.
  - `name` string — Specify a name for the trip.
  - `description` string — Add a custom description for the trip.
  - `meta_data` object — An JSON object to collect additional details about the trip. Use this property to add any custom information / context about the trip. The input will be passed on to the response as-is and can be used to display useful information on, for example, a UI app.
  - `attributes` object — attributes can be used to store custom information about a trip in key:value format. Use attributes to add any useful information or context to your trips like the driver name, destination etc. Please note that the maximum number of key:value pairs that can be added to an attributes object is 100. Also, the overall size of attributes object should not exceed 65kb.
  - `stops` object[] — An array of objects to collect the details about all the stops that need to be made before the trip ends. Each object represents one stop.
    - `name` string — Specify a custom name for the stop.
    - `meta_data` object — An JSON object to collect additional details about the stop. Use this property to add any custom information / context about the stop. The input will be passed on to the response as-is and can be used to display useful information on, for example, a UI app.
    - `geofence_id` string — Specify the ID of the geofence indicating the area where the asset needs to make a stop, during the trip. Only the IDs of geofences created using [NextBillion.ai's Geofence API](https://docs.nextbillion.ai/docs/tracking/api/geofence#create-a-geofence) are accepted.

## Response `200`

- object
  - `status` string — A string indicating the state of the response. On successful responses, the value will be Ok. Indicative error messages are returned for different errors. See the [API Error Codes](#api-error-codes) section below for more information.
  - `message` string — Displays the error message in case of a failed request. If the request is successful, this field is not present in the response.
  - `data` object
    - `id` string — Returns the ID of the newly created trip. It will be same as the custom_id if that input was provided in the input request. Use this ID to manage this trip using other available Trip methods.

---

[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)
