Skip to content
Navigation

Convert a file to PDF

Turns a Word document, a spreadsheet, a presentation, an image or a plain-text file into a PDF, and stores the result as a new file next to the original.

{ref} is the file id or the file name. A file that is already a PDF answers 400 — there is nothing to convert.

The new file carries parentFileId pointing back at the original, and is never indexed for search: the original is the thing that gets indexed.

Learn more: Working with files

POST
https://api.cloudraker.com/v1/spaces/{spaceId}/files/{ref}/convert/pdf
Try it
Path parameters
Live API request

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

Authorization

  • bearerAuth
    HTTP
    required

Path parameters

  • ref
    string
    required
    minLength: 1
  • spaceId
    string
    required

Returns

201

The converted file.

JSON
  • object
    string
    required
  • id
    string
    required
  • name
    string
    required
  • mimeType
    string
    required
  • status
    uploading
    or
    processing
    or
    ready
    or
    failed
    required
  • createdAt
    string
    required
  • parentFileId
    optional
    string
  • metadata
    optional
    map of
    string
  • error
    optional
    string
  • uploadUrl
    optional
    string
  • uploadExpiresAt
    optional
    string
  • urls
    optional
    object
    • content
      optional
      string
    • markdown
      optional
      string
    • json
      optional
      string

400

The file is already a PDF (invalid_request).

404

Unknown file.

422

The file type cannot be converted (unsupported_file_type).

429

Rate limited. The /v1 API allows at least 67 requests per minute per organization (about 1,000 requests per 15 minutes) — a guaranteed floor, enforced per edge location, so a geographically spread caller may get more. Wait for the Retry-After interval and retry — the error is retryable.
JSON
  • code
    rate_limited
    required
  • message
    string
    required
  • retryable
    true
    required
  • requestId
    string
    required
  • docUrl
    optional
    string

Type to search…

↑↓ navigate↵ selectEsc close