---
title: "Upload a document"
method: POST
path: "/api/v1/trips/{tripExternalId}/documents"
tags: ["Documents"]
---

# Upload a document

`POST /api/v1/trips/{tripExternalId}/documents`

## Request

- Base URL: `https://www.endlesstravelplans.com`
- URL: `https://www.endlesstravelplans.com/api/v1/trips/{tripExternalId}/documents`
- Auth: HTTP bearer

Multipart upload. The document starts private (`shared_with_trip` false). Guests cannot upload.

## Response `201`

- object
  - `document` object
    - `external_id` string
    - `trip_id` integer
    - `document_type` string
    - `name` string
    - `file_url` string
    - `mime_type` string
    - `notes` string
    - `shared_with_trip` boolean
    - `uploaded_by` object
      - `id` integer
      - `first_name` string
    - `can_delete` boolean
    - `can` object
      - `update` boolean
      - `delete` boolean
      - `share` boolean
    - `size_bytes` integer
    - `created_at` string
    - `updated_at` string

## Other responses

- `401`: unauthenticated: No valid bearer token was sent.
- `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)
