---
title: "Change a draft's inputs"
method: PUT
path: "/api/v2/itineraries/{externalId}"
tags: ["Itineraries (v2)"]
---

# Change a draft's inputs

`PUT /api/v2/itineraries/{externalId}`

## Request

- Base URL: `https://www.endlesstravelplans.com`
- URL: `https://www.endlesstravelplans.com/api/v2/itineraries/{externalId}`
- Auth: HTTP bearer

The same body as create, on an itinerary the caller may edit (`can.edit` on the document: the owner, an
itinerary editor, or an accepted editor of its trip); anyone else gets 404. Fields left out keep their stored
values. The row keeps its plan; generate again to rebuild it. Only the owner can move it to another trip.

## Request body

- object
  - `generate` boolean
  - `tripExternalId` string, nullable: Must not be greater than 64 characters.
  - `destination` string, nullable: Must not be greater than 255 characters.
  - `destinationId` integer, nullable
  - `startDate` string, nullable: Must be a valid date in the format <code>Y-m-d</code>.
  - `endDate` string, nullable: Must be a valid date in the format <code>Y-m-d</code>.
  - `intensityLevel` string, nullable: Must not be greater than 20 characters.
  - `numAdults` integer: Must be at least 0. Must not be greater than 50.
  - `numSeniors` integer: Must be at least 0. Must not be greater than 50.
  - `numChildren` integer, nullable: Must be at least 0. Must not be greater than 50.
  - `childrenAges` integer[]: Must be at least 0. Must not be greater than 17.
  - `interests` string[]: Must not be greater than 100 characters.
  - `categories` string[]: Must not be greater than 100 characters.
  - `mustDo` string, nullable: Must not be greater than 2000 characters.
  - `mustDoChips` string[]: Must not be greater than 255 characters.
  - `tripType` 'single_city' | 'multi_city'
  - `stops` object[]: Must not have more than 20 items.
    - `destination` string, nullable: Must not be greater than 255 characters.
    - `destination_id` integer, nullable
    - `nights` integer, nullable: Must be at least 0. Must not be greater than 60.
  - `quickStartTemplateId` integer, nullable

## Response `200`

- object
  - `external_id` string
  - `state` string
  - `inputs` object
    - `destination` string

## Other responses

- `401`: unauthenticated: No valid bearer token was sent.
- `403`: forbidden: The caller is signed in but may not do this.
- `404`: not_found: The record does not exist or the caller may not know it exists.
- `422`: validation_failed: The request body failed validation; field messages are in `errors`.
- `429`: rate_limited: A throttle or a per-account allowance refused the request; `retry_after` or `remaining` may be present.
- `500`: server_error: Unhandled failure; quote `request_id` to support.

---

[API](https://skmtc.dev/endlesstravelplans/apis/endless-travel-plans-api.md) · [All operations](https://skmtc.dev/endlesstravelplans/apis/endless-travel-plans-api/llms.txt) · [OpenAPI document](https://skmtc.dev/endlesstravelplans/apis/endless-travel-plans-api/revisions/ae82ed3e4a8f?raw)
