Website content entries
Read a website's content types and create, update and delete the entries it renders, such as team members, events or neighborhood guides.
A content type is a kind of structured content a website renders: team members, events, neighborhood guides. Each type defines its fields. A content entry is one record of a type: one team member, one event. Websites read entries through the Sites API; V2 is where you write them.
Websites and their content types are configured in the Resi app and are read-only through V2. Entries are fully writable.
Find the website and its types
GET /api/v2/websites lists the account's websites. GET /api/v2/websites/{website}/content-types lists every type that website carries, by key:
curl "https://v2.getresi.com/api/v2/websites/$WEBSITE_ID/content-types" \
-H "Authorization: Bearer $RESI_TOKEN"A content type is addressed by its key (team), not its id, exactly as on the Sites API. Each type carries:
fields: its field definitions, withkey,label,type,required,optionsfor a choice field, and nestedfieldsfor a repeater.json_schema: a JSON Schema (2020-12) document that an entry'sdatamust satisfy. Validate against it before you write, and you will not see a422.scope:accountfor a type shared by every website in the account that carries it,sitefor a type authored for this website only.requires_approval: whether publishing needs an approver.
Create an entry
POST .../content-types/{contentType}/entries takes a slug, the entry's field values in data, and optionally status, seo, property_id and expires_at:
curl -X POST "https://v2.getresi.com/api/v2/websites/$WEBSITE_ID/content-types/team/entries" \
-H "Authorization: Bearer $RESI_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"slug": "ada-lovelace",
"status": "published",
"data": { "name": "Ada Lovelace", "role": "manager" },
"seo": { "title": "Ada Lovelace, Community Manager" }
}'slugis one path segment: no slashes or spaces. It is unique among the type's entries in the same scope. The entry renders at the type'surl_patternwith{slug}replaced, returned aspath.statusisdraft(the default),in_review,publishedorarchived.- An entry of an
account-scoped type is shared: every website that carries the type renders it. An entry of asite-scoped type lives on this website only.scopeon the entry says which.
An entry of a type that requires_approval cannot be published through the API: setting status to published is a 422. Create it as draft or in_review, and an approver publishes it in the Resi app.
Update and delete
PATCH .../entries/{entry} changes only the keys you send. data is merged into the stored values: a field you leave out is kept, and a field sent as null is cleared.
DELETE .../entries/{entry} moves the entry to the trash. It can be restored in the Resi app.
Per-website overrides
A shared entry can be customised or hidden per website in the Resi app. V2 returns that website's override as website_override (is_excluded, data, seo), or null when there is none. Add include=resolved_data to a read to get resolved_data: the entry's data as this website renders it, with the override merged over the shared values. Overrides are read-only through V2.
Last updated on