All endpoints are under /wp-json/typost/v1/. The plugin’s own admin screen uses the same endpoints.
What is required on every request?
- Authentication: Send a nonce in the standard
X-WP-Nonceheader. - Capability: Each route needs
edit_posts,upload_files, ormanage_options. The tables show which. Most read routes neededit_posts. - Rate limiting: Each user can send 50 write requests (
POST,PUT,PATCH,DELETE) per minute to alltypost/v1routes together. Read requests are not limited. Above the limit, a route returns HTTP 429 with the coderate_limit_exceeded.
Authors can pick and adopt fonts. To add, change, or delete uploaded kits and Adobe Fonts projects, a user needs upload_files. Site-wide settings need manage_options.
Presets and features
| Method | Route | Capability |
|---|---|---|
GET | /presets | edit_posts |
POST | /presets | edit_posts |
DELETE | /presets/{id} | edit_posts |
GET | /features | edit_posts |
Fonts
Uploaded kits
| Method | Route | Capability |
|---|---|---|
GET | /fonts | edit_posts |
POST | /fonts | upload_files |
DELETE | /fonts/{id} | upload_files |
PATCH | /fonts/{id}/fallback, /fonts/{id}/load-on-all-pages | upload_files |
POST | /fonts/detect-weights/bulk | upload_files |
Adobe Fonts
| Method | Route | Capability |
|---|---|---|
GET | /adobe-fonts | edit_posts |
POST | /adobe-fonts | upload_files |
DELETE | /adobe-fonts/{id} | upload_files |
PATCH | /adobe-fonts/{id}/fallback, /adobe-fonts/{id}/load-on-all-pages | upload_files |
Custom definitions
| Method | Route | Capability |
|---|---|---|
GET | /manual-fonts | edit_posts |
POST | /manual-fonts | edit_posts |
PATCH, DELETE | /manual-fonts/{id} | edit_posts |
Font order, feature visibility, and replacements
| Method | Route | Capability |
|---|---|---|
GET | /font-order, /font-feature-visibility | edit_posts |
POST | /font-order, /font-feature-visibility/{font_id} | edit_posts |
GET | /font-replacements, /font-replacements/orphans | edit_posts |
POST | /font-replacements | edit_posts |
PATCH, DELETE | /font-replacements/{id} | edit_posts |
WordPress Font Library
These routes need WordPress 6.5 or later.
| Method | Route | Capability |
|---|---|---|
POST, DELETE | /fonts/{id}/wp-library | manage_options |
POST | /fonts/wp-library/bulk, /fonts/wp-library/dismiss-notice | manage_options |
POST | /wp-fonts/adopt | edit_posts |
Adoption is idempotent. If you adopt a font two times, you get the same numeric ID. The plugin does not allocate a second ID.
Admin settings
| Method | Route | Capability |
|---|---|---|
GET | /admin/refresh | manage_options |
POST | /admin/options, /admin/accessibility, /admin/clear-cache | manage_options |
Export and import
| Method | Route | Capability |
|---|---|---|
POST | /export | edit_posts, plus the capability of each section, and manage_options for allFonts |
POST | /import/preview | manage_options |
POST | /import | manage_options |
/export takes sections, allFonts, and sectionArgs, and returns the file. /import/preview takes fileText and saves nothing. /import takes fileText and choices. The client sends the file again with the import, so the server keeps nothing between the two requests. Since 2.3.5. Extensions add their own sections with the typost_export_sections filter.
Variable font axes
| Method | Route | Capability |
|---|---|---|
GET | /variable-font-axes | manage_options |
GET, POST, DELETE | /variable-font-axes/{id} | manage_options |
POST | /variable-font-axes/{id}/redetect | manage_options |
Re-detection reads the axes from the font’s own files and returns them without saving. The admin form then shows what it found, and you decide. Only uploaded kits have files on the server. For Adobe fonts and custom font definitions, the browser reads the axes.
To save axes, send the full axes array. A partial array replaces the stored array. It does not merge. So read before you write.
Send isVariable: true with the axes. If you leave it out, the plugin stores no axes and marks the font as not variable. You can also send hideWeights.
Paragraph styles
| Method | Route | Capability |
|---|---|---|
GET, POST | /paragraph-styles | edit_posts |
PATCH, DELETE | /paragraph-styles/{id} | edit_posts |
GET | /paragraph-styles/{id}/admin-card | edit_posts |
The admin-card route returns the details and the preview HTML of the style’s card on the Paragraph Styles tab, and the style CSS made again. The tab calls it after the Edit form saves. It is available since 2.3.4.
Where is the data stored?
The data is in wp_options, not in custom tables:
typost_presetstypost_custom_fontstypost_adobe_fontstypost_manual_fontstypost_adopted_wp_fontstypost_font_replacementstypost_paragraph_stylestypost_paragraph_styles_next_idtypost_variable_font_axestypost_variable_font_flagstypost_block_enter_line_breaktypost_glyphs_toolbar_buttontypost_ps_toolbar_buttontypost_new_font_sizes_pxtypost_font_face_version
Applied typography is inline in the post content. So it goes with an export and needs no migration.