Skip to main content

Create document with auto ID

POST 

/documents/collections/:collection

Creates a new document under the collection with a server-generated UUID. Requires client.documents permission.

Request

Responses

Successful Response

Response shape

{
"id": "7c9e6679-7425-40de-944b-e07fc1f90ae7",
"path": "users/7c9e6679-7425-40de-944b-e07fc1f90ae7",
"data": { "display_name": "Alice", "level": 1 },
"created": true
}

cURL example

curl -X POST "https://mw-client-api.wonderfulcoast-218d579d.centralindia.azurecontainerapps.io/documents/collections/users" \
-H "x-client-id: <client-id>" \
-H "x-client-secret: <client-secret>" \
-H "Authorization: Bearer <access-token>" \
-H "Content-Type: application/json" \
-d '{"data":{"display_name":"Alice"},"parent_path":""}'