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
| Field | Type | Description |
|---|---|---|
| id | string (uuid) | Unique conversion identifier (UUID). |
| userId | string (uuid) | Owning account id; null for guest conversions. |
| inputFormat | string | Detected input format of the uploaded file. |
| outputFormat | string | Format produced by this conversion. |
| inputFileName | string | Original filename of the uploaded file. |
| outputFileName | string | Filename of the converted output. |
| inputFileSize | number | Upload size in bytes. |
| outputFileSize | number | Converted output size in bytes. |
| status | string | Lifecycle state of the conversion. |
| error | string | Error message when the conversion failed. |
| creditCost | number | Credits charged for this conversion. |
| filesCleanedAt | string (date-time) | When the stored output was auto-deleted. |
| createdAt | string (date-time) | ISO 8601 timestamp when the conversion was created. |
| completedAt | string (date-time) | ISO 8601 timestamp when the conversion finished. |
| downloadUrl | string | Relative 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