App API

The programmatic surface of the Horizon API, /api/v2/agent/*, called with an hzn_ API key. Which /api/v2 routes a key can reach, how each request is authorized, and every endpoint with its body, response and status codes.

https://api.horizonplatform.ai/api/v2/agent/* is the part of the Horizon API built for programs that hold an hzn_ API key: boards, tasks, labels, organization members, Sales records, Marketing brand kits and canvases. This page also covers the Marketing records a key reaches outside /agent: core offerings, persona and account profiles, competitors, Positioning and assets.

Your own integrations call it with a key you create in Settings (see API Key Management). Horizon’s own agents call the same routes, through skills that hold an hzn_ key. AI assistants such as Claude and ChatGPT reach them through the MCP connector, which acts as the owner or admin who signed in.

Which routes an API key can reach

An Authorization: Bearer hzn_... key reaches three groups of /api/v2 routes, and no others:

RoutesKey acceptedEnforced by
/api/v2/agent/*Yes, and only keys: a signed-in session’s token gets 401Each route checks the key itself, plus one permission per group of routes, as described on this page
/api/v2/forms/*YesThe forms routes check the key’s permission for each entity
Any other /api/v2 path that belongs to a module feature in the key’s permission matrix, for example /boards, /tasks, /erp/crm/contacts and /meetingsYesThe key’s permission for that module and feature
Every other /api/v2 pathNo. 403 PERMISSION_DENIED, “API keys cannot access this endpoint”

The paths closed to keys by that last rule include /settings, /org, /billing, /connections, /agents, /apps, /skills, /modules, /services, /onboarding, /dashboard, /notifications, /operator, /connector-actions and /marketing/sites, apart from four organization-setup routes under /org, /billing and /settings that have module features of their own (see Organization setup with a key). A set of named finance actions is closed as well, among them /erp/finance/disbursement-freeze and /erp/finance/remittance. Because the API keys routes under /settings are closed, a key cannot create, list or revoke keys. An owner or admin creates them in the dashboard, and each key is hzn_ followed by 32 random bytes in base64url.

The refusal says why the path is closed in details.reason, and details.path is the path relative to /api/v2:

json
{
  "error": {
    "code": "PERMISSION_DENIED",
    "message": "API keys cannot access this endpoint",
    "details": {
      "path": "/erp/finance/customers",
      "reason": "retired",
      "movedTo": ["/api/v2/forms/customers"],
      "hint": "This path belonged to the retired legacy finance API. For customers, use /api/v2/forms/customers."
    }
  }
}
details.reasonMeaning
session_onlyThe path serves signed-in users only
retiredThe path belonged to a retired API. details.movedTo lists the paths to use instead
no_routeNo route exists at this path

A path under /api/v2/agent/ that matches none of the endpoints on this page is refused the same way, with details.reason no_route. The exception is paths under /api/v2/agent/users, which are checked against the key’s system.users permission for the request’s method: a key that holds it gets the 404 below instead.

A request that a key may make, or any request from a signed-in session, to a path where no route exists gets 404 in the same envelope:

json
{
  "error": {
    "code": "NOT_FOUND",
    "message": "No API route matches GET /api/v2/tasks",
    "details": {
      "method": "GET",
      "path": "/api/v2/tasks",
      "reason": "no_collection_root",
      "movedTo": [
        "/api/v2/my-tasks",
        "/api/v2/boards/:boardId/tasks"
      ],
      "hint": "…"
    }
  }
}

details.reason is no_collection_root for a path that serves only records below it, retired for a path that belonged to a retired API, and otherwise no_route. movedTo and hint are present when Horizon knows where to go instead. On /api/v2/forms/*, an unknown entity type is a 404 in problem-details form instead, with "detail": "Unknown entity type".

The retired finance endpoints a key can still reach, under /api/v2/erp/finance/bank and /api/v2/erp/finance/periods, answer 501 with code NOT_IMPLEMENTED in the same envelope, and details.movedTo where there is a replacement.

Same key, two enforcement paths

The /api/v2/agent/* routes and the module routes accept the same key and read the same permissions. What they check differs:

/api/v2/agent/*Module routes
Module entitlementNot checked, except on POST /crm/quotes/:id/ordersChecked: a module your organization does not have is refused
Board roleNone. The key’s board access is the whole of its board authorizationThe key acts as its creator, and the creator’s board access applies
Key’s creator removed or deactivatedRefused, see Key checksRefused the same way
Rate limit1,000 requests per 60 seconds per key, then your organization’s API tier, see Rate limits100 requests per 60 seconds per key, counted separately (1,000 for a request the tier counts), then your organization’s API tier

Authentication and authorization

Every /api/v2/agent/* request is first counted against the key’s rate limit, then checked in this order: the key, who the request acts as (see Actor), the key’s creator and the active legal entity, then the one permission the route needs. A request that passes the key checks is then counted toward your organization’s API tier.

Request headers

HeaderRequiredEffect
Authorization: Bearer hzn_...YesThe API key. Anything not starting Bearer hzn_ is refused
Content-Type: application/jsonFor bodiesJSON bodies up to 10 MB. Larger bodies get 413 PAYLOAD_TOO_LARGE
X-Active-Legal-EntityNoA legal-entity id, or * for all entities. Only has an effect when legal-entity separation is on, see below
X-Horizon-Agent-Deployment-IdNoMakes the caller an agent deployment instead of the key’s creator, see Actor
X-Request-IdNoEchoed back, or generated when absent. Recorded on delete audit rows

Key checks

Horizon looks the key up by its hash. It must exist and be active:

Statuserror.codeMessage
401UNAUTHORIZEDMissing or malformed API key
401UNAUTHORIZEDInvalid API key (unknown, or its status is not active)
401UNAUTHORIZEDAPI key expired

The key’s creator must be an active member of the key’s organization:

Statuserror.codeWhen
401KEY_OWNER_NOT_FOUNDThe key’s creator is no longer a member of the organization: they were removed, or they left. Message: API key creator is no longer a member of the organization
403MEMBER_DEACTIVATEDThe key’s creator is deactivated in the organization

These two refusals apply on every /api/v2/agent/* route, and on every other route a key can reach, whatever the organization’s Multi-entity separation setting: Off, Standard, Strict or Inherit.

Removing or deactivating the creator does not revoke the key. It stays active, and it works again from its next request if the creator is reactivated or rejoins the organization. To stop a key for good, revoke or delete it.

Rate limits

Two limits apply to every keyed request: your organization’s API tier, shared by all of its keys, and a per-key limit that guards the platform. The per-key limit is checked first.

Your organization’s API tier

TierPer minutePer dayPrice
Free10100$0
API 1K1001,000$75 a month
API 3K2003,000$150 a month
API 10K50010,000$450 a month

Above API 10K, email [email protected] for a custom quote. A tier is bought separately from your Launch, Navigate or Summit plan and billed monthly. An organization that has bought none is on Free. Owners, admins and billing admins buy, switch and cancel a tier on System > Plan and Tokens in Horizon on the web; see Buy, switch or cancel a tier.

  • One allowance for the organization. Every request made with any of your organization’s hzn_ keys, anywhere on /api/v2, counts once toward the same minute and day. MCP connector tool calls are not counted on their own; the API requests they make are, including those an execute script makes.
  • Not counted: Horizon’s own agents, a signed-in session in the web or mobile app, exports, the data importer, GET /api/v2/agent/usage, reading a run (GET /api/v2/agent/runs/:id), webhook deliveries, and refused calls: any 401, 403, 413 or 429, and INSUFFICIENT_TOKENS. A 400, 404, 409 or 5xx counts.
  • A bulk request counts once and carries at most 100 records (a few routes accept fewer); more is refused with 413 BATCH_TOO_LARGE and not counted.
  • The day resets at midnight in your organization’s time zone, set under Organization time zone on Settings > API Keys, or in UTC when none is set. The minute is a 60-second window.

Over a limit, the request is refused with 429, a Retry-After header holding the wait in seconds, and PLAN_LIMIT_DAILY or PLAN_LIMIT_MINUTE. The message is written to be shown to a person as it stands:

json
{
  "error": {
    "code": "PLAN_LIMIT_DAILY",
    "message": "This organization has used all 100 of its Horizon API requests for today (Free tier). The limit resets at midnight Central, in about 6 hours. API 1K allows 1,000 requests a day for $75 a month. A person with billing access must open this link to upgrade: https://api.horizonplatform.ai/api/v2/public/billing/api-tier-upgrade/<token>",
    "tier": "free",
    "limit": 100,
    "resetsAt": "2026-11-03T00:00:00-06:00",
    "upgradeUrl": "https://api.horizonplatform.ai/api/v2/public/billing/api-tier-upgrade/<token>",
    "nextTier": { "name": "API 1K", "perMinute": 100, "perDay": 1000, "priceUsd": 75 }
  }
}

PLAN_LIMIT_MINUTE has the same fields, a message that starts “Try again in N seconds”, and a resetsAt at the end of the minute. At API 10K and on custom limits, upgradeUrl and nextTier are null and the message points to [email protected]. upgradeUrl is also null when no link could be made; the message then points to Billing in Horizon.

The upgrade link needs no sign-in and expires after 24 hours. It opens a page with one Continue to checkout button. On Free, the button goes to checkout for the next tier, granted once payment goes through. On a paid tier, it opens Plan and Tokens in Horizon, where a signed-in owner, admin or billing admin confirms the switch.

Every counted response carries X-RateLimit-Limit, X-RateLimit-Remaining and X-RateLimit-Reset (epoch seconds) for the window with fewer requests left, or the refused one on a 429.

GET /api/v2/agent/usage, with any key, answers { "data": ... } with the tier (tier, tierName), the limits (perMinute, perDay), today’s count (dayCount, dayRemaining), the current minute (minuteCount, minuteResetsInSeconds), timeZone, the day’s reset (resetsAt, resetsAtText), and upgradeUrl and nextTier as in a refusal. It is not counted. If the count cannot be read it answers 503 USAGE_UNAVAILABLE. Owners and admins see the same numbers on the API usage card on Settings > API Keys; see Your API tier.

Your organization’s owners and admins are emailed when it reaches 80% of the day’s allowance and again at 100%, once each per day. Each owner or admin can turn the 80% email off on Settings > API Keys; the 100% email is always sent.

Per-key limit

Each key can make 1,000 requests to /api/v2/agent/* per 60-second window. Over that, a request is refused with 429:

json
{ "error": { "code": "RATE_LIMITED", "message": "Too many requests" } }
HeaderSent onValue
X-RateLimit-LimitEvery counted response, including the 4291000
X-RateLimit-RemainingThe sameRequests left in the window, never below 0
Retry-AfterThe 429 onlySeconds until the window ends
  • Counted per key. Each key has its own count. Two keys in the same organization do not share one, and calls Horizon’s own agents make with a key count against that key like any other.
  • Counted before the key is checked. A request that is then refused, for example with 401 or 403, still counts.
  • Separate from the other routes. The other /api/v2 routes a key can reach allow 100 requests per 60 seconds per key, counted separately. A request that counts toward your organization’s tier gets the same 1,000 per 60 seconds there instead, shared with the key’s /api/v2/agent/* requests.
  • The window is fixed. It starts with the key’s first counted request and ends 60 seconds later, not on the clock minute. Refused requests count but do not extend it, so waiting Retry-After seconds is always enough.
  • A key has no rate-limit setting of its own, and the per-key limit does not vary by plan or tier. If Horizon cannot count a request, it serves it without the rate-limit headers.

Permission map

The Module permissions you set on a key are stored as a map of "<module>.<feature>": "<actions>", where actions are any of R (Read), W (Write), D (Delete) and X (Execute). Execute applies to workflow actions on /api/v2/forms/*, and no route on this page asks for it. Each group of agent routes requires one entry, and the HTTP method picks the action: GET needs R; POST, PUT and PATCH need W; DELETE needs D.

RoutesPermission
/boards, and its /columns, /sections, /memberscompany.boards
/boards/:boardId/tasks, /taskscompany.tasks
/tasks/:taskId/commentscompany.task-comments and company.tasks W, see below
/boards/:boardId/tabscompany.board-tabs
/labelscompany.labels
/userssystem.users
/crm/contactscrm.contacts
/crm/companiescrm.companies
/crm/dealscrm.deals
/crm/quotescrm.quotes
/marketing/brand-kitsmarketing.brand-kit
/canvasessystem.canvases, read only, see Canvases

A missing action returns 403 PERMISSION_DENIED with the message API key lacks <action> permission for <module>.<feature> and details of { module, feature, action }.

A key with Full access (includes future features) stores the map {"*": "RWDX"} and no other entry. The * entry is used only when no entry names the feature, so it covers every feature, including features added after the key was created, and it holds every permission in the table above. It never grants an action a feature does not offer to keys, and it does not open the paths closed to keys.

On the module routes and /api/v2/forms/*, some features cap the actions any key can hold, whatever the map says. See Actions no key can hold. A request for a capped action gets the same 403, but the message goes on to say No API key can be granted <action> here: <reason>., and details adds capped: true, offered, the actions keys can hold there, and hint, which names what to use instead where there is something. None of the permissions in the table above is capped.

Caution

Commenting needs company.tasks write as well as company.task-comments write. A comment request is checked against the task routes’ permission before it reaches the comment route, so a key with only company.task-comments gets 403 naming company.tasks.

Board scope

A key’s Board access sets which boards it reaches:

Board accessStored asBoards the key reaches
All boardsallEvery board in the organization, private boards included
Only selected boardsselectedThe boards stored on the key
Only boards this key’s owner has been added tomemberThe boards on which the key’s creator is a user member, read on every request

A board or task outside the key’s scope returns 404 NOT_FOUND (Board not found or Task not found), never 403. An out-of-scope board cannot be told apart from one that does not exist. GET /boards lists only boards in scope. Labels and /users are organization-wide under every mode.

There is no board-role check on this surface. A key with company.boards D can delete any board in its scope.

Unscoped callers only

Seventeen routes, marked “unscoped only” in the endpoint table, refuse a key whose creator has a dimension grant that limits them to specific dimension values.

The refusal is a 403 in RFC 7807 form, not the usual error envelope:

json
{
  "type": "about:blank",
  "title": "Forbidden",
  "status": 403,
  "detail": "Your access is limited to specific dimension values. Sales covers all values and cannot be filtered."
}

Each agent route resolves the active legal entity from the key creator’s membership. Whether a caller can observe any of it depends on the organization’s Multi-entity separation setting: Off, Standard or Strict, or Inherit, which follows Horizon’s platform default.

  • Off: nothing narrows, X-Active-Legal-Entity has no effect, and no 403 comes from this step. The creator checks under Key checks still apply.
  • Standard or Strict: list and read routes for boards, tasks, contacts, companies, deals and quotes return only records visible under the active entity, except that boards the key’s creator is a member of stay visible. A record outside it returns 404.
  • X-Active-Legal-Entity naming an entity the creator cannot access returns 403 ENTITY_ACCESS_DENIED, as does * under Strict unless the creator has all-entities access or is an owner or admin.
  • PUT and DELETE on a company the active entity does not own return 403 ENTITY_EDIT_DENIED. New boards and companies are stamped with the active entity.

Actor and write attribution

Who a request acts as:

  • No X-Horizon-Agent-Deployment-Id: the actor is the key’s creator.
  • With the header: the actor is that agent deployment, but only if an active skill on the deployment holds a horizon-api connection whose stored key is this key. Otherwise 403 AGENT_DEPLOYMENT_NOT_VERIFIED. The deployment must also be active: one that is paused, configuring, error or removed gets 403 AGENT_DEPLOYMENT_NOT_ACTIVE. The request is never downgraded to the creator.

Writes are attributed as follows:

  • createdBy, updatedBy, completedBy and stage-history changedBy are the key creator’s Clerk user id, whichever actor applies.
  • A comment’s author is the creator, or the agent deployment when the actor is an agent.
  • When the actor is an agent, reading or updating a board, adding a column or section, creating or updating a task or subtask, and commenting add that deployment to the board as an editor member, for attribution.
  • Deleting a contact, company, deal or quote records an audit entry in the same transaction: source AGENT, the key’s creator, the deployment when the actor is an agent, the request id, and a snapshot of the deleted record.
Note

Horizon’s own skills do not send X-Horizon-Agent-Deployment-Id yet. A call a Horizon agent makes with a key therefore acts as the key’s creator and is attributed to them.

Endpoints

All paths are relative to https://api.horizonplatform.ai/api/v2/agent.

MethodPathPermissionUnscoped onlyPurpose
GET/boardscompany.boards RList boards in scope
POST/boardscompany.boards WCreate a board
GET/boards/:boardIdcompany.boards RGet a board with columns, sections, tabs, members
PUT/boards/:boardIdcompany.boards WUpdate a board
DELETE/boards/:boardIdcompany.boards DDelete a board
POST/boards/:boardId/columnscompany.boards WAdd a column
PUT/boards/:boardId/columns/reordercompany.boards WReorder columns
PUT/boards/:boardId/columns/:columnIdcompany.boards WUpdate a column
DELETE/boards/:boardId/columns/:columnIdcompany.boards DDelete a column
POST/boards/:boardId/sectionscompany.boards WAdd a section
PUT/boards/:boardId/sections/reordercompany.boards WReorder sections
PUT/boards/:boardId/sections/:sectionIdcompany.boards WUpdate a section
DELETE/boards/:boardId/sections/:sectionIdcompany.boards DDelete a section
GET/boards/:boardId/memberscompany.boards RList board members
POST/boards/:boardId/memberscompany.boards WAdd a board member
PUT/boards/:boardId/members/:memberIdcompany.boards WChange a member’s role
DELETE/boards/:boardId/members/:memberIdcompany.boards DRemove a board member
GET/boards/:boardId/tabscompany.board-tabs RList saved views
POST/boards/:boardId/tabscompany.board-tabs WCreate a saved view
PUT/boards/:boardId/tabs/reordercompany.board-tabs WReorder saved views
PUT/boards/:boardId/tabs/:tabIdcompany.board-tabs WUpdate a saved view
DELETE/boards/:boardId/tabs/:tabIdcompany.board-tabs DDelete a saved view
GET/boards/:boardId/taskscompany.tasks RList a board’s tasks
POST/boards/:boardId/taskscompany.tasks WCreate a task
GET/tasks?q=company.tasks RSearch task titles across boards
GET/tasks/:taskIdcompany.tasks RGet a task
PUT/tasks/:taskIdcompany.tasks WUpdate a task
DELETE/tasks/:taskIdcompany.tasks DDelete a task
PUT/tasks/:taskId/movecompany.tasks WMove a task, within or across boards
POST/tasks/:taskId/subtaskscompany.tasks WCreate a subtask
POST/tasks/:taskId/commentscompany.task-comments W, company.tasks WComment on a task
GET/labelscompany.labels RList task labels
POST/labelscompany.labels WCreate a label
PUT/labels/:labelIdcompany.labels WUpdate a label
DELETE/labels/:labelIdcompany.labels DDelete a label
GET/userssystem.users RList organization members
GET/users/:memberIdsystem.users RGet a member
POST/userssystem.users WAdd an existing Clerk user to the organization
PATCH/users/:memberIdsystem.users WChange a member’s role
DELETE/users/:memberIdsystem.users DRemove a member from the organization
GET/crm/contactscrm.contacts RList contacts
POST/crm/contactscrm.contacts WYesCreate a contact
GET/crm/contacts/:idcrm.contacts RGet a contact
PUT/crm/contacts/:idcrm.contacts WUpdate a contact
POST/crm/contacts/:id/associate-companycrm.contacts WYesLink a contact to a company
DELETE/crm/contacts/:idcrm.contacts DYesDelete a contact
GET/crm/companiescrm.companies RYesList companies
POST/crm/companiescrm.companies WYesCreate a company
GET/crm/companies/:idcrm.companies RYesGet a company
PUT/crm/companies/:idcrm.companies WYesUpdate a company
DELETE/crm/companies/:idcrm.companies DYesDelete a company
GET/crm/dealscrm.deals RList deals
POST/crm/dealscrm.deals WCreate a deal
GET/crm/deals/:idcrm.deals RGet a deal
PUT/crm/deals/:idcrm.deals WUpdate a deal
POST/crm/deals/:id/change-stagecrm.deals WMove a deal to another stage
DELETE/crm/deals/:idcrm.deals DDelete a deal
GET/crm/quotescrm.quotes RYesList quotes
POST/crm/quotescrm.quotes WYesCreate a draft quote
GET/crm/quotes/:idcrm.quotes RYesGet a quote
PUT/crm/quotes/:idcrm.quotes WYesEdit a draft quote
POST/crm/quotes/:id/sendcrm.quotes WYesMark a draft quote sent
POST/crm/quotes/:id/statuscrm.quotes WYesChange a quote’s status
POST/crm/quotes/:id/orderscrm.quotes WYesCreate a sales order from an accepted quote
DELETE/crm/quotes/:idcrm.quotes DYesDelete a draft quote
GET/marketing/brand-kitsmarketing.brand-kit RYesList brand kits
GET/marketing/brand-kits/:idmarketing.brand-kit RYesGet a brand kit with its pillars
GET/canvasessystem.canvases RList canvases
GET/canvases/:canvasIdsystem.canvases RGet a canvas with its versions
GET/canvases/:canvasId/htmlsystem.canvases RRead a canvas’s HTML, a page of bytes at a time

Responses

Every success wraps its payload as { "data": ... }. Deletes return 200 with a body, never 204; the Marketing module routes are the exception (see Marketing records with a key). Identifiers are UUIDs, except user identifiers, which are Clerk user ids (user_...).

Errors use this envelope, where details appears only on some errors:

json
{
  "error": {
    "code": "MISSING_FIELDS",
    "message": "firstName and lastName are required"
  }
}

Two refusals use an RFC 7807 body instead: unscoped-only routes and the role check on POST /crm/quotes/:id/orders. Codes this surface raises beyond the ones above:

Statuserror.codeCause
400VALIDATION_ERRORA body failed its schema. details lists { path, message } per issue
400INVALID_JSONThe body is not valid JSON
400INVALID_BODY_ENCODINGThe body is labelled gzip, deflate or br but does not decompress
400MISSING_FIELDS, MISSING_PARAMA required field or query parameter is absent
400INVALID_UUIDAn id field is not a UUID
400INVALID_COMPANY, INVALID_CONTACT, INVALID_DEAL, INVALID_PIPELINE, INVALID_PRODUCT, INVALID_PARENTA referenced id is not in the organization. Message: <field> not found in this org
404NOT_FOUNDNot found, out of the key’s board scope, or hidden by legal-entity separation
409variesA state conflict, listed per resource below

Pagination

Two styles. Sales records and tasks come newest first (createdAt descending); brand kits come oldest first; canvases come most recently updated first:

EndpointsQueryResponseLimits
/crm/contacts, /crm/companies, /crm/deals, /crm/quoteslimit, cursor{ data, cursor, hasMore }. cursor is the last row’s id, or null on the last pageDefault 25, clamped to 1-100
/marketing/brand-kitslimit, cursor{ data, cursor, hasMore }, as aboveDefault 25. A limit outside 1-50 is read as 25
/canvasestab, cursor{ data, cursor, hasMore }. cursor is an opaque string, null on the last page50 per page, newest updated first. No limit
/boards/:boardId/tasks, /tasks?q=limit, cursor{ data } only. Pass the last task’s id as cursor; a page shorter than limit is the lastDefault 50, at most 200

GET /users returns at most 200 members, with no cursor. The other list routes are unpaginated. The Marketing module routes page with { data, nextCursor } instead; see Lists.

Tasks

Task routes return the task row with no relations.

Create a task

POST /boards/:boardId/tasks returns 201 with the task. It reads only these fields from the body:

FieldTypeRequiredNotes
titlestringYesAt least one character
columnIdstringYesMust be a column on this board, else 400 INVALID_COLUMN
descriptionstring or nullNo
sectionIdstring or nullNo
prioritynone, low, medium, high, urgentNo
assigneeTypeuser, agent, or nullNo
assigneeUserIdstring or nullNoA Clerk user id
assigneeAgentDeploymentIdstring or nullNoMust be a deployment in the organization, else 404 NOT_FOUND
dueDatedate string or nullNo

Two kinds of field are refused rather than ignored, anywhere in a task body:

  • agentQueueStatus, agentQueueOrder, agentConversationId and skipQueueReconciliation return 400 DISPATCH_OWNED_FIELD, even when the value is null. The agent queue owns them.
  • include returns 400 UNSUPPORTED_FIELD. The server chooses the returned shape.

Other unknown fields are dropped. labelIds is dropped on create; set labels with an update.

Note

Assigning a task to an agent here records the assignment and nothing else. The agent is not queued or started, because this surface cannot set the queue fields and never dispatches the agent. Creating the task through POST /api/v2/boards/:boardId/tasks, the route the Horizon app uses, queues it for the agent and can start the agent.

Update, move and delete

PUT /tasks/:taskId is a partial update. It accepts the create fields except that columnId is optional, plus:

FieldTypeNotes
columnIdstring or nullMust be a column on the task’s current board
statusnot_started, in_progress, completedChanging to completed sets completedAt and completedBy
autonomyOverridesuggest_only, supervised, autonomous, or null
labelIdsstring arrayReplaces the task’s labels. [] clears them. Ids from another organization are dropped without an error

Completing a task assigned to an agent, or changing its agent assignee, also sets that agent’s other working tasks in the organization to done.

PUT /tasks/:taskId/move takes columnId, position and targetBoardId, and nothing else:

  • position is clamped to the destination column’s range; omit it to append.
  • With targetBoardId, the destination must be in the key’s scope and the organization (404 Board not found otherwise), and columnId must name one of its columns (400 INVALID_COLUMN). A cross-board move without columnId fails the same way. The task’s section is cleared and its subtasks move with it.

DELETE /tasks/:taskId returns { "data": { "id": "..." } }.

Subtasks

POST /tasks/:taskId/subtasks takes title (required, 400 MISSING_FIELDS), description, assigneeType, assigneeUserId, assigneeAgentDeploymentId and dueDate, and returns 201. The subtask takes its parent’s column. A subtask cannot have subtasks: 400 INVALID_NESTING.

GET /boards/:boardId/tasks accepts limit, cursor and tabId. tabId applies a saved view’s filters; an unknown tabId returns the unfiltered list.

GET /tasks searches task titles, case-insensitively, across the boards the key can reach:

QueryRequiredNotes
qYes400 MISSING_PARAM when absent
boardIdNoRestricts to one board. Out of scope returns 404 Board not found
limit, cursorNoAs in Pagination

Comments

POST /tasks/:taskId/comments takes { "body": "..." }, which must be non-empty, and returns 201 with the comment. It needs two permissions, see Permission map.

Mentions are written inline as @[Display Name](user:<clerkUserId>) or @[Display Name](agent:<agentDeploymentId>). For each mention of a user or agent deployment in the organization, Horizon:

  • adds them to the task’s board as an editor if they are not already a member
  • starts a run of a mentioned agent on the task

Mentions of ids outside the organization stay in the text and have no effect.

Boards

Boards

RouteBodyResult
POST /boardsname (required, 400 MISSING_FIELDS), description, visibility (public or private, default private), goalId (must be in the organization, else 400 INVALID_GOAL), templateColumns (array of { name, color })201. The key’s creator becomes a board admin, and the board gets one saved view named All Tasks. A legalEntityId in the body is ignored
GET /boards{ data: { myBoards, otherBoards, guestBoards } }. myBoards are boards in scope where the key’s creator is a user member; otherBoards are public boards in scope the creator has not joined; guestBoards is always empty
GET /boards/:boardIdThe board with columns, members, goal, a task count, sections and tabs
PUT /boards/:boardIdname, description, visibility, goalId (null clears)The updated board
DELETE /boards/:boardId{ data: { id } }

GET /boards shows the creator’s view: an all-mode key does not list private boards its creator has not joined, but it can still fetch and change them by id.

The board body is not schema-validated on this surface. Unknown fields are ignored.

Columns, sections and members

RouteBody
POST /boards/:boardId/columnsname, color, position. Without position the column is appended
PUT /boards/:boardId/columns/:columnIdname, color, position
PUT /boards/:boardId/columns/reorderorderedIds: column ids in the new order
POST /boards/:boardId/sectionsname, position
PUT /boards/:boardId/sections/:sectionIdname, position
PUT /boards/:boardId/sections/reorderorderedIds
POST /boards/:boardId/membersmemberType (user or agent), then userId (a Clerk user id of an organization member or guest) or agentDeploymentId (a deployment in the organization), and role (viewer, commenter, editor, admin; default viewer). A principal not in the organization returns 404
PUT /boards/:boardId/members/:memberIdrole only

Deletes return { data: { id } }.

Saved views (tabs)

RouteBodyResult
POST /boards/:boardId/tabsname (required), viewMode (list; any other value is stored as board), filters (validated, 400 INVALID_FILTERS)201 with the view
PUT /boards/:boardId/tabs/:tabIdname, viewMode, filtersThe view
PUT /boards/:boardId/tabs/reordertabIds, every one on this board, else 400 INVALID_INPUT{ data: { reordered: true } }
DELETE /boards/:boardId/tabs/:tabId{ data: { id, deleted: true } }

Labels

Labels belong to the organization, not to a board, so board scope does not apply. POST /labels takes name (required) and color (default ""); PUT /labels/:labelId takes either. A label outside the organization returns 404 Label not found. GET /labels is sorted by name.

Sales

Create and update bodies are validated by the same schemas as the Sales module’s own /api/v2/erp/crm/* routes, which strip unknown fields. Each route then writes only the fields listed below. Other schema fields, such as a contact’s department or a company’s website, pass validation and are not stored by these routes.

ownerId is a Clerk user id and is not checked against the organization’s members.

customFields behaves differently by route. On PUT for contacts and companies it merges into the stored object: absent leaves it alone, null clears it, an object replaces the keys it names and deletes keys set to null, and anything else returns 400 INVALID_CUSTOM_FIELDS. On deal PUT, and on every create, the value sent replaces what is stored.

Contacts

RouteBehavior
POST /crm/contactsRequires firstName and lastName (400 MISSING_FIELDS). Writes those plus email, phone, title, lifecycleStage (default lead), leadSource, ownerId, customFields. companyId links the contact to that company as its primary. email must be unique in the organization (409 EMAIL_EXISTS)
GET /crm/contactsFilters: lifecycleStage, ownerId, leadSource, status, companyId, search (first name, last name, email)
GET /crm/contacts/:idIncludes linked companies, linked deals, and the 10 most recent activities
PUT /crm/contacts/:idWrites firstName, lastName, email, phone, title, lifecycleStage, leadSource, ownerId, status, customFields (merged). A changed email must also be unique. companyId is accepted and ignored
POST /crm/contacts/:id/associate-companyBody companyId (required UUID), role, isPrimary. Creates or updates the link and returns 201. isPrimary: true demotes the current primary
DELETE /crm/contacts/:idRefused with 409 CONTACT_IN_USE while anything references the contact; details lists the references

lifecycleStage is one of lead, contact, customer, evangelist, opportunity, other (400 INVALID_STAGE).

Companies

All five company routes are unscoped only.

RouteBehavior
POST /crm/companiesRequires name and type (400 MISSING_FIELDS; a type that is present but not allowed is 400 INVALID_TYPE). Writes those plus domain, industry, companySize, annualRevenue, phone, address, ownerId, paymentTerms, parentCompanyId, currencyCode, customFields. domain must be unique in the organization (409 DOMAIN_EXISTS)
GET /crm/companiesFilters: type, industry, ownerId, status, search (name, domain)
GET /crm/companies/:idIncludes linked contacts, the 10 most recent deals and the 10 most recent activities
PUT /crm/companies/:idWrites the create fields plus status; customFields merged
DELETE /crm/companies/:idRefused with 409 COMPANY_IN_USE while anything references the company, including a deal that names it as its referral company

type is one of customer, vendor, prospect, partner. annualRevenue is a number or a decimal string. currencyCode is the company’s account currency, a three-letter ISO 4217 code such as EUR, stored upper-case. A non-blank value that is not three letters is 400 VALIDATION_ERROR; a three-letter code Horizon does not know is 400 INVALID_CURRENCY. On PUT, null or an empty string clears it. A new deal for the company starts in this currency when the request names none. Company responses include currencyCode.

address is a JSON object. Horizon reads the street (street, then line2), city, state, postalCode and country from it and sets the company’s street, city, state, postalCode and country fields to match; street holds both lines, separated by a line break. On PUT, only the parts whose value differs from the object already stored change those fields; null, {} or an object with no changed part leaves them as they are. Company responses include all five fields.

Deals

RouteBehavior
POST /crm/dealsRequires name, stage and expectedCloseDate (400 MISSING_FIELDS). Writes those plus companyId, contactId, referralCompanyId, amount, currency (default: the company’s currencyCode, else USD), probability (integer 0-100), pipelineId, ownerId, notes, customFields, status and actualCloseDate. With no pipelineId, the deal joins your organization’s default pipeline when that pipeline has an open stage named exactly stage, and takes that stage’s probability unless you send one; otherwise it has no pipeline. status and actualCloseDate follow the stage, see below. Optional lineItems and contacts arrays. Returns 201 with company, referral company (id, name), contact, deal contacts and line items
GET /crm/dealsFilters: pipelineId, stage, status, ownerId, companyId, contactId, referralCompanyId, search (name). Each row includes the company’s id and name, the referral company’s id and name, and the contact’s id and names
GET /crm/deals/:idIncludes company, referral company (id, name), contact, pipeline, deal contacts, line items and the 20 most recent stage changes
PUT /crm/deals/:idWrites name, companyId, contactId, referralCompanyId, amount, currency, probability, pipelineId, ownerId, lossReason, notes, status, customFields, expectedCloseDate, actualCloseDate, stage. A status of null is ignored; a referralCompanyId of null clears the referral company. When stage or pipelineId changes and the deal ends up on a stage of its pipeline, probability (unless you send one), status and close date follow that stage
POST /crm/deals/:id/change-stageBody stage (required), lossReason, actualCloseDate. The same stage returns the deal unchanged. A stage in the deal’s pipeline sets probability, status and close date; a stage that is not, or a deal on no pipeline, moves the stage alone
DELETE /crm/deals/:idRefused with 409 DEAL_HAS_LIVE_BILLING while a sales order, a direct quote invoice or an agreement is billing the deal; details.billedBy is sales_order, quote or agreement. Void that billing first

A deal line item is { productId, description, quantity, unitPrice, discountPercent, taxRate, sortOrder }. Only unitPrice is required, and quantity defaults to 1. A deal contact is { contactId, role }. POST takes at most 200 lineItems and 100 contacts (400 VALIDATION_ERROR). referralCompanyId names the company that referred the deal. Send a UUID or null; an empty string is 400 VALIDATION_ERROR. POST, GET /crm/deals and GET /crm/deals/:id return that company as referralCompany (id, name), null when the deal has none. companyId, contactId, referralCompanyId and pipelineId, and on create each line’s productId and each contact’s contactId, must belong to your organization (400 INVALID_COMPANY, INVALID_CONTACT, INVALID_REFERRAL_COMPANY, INVALID_PIPELINE or INVALID_PRODUCT), and nothing is written otherwise.

How taxRate is applied depends on whether the crm-pricing-canonical feature is on for your organization: on, it is a fraction (0.0825 is 8.25%); off, the stored line total treats it as a percent. The schema caps it at 9.9999 either way. Before a line’s total is worked out, quantity and unitPrice are rounded half up to four decimals, discountPercent to two and taxRate to four, and the line stores the rounded values.

Status follows the stage. A deal on a stage marked as won is won, on a stage marked as lost is lost, and on any other stage open. A deal that is won or lost has an actualCloseDate: the date you send, or otherwise the moment it closed. A deal moved from one won stage to another, or from one lost stage to another, keeps the close date it has unless you send a new one. Moving a won or lost deal to an open stage reopens it and clears the close date. Every stage change on PUT and change-stage records a stage-history row.

A status you send must agree with the stage the deal ends up on. won or lost is accepted for a deal on an open stage when its pipeline has no stage for that status, and for a deal whose stage is not in a pipeline. open is accepted on a won or lost stage when the pipeline has no open stage. Sending the status a deal already has changes nothing. actualCloseDate cannot be in the future: the latest date accepted is today in UTC+14 (400 VALIDATION_ERROR).

Statuserror.codeCause
400INVALID_STATUSstatus is not open, won or lost
422STATUS_VIA_STAGEThe pipeline has a stage for that status. Create or move the deal on that stage instead
422STATUS_CONFLICTS_WITH_STAGEThe deal is on a won or lost stage, so it has that status. Move it to another stage to change it
422CLOSE_DATE_ON_OPEN_DEALactualCloseDate is sent for a deal that ends up open
422CLOSE_DATE_REQUIREDPUT or change-stage sends actualCloseDate: null for a deal that ends up won or lost

Winning a deal. When a PUT that changes stage, or a change-stage, moves a deal onto a stage of its pipeline marked as won, Horizon sets the deal’s company’s type to customer, and its payment terms to net 30 if it has none. Then, if your organization has Finance and the order-entry-quote-picker feature is off, it creates a Finance customer and a draft sales order, from the deal’s accepted quote, or from its line items when it has no accepted quote. Winning the same deal again does not make a second order. Creating a deal on a won stage does none of this.

The deal is saved before Finance runs, so the win stands whatever Finance does. When Finance cannot make the order for one of the reasons below, the call still answers 200, no Finance customer or sales order is created, a row on the deal’s History in Horizon says why, and data carries financeHandoff beside the deal’s fields:

json
{
  "data": {
    "id": "…",
    "stage": "Closed Won",
    "status": "won",
    "financeHandoff": {
      "setting": "sales_order",
      "outcome": "needs_legal_entity",
      "error": {
        "code": "AMBIGUOUS_LEGAL_ENTITY",
        "message": "This organization has more than one legal entity and none is set as primary, so Finance cannot tell which one the sales order belongs to. Set a primary legal entity in Settings > Entities."
      }
    }
  }
}
outcomeCauseOther fields
needs_legal_entityChecked first. Your organization has no legal entity (NO_LEGAL_ENTITY), none that is active (FINANCE_LEGAL_ENTITY_NOT_ACTIVE), or several and none set as primary (AMBIGUOUS_LEGAL_ENTITY)error.code, and error.message saying what to set up
needs_quoteNothing to order: the deal has no line items and no accepted quote, or its accepted quote has no line itemsquoteId, when the accepted quote has no line items

setting is always sales_order. Otherwise financeHandoff is absent: the sales order was made or already existed, the deal has no company to make one for, your organization does not have Finance, or the order-entry-quote-picker feature is on. Any other failure in the Finance step is answered as an error, with the deal already saved.

Quotes

All eight quote routes are unscoped only. A quote moves through these statuses:

FromTo
draftsent
sentaccepted, rejected, expired
expireddraft
accepted, rejectednone
RouteBehavior
POST /crm/quotesRequires lineItems with at least one item (400 MISSING_LINE_ITEMS) and at most 200 (400 VALIDATION_ERROR). Writes dealId, companyId, contactId, validUntil, currency (default USD), notes, terms. dealId, companyId, contactId and each line’s productId must belong to your organization (400 INVALID_DEAL, INVALID_COMPANY, INVALID_CONTACT or INVALID_PRODUCT), and nothing is written otherwise. The quote starts as draft; the server assigns quoteNumber and computes the totals. Returns 201 with line items
GET /crm/quotesFilters: dealId, companyId, status. Each row includes line items and the company’s and deal’s id and name
GET /crm/quotes/:idIncludes line items, company, and the deal’s id, name and stage
PUT /crm/quotes/:idDrafts only (409 NOT_EDITABLE). Writes notes, terms, validUntil, currency (null is ignored). lineItems, when sent, replaces every line and recomputes the totals; at most 200 (400 VALIDATION_ERROR), and each line’s productId must belong to your organization (400 INVALID_PRODUCT)
POST /crm/quotes/:id/senddraft to sent, else 409 INVALID_TRANSITION
POST /crm/quotes/:id/statusBody status (required). A move the table above does not allow returns 409 INVALID_TRANSITION
POST /crm/quotes/:id/ordersSee below
DELETE /crm/quotes/:idDrafts only (409 NOT_DELETABLE)

A quote line item is { description, quantity, unitPrice, productId, discountPercent, taxRate, sortOrder }; description, quantity and unitPrice are required. The schema also accepts legalEntityId on create and dealId, companyId, contactId on update; these routes do not store them.

POST /crm/quotes/:id/orders turns an accepted quote into a sales order. Body { "definitionKey": "sales_order" }; it returns 201 { data: { id, orderNumber } }. Calling it again for the same quote returns the existing order with 201, but two concurrent calls can both create one. Refusals, in the order they are checked:

StatusCause
403, RFC 7807 bodyDimension-scoped caller
403 ENTITLEMENT_REQUIRED or 403 MODULE_HIDDEN_FOR_ENTITYThe organization lacks the Sales or Finance module
403, RFC 7807 bodyThe key creator’s role cannot write sales orders
404 NOT_FOUND, message Not foundThe order-entry-quote-picker feature is off for the organization
400 MISSING_DEFINITION_KEYNo definitionKey
422 UNKNOWN_DEFINITION_KEYdefinitionKey is not sales_order
404 NOT_FOUNDQuote not found or not visible
409 INVALID_TRANSITIONThe quote is not accepted
422 UNPROVISIONABLE_CUSTOMERThe quote has no company
422 EMPTY_QUOTEThe quote has no line items

Marketing

Marketing has two routes under /api/v2/agent, the brand kit reads below. The rest of what a key reaches in Marketing is the module’s own routes, at the bare /api/v2 path (outside /agent), checked the way Same key, two enforcement paths describes for module routes. The Marketing Setup checklist and Sites are covered at the end of this section.

Brand kits

One row is one brand kit. An organization can hold several, and exactly one is its default: the kit that anything naming no kit uses (see Brand kits). These routes are read only, need marketing.brand-kit read, are unscoped-only, and need the Marketing module (otherwise 403 with ENTITLEMENT_REQUIRED, ENTITLEMENT_HIDDEN_FOR_ENTITY or MODULE_HIDDEN_FOR_ENTITY). Archived kits are never returned.

RouteBehavior
GET /marketing/brand-kitsEach row is { id, name, isDefault, updatedAt }, oldest first. A cursor that is not a live kit of the organization returns 400 INVALID_CURSOR
GET /marketing/brand-kits/:idThe whole kit, below. Another organization’s kit, an archived kit, an unknown id and a value that is not a UUID all return 404 BRAND_KIT_NOT_FOUND

A kit read by id carries:

FieldTypeMeaning
id, namestring
isDefaultbooleanWhether this is the organization’s default kit
logoUrlstring or nullThe primary logo, used in email and PDFs
logoPngUrlstring or nullA PNG copy of an uploaded primary logo; null for a pasted URL
logoIconUrl, logoIconPngUrlstring or nullThe square mark, and its PNG copy
logoDarkUrl, logoDarkPngUrlstring or nullThe logo for dark backgrounds, and its PNG copy
primaryColors, secondaryColorsarray of stringsHex values, for example #0F172A
voice, tagline, elevatorPitchstring or null
messagingFrameworkDefaultsobject or nullDefault language by channel: linkedin, email, landing_page
brandPillarsarrayThe kit’s live pillars in order, each { id, name, description }. Empty when it has none
createdAt, updatedAtstringISO 8601

The agent API has no route that changes a kit. A key with marketing.brand-kit can call the Brand Kit page’s own routes under /api/v2/brand-kit (outside /agent) instead:

RouteBehavior
GET /brand-kitThe default kit. 404 NOT_FOUND until the organization has a kit
PUT /brand-kitUpdates the default kit, or creates it as the default when there is none
GET /brand-kit/kitsThe organization’s live kits, oldest first, paged with limit and cursor
POST /brand-kit/kitsCreates a kit. name is required (400 INVALID_NAME, at most 120 characters); the organization’s first kit becomes its default
GET /brand-kit/kits/:id, PUT /brand-kit/kits/:idReads or updates one kit. PUT can also change name
POST /brand-kit/kits/:id/defaultMakes the kit the default
DELETE /brand-kit/kits/:idUnscoped-only. 409 BRAND_KIT_IS_DEFAULT for the default kit, 409 BRAND_KIT_IN_USE while a draft or active Positioning or a site uses it; a kit only archived Positionings use is archived instead of deleted

A name another live kit has, ignoring case, returns 409 BRAND_KIT_NAME_TAKEN. Every write needs the caller to be an owner or admin, and for a key that means the member who created it; otherwise the write returns 403 INSUFFICIENT_ROLE. A key cannot set a site’s kit, because /marketing/sites is closed to keys.

Marketing records with a key

A key reaches core offerings, persona profiles, account profiles, competitors, Positioning and assets through the routes the Marketing pages use. Paths below are relative to https://api.horizonplatform.ai/api/v2, and each group needs one entry in the key’s Module permissions:

RoutesPermissionIn Module permissions
/core-offeringscompany.core-offeringsCompany, Core Offerings
/persona-profilesmarketing.persona-profilesMarketing, Persona Profiles
/account-profilesmarketing.account-profilesMarketing, Account Profiles
/competitorsmarketing.competitorsMarketing, Competitors
/messaging-frameworks (Positioning)marketing.messaging-frameworksMarketing, Messaging Frameworks
/marketing-assetsmarketing.marketing-assetsMarketing, Marketing Assets

The HTTP method picks the action, as on the agent routes: GET needs R; POST, PUT and PATCH need W; DELETE needs D. None of these permissions is capped. A missing action returns 403 PERMISSION_DENIED, for example API key lacks W permission for marketing.competitors.

These rules apply to every route in this group:

  • Module. /core-offerings needs the Company module. The others need the Marketing module.
  • The key acts as its creator. The member who created the key must be allowed to read or write that kind of record. Every built-in role is, so the refusal comes only from a permission set group that doesn’t include it, or one that was archived: 403 in RFC 7807 form, for example "detail": "Role 'member' cannot write PersonaProfile". Two routes need the creator to be an owner or admin, and are marked below.
  • Unscoped only. Routes marked “Unscoped only” refuse a key whose creator is limited to specific dimension values, with the 403 in Unscoped callers only.
  • Legal entities. Under Standard or Strict separation, a record owned by another legal entity is left out of lists, and a read or write by its id returns 404 NOT_FOUND. Records with no owner are visible from every entity. A new record is owned by the active legal entity, or by no entity when the active entity is *.
  • Bodies. A POST, PUT or PATCH body must be a JSON object sent as application/json, otherwise 400 INVALID_BODY. Only the fields listed for each record are read. An update that names none of them returns 400 NO_FIELDS. A value outside a field’s rules returns 400 with a code naming the field, for example INVALID_CHANNELS.
  • Responses. A record comes back as { "data": ... }. Create returns 201. Delete returns 204 with no body, unlike the agent routes.
  • Rate limit. Your organization’s API tier, and 100 requests per 60 seconds per key, shared with every other module route (1,000 for a request the tier counts).

Lists

Every list route takes the same paging and returns { data, nextCursor }:

QueryEffect
limitRows per page. Default 50; any value is clamped to 1-200
cursorThe last row’s id from the previous page. nextCursor is null on the last page. A cursor that is not a row of this listing returns 400 INVALID_CURSOR
isActivefalse lists only deactivated records; any other value lists only active ones; absent lists both. Not on Positioning or assets
searchCase-insensitive match on the name. On core offerings, persona profiles, competitors and assets
sortThe name field (name, or competitorName on competitors) sorts by name; anything else, or nothing, is newest first. Positioning is always newest version first

Lists return each record’s own fields. The linked records (an offering’s personas, an account profile’s offerings, and so on) come only with a read by id.

Deactivate before delete

Core offerings, persona profiles, account profiles and competitors share three lifecycle routes. All three are unscoped-only, like the create and update routes:

RouteBehavior
PATCH /:id/deactivateSets isActive to false. Returns the record
PATCH /:id/reactivateSets isActive to true. Returns the record
DELETE /:idDeletes a deactivated record and its links. An active one returns 409 MUST_DEACTIVATE_FIRST

isActive is never written by a create or update. Deleting a core offering or an account profile also archives the active Positioning scoped to it.

Core offerings

One row is one product, service or bundle the organization sells.

RouteUnscoped onlyBehavior
GET /core-offeringsList. Also filters on offeringType; an unknown value returns 400 VALIDATION_ERROR
GET /core-offerings/:idOne offering, with targetPersonas and targetCompetitors
POST /core-offeringsYesCreate
PATCH /core-offerings/:idYesUpdate
PATCH /core-offerings/:id/deactivate, .../reactivate, DELETE /core-offerings/:idYesSee Deactivate before delete
FieldRules
nameRequired on create, at most 200 characters. A name another offering has returns 409 OFFERING_NAME_TAKEN
offeringTypeRequired on create: product, service or bundle
description, problemSolved, competitorFreetext, decisionMakerVsChampionText, at most 2,000 characters
pricingModelText, at most 500 characters
keyDifferentiatorsUp to 20 strings of at most 200 characters
salesMotionself_serve, transactional, consultative, enterprise or null
touchpointsWhole number, 0 to 100,000
commonObjectionsUp to 5 objects of { objection, handling }: at most 500 and 2,000 characters
personaProfileIds, competitorIdsThe personas and competitors the offering targets. An update replaces the set, keeping links to records the active legal entity can’t see. An id not in the organization returns 400 INVALID_PERSONA_PROFILE_IDS or 400 INVALID_COMPETITOR_IDS

Persona profiles

One row is one buyer or user persona.

RouteUnscoped onlyBehavior
GET /persona-profilesList
GET /persona-profiles/:idOne profile, with demographics and targetingOfferings, the offerings that target it
POST /persona-profilesYesCreate
PATCH /persona-profiles/:idYesUpdate
PATCH /persona-profiles/:id/deactivate, .../reactivate, DELETE /persona-profiles/:idYesSee Deactivate before delete
FieldRules
nameRequired on create, at most 120 characters. A name another profile has returns 409 PERSONA_NAME_TAKEN
descriptionText, at most 2,000 characters
representativeQuoteText, at most 500 characters
howTheySearchText, at most 1,000 characters
demographicsAn object of up to 20 string values: keys at most 100 characters, values at most 200
painPoints, motivations, buyerTriggers, jobTitlesUp to 20 strings of at most 200 characters
preferredChannelsAny of LinkedIn, Email, Twitter/X, Events, Podcasts, Industry forums, Slack communities, YouTube, Webinars, Industry publications

The time-to-close fields on a profile are read-only here.

Account profiles

One row is one kind of target company: firmographics, buying triggers, disqualifiers and a tier.

RouteUnscoped onlyBehavior
GET /account-profilesList. Also filters on tier. This list takes no search
GET /account-profiles/:idOne profile, with linkedPersonas and linkedOfferings
POST /account-profilesYesCreate
PATCH /account-profiles/:idYesUpdate
PATCH /account-profiles/:id/deactivate, .../reactivate, DELETE /account-profiles/:idYesSee Deactivate before delete
FieldRules
nameRequired on create, at most 120 characters. A name another profile has returns 409 ACCOUNT_PROFILE_NAME_TAKEN
firmographicsAn object with any of headcount_range, revenue_range, business_model, geography, growth_stage, industries, each up to 20 strings of at most 200 characters
techOpsContextAn object with any of operational_maturity and team_structure (text, at most 200 characters) and current_tools (up to 20 strings)
triggerEvents, inMarketIndicators, hardDisqualifiers, softDisqualifiersUp to 20 strings of at most 200 characters
tiertier_1, tier_2, tier_3 or null
tierRationaleText, at most 2,000 characters
timeToCloseDaysWhole number, 0 to 100,000
timeToCloseSourceunset or manual. crm_calculated is refused with 400 INVALID_TIME_TO_CLOSE_SOURCE unless the profile already holds it
timeToCloseSampleSizeWhole number, 0 or more
personaProfileIds, offeringIdsThe linked personas and offerings. An update replaces the set, keeping links to records the active legal entity can’t see. An id not in the organization returns 400 INVALID_PERSONA_PROFILE or 400 INVALID_OFFERING

Competitors

One row is one competitor.

RouteUnscoped onlyBehavior
GET /competitorsList. search and sort use competitorName
GET /competitors/:idOne competitor, with competingForOfferings
POST /competitorsYesCreate
PATCH /competitors/:idYesUpdate
PATCH /competitors/:id/deactivate, .../reactivate, DELETE /competitors/:idYesSee Deactivate before delete
FieldRules
competitorNameRequired on create, at most 120 characters. A name another competitor has returns 409 COMPETITOR_NAME_TAKEN
domainA domain or URL, at most 255 characters
primaryValueProp, overlapWithUs, ourWhiteSpaceText, at most 2,000 characters
pricingText, at most 500 characters
keyFeaturesUp to 20 strings of at most 200 characters
socialChannelsAn object with any of linkedin, youtube, instagram, x, each { url, follower_count }, both optional
seoSearchPresenceAn object: keywords (up to 50 strings of at most 100 characters) and estimated_traffic (a whole number, 0 or more)

Positioning

One row is one version of a Positioning (the API calls it a messaging framework). Each create is a new version: version counts up across the organization, and older versions are kept. There is no delete route. A version names what it positions: a core offering, an account profile, both or neither (organization-wide). At most one version is active per scope.

RouteUnscoped onlyBehavior
GET /messaging-frameworksList, newest version first. Filters on status; an unknown value returns 400 VALIDATION_ERROR. Rows carry id, name, status, version, generationMethod, generatedAt, coreOfferingId and accountProfileId only
GET /messaging-frameworks/activeYesThe active version that applies to coreOfferingId and accountProfileId (both optional), most specific first: both, then the offering alone, then the account profile alone, then organization-wide. 404 NOT_FOUND when none applies; a value that is not a UUID returns 400 INVALID_SCOPE
GET /messaging-frameworks/:idOne version with its applied pillars. With drift=true, adds drift
POST /messaging-frameworksYesCreates the next version as a draft
PATCH /messaging-frameworks/:idYesEdits a version’s content and brand kit
PATCH /messaging-frameworks/:id/statusYesBody status: draft, active or archived. The key’s creator must be an owner or admin, otherwise 403 INSUFFICIENT_ROLE. Activating archives the version that was active in the same scope
FieldRules
nameRequired on create, at most 200 characters
positioningStatement, uspText, at most 2,000 characters
pillarApplicationUp to 10 objects of { pillar_id, applied_message }, each pillar once, messages at most 2,000 characters. Each pillar_id must be a current pillar of the version’s brand kit, otherwise 400 INVALID_PILLAR_IDS
channelLanguageAn object with any of linkedin, email, landing_page, ads, each text of at most 2,000 characters
brand_kit_idThe brand kit the version is written against; absent or null is the default kit. Not a kit of the organization: 400 INVALID_BRAND_KIT_ID
coreOfferingId, accountProfileIdCreate only. The scope. Not in the organization: 400 INVALID_OFFERING or 400 INVALID_ACCOUNT_PROFILE
coreOfferingIds, personaProfileIds, competitorIds, accountProfileIdsCreate only. The records the version was built from. Not in the organization: 400 INVALID_CORE_OFFERING_IDS, INVALID_PERSONA_PROFILE_IDS, INVALID_COMPETITOR_IDS or INVALID_ACCOUNT_PROFILE_IDS

A create records when each record it was built from, and the brand kit, last changed. drift on a read compares that with now: { hasDrift, drifts }, where each drift is { entity, id, status }, entity one of core_offering, buyer_profile, competitor, brand_kit, account_profile, and status one of drifted, deleted, deactivated.

generationMethod is manual for a version made through this API. Editing a version an agent drafted changes it to human_edited_from_agent.

The status route refuses with 409:

error.codeWhen
APPLIES_REMOVED_PILLARSMoving to draft or active a version that applies a pillar since removed from its brand kit
BRAND_KIT_ARCHIVEDMoving to draft or active a version whose brand kit was deleted
SCOPE_CHANGEDActivating a version whose offering or account profile was deleted
CONFLICTAnother version in the same scope became active at the same moment. Retry

A create that loses the race for the next version number three times returns 503 VERSION_RACE. Retry it.

Assets

One row is one piece of marketing content: an email, a landing page, a social post or ad copy.

RouteUnscoped onlyBehavior
GET /marketing-assetsList. Also filters on assetType, status and generationMethod; an unknown value is ignored
GET /marketing-assets/:idOne asset with content, and personaProfile, offering, messagingFramework and accountProfile as { id, name, ... } or null
POST /marketing-assetsYesCreates an asset as a draft
PATCH /marketing-assets/:idYesUpdates the asset’s fields
PATCH /marketing-assets/:id/statusYesBody status. The key’s creator must be an owner or admin, otherwise 403 INSUFFICIENT_ROLE
DELETE /marketing-assets/:idYesDeletes the asset and its approval card. Assets have no deactivate step
GET /marketing-assets/goal-link-count?goalId=Yes{ data: { count } }: how many assets name that goal
POST /marketing-assets/retag-goalYesBody fromGoalId, toGoalId. Moves every asset from one goal to the other and returns { data: { count } }. The same goal twice returns 400 SAME_GOAL
FieldRules
nameRequired on create, at most 200 characters
assetTypeRequired on create: landing_page, email, social_post or ad_copy
contentA JSON object of at most 64 KB, or null
externalUrlAn absolute http or https URL of at most 2,048 characters, or empty
goalId, boardId, personaProfileId, offeringId, messagingFrameworkId, accountProfileIdLinks, each a UUID or null. A goal, persona, offering, Positioning or account profile not in the organization returns 400 (INVALID_GOAL, INVALID_PERSONA_PROFILE, INVALID_OFFERING, INVALID_MESSAGING_FRAMEWORK, INVALID_ACCOUNT_PROFILE)
generationMethodmanual. agent_drafted is set only by Horizon’s drafting agent: 400 INVALID_GENERATION_METHOD. Likewise createdByAgent can’t be set: 400 INVALID_CREATED_BY_AGENT

status is never set by a create or update (400 STATUS_NOT_SETTABLE_ON_CREATE, 400 STATUS_NOT_PATCHABLE). The status route moves an asset along these steps, and any other move returns 409 INVALID_STATUS_TRANSITION:

FromTo
draftin_review, approved
in_reviewapproved, draft
approvedpublished, in_review
publishedapproved

The approval card. Approving an asset that names a board posts a card for it on that board, and moving an approved or published asset to another board moves the card. With a key, the card is posted only when the key also holds company.tasks W and its creator is an editor of the board. When it can’t be posted, the change still saves and the response adds "warnings": [{ "code": "APPROVAL_CARD_NOT_POSTED", "message": "..." }].

Persona and account profile tags on Sales records

Contacts and prospects can be tagged with persona profiles, and companies with account profiles. These routes belong to Sales: they need the Sales module and the Sales record’s permission, not the Marketing one. Paths are relative to https://api.horizonplatform.ai/api/v2/erp/crm.

RoutePermissionBehavior
POST /contacts/:id/persona-profilescrm.contacts WBody personaProfileId. Returns 201 with the tag { id, contactId, personaProfileId, createdAt }
DELETE /contacts/:id/persona-profiles/:personaProfileIdcrm.contacts DRemoves the tag. 204
POST /prospects/:id/persona-profilescrm.prospects WAs for contacts, on a prospect
DELETE /prospects/:id/persona-profiles/:personaProfileIdcrm.prospects DAs for contacts
POST /companies/:id/account-profilescrm.companies WBody accountProfileId. Returns 201 with the tag
DELETE /companies/:id/account-profiles/:accountProfileIdcrm.companies DRemoves the tag. 204
GET /contacts/persona-profile-countscrm.contacts R{ data: [{ personaProfileId, contactCount }] }, one row per persona with a tagged contact. With personaProfileId, one row for each persona asked about, 0 included
GET /prospects/persona-profile-countscrm.prospects RThe same, with prospectCount

All of them are unscoped-only. They return 400 MISSING_FIELDS without the body field; 404 with CONTACT_NOT_FOUND, PROSPECT_NOT_FOUND, COMPANY_NOT_FOUND, PERSONA_PROFILE_NOT_FOUND or ACCOUNT_PROFILE_NOT_FOUND; 409 ASSOCIATION_EXISTS for a tag that is already there; and 404 ASSOCIATION_NOT_FOUND when removing one that isn’t. A company the active legal entity does not own returns 403 ENTITY_EDIT_DENIED. Under Standard or Strict separation, a persona or account profile owned by another legal entity is treated as missing: tagging it returns 404 PERSONA_PROFILE_NOT_FOUND or 404 ACCOUNT_PROFILE_NOT_FOUND, removing its tag returns 404 ASSOCIATION_NOT_FOUND, and the reads below leave its tags out.

Reading the tags:

  • GET /contacts takes personaProfileId, one id or the parameter repeated (up to 100), and lists the contacts tagged with any of them. Each listed contact carries contactPersonaProfiles as bare { personaProfileId } objects. A value that is not a UUID returns 400 VALIDATION_ERROR.
  • GET /contacts/:id and GET /prospects/:id carry contactPersonaProfiles or prospectPersonaProfiles, each with personaProfile as { id, name, description, isActive }.
  • GET /companies/:id carries companyAccountProfiles, each with accountProfile as { id, name, tier, isActive }.

Setup checklist

The Marketing Setup page has no route of its own. It reads the routes above, so a key with read on each feature can tell where an organization is:

StepDone when
Core offeringGET /core-offerings?isActive=true returns a row
Persona profilesGET /persona-profiles?isActive=true returns a row
CompetitorGET /competitors?isActive=true returns a row
Brand KitGET /brand-kit returns a kit with a logo, a color, a voice or a named pillar. A tagline or elevator pitch alone does not count
PositioningGET /messaging-frameworks?status=active returns a row
Outbound emailGET /marketing-assets?assetType=email&status=approved (or status=published) returns a row
Landing pageThe same, with assetType=landing_page

Sites

Sites can’t be read or changed with a key. Every path under /api/v2/marketing/sites, its custom domain routes included, is closed to keys and returns 403 PERMISSION_DENIED with details.reason session_only.

What a site’s visitors send through a form is saved as submissions of one of your Horizon Forms (see Save a site’s form entries in a Horizon Form). A key reads them with GET /api/v2/horizon-forms/:formId/submissions. It needs Form Answers (workspace.form-answers) read, which Full access does not include, so it has to be ticked on the key, and the key’s creator must be able to read form answers.

Canvases

These routes list your organization’s canvases and read their HTML. They are read only. Every route needs Canvases (system.canvases) read, which Full access does not include, so it has to be ticked on the key.

A key sees exactly what its creator sees on the Canvases page, no more: the permission opens the routes, and each canvas is then checked against the creator’s own access. Another organization’s canvas, one the creator cannot open, and a deleted or disabled one all return 404 CANVAS_NOT_FOUND. Only the current version of a canvas is readable, except by the canvas’s owner, who can also read the older versions it keeps (the newest 20). Responses carry Cache-Control: no-store.

RouteBehavior
GET /canvasesOne tab of the Canvases page: tab is mine (the default, the creator’s own), shared (shared with them) or org (visible to the organization). For an owner or admin, org lists every canvas in the organization, with a null url on the ones they cannot open; those canvases’ other routes return 404
GET /canvases/:canvasIdThe canvas and its versions, below
GET /canvases/:canvasId/htmlOne page of the HTML file, below

A list row carries:

FieldTypeMeaning
id, title, pathstring
urlstring or nullThe canvas’s link. null on a disabled canvas, and on an admin’s org row they cannot open
visibilitystringprivate, shared (private, and shared with people), org or public
statusstringlive, disabled or disabled_by_platform
createdAt, updatedAtstringISO 8601
ownerobject or null{ name, active }, where active is false once the owner has left the organization. null for a canvas published with no owner (from Slack or Teams). Absent on mine
statsobject{ views30d, viewsTotal, ctaClicks30d }. On mine only, and absent when the counts could not be read

GET /canvases/:canvasId returns id, title, slug, path, url, visibility, status, createdAt, updatedAt, currentVersion, publishedBy (the name of the agent that published it, or null) and versions. versions is newest first, each { version, createdAt, sha256, bytes }, where sha256 is the hex SHA-256 of that version’s HTML file and bytes its size. The owner gets every kept version; anyone else gets the current one only.

Read a canvas’s HTML

GET /canvases/:canvasId/html returns the file in pages of bytes. Start at offset 0 and pass each page’s nextOffset as the next offset until it is null. The pages’ content, joined in order, is the file byte for byte; check it against sha256.

QueryMeaning
versionA version number from the canvas’s details. Default: the current version. Any other version is the owner’s only; for anyone else it returns 404 CANVAS_VERSION_NOT_FOUND
offset0, or the previous page’s nextOffset. Default 0
lengthBytes to read, 1,024 to 524,288. Default 49,152

The response is { data: { version, offset, length, totalBytes, nextOffset, sha256, content } }. length is the bytes actually returned, which can be up to 3 fewer than asked, because a page never splits a character.

A key can have at most 4 HTML reads in progress at once. Codes these routes raise:

Statuserror.codeCause
400INVALID_OFFSEToffset is past the end of the file, or falls inside a character. Start at 0 or at a nextOffset
400VALIDATION_ERRORA query parameter is invalid or out of range
403NOT_ORG_MEMBERGET /canvases only: the key’s creator is no longer an active member of the organization
404CANVAS_NOT_FOUNDNo such canvas, or the key’s creator cannot open it
404CANVAS_VERSION_NOT_FOUNDNo such version, or a version other than the current one asked for by anyone but the owner
422CANVAS_NOT_TEXTThe stored file is not UTF-8 text. Do not retry
503CANVAS_READS_BUSYThe key already has 4 HTML reads in progress. Sent with Retry-After: 1
503CANVAS_READ_UNAVAILABLE, CANVAS_LIST_UNAVAILABLECanvases cannot be read just now. Retry

Organization members

Every route needs system.users. Members are returned as { id, clerkUserId, email, name, role, deactivatedAt, createdAt }.

RouteBehavior
GET /usersOptional email (exact, case-insensitive) or q (substring of email or name). Sorted by name, then email. At most 200
GET /users/:memberId:memberId is a member UUID or a Clerk user id
POST /usersBody email, role. Adds an existing Clerk user with that email to the organization, or updates the role of one already in it. Returns 201. No Clerk user with the email returns 404 USER_NOT_FOUND
PATCH /users/:memberIdBody role. A deactivated member returns 409 MEMBER_IS_DEACTIVATED
DELETE /users/:memberIdRemoves the membership in Clerk and in Horizon. Returns { data: { deleted: true } }. The removed member’s keys stop working, see Key checks

role is one of owner, admin, department_lead, member, billing_admin, controller, accountant (400 VALIDATION otherwise). The key’s creator is the actor for every check:

Statuserror.codeCause
403ROLE_ABOVE_ACTORThe role ranks above the creator’s own
403OWNER_REQUIREDOnly an owner can make an owner
403CANNOT_MODIFY_SELFThe target is the key’s creator
403LAST_OWNERThe change would leave no active owner
409WOULD_LOCK_LAST_ADMINThe change would remove the organization’s last unscoped administrator