How to upload a TTF and get a URL
Font files are application assets, but they still need the same reliable delivery layer as images and documents. FilePost stores the TTF and returns a URL your asset pipeline can save or distribute.
Use a clear filename and content type such as font/ttf when you know it. Check licensing and cross-origin requirements before making a font URL public or embedding it in a website.
Upload ttf files with FilePost
Use the authenticated FilePost upload API for ttf files. The endpoint returns a JSON object containing the public URL, file ID, size, content type, and filename mode.
curl -X POST https://upload.filepost.dev/v1/upload \
-H "X-API-Key: YOUR_API_KEY" \
-F "file=@brand-font.ttf" \
-F "content_type=font/ttf"
Example response
{
"url": "https://cdn.filepost.dev/file/…",
"file_id": "a1b2c3d4e5f6",
"name": "brand-font.ttf",
"size": 84210,
"content_type": "font/ttf"
}
What to do with the returned URL
Use the URL in an asset record, a controlled download, or a build step that needs a public font location.
@font-face { font-family: Brand; src: url("https://cdn.filepost.dev/file/…"); }
Good uses for ttf to URL
- Internal type-asset tools
- Font previews and downloads
- Asset handoffs in build or content workflows
Know the boundary
FilePost does not subset, convert, optimize, or license fonts. Confirm that you have the right to distribute a font and use a font pipeline for format conversion.
For the complete request and response contract, see the FilePost API documentation. You can also test the flow with the interactive upload on the homepage.