---
title: "Upload a schedule file"
method: POST
path: "/schedule_files"
tags: ["Schedule Files"]
---

# Upload a schedule file

`POST /schedule_files`

Uploads a P6 schedule file (XER, XML, or PPX) and enqueues a sync job
to parse and ingest it.

**Required scope:** `write:schedule_files`

**Constraints:**
- `file` must be a multipart/form-data upload.
- `file_type` must be one of `xer`, `xml`, `ppx`.
- Within the same partner family (XER/XML share a family; PPX is its
  own), the most recent file's `file_type` cannot change between
  uploads. Switching formats inside a partner returns 422
  `file_type_mismatch`. PPX after XER is allowed because they belong
  to different partners.
- `customer_project_id`, if provided, must reference a customer
  project owned by the authenticated company.

**422 error codes:**
- `invalid_request` — missing required parameter (`name`, `file`, or
  `file_type`) or `file` is not a multipart upload.
- `file_type_mismatch` — the most recent file in the same partner
  family uses a different `file_type`.
- `validation_error` — the underlying record failed model-level
  validation (including unknown `file_type` values).

## Response `201`

File uploaded; sync job enqueued

- ScheduleFile
  - `id` integer, required — Unique identifier for the schedule file.
  - `name` string, required — Human-readable name supplied when the file was uploaded.
  - `is_baseline` boolean, required — True if the file was marked as a baseline at upload time; baselines are preserved for variance reporting.
  - `company_id` integer, required — ID of the company that owns this file. Always equal to the authenticated client's company.
  - `customer_project` object, nullable, required — Project association if one was provided on upload. `null` for unassociated files.
    - `id` integer — Kroo-side project ID.
    - `name` string — Human-readable project name.
    - `source` string — Partner source the project was synced from (e.g. `procore`).
    - `customer_project_id` string — Project identifier in the source partner system.
  - `created_at` string, date-time, required — ISO 8601 timestamp of when the upload was accepted.

## Other responses

- `401` — Missing or invalid token
- `403` — Token lacks required scope
- `404` — Customer project not found for this company
- `422` — Validation failure (see operation description for error codes)
- `429` — Rate limit exceeded

---

[API](https://skmtc.net/getkroo/apis/kroo-api-v3.md) · [All operations](https://skmtc.net/getkroo/apis/kroo-api-v3/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/getkroo/kroo-api-v3/versions/1aeb2b609ff7/schema)
