VeroXM Docs

Endpoints

The Content API's core endpoints read and write entries within one collection. Every route below is relative to /public/v2/projects/:uuid/collections/:slug/content and requires a bearer token (see Authentication).

Get Entries

GET/collections/:slug/content

List entries

Returns entries for the collection, filtered and paginated by query-string parameters - see Parameters. Requires the read ability.

Search Entries

POST/collections/:slug/content/search

List entries with a JSON filter body

The same listing as GET .../content, but takes its filters - including where and whereRelation, which are awkward to express as bracketed query-string params - as a JSON request body instead. Requires the read ability.

Request body
{
  "where": [{ "status": "active" }],
  "sort": "publishedAt:desc",
  "limit": 20
}

Get One Entry

GET/collections/:slug/content/:id

Fetch a single entry

Returns one entry by id. Responds with 404 if the id doesn't exist in this collection, or has been deleted. Requires the read ability.

Create an Entry

POST/collections/:slug/content

Create a new entry

Body is a flat object of field name → value, for the fields defined on the collection. The new entry is created as a draft unless the collection's write rules publish it automatically. Requires the create ability.

Update an Entry

PATCH/collections/:slug/content/:id

Update an existing entry

Body only needs the fields being changed - fields left out keep their current value. Requires the update ability.

Delete an Entry

DELETE/collections/:slug/content/:id

Delete an entry

Permanently removes the entry. Requires the delete ability.

Response
{ "message": "Record deleted." }

See also

Media uploads and the media library live under a separate base path - see Managing Media Library.