> ## Documentation Index
> Fetch the complete documentation index at: https://guide.getkroo.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Delete a schedule file

> Deletes a schedule file and enqueues a job to remove its derived data
downstream.

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




## OpenAPI

````yaml https://api.getkroo.com/api/v3/openapi.yaml delete /schedule_files/{id}
openapi: 3.0.1
info:
  title: Kroo API v3
  version: 1.0.0
  description: |
    OAuth 2.0 Client Credentials authenticated API for machine-to-machine
    integrations.

    ## Authentication

    All v3 endpoints require Bearer token authentication. Request a token
    from `/oauth/token` with your client credentials, then send it on
    subsequent requests as `Authorization: Bearer <token>`. Tokens
    expire after 1 hour.

    ## Rate Limiting

    - V3 API endpoints: 60 requests per minute per IP
    - OAuth token endpoint: 10 requests per minute per IP

    Every response carries `X-RateLimit-Limit`, `X-RateLimit-Remaining`,
    and `X-RateLimit-Reset` headers. When the limit is exceeded the
    server returns `429 rate_limit_exceeded`; back off until the
    `X-RateLimit-Reset` Unix timestamp and retry.
  contact:
    name: Kroo API Support
    email: implementations@getkroo.com
servers:
  - url: https://api.getkroo.com/api/v3
    description: Production
security:
  - BearerAuth: []
tags:
  - name: Authentication
    description: >-
      Exchange client credentials for short-lived Bearer tokens used to
      authorize every other v3 request.
  - name: Schedule Files
    description: >-
      Upload, list, retrieve, and delete P6 schedule files (XER, XML, PPX).
      Uploads are parsed and ingested asynchronously.
paths:
  /schedule_files/{id}:
    parameters:
      - name: id
        in: path
        required: true
        description: Schedule file ID.
        schema:
          type: integer
          format: int64
    delete:
      tags:
        - Schedule Files
      summary: Delete a schedule file
      description: |
        Deletes a schedule file and enqueues a job to remove its derived data
        downstream.

        **Required scope:** `write:schedule_files`
      operationId: deleteScheduleFile
      responses:
        '200':
          description: File deleted; downstream cleanup enqueued
          content:
            application/json:
              schema:
                type: object
                required:
                  - deleted
                  - id
                properties:
                  deleted:
                    type: boolean
                    enum:
                      - true
                  id:
                    type: integer
                    format: int64
        '401':
          description: Missing or invalid token
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          description: Token lacks required scope
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: Schedule file not found for the authenticated company
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '429':
          description: Rate limit exceeded
          headers:
            X-RateLimit-Limit:
              schema:
                type: integer
            X-RateLimit-Remaining:
              schema:
                type: integer
            X-RateLimit-Reset:
              schema:
                type: integer
                format: int64
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
        - BearerAuth: []
components:
  schemas:
    Error:
      type: object
      required:
        - error
        - error_description
      properties:
        error:
          type: string
          description: >-
            Machine-readable error code. See the operation description for the
            codes a specific endpoint can return.
        error_description:
          type: string
          description: >-
            Human-readable description of the error. Safe to log; do not show to
            end users verbatim.
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: >-
        Bearer token obtained from `POST /oauth/token`. Send as `Authorization:
        Bearer <token>`. Tokens expire after 1 hour; refresh by requesting a new
        one with the same client credentials.

````