---
title: "Upload a Document"
method: POST
path: "/projects/{project_id}/documents"
tags: ["Projects"]
---

# Upload a Document

`POST /projects/{project_id}/documents`

## Path parameters

- `project_id` string, id, required

## Headers

- `X-CompanyCam-User` string

## Request body

- object
  - `document` object
    - `name` string
    - `attachment` string — Base64 encoded file contents with 30 MB limit

## Response `201`

The created project document

- Document
  - `id` string, required — The unique ID of the document
  - `creator_id` string — The unique ID of the entity that created the document
  - `creator_type` string — The type of the entity that created the document
  - `creator_name` string — The unique ID of the company that owns the document
  - `project_id` string — The unique ID of the project the document is attached to
  - `name` string — the filename of the document
  - `url` string — The URL where the document can be downloaded/viewed from
  - `content_type` string — The content type of the document. (e.g. application/pdf)
  - `byte_size` integer — The size of the document in bytes.
  - `created_at` integer — Timestamp when the Document was created on the server
  - `updated_at` integer — Timestamp when the Document was last updated

## Other responses

- `400` — Bad Request
- `404` — Not found
- `500` — Unexpected error

---

[API](https://skmtc.net/companycam/apis/core-api.md) · [All operations](https://skmtc.net/companycam/apis/core-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/companycam/core-api/versions/f2cd76b46603/schema)
