Response Schema

The standard Conversion object returned by every conversion endpoint.

Response body

On success, every conversion endpoint returns the same envelope: success, message, and data — a Conversion object. The outputFormat, outputFileName, and outputMime vary per conversion:

Response bodyjson
{
  "success": true,
  "message": "Conversion completed",
  "data": {
    "id": "b10a5f2e-8c1e-4b3a-9c1d-2e3f4a5b6c7d",
    "userId": "4b006abd-e7a3-48e5-a29c-d14d28465b57",
    "inputFormat": "html",
    "outputFormat": "pdf",
    "inputFileName": "document.html",
    "outputFileName": "document.pdf",
    "inputFileSize": 45210,
    "outputFileSize": 88431,
    "status": "completed",
    "error": null,
    "creditCost": 2,
    "filesCleanedAt": null,
    "createdAt": "2026-07-31T13:00:00.000Z",
    "completedAt": "2026-07-31T13:00:02.000Z",
    "downloadUrl": "/api/v1/converter/download/conversions%2Fb10a5f2e-8c1e-4b3a-9c1d-2e3f4a5b6c7d%2Foutput.pdf"
  }
}

Conversion fields

FieldTypeDescription
idstring (uuid)Unique conversion identifier (UUID).
userIdstring (uuid)Owning account id; null for guest conversions.
inputFormatstringDetected input format of the uploaded file.
outputFormatstringFormat produced by this conversion.
inputFileNamestringOriginal filename of the uploaded file.
outputFileNamestringFilename of the converted output.
inputFileSizenumberUpload size in bytes.
outputFileSizenumberConverted output size in bytes.
statusstringLifecycle state of the conversion.
errorstringError message when the conversion failed.
creditCostnumberCredits charged for this conversion.
filesCleanedAtstring (date-time)When the stored output was auto-deleted.
createdAtstring (date-time)ISO 8601 timestamp when the conversion was created.
completedAtstring (date-time)ISO 8601 timestamp when the conversion finished.
downloadUrlstringRelative URL to download the output; present only while the output is stored.

Downloading the output

The downloadUrl is relative to the API host. Prepend https://api.fileswitch.coto download the file with the same API key (or the owning account's JWT). Files are retained temporarily and auto-deleted, so download outputs promptly:

Download the outputbash
curl https://api.fileswitch.co/api/v1/converter/download/conversions%2Fb10a5f2e-8c1e-4b3a-9c1d-2e3f4a5b6c7d%2Foutput.pdf \
  -H "Authorization: Bearer fc_YOUR_API_KEY" \
  --output document.pdf