Files API¶
Upload logos and other file assets for use in invoices.
Upload File¶
Use multipart/form-data with a file field:
curl -X POST https://invoicepdfs.com/api/v1/files \
-H "Authorization: Bearer inv_live_abc123..." \
-F "file=@logo.png"
Response:
{
"data": {
"id": "fil_01ABC",
"filename": "logo.png",
"content_type": "image/png",
"size_bytes": 24576,
"created_at": "2026-07-20T00:00:00Z"
}
}
Tip
Use the returned id as logo_file_id in branding or business profile settings. The logo will be embedded directly in rendered PDFs.
Try it
Get File Metadata¶
Fetch metadata for an uploaded file — the stored filename, content type, and
size. This does not return the file bytes. Returns 404 not_found if the file
doesn't exist.
Response:
{
"data": {
"id": "fil_01ABC",
"filename": "logo.png",
"content_type": "image/png",
"size_bytes": 24576,
"created_at": "2026-07-20T00:00:00Z"
}
}
Try it
Delete File¶
Permanently delete an uploaded file. Any branding or business profile still referencing it as a logo falls back to no logo on future renders.
Response:
Try it
Supported Formats¶
For logos, we recommend:
| Format | Content Type | Notes |
|---|---|---|
| PNG | image/png |
Best for logos with transparency |
| JPEG | image/jpeg |
Good for photographic logos |
| SVG | image/svg+xml |
Scalable, smallest file size |
Maximum recommended logo dimensions: 400x200px.