Skip to content

Workspaces, products and set-up

Look up the REST routes for workspaces, members, products, keys, page settings and the set-up checklist, with their fields and who may call them.

Updated

The REST routes for workspaces, products and set-up, generated with npm run openapi from the schemas Handline validates every request with. Routes are under https://app.handline.io/api/v1 and take Authorization: Bearer <key or token>; the ids in braces are path parameters. The OpenAPI document is at https://app.handline.io/api/v1/openapi.json.

A GET or DELETE takes its fields as query parameters: numbers and true or false are read as such, and a repeated key is a list. Other methods take a JSON body with content-type: application/json.

GET /me#

Read who you are and the workspaces you belong to.

Operation: me.get, MCP tool me_get. Who: any signed-in person, for themselves; not agent keys.

No query parameters.

GET /workspaces/{workspaceId}#

Read a workspace.

Operation: workspaces.get, MCP tool workspaces_get. Who: owners, admins, editors and viewers (workspace.read); not agent keys.

No query parameters.

PATCH /workspaces/{workspaceId}#

Rename a workspace.

Operation: workspaces.rename, MCP tool workspaces_rename. Who: owners and admins (workspace.rename); not agent keys.

BodyTypeRequiredRules
namestringYes1 to 80 characters.

GET /workspaces/{workspaceId}/products#

List the products in a workspace.

Operation: products.list, MCP tool products_list. Who: owners, admins, editors and viewers (workspace.read); not agent keys.

No query parameters.

POST /workspaces/{workspaceId}/products#

Create a product: one thing being marketed, with its own ground rules, domain and settings.

Operation: products.create, MCP tool products_create. Who: owners and admins (products.create); not agent keys.

BodyTypeRequiredRules
namestringYes1 to 80 characters.
siteUrlstringNoA URL.
timezonestringNoDefault UTC.
currencystringNoMatches ^[A-Z]{3}$. Default EUR.

GET /products/{productId}#

Read a product and its settings.

Operation: products.get, MCP tool products_get. Who: owners, admins, editors and viewers (record.read); agent keys with read.

No query parameters.

PATCH /products/{productId}#

Change a product: its name, site, time zone, currency or settings. Settings that checks read (check modes, channels) mark every open change set as needing a recheck before it can be published.

Operation: products.update, MCP tool products_update. Who: owners and admins (products.settings); not agent keys.

BodyTypeRequiredRules
namestringNo1 to 80 characters.
siteUrlstring or nullNoA URL.
timezonestringNo
currencystringNoMatches ^[A-Z]{3}$.
settingsobjectNo
settings.checkModesobjectNoAny keys; each value string.
settings.approvalobjectNoAny keys; each value string.
settings.channelsobjectNoAny keys; each value object.
settings.channels.<key>.enabledbooleanYes
settings.emailApproversbooleanNo

GET /workspaces/{workspaceId}/members#

List the members of a workspace and the invitations waiting.

Operation: members.list, MCP tool members_list. Who: owners, admins, editors and viewers (workspace.read); not agent keys.

No query parameters.

POST /workspaces/{workspaceId}/invites#

Invite a person to the workspace by email, with a role.

Operation: members.invite, MCP tool members_invite. Who: owners and admins (members.manage); not agent keys.

BodyTypeRequiredRules
emailstringYesAn email address.
rolestringYesOne of owner, admin, editor, viewer.

DELETE /workspaces/{workspaceId}/invites/{inviteId}#

Withdraw an invitation that has not been accepted.

Operation: invites.revoke, MCP tool invites_revoke. Who: owners and admins (members.manage); not agent keys.

No query parameters.

PATCH /workspaces/{workspaceId}/members/{userId}#

Change a member's role.

Operation: members.changeRole, MCP tool members_changeRole. Who: owners and admins (members.manage); not agent keys.

BodyTypeRequiredRules
rolestringYesOne of owner, admin, editor, viewer.

DELETE /workspaces/{workspaceId}/members/{userId}#

Remove a member from the workspace. They lose access on their next request.

Operation: members.remove, MCP tool members_remove. Who: owners and admins (members.manage); not agent keys.

No query parameters.

GET /products/{productId}/counts#

Count what needs attention: change sets awaiting approval and open work items.

Operation: products.counts, MCP tool products_counts. Who: owners, admins, editors and viewers (record.read); agent keys with read.

No query parameters.

GET /products/{productId}/keys#

List the agent and product keys of a product, with their scopes and when each was last used.

Operation: keys.list, MCP tool keys_list. Who: owners and admins (keys.manage); not agent keys.

No query parameters.

POST /products/{productId}/keys#

Create an agent key with scopes, or a product key that can only report outcomes. The key is shown once.

Operation: keys.create. Who: owners and admins (keys.manage); not agent keys.

BodyTypeRequiredRules
kindstringYesOne of agent, product.
namestringYes1 to 60 characters.
scopesstring[]NoAt least 1 item. Each one of read, propose, publish, report.

POST /products/{productId}/keys/{keyId}/rotate#

Rotate a key: a new key with the same scopes, and the old one revoked at once.

Operation: keys.rotate. Who: owners and admins (keys.manage); not agent keys.

No body.

POST /products/{productId}/keys/{keyId}/revoke#

Revoke a key. It is refused on its next call.

Operation: keys.revoke, MCP tool keys_revoke. Who: owners and admins (keys.manage); not agent keys.

No body.

PUT /products/{productId}/theme#

Set the product’s brand theme for its pages. Every page changes, with no page edit. A theme whose text and background colours fail WCAG AA contrast is refused, with the failing pair named.

Operation: products.setTheme, MCP tool products_setTheme. Who: owners and admins (products.settings); not agent keys.

BodyTypeRequiredRules
themeobjectYes
theme.colorsobjectYes
theme.colors.backgroundstringYesMatches ^#[0-9a-fA-F]{6}$.
theme.colors.surfacestringYesMatches ^#[0-9a-fA-F]{6}$.
theme.colors.textstringYesMatches ^#[0-9a-fA-F]{6}$.
theme.colors.mutedstringYesMatches ^#[0-9a-fA-F]{6}$.
theme.colors.primarystringYesMatches ^#[0-9a-fA-F]{6}$.
theme.colors.onPrimarystringYesMatches ^#[0-9a-fA-F]{6}$.
theme.colors.borderstringYesMatches ^#[0-9a-fA-F]{6}$.
theme.fontsobjectYes
theme.fonts.headingstringYesOne of system-sans, system-serif, atkinson, inter, source-sans, ibm-plex-sans, lora, merriweather.
theme.fonts.bodystringYesOne of system-sans, system-serif, atkinson, inter, source-sans, ibm-plex-sans, lora, merriweather.
theme.radiusintegerYesFrom 0 to 24.
theme.logoobject or nullYes
theme.logo.srcstringYesA URL.
theme.logo.altstringYes1 to 100 characters.
theme.logo.heightintegerNoFrom 16 to 64. Default 28.
theme.faviconstring or nullYesA URL.
theme.allowThirdPartyFontsbooleanNoDefault false.

PATCH /products/{productId}/page-settings#

Set the product’s page settings: privacy notice, fallback address, indexing, allowed destinations and the consent wording.

Operation: products.setPageSettings, MCP tool products_setPageSettings. Who: owners and admins (products.settings); not agent keys.

BodyTypeRequiredRules
privacyUrlstring or nullNoA URL.
fallbackUrlstring or nullNoA URL.
indexablebooleanNo
allowedDestinationsstring[]NoAt most 20 items. Each matches ^([a-z0-9-]+\.)+[a-z]{2,}$.
consentTextobjectNo
consentText.titlestringYes1 to 80 characters.
consentText.bodystringYes1 to 400 characters.
consentText.acceptstringYes1 to 30 characters.
consentText.declinestringYes1 to 30 characters.

PUT /products/{productId}/retention#

Set how long visit detail, and the IP address and browser string, are kept.

Operation: products.setRetention, MCP tool products_setRetention. Who: owners and admins (products.settings); not agent keys.

BodyTypeRequiredRules
visitDaysintegerYesFrom 1 to 400.
ipUaDaysintegerYesFrom 1 to 30.

GET /products/{productId}/page-setup#

Read the product’s theme, page settings and retention.

Operation: products.pageSetup, MCP tool products_pageSetup. Who: owners, admins, editors and viewers (record.read); agent keys with read.

No query parameters.

GET /products/{productId}/setup#

The product’s set-up checklist: each step done or not, exactly what is missing, and who can do it. Steps an agent can do list their tools. The product is ready to run when every step passes; until then placements can be planned, not marked live.

Operation: setup.checklist, MCP tool setup_checklist. Who: owners, admins, editors and viewers (record.read); agent keys with read.

No query parameters.

A test link to one of the product’s pages: its visits and outcomes are marked as tests. Test visits and test outcomes show on the checklist, never in results, and are never sent to a platform.

Operation: setup.testLink, MCP tool setup_testLink. Who: owners, admins, editors and viewers (record.read); agent keys with read.

QueryTypeRequiredRules
pageIdstringYes

Was this page helpful?