Skip to content
Navigation

Register a file in a space and get a presigned upload URL

Reserves a file metadata record in the space and returns { id, uploadUrl, uploadExpiresAt, file }. uploadUrl is a secure PUT URL valid for 15 minutes (see uploadExpiresAt, ISO 8601). Two-step upload: PUT the raw file bytes to uploadUrl with a Content-Type request header EXACTLY equal to the mimeType you sent at create (a mismatch rejects the PUT), then poll getFile until status reaches a terminal value — stored (uploaded, no processing requested), processed (processing succeeded), or failed (see processingError); waiting/processing mean keep polling. Request body: fileName (required), mimeType (required, drives both the record and the required PUT Content-Type), size (bytes, optional), optional processingKind — one of doc-simple | doc-ocr | doc-auto | audio-transcribe | audio-transcribe-and-diarize — selecting how the stored file is post-processed; indexVectors and indexOntology (both default true) are opt-out booleans for semantic and ontology indexing — both are FORCED false for a desk (me:<userId>) space, whose files are never indexed. parentType/parentId in the body are ignored: the API forces the parent to this :spaceId. Authorization: requires space:contribute on :spaceId (missing permission → 403; org admins bypass). An invalid body returns 422.

POST
https://api.cloudraker.com/spaces/{spaceId}/files
Try it
Path parameters
Request body
Live API request

This request can change data or incur charges for the selected organization.

Authorization

  • bearerAuth
    HTTP
    required

Path parameters

  • spaceId
    string
    required

Request body JSON required

  • fileName
    string
    required
    minLength: 1
  • mimeType
    string
    required

    Drives both the record and the required upload Content-Type.

    minLength: 1
  • size
    optional
    integer

    Size in bytes.

    maximum: 9007199254740991 · minimum: 0
  • processingKind
    optional
    doc-simple
    or
    doc-ocr
    or
    doc-auto
    or
    audio-transcribe
    or
    audio-transcribe-and-diarize

    How the stored file is post-processed. Omit for automatic selection by mime.

  • indexVectors
    optional
    boolean

    Semantic indexing.

    default: true
  • indexOntology
    optional
    boolean

    Knowledge-graph indexing.

    default: true

Returns

201

File record created, with its presigned upload URL.

JSON
  • id
    string
    required
  • uploadUrl
    string
    required

    Presigned upload URL, valid 15 minutes. PUT the raw bytes there with a Content-Type header EXACTLY equal to the mimeType sent at create.

  • uploadExpiresAt
    string
    required
    format: date-time · pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z))$
  • file
    object
    required
    • id
      string
      required
    • fileName
      string
      required
    • parentType
      string
      required
    • parentId
      string
      required
    • mimeType
      string
      required
    • size
      number | null
      required

      Size in bytes, null until stored.

    • status
      waiting
      or
      stored
      or
      processing
      or
      processed
      or
      failed
      required

      Terminal values are stored (uploaded, no processing requested), processed and failed; waiting and processing mean keep polling.

    • processingKind
      required

      Any of the following:

      • string
        doc-simple
        or
        doc-ocr
        or
        doc-auto
        or
        audio-transcribe
        or
        audio-transcribe-and-diarize
      • null
    • createdAt
      string
      required
      format: date-time · pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z))$
    • processingError
      optional
      string
    • processingProgress
      optional
      object

      Present while status is processing. queued means that the organization is at its concurrent parse limit and no page of this file is in parse.

      • state
        queued
        or
        processing
        required
      • pagesTotal
        integer
        required
        maximum: 9007199254740991 · minimum: -9007199254740991
      • pagesDone
        integer
        required
        maximum: 9007199254740991 · minimum: -9007199254740991
    • parentFileId
      optional
      string

      Source file this one was generated from (e.g. a redacted or signed copy).

    • artifacts
      optional
      array of
      string

      Parsing byproducts present, e.g. structured, transcript.

    • indexVectors
      optional
      boolean
    • indexOntology
      optional
      boolean
    • storedAt
      optional
      string
      format: date-time · pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z))$
    • processedAt
      optional
      string
      format: date-time · pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z))$
    • urls
      optional
      object

      Minted download links, each valid ~1 hour. Present on single-file reads only — list responses mint none.

      • file
        optional
        string

        The stored original.

      • processedJson
        optional
        string

        Structured/grounded JSON.

      • processedMd
        optional
        string

        Extracted markdown.

      • previewPdf
        optional
        string

Type to search…

↑↓ navigate↵ selectEsc close