---
title: "Update a trip"
method: PUT
path: "/skynet/trip/{id}"
tags: ["Tracking_Trip"]
---

# Update a trip

`PUT /skynet/trip/{id}`

Updates the data of a specified trip with the provided data.

## Path parameters

- `id` string, required

## Query parameters

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

## Request body

- object
  - `asset_id` string, required — Use this param to update the ID of the asset which made this trip. Please be cautious when using this field as providing an ID other than what was provided at the time of starting the trip, will link a new asset to the trip and un-link the original asset, even if the trip is still active.
  - `name` string — Use this property to update the name of the trip.
  - `description` string — Use this parameter to update the custom description of the trip.
  - `meta_data` object — Use this JSON object to update additional details about the trip. This property is used to add any custom information / context about the trip. Please note that updating the meta_data field will overwrite the previously added information.
  - `attributes` object — Use this field to update the attributes of the trip. Please note that when updating the attributes field, previously added information will be overwritten.
  - `stops` object[] — Use this object to update the details of the stops made during the trip. Each object represents a single stop. Please note that when updating this field, the new stops will overwrite any existing stops configured for the trip.
    - `name` string — Use this filed to update the name of the stop.
    - `meta_data` object — Use this JSON object to update additional details about the stop. This property is used to add any custom information / context about the stop. Please note that updating the meta_data field will overwrite the previously added information.
    - `geofence_id` string — Use this parameter to update 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. Please note that updating this field will overwrite the previously added information.

## Response `200`

Trip updated

- DtoSimpleResp
  - `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.
  - `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.

---

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