Marketing

Websites

The websites Genaya built for you and their own data tables - read each table's fields, and add, update, delete or restore records.

GET/sites

List 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

No fields.

Errors

400Malformed or missing parameters
401Bad, missing, or revoked key
402The prepaid balance has nothing left for API requests past the included pool, or the trial requests are used up
403Lacks scope, plan without API access, live key on a trial, test key writing, or feature switched off
429Rate limited
500Unexpected server error
GET/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

siteIdrequired
string
The id of the website.

Response 200

FieldTypeDescription
idrequired
string
Unique identifier for the website.
objectrequired
string
The object type. Always "site".
namerequired
string
The website's name.
slugrequired
string
The public link's label - the site answers at `<slug>.genaya.site`.
urlrequired
string <uri>
The site's public link on genaya.site.
primaryDomain
string
The connected domain the site answers on as its primary address, or null.nullable
statusrequired
enumdraft | live | paused | suspended
draft (built, not published), live, paused (taken offline by the owner) or suspended (taken offline by Genaya).
pageCount
integer
How many pages the site has.
hasUnpublishedChanges
boolean
Whether the draft differs from what is live.
lastPublishedAt
string <date-time>
ISO-8601 timestamp of the last publish, or null for a draft.nullable
createdAt
string <date-time>
ISO-8601 timestamp of when the site was created.nullable
updatedAt
string <date-time>
ISO-8601 timestamp of the last change.nullable

Errors

401Bad, missing, or revoked key
402The prepaid balance has nothing left for API requests past the included pool, or the trial requests are used up
403Lacks scope, plan without API access, live key on a trial, test key writing, or feature switched off
404No such resource in this organization
429Rate limited
500Unexpected server error
GET/sites/{siteId}/tables

List 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

siteIdrequired
string
The id of the website.

Response 200

No fields.

Errors

400Malformed or missing parameters
401Bad, missing, or revoked key
402The prepaid balance has nothing left for API requests past the included pool, or the trial requests are used up
403Lacks scope, plan without API access, live key on a trial, test key writing, or feature switched off
404No such resource in this organization
429Rate limited
500Unexpected server error
GET/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

siteIdrequired
string
tableIdrequired
string
The id of the table (the Leads and Bookings tables are `<siteId>__leads` and `<siteId>__bookings`).

Response 200

FieldTypeDescription
idrequired
string
Unique identifier for the table.
objectrequired
string
The object type. Always "site_table".
siteIdrequired
string
The website the table belongs to.
keyrequired
string
A stable key derived from the name (leads, bookings, or a slug).
namerequired
string
The table's name.
system
boolean
true on the two built-in tables (Leads, Bookings).
source
enumleads | bookings | custom
What fills the table - leads (the site's forms), bookings (the site's booking page) or custom.
fieldsrequired
array of object
The columns, in display order.
keyrequired
string
The key a record's `values` map stores this column under.
labelrequired
string
The column's label in the app.
typerequired
enumtext | longtext | number | date | boolean | select | email | phone | url
The value type - text (up to 500 characters), longtext (up to 5000), number, date (an ISO-8601 string), boolean, select (one of `options`), email, phone or url.
required
boolean
Whether a record must carry a value for this column.
options
array of string
The choices of a select column, exactly as written; empty for every other type.
recordCount
integer
How many live records the table holds.
createdAt
string <date-time>
nullable
updatedAt
string <date-time>
nullable

Errors

401Bad, missing, or revoked key
402The prepaid balance has nothing left for API requests past the included pool, or the trial requests are used up
403Lacks scope, plan without API access, live key on a trial, test key writing, or feature switched off
404No such resource in this organization
429Rate limited
500Unexpected server error
GET/sites/{siteId}/tables/{tableId}/records

List 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

siteIdrequired
string
tableIdrequired
string

Response 200

No fields.

Errors

400Malformed or missing parameters
401Bad, missing, or revoked key
402The prepaid balance has nothing left for API requests past the included pool, or the trial requests are used up
403Lacks scope, plan without API access, live key on a trial, test key writing, or feature switched off
404No such resource in this organization
429Rate limited
500Unexpected server error
POST/sites/{siteId}/tables/{tableId}/records

Create 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

siteIdrequired
string
tableIdrequired
string

Request body

FieldTypeDescription
valuesrequired
object
The record's values keyed by the table's field keys. Every required field must be present; a select value must be one of the column's options; unknown keys are ignored.

Response 201

FieldTypeDescription
idrequired
string
Unique identifier for the record.
objectrequired
string
The object type. Always "site_record".
siteIdrequired
string
tableIdrequired
string
valuesrequired
object
The values keyed by field key, typed by the table's fields: text as a string, number as a number, boolean as true / false, date as an ISO-8601 string, select as the option's exact text. An empty value is null.
links
object
The Genaya records this row is linked to (null when none).
leadId
string
The lead row in the site's "<Site> - Website" lead table (a Leads row).nullable
appointmentId
string
The appointment a booking created (a Bookings row).nullable
clientId
string
The client a booking created or matched (a Bookings row).nullable
submissionId
string
The Engage form or booking submission the row came from.nullable
source
enumpublic | ai | member
public (a visitor on the site), ai (Genaya AI) or member (a team member on the Data tab, or an API key).
createdAt
string <date-time>
nullable
updatedAt
string <date-time>
nullable

Errors

400Malformed or missing parameters
401Bad, missing, or revoked key
402The prepaid balance has nothing left for API requests past the included pool, or the trial requests are used up
403Lacks scope, plan without API access, live key on a trial, test key writing, or feature switched off
404No such resource in this organization
409Idempotency-Key reused with a different body
422Rejected by a business rule
429Rate limited
500Unexpected server error
GET/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

siteIdrequired
string
recordIdrequired
string

Response 200

FieldTypeDescription
idrequired
string
Unique identifier for the record.
objectrequired
string
The object type. Always "site_record".
siteIdrequired
string
tableIdrequired
string
valuesrequired
object
The values keyed by field key, typed by the table's fields: text as a string, number as a number, boolean as true / false, date as an ISO-8601 string, select as the option's exact text. An empty value is null.
links
object
The Genaya records this row is linked to (null when none).
leadId
string
The lead row in the site's "<Site> - Website" lead table (a Leads row).nullable
appointmentId
string
The appointment a booking created (a Bookings row).nullable
clientId
string
The client a booking created or matched (a Bookings row).nullable
submissionId
string
The Engage form or booking submission the row came from.nullable
source
enumpublic | ai | member
public (a visitor on the site), ai (Genaya AI) or member (a team member on the Data tab, or an API key).
createdAt
string <date-time>
nullable
updatedAt
string <date-time>
nullable

Errors

401Bad, missing, or revoked key
402The prepaid balance has nothing left for API requests past the included pool, or the trial requests are used up
403Lacks scope, plan without API access, live key on a trial, test key writing, or feature switched off
404No such resource in this organization
429Rate limited
500Unexpected server error
PATCH/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

siteIdrequired
string
recordIdrequired
string

Request body

FieldTypeDescription
valuesrequired
object
Only the keys present are checked and replaced; every other value stays as it was.

Response 200

FieldTypeDescription
idrequired
string
Unique identifier for the record.
objectrequired
string
The object type. Always "site_record".
siteIdrequired
string
tableIdrequired
string
valuesrequired
object
The values keyed by field key, typed by the table's fields: text as a string, number as a number, boolean as true / false, date as an ISO-8601 string, select as the option's exact text. An empty value is null.
links
object
The Genaya records this row is linked to (null when none).
leadId
string
The lead row in the site's "<Site> - Website" lead table (a Leads row).nullable
appointmentId
string
The appointment a booking created (a Bookings row).nullable
clientId
string
The client a booking created or matched (a Bookings row).nullable
submissionId
string
The Engage form or booking submission the row came from.nullable
source
enumpublic | ai | member
public (a visitor on the site), ai (Genaya AI) or member (a team member on the Data tab, or an API key).
createdAt
string <date-time>
nullable
updatedAt
string <date-time>
nullable

Errors

400Malformed or missing parameters
401Bad, missing, or revoked key
402The prepaid balance has nothing left for API requests past the included pool, or the trial requests are used up
403Lacks scope, plan without API access, live key on a trial, test key writing, or feature switched off
404No such resource in this organization
422Rejected by a business rule
429Rate limited
500Unexpected server error
DELETE/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

siteIdrequired
string
recordIdrequired
string

Response 200

FieldTypeDescription
id
string
object
string
deleted
boolean

Errors

401Bad, missing, or revoked key
402The prepaid balance has nothing left for API requests past the included pool, or the trial requests are used up
403Lacks scope, plan without API access, live key on a trial, test key writing, or feature switched off
404No such resource in this organization
429Rate limited
500Unexpected server error
POST/sites/{siteId}/records/{recordId}/restore

Restore 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

siteIdrequired
string
recordIdrequired
string

Response 200

FieldTypeDescription
idrequired
string
Unique identifier for the record.
objectrequired
string
The object type. Always "site_record".
siteIdrequired
string
tableIdrequired
string
valuesrequired
object
The values keyed by field key, typed by the table's fields: text as a string, number as a number, boolean as true / false, date as an ISO-8601 string, select as the option's exact text. An empty value is null.
links
object
The Genaya records this row is linked to (null when none).
leadId
string
The lead row in the site's "<Site> - Website" lead table (a Leads row).nullable
appointmentId
string
The appointment a booking created (a Bookings row).nullable
clientId
string
The client a booking created or matched (a Bookings row).nullable
submissionId
string
The Engage form or booking submission the row came from.nullable
source
enumpublic | ai | member
public (a visitor on the site), ai (Genaya AI) or member (a team member on the Data tab, or an API key).
createdAt
string <date-time>
nullable
updatedAt
string <date-time>
nullable

Errors

401Bad, missing, or revoked key
402The prepaid balance has nothing left for API requests past the included pool, or the trial requests are used up
403Lacks scope, plan without API access, live key on a trial, test key writing, or feature switched off
404No such resource in this organization
422Rejected by a business rule
429Rate limited
500Unexpected server error