---
title: "Create Post"
method: POST
path: "/api/posts"
tags: ["posts"]
---

# Create Post

`POST /api/posts`

## Request

- Base URL: `https://api.parlel.com` (the document declares no server; this is the origin it was published from)
- URL: `https://api.parlel.com/api/posts`
- Auth: none declared

Write a post.

A profile is required, and the 422 says so rather than 404ing. A post is
profile content -- it is displayed at ``/u/{handle}`` and it is bound to the
profile row by a foreign key -- so an account with no profile has nowhere to
put one. This is the same shape as showing interest in a role, which also
requires a profile and also explains itself instead of failing quietly.

Publishing is NOT required. Somebody can write before they publish, and
everything they wrote goes public with the profile when they do; refusing
would mean a new account has to publish an empty page before it can put
anything on it.

## Headers

- `authorization` string, nullable

## Request body

- PostCreate: A new post. One field, because a post is one field. ``extra="forbid"`` so a client sending ``title`` or ``visibility`` -- both plausible, neither real -- is told rather than silently ignored.
  - `body` string, required

## Response `201`

Successful Response

- object

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/parlel/apis/parlel-api.md) · [All operations](https://skmtc.dev/parlel/apis/parlel-api/llms.txt) · [OpenAPI document](https://skmtc.dev/parlel/apis/parlel-api/revisions/4d41a8f5cfc9?raw)
