Create an API key
Creates an API key for the signed-in user. The response is the only time you see the full key, so store it.
Send Accept: application/json to get the key as JSON. Without it, a request with a session cookie is redirected to /settings, which shows the key once. A request without a session cookie always gets JSON. Available only when sign-in is enabled.
Authorizations
Needed only when the instance has sign-in enabled (PULLMD_AUTH_MODE is single-admin or multi-user). Send Bearer pmd_<key> with an API key created at /settings. In single-admin mode, the legacy PULLMD_AUTH_TOKEN is also accepted as a bearer token. OAuth access tokens work only on /mcp. Browser sessions use the pullmd_session cookie instead.
Body
application/x-www-form-urlencodedForm-encoded. Without a body, the key has no label.
A name for the key, shown at /settings. Longer values are cut to 100 characters.
Response
200 · application/jsonThe new key.
The full API key: pmd_ followed by 32 letters and digits. Send it as Authorization: Bearer <key>.