Citation Files API

The Files API from Citation — 3 operation(s) for files.

Operations 3

DELETE /files/{file_id} delete File #
POST /files upload #
GET /files/{file_id}/download download #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/citation-co:citation-co-files-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

citation-co-files-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Citation Files API
  version: 1.0.0
  description: Workspace scoped API keys, durable jobs and prepaid credits. AI and Check return proposals unless apply is true. Credit purchases are currently unavailable; operations that use credits require an existing balance.
servers:
- url: https://citation.co/api/v1
  description: Citation production
security:
- apiKey: []
tags:
- name: Files
paths:
  /files/{file_id}:
    delete:
      operationId: deleteFile
      summary: delete File
      description: Remove a private API file and release its storage using an Idempotency-Key. Current workspace and document access are checked. Input files require files:write; generated output files require exports:read.
      parameters:
      - name: file_id
        in: path
        required: true
        schema:
          type: string
          format: uuid
      - name: Idempotency-Key
        in: header
        required: true
        description: Reuse the same value and identical payload after a timeout. Different input returns 409. Retained across key rotation.
        schema:
          type: string
          minLength: 1
          maxLength: 128
      security:
      - apiKey: []
      x-scopes: []
      x-credits: 0
      responses:
        '200':
          description: Successful operation.
          headers:
            X-Request-ID:
              schema:
                type: string
                format: uuid
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Deleted'
        '400':
          description: Invalid input
          headers:
            X-Request-ID:
              schema:
                type: string
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: Invalid key
          headers:
            X-Request-ID:
              schema:
                type: string
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '402':
          description: Insufficient credits
          headers:
            X-Request-ID:
              schema:
                type: string
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          description: Insufficient permissions
          headers:
            X-Request-ID:
              schema:
                type: string
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: Resource not found
          headers:
            X-Request-ID:
              schema:
                type: string
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '408':
          description: Request timeout
          headers:
            X-Request-ID:
              schema:
                type: string
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '409':
          description: Version or idempotency conflict
          headers:
            X-Request-ID:
              schema:
                type: string
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '413':
          description: Size limit
          headers:
            X-Request-ID:
              schema:
                type: string
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '415':
          description: Unsupported media
          headers:
            X-Request-ID:
              schema:
                type: string
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '422':
          description: Invalid content or credit ceiling
          headers:
            X-Request-ID:
              schema:
                type: string
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '429':
          description: Rate or queue limit
          headers:
            X-Request-ID:
              schema:
                type: string
            Retry-After:
              schema:
                type: integer
              description: Seconds to wait before retrying.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '502':
          description: Invalid provider result
          headers:
            X-Request-ID:
              schema:
                type: string
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '503':
          description: Temporarily unavailable
          headers:
            X-Request-ID:
              schema:
                type: string
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      tags:
      - Files
  /files:
    post:
      operationId: upload
      summary: upload
      description: Upload DOCX, TXT or PDF bytes as application/octet-stream, up to 4000000 bytes. Send a URL encoded X-File-Name, the lowercase SHA256 digest in X-Content-SHA256 and an Idempotency-Key. The 201 response's id is the file_id to pass to an import job; this upload does not itself create a document.
      parameters:
      - name: Idempotency-Key
        in: header
        required: true
        description: Reuse the same value and identical payload after a timeout. Different input returns 409. Retained across key rotation.
        schema:
          type: string
          minLength: 1
          maxLength: 128
      - name: X-File-Name
        in: header
        required: true
        schema:
          type: string
      - name: X-Content-SHA256
        in: header
        required: true
        schema:
          type: string
      security:
      - apiKey: []
      x-scopes:
      - files:write
      x-credits: 0
      requestBody:
        required: true
        content:
          application/octet-stream:
            schema:
              type: string
              format: binary
      responses:
        '201':
          description: Successful operation.
          headers:
            X-Request-ID:
              schema:
                type: string
                format: uuid
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FileResult'
        '400':
          description: Invalid input
          headers:
            X-Request-ID:
              schema:
                type: string
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: Invalid key
          headers:
            X-Request-ID:
              schema:
                type: string
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '402':
          description: Insufficient credits
          headers:
            X-Request-ID:
              schema:
                type: string
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          description: Insufficient permissions
          headers:
            X-Request-ID:
              schema:
                type: string
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: Resource not found
          headers:
            X-Request-ID:
              schema:
                type: string
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '408':
          description: Request timeout
          headers:
            X-Request-ID:
              schema:
                type: string
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '409':
          description: Version or idempotency conflict
          headers:
            X-Request-ID:
              schema:
                type: string
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '413':
          description: Size limit
          headers:
            X-Request-ID:
              schema:
                type: string
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '415':
          description: Unsupported media
          headers:
            X-Request-ID:
              schema:
                type: string
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '422':
          description: Invalid content or credit ceiling
          headers:
            X-Request-ID:
              schema:
                type: string
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '429':
          description: Rate or queue limit
          headers:
            X-Request-ID:
              schema:
                type: string
            Retry-After:
              schema:
                type: integer
              description: Seconds to wait before retrying.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '502':
          description: Invalid provider result
          headers:
            X-Request-ID:
              schema:
                type: string
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '503':
          description: Temporarily unavailable
          headers:
            X-Request-ID:
              schema:
                type: string
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      tags:
      - Files
  /files/{file_id}/download:
    get:
      operationId: download
      summary: download
      description: Download a ready private API file as binary bytes with the same Bearer authentication. Current workspace and document access are checked again. Input files require files:write; generated output files require exports:read. The response is an attachment, not a public storage URL.
      parameters:
      - name: file_id
        in: path
        required: true
        schema:
          type: string
          format: uuid
      security:
      - apiKey: []
      x-scopes: []
      x-credits: 0
      responses:
        '200':
          description: Successful operation.
          headers:
            X-Request-ID:
              schema:
                type: string
                format: uuid
          content:
            application/octet-stream:
              schema:
                type: string
                format: binary
        '400':
          description: Invalid input
          headers:
            X-Request-ID:
              schema:
                type: string
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: Invalid key
          headers:
            X-Request-ID:
              schema:
                type: string
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '402':
          description: Insufficient credits
          headers:
            X-Request-ID:
              schema:
                type: string
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          description: Insufficient permissions
          headers:
            X-Request-ID:
              schema:
                type: string
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: Resource not found
          headers:
            X-Request-ID:
              schema:
                type: string
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '408':
          description: Request timeout
          headers:
            X-Request-ID:
              schema:
                type: string
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '409':
          description: Version or idempotency conflict
          headers:
            X-Request-ID:
              schema:
                type: string
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '413':
          description: Size limit
          headers:
            X-Request-ID:
              schema:
                type: string
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '415':
          description: Unsupported media
          headers:
            X-Request-ID:
              schema:
                type: string
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '422':
          description: Invalid content or credit ceiling
          headers:
            X-Request-ID:
              schema:
                type: string
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '429':
          description: Rate or queue limit
          headers:
            X-Request-ID:
              schema:
                type: string
            Retry-After:
              schema:
                type: integer
              description: Seconds to wait before retrying.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '502':
          description: Invalid provider result
          headers:
            X-Request-ID:
              schema:
                type: string
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '503':
          description: Temporarily unavailable
          headers:
            X-Request-ID:
              schema:
                type: string
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      tags:
      - Files
components:
  schemas:
    Error:
      type: object
      properties:
        error:
          type: object
          properties:
            code:
              type: string
            message:
              type: string
            retryable:
              type: boolean
            request_id:
              type: string
              format: uuid
              pattern: ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
          required:
          - code
          - message
          - retryable
          - request_id
      required:
      - error
    FileResult:
      type: object
      properties:
        id:
          type: string
          format: uuid
          pattern: ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
        name:
          type: string
        size:
          type: integer
          minimum: -9007199254740991
          maximum: 9007199254740991
        sha256:
          type: string
      required:
      - id
      - name
      - size
      - sha256
    Deleted:
      type: object
      properties:
        deleted:
          type: boolean
          const: true
      required:
      - deleted
  securitySchemes:
    apiKey:
      type: http
      scheme: bearer
      bearerFormat: ca1_
externalDocs:
  description: API reference and authentication
  url: https://citation.co/docs/api
x-pricing:
  currency: USD
  package:
    amount: 1000
    credits: 100
  operations:
    write: 1
    resolve: 1
    import: 1
    export: 1
    check: 5
  expires: false
x-limits:
  key_per_minute: 120
  account_per_minute: 300
  running_jobs: 2
  queued_jobs: 20
  ai_words: 10000
  ai_sources: 12
  output_words: 2000
  check_words: 5000
  check_sources: 20
  file_bytes: 10000000