Websites
The websites Genaya built for you and their own data tables - read each table's fields, and add, update, delete or restore records.
/sitesList websites
Returns every website of the organization (drafts included), cursor paginated and ordered by document id. A website is built and published in the Genaya app; the API reads it and works with its data tables. The sites resource is available on the Pro plan and above; below it every call answers 403 permission_error with code plan_required. Requires scope: sites:read.
Response 200
Errors
/sites/{siteId}Retrieve a website
Returns one website by id: name, public link, connected domain, status, page count and when it was last published. Returns 404 if the website is missing, in the trash, or belongs to another organization. Requires scope: sites:read.
Parameters
Path
siteIdrequiredResponse 200
idrequiredobjectrequirednamerequiredslugrequiredurlrequiredprimaryDomainstatusrequiredpageCounthasUnpublishedChangeslastPublishedAtcreatedAtupdatedAtErrors
/sites/{siteId}/tablesList a website's tables
Returns the website's data tables - the built-in Leads table (one row per form submission on the site) and Bookings table (one row per booking made on the site) every website starts with, plus the custom tables created in the app - each with its field list. Tables are created and edited in the Genaya app (Marketing > Websites > Data); the API reads them and works with their records. Requires scope: sites:read.
Parameters
Path
siteIdrequiredResponse 200
Errors
/sites/{siteId}/tables/{tableId}Retrieve a table
Returns one table of the website with its fields (key, label, type, options, required) and its live record count. A table of another website, even one of the same organization, returns 404. Requires scope: sites:read.
Parameters
Path
siteIdrequiredtableIdrequiredResponse 200
idrequiredobjectrequiredsiteIdrequiredkeyrequirednamerequiredsystemsourcefieldsrequiredkeyrequiredlabelrequiredtyperequiredrequiredoptionsrecordCountcreatedAtupdatedAtErrors
/sites/{siteId}/tables/{tableId}/recordsList records in a table
Returns the table's records, cursor paginated and ordered by document id. Records in the trash are excluded. Reads Firestore directly so a record a visitor just submitted appears immediately. Requires scope: sites:read.
Parameters
Path
siteIdrequiredtableIdrequiredResponse 200
Errors
/sites/{siteId}/tables/{tableId}/recordsCreate a record
Adds one record to the table. Send `values` keyed by the table's field keys (read them with "Retrieve a table"). Every value is checked against its field type exactly as the app checks it - a required field must be present, a choice must be one of its options, a number must be a number, a date an ISO-8601 string - and a value that fails returns 422 validation_error naming `values.<key>`. Unknown keys are ignored. The record counts toward the plan's records-per-website cap (403 permission_error, code plan_limit_reached, at the cap). The record's `source` is `member` (the key's issuing member is the author). Supports Idempotency-Key. Requires scope: sites:write.
Parameters
Path
siteIdrequiredtableIdrequiredRequest body
valuesrequiredResponse 201
idrequiredobjectrequiredsiteIdrequiredtableIdrequiredvaluesrequiredlinksleadIdappointmentIdclientIdsubmissionIdsourcecreatedAtupdatedAtErrors
/sites/{siteId}/records/{recordId}Retrieve a record
Returns one record by id with its values and the lead, appointment, client and form submission it is linked to. The record must belong to the website in the path; a record of another website, or one in the trash, returns 404. Requires scope: sites:read.
Parameters
Path
siteIdrequiredrecordIdrequiredResponse 200
idrequiredobjectrequiredsiteIdrequiredtableIdrequiredvaluesrequiredlinksleadIdappointmentIdclientIdsubmissionIdsourcecreatedAtupdatedAtErrors
/sites/{siteId}/records/{recordId}Update a record
A partial update: only the keys present in `values` are checked and replaced; every other value stays exactly as it was. Requires scope: sites:write.
Parameters
Path
siteIdrequiredrecordIdrequiredRequest body
valuesrequiredResponse 200
idrequiredobjectrequiredsiteIdrequiredtableIdrequiredvaluesrequiredlinksleadIdappointmentIdclientIdsubmissionIdsourcecreatedAtupdatedAtErrors
/sites/{siteId}/records/{recordId}Move a record to the trash
Soft delete, matching every other /v1 delete and the app's Data tab: the record leaves every list at once, is kept 30 days, then removed for good. Restore it within those 30 days with "Restore a record". Requires scope: sites:write.
Parameters
Path
siteIdrequiredrecordIdrequiredResponse 200
idobjectdeletedErrors
/sites/{siteId}/records/{recordId}/restoreRestore a record
Brings a record back from the trash within its 30 days. A record that was removed together with its table or its website stays with them (404), a record that is not in the trash returns 422 validation_error with code not_in_trash, and one whose 30 days are over returns 404. Requires scope: sites:write.
Parameters
Path
siteIdrequiredrecordIdrequiredResponse 200
idrequiredobjectrequiredsiteIdrequiredtableIdrequiredvaluesrequiredlinksleadIdappointmentIdclientIdsubmissionIdsourcecreatedAtupdatedAt