pages
pages
Changed onCreate a new custom page. Requires site administrative privileges, or organization admin privileges for the specified organization_id (when the organization pages feature is enabled). Successful writes log api_page_create with the actor and target ids in the admin API audit log.
### Body Parameter Guidelines:
- **title**: Heading displayed at the top of the page.
- **slug**: URL path identifier. Must be unique and URL-safe. For organization pages, scoped under `{org_slug}/{suffix}` (with the first page defaulting to `{org_slug}/readme`).
- **body_markdown**: Content written in Markdown format.
- **body_json**: Optional JSON payload for API-consumed/structured data pages.
- **is_top_level_path**: Set to `true` to serve the page directly at the root (e.g. `/{slug}`) instead of under the default namespace `/page/{slug}`. Use with caution to avoid namespace collisions with core Forem paths.
- **template**: Layout styling options (`contained` or custom layouts). Organization pages always use `full_within_layout`.
- **organization_id**: Optional ID of the organization this page belongs to.
- **position**: Optional display order position for organization pages.
post/api/pages
Request
- Base URLhttps://dev.to
- Auth
- API key in header api-key
- or HTTP bearer
Request body
Response
successful
Changes
- info
added the new optional request property
- info
added the new optional request property
- info
- breaking
removed the media type
application/jsonfor the response with the status - breaking
removed the media type
application/jsonfor the response with the status - breaking
removed the media type
application/jsonfor the response with the status
- breaking