Guidely API reference
All endpoints are served under /api/v1. Responses are JSON. Errors use a consistent envelope:
{ "error": { "code": "validation_error", "message": "…", "details": { } } }
Error codes: unauthorized (401), forbidden (403), not_found (404), validation_error (400), conflict (409), rate_limited (429), internal (500), remote_evaluation_required (403, flag payload requested with a public key in an environment that only allows remote evaluation), and wrong_region (421, the workspace's data lives in another region's deployment; see Data residency).
List endpoints accept ?page=1&pageSize=25 (max 100) and return { items, page, pageSize, total }.
Public SDK API (/api/v1/sdk/*)
Authentication: the environment public key, passed as ?key=pk_… or header X-Guidely-Key. Origin is checked against the environment's allowed origins (when configured); native and React Native apps send no Origin and are not restricted by it. CORS headers are set for the allowed origin; preflight OPTIONS is supported. Rate limited per key and per IP. Public keys only unlock published data for that environment; they can never read drafts, analytics, or other environments.
| Method | Path | Body | Response | |||||
|---|---|---|---|---|---|---|---|---|
| GET | /sdk/config?platform= | – | SdkConfigResponse (ETag = W/"<projectId>:<env>:<configVersion>[:<platform>]", honours If-None-Match → 304). platform = web \ | ios \ | android returns only guides enabled for that platform; omitted, all guides are returned (older web SDKs). | |||
| POST | /sdk/identify | IdentifyRequest | IdentifyResponse | |||||
| POST | /sdk/events | EventBatch | { accepted: number, duplicates: number }; 503 when an exception's source map exists but can't be fetched right now: the rest of the batch is stored and a retry adds the exception (stored events are skipped as duplicates) | |||||
| POST | /sdk/replay[?enc=gzip] | ReplayChunk as JSON, or gzip-compressed JSON with enc=gzip (text/plain; ≤2 MB compressed, ≤16 MB raw) | 202 { accepted }, { accepted: 0, duplicate: true }, or { accepted: 0, disabled: true } when replay is off for the project; 409 when the session id belongs to another visitor; 413 over the size limits (also enforced on bodies without Content-Length); 503 when recording storage is unavailable (retry) | |||||
| POST | /sdk/guide-state | GuideStateUpdate | { ok: true } | |||||
| POST | /sdk/checklists/:guideId/progress | ChecklistProgressRequest | { completedTaskIds, completedAt, dismissedAt } | |||||
| POST | /sdk/surveys/:guideId/responses | SurveyResponseRequest | { ok: true, duplicate?: true } | |||||
| GET | /sdk/resource-center/search?q= | – | { articles: ResourceCenterArticle[] } (full-text, published articles; last word matches as a prefix) | |||||
| GET | /sdk/articles | – | SdkArticlesResponse (published articles without bodies, and collections; parentId / audienceIds only when set) | |||||
| GET | /sdk/articles/:id | – | { article: ResourceCenterArticle } | |||||
| GET | /sdk/how-tos?url= | – | SdkHowTosResponse: how-tos made available in the app (HowTo.inAppHelp, at most 200, by title) and forPage, the ids of those recorded on the screen at url (a path; ids and query ignored). no-store | |||||
| GET | /sdk/how-tos/:id | – | { howTo: SdkHowTo }: steps as plain text with image { url, crop?, highlight? }, and guideKey when the tour made from it is live in this environment; 404 unless it is available in this project | |||||
| POST | /sdk/conversations | StartConversationRequest | StartConversationResponse (201 JSON), or a text/event-stream of ScoutStreamEvents when Scout replies (first event conversation carries the token) | |||||
| POST | /sdk/conversations/lookup | { tokens: string[] } | ConversationLookupResponse | |||||
| GET | /sdk/conversations/:id/messages?since= | – | ConversationMessagesResponse | |||||
| POST | /sdk/conversations/:id/messages | { message, pageUrl?, answer? } (pageUrl: the page the user is on now; answer: { stepId, optionId?, skip? } when they pressed a workflow button) | JSON snapshot, or an event stream when Scout replies. Messages carry howTos: [{ howToId, title }] when Scout cited how-tos, workflow: true on workflow messages, and ask: MessengerAsk on the workflow question waiting for an answer (each absent otherwise) | |||||
| POST | /sdk/conversations/:id/handoff | – | ConversationMessagesResponse | |||||
| POST | /sdk/conversations/:id/rating | { rating: 1–5, comment? } | { conversation } | |||||
| POST | /sdk/feedback/requests/query | `{ anonymousId, userId?, q?, sort: top\ | new\ | trending, filter: open\ | all\ | mine\ | following, status?, productArea?, page }` | PublicFeedbackList (public requests plus the visitor's own private ones; myVote, following, mine) |
| POST | /sdk/feedback/requests | SubmitFeedbackRequest (title, description, productArea?, priority, conversationId?) | PublicFeedbackRequestDetail (201). 403 when the visitor may not write (anonymous, or the project requires a verified identity); 10 per IP per hour | |||||
| POST | /sdk/feedback/requests/:id/view \ | vote \ | unvote \ | follow \ | comments | identity plus { priority, note? } / { follow } / { body } | The request (detail with thread for view and comments). :id may be the number | |
| POST | /sdk/feedback/similar | identity plus { title } | { requests } resembling the title | |||||
| POST | /sdk/feedback/updates, /sdk/feedback/updates/read | identity (plus ids?) | FeedbackUpdatesResponse (status changes on followed requests) | |||||
| POST | /sdk/feedback/portal-link | identity | { url } into the hosted portal (15 minutes). Scout messages carry ideaOffer: { requestId, title, description, votes? } when Scout offered to vote or suggest; see feedback.md | |||||
| POST | /sdk/complaints | FileComplaintRequest (categoryId, description, answers, email? for anonymous visitors, conversationId? with its token in X-Guidely-Conversation, attachment?: { fileName, data } base64 ≤ 2 MB) | FileComplaintResponse (201; token when a conversation was started for it). Conversations carry complaint: { reference, status, … } and Scout messages complaintOffer: { categoryId, name } when present | |||||
| POST | /sdk/agent-events | { turns: AgentTurnInput[] (1–100), sdk? } (≤1 MB) | 202 AgentEventsResponse { accepted, duplicates, rejected?, overLimit? }; see Agent analytics. 120 requests per minute per key and IP | |||||
| GET | /sdk/authoring/session?token= | – | AuthoringSessionInfo | |||||
| POST | /sdk/authoring/session/picks?token= | AuthoringPick | { ok: true } | |||||
| POST | /sdk/authoring/session/heartbeat?token= | – | { ok: true } | |||||
| GET | /sdk/capture/session?token= | – | CaptureSessionInfo (how-to recording; 401 once it ended or expired) | |||||
| POST | /sdk/capture/steps?token= | multipart: step (CaptureStep JSON), optional screenshot (PNG/JPEG/WebP, ≤8 MB; Content-Length required) | 201 { id, position, stepCount }; a retry with the same clientId returns the stored step | |||||
| POST | /sdk/capture/session/heartbeat?token= | – | { ok: true } | |||||
| POST | /sdk/capture/session/finish?token= | – | { ok: true, howToId } | |||||
| GET | /sdk/health | – | { ok: true, environment, project } |
Feature flag SDK endpoints
TypeScript types for these payloads are exported by @guidelytech/flags. These accept the environment public key as above or a secret project key (Authorization: Bearer gly_sk_… with scope flags:read, plus ?environment=<key>, e.g. production or qa), which also receives server-only flags and ignores the environment's exposure mode (1200 requests/minute per key). A secret key limited to some environments gets 403 forbidden for any other ?environment=.
| Method | Path | Body | Response | ||
|---|---|---|---|---|---|
| GET | /sdk/flags | – | FlagsPayload, or EncryptedFlagsPayload when the environment encrypts payloads for public keys. ETag `W/"flags:<envId>:<version>:<public\ | public-enc\ | server>", If-None-Match → 304, Cache-Control: private, max-age=0, must-revalidate. Public key + remote exposure → 403 remote_evaluation_required` |
| POST | /sdk/flags/evaluate | { attributes, flags? } (≤64 KB) | RemoteEvaluationResponse { version, flags: { key: EvaluationResult } }; server-only flags only for secret keys (public keys get FLAG_NOT_FOUND). 300/min per key and IP | ||
| GET | /sdk/flags/stream | – | text/event-stream: event: flags / data: {"version":n} at once and whenever the environment's flags change (polled every 3 s), : ping every 25 s, closed after 10 minutes (reconnect) | ||
| POST | /sdk/flags/events | FlagEventsBatch (≤500 usage rows, ≤200 exposures, ≤512 KB; text/plain accepted) | 202 { usage, exposures, duplicates }. Usage adds to the day's usage counters (unknown flag keys ignored); exposures are stored as experiment_viewed events (properties: { experimentKey, variationId, flagKey, hashAttribute, source: "server" }, idempotent per experiment, unit, variation and day; userId links or creates the end user) |
Server-side Track Events (server-sdks.md) authenticate with a secret key that has the events:write scope (Authorization: Bearer gly_sk_…, ?environment=<key>, e.g. production or qa, 3000 requests/minute per key; no CORS):
| Method | Path | Body | Response | ||
|---|---|---|---|---|---|
| POST | /sdk/server/batch | `{ batch: (identify \ | track \ | group)[] (1–100), sentAt?, sdk? }` (≤512 KB) | 202 { accepted, duplicates, overLimit? }. track is stored as a custom event (idempotent by messageId, properties.$source = "server"); identify / group merge user / account traits. Server calls never mark a user as seen |
Request and response types are exported by @guidelytech/shared. Authoring and capture routes authenticate with their session token instead of the public key. :guideId accepts the guide id or key.
Conversation routes additionally require the per-conversation token returned when the conversation was created, in header X-Guidely-Conversation; a wrong or missing token answers 404. Request bodies are limited to 32 KB. Event streams send message, delta ({ messageId, text }), done ({ message, conversation }) and error events, plus : keepalive comments every 15 s.
Guide display never depends on event ingestion succeeding; events are queued and retried by the SDK.
Management API (/api/v1/*)
Authentication: guidely_session httpOnly cookie. Mutating requests must come from the dashboard origin (Origin/Sec-Fetch-Site check) for CSRF protection. Every route resolves the workspace from the addressed resource and checks the caller's membership role, or one of the member's permissions (role defaults plus per-member grants and revokes):
| Role | Capabilities |
|---|---|
| OWNER | everything incl. deleting workspace, billing, transferring ownership |
| ADMIN | manage members/projects/environments/integrations, publish anywhere |
| EDITOR | create/edit guides, audiences, content; publish to development & staging; publish to production when project setting editorsCanPublishProduction is true |
| VIEWER | read-only, including analytics and session replays |
Permissions an admin can grant or revoke per member (default role in brackets): guides.edit, guides.publish, audiences.edit, articles.edit, articles.publish (publishing, unpublishing and rolling back articles, and publishing the resource center), inbox.reply, insights.manage, flags.edit (editor); guides.publishProduction, guides.delete, scout.manage, userData.delete, project.settings, developer.manage, flags.publishProduction, flags.review, flags.manage (admin); replays.view (viewer). Owners always hold all of them. Managing members, sign-in, the audit log and the workspace stay tied to roles. Routes marked "(editor)" or "(admin)" below check the matching permission. GET /projects/:id returns the caller's permissions.
Auth & account
POST /auth/signup { email, name, password, workspaceName?, inviteToken? } · POST /auth/login { login | email (email or username), password, inviteToken? } → { user, workspaceId, inviteError }, or { mfaRequired: true } with a 5-minute challenge cookie when two-step verification is on · POST /auth/login/mfa { code } (authenticator or recovery code) → the same as login, plus recoveryCodesLeft after a recovery code; 400 with error.details.reason = "mfa_expired" means start again with the password · GET /auth/mfa → { available, enabled, enabledAt, recoveryCodesLeft } · POST /auth/mfa/setup → { secret, otpauthUrl, qrSvg } · POST /auth/mfa/confirm { code } → { recoveryCodes } · POST /auth/mfa/recovery-codes { code } → { recoveryCodes } · POST /auth/mfa/disable { code } · POST /auth/logout · GET /auth/me · PATCH /auth/me { name?, username?, currentPassword?, newPassword? } · GET /auth/sessions · DELETE /auth/sessions/:id · GET /auth/providers?workspace=<slug> (public; enabled methods, narrowed to the workspace's) · GET /auth/github and GET /auth/google ?next=&inviteToken=&workspace= (browser redirects; callbacks at /auth/<provider>/callback)
A member whose session signed in with a method their workspace doesn't allow gets 403 with error.details = { reason: "auth_method", workspaceSlug, allowedAuthMethods }, and a password session without the two-step verification a workspace requires gets 403 with { reason: "mfa_required", workspaceSlug }. GET /auth/me lists such workspaces with locked: true, lockReason ("auth_method" or "mfa") and no projects.
Workspaces
GET /workspaces · POST /workspaces · GET /workspaces/:id · PATCH /workspaces/:id · DELETE /workspaces/:id (OWNER) · POST /workspaces/:id/leave (not the last owner) · GET /workspaces/:id/members · PATCH /workspaces/:id/members/:userId { role } · PATCH /workspaces/:id/members/:userId/permissions { grants, revokes } (ADMIN; not your own; only owners for admins; owners can't be restricted) · DELETE /workspaces/:id/members/:userId · POST /workspaces/:id/invitations { email, role, grants?, revokes? } → the invitation with inviteUrl and emailed (the access is applied when the invitation is accepted; the invitation is emailed unless outgoing email is off) · GET /workspaces/:id/invitations · DELETE /workspaces/:id/invitations/:invId · POST /invitations/accept { token } · GET /workspaces/:id/audit-log · GET /workspaces/:id/sign-in · PATCH /workspaces/:id/sign-in { allowedAuthMethods?, githubOrgs?, googleDomains?, autoJoinRole?, requireMfa? } (ADMIN; GET also returns passwordMembersWithoutMfa; requireMfa: false is refused in HIPAA mode) · GET /workspaces/:id/hipaa · POST /workspaces/:id/hipaa { baaVersion, acceptedName, acceptedTitle, authority: true, sessionIdleMinutes? } (OWNER; accepts the BAA and turns HIPAA mode on, HIPAA mode) · PATCH /workspaces/:id/hipaa { sessionIdleMinutes } (OWNER) · POST /workspaces/:id/logins { name, email, username?, password, role, grants?, revokes? } (ADMIN; workspace-managed login) · POST /workspaces/:id/logins/:userId/password { password, turnOffMfa? } (ADMIN; managed logins only)
Projects & environments
GET /workspaces/:id/projects · POST /workspaces/:id/projects · GET /projects/:id · PATCH /projects/:id (name, description, theme, settings) · POST /projects/:id/theme/import ({ url } → { url, theme, palette }: branding read from a public website, not saved; admins, 20 per 10 minutes) · DELETE /projects/:id · GET /projects/:id/environments · POST /projects/:id/environments ({ name, key?, allowedOrigins? }: add an environment, up to 10 per project; key defaults to one made from the name) · PATCH /projects/:id/environments/:envId (name, allowedOrigins, settings) · DELETE /projects/:id/environments/:envId (admins; environments you added only, with their data) · POST /projects/:id/environments/:envId/rotate-key · GET /projects/:id/status (SDK connectivity, last events) · GET /projects/:id/setup (installation snippets)
Guides
GET /projects/:id/guides?kind=&status=&q=&sort=&page= · POST /projects/:id/guides { name, kind, key?, templateId?, description? } · GET /guides/:id · PATCH /guides/:id (name, description, key, tags, draftConfig) · DELETE /guides/:id · POST /guides/:id/duplicate · POST /guides/:id/archive · POST /guides/:id/unarchive · POST /projects/:id/guides/bulk { ids, action } POST /guides/:id/validate → { issues } · POST /guides/:id/publish { environment, notes? } → version · POST /guides/:id/rollback { environment, version } · POST /guides/:id/pause { environment } · POST /guides/:id/resume · POST /guides/:id/unpublish · GET /guides/:id/versions · GET /guides/:id/versions/:version · GET /guides/:id/history (publish events) GET /templates
Audiences
GET /projects/:id/audiences · POST · GET /audiences/:id · PATCH · DELETE · GET /audiences/:id/members · POST /audiences/:id/members { externalIds } · DELETE /audiences/:id/members/:endUserId · POST /projects/:id/audiences/preview { rules } → estimated size
End users & events
GET /projects/:id/users?q= · GET /projects/:id/users/:id · DELETE /projects/:id/users/:id (GDPR deletion) · GET /projects/:id/accounts · GET /projects/:id/events?env=&name=&from=&to=&userId=&guideId=&page= · GET /projects/:id/events/export.csv
Data subject requests (GDPR / CCPA)
Exports need the Export end-user data permission (userData.export), deletions Delete end-user data (userData.delete); both are admin defaults and audit-logged. Lookups never leave the project. See security.
GET /projects/:id/users/:userId/export?format=zip|json(defaultzip): everything stored about one end user, streamed as an attachment (Content-Disposition: attachment,Cache-Control: no-store). The ZIP holdsREADME.txt,manifest.json(generated at, project, workspace and data region, subject ids,recordCounts,dataCategories, retention,files), one JSON file per category (profile,accounts,audiences,environments,guide-states,checklist-progress,survey-responses,conversations,complaints,session-replays,journeys,emails,email-suppressions,prototype-tests,agent-conversations) and JSON Lines partsguide-sessions/guide-sessions-0001.jsonlandevents/events-0001.jsonl(50,000 records per file).format=jsonstreams one document with the same categories in camelCase (manifest,profile, …,guideSessions,events). Recordings are listed (times, pages, chunk storage keys and sizes), not included.GET /projects/:id/data-subject/export?externalId=…|email=…|anonymousId=…|endUserId=…&format=zip|json: the same, by exactly one identifier.emailmatches theemailtrait ignoring case;anonymousIdalso matches ids left on the user's events by an alias.404when nobody matches;409 conflictwithdetails.endUserIdswhen an email belongs to several profiles.POST /projects/:id/users/bulk-delete{ identifiers: string[] (1–1000), kind: "auto"|"externalId"|"email"|"anonymousId"|"id" (default auto), dryRun: boolean (default true) }→{ dryRun, requested, matchedIdentifiers, notFound, users, deleted?, errors, results: [{ identifier, status: "found"|"deleted"|"not_found"|"error", matchedBy?, users? (dry run: id, externalId, email, name, lastSeenAt), deleted?, error? }] }.autotries the identify() id, then email (identifiers with@), then anonymous id, then Guidely id. Each match is deleted likeDELETE /projects/:id/users/:id(oneend_user.deleteaudit entry each, plus oneend_user.bulk_deletewith counts). Unsubscribe records are kept. At most 2,000 matched users per request.
Data residency
GET /regions (public) → { current, regions: [{ id: "us"|"eu", label, location, appUrl, current }] }: regions offered for new workspaces (just this deployment's unless GUIDELY_REGION_URLS lists more). POST /workspaces and POST /auth/signup accept dataRegion; another region's is refused with 421 wrong_region. GET /workspaces/:id/data-region (any member) → { region, label, location, deploymentRegion, servedHere, multiRegion, appUrl, apiUrl, cdnUrl }. GET /projects/:id/setup also returns apiUrl, the SDK API of the workspace's region.
421 Misdirected Request { "error": { "code": "wrong_region", "message", "region", "appUrl", "apiUrl", "details": { "region", "appUrl", "apiUrl" } } } is returned when a request reaches the deployment of the wrong region: any public SDK request (reads included) whose key belongs to a workspace of another region, end-user deletions in such a workspace, and creating a workspace in another region. appUrl / apiUrl are that region's dashboard and SDK API (null when this deployment doesn't know them).
Analytics
GET /projects/:id/analytics/overview?env=&from=&to=&compare= · GET /projects/:id/analytics/guides?env=&from=&to= · GET /guides/:id/analytics?env=&from=&to= (funnel, step abandonment, timeseries, audience comparison) · GET /guides/:id/analytics/export.csv · GET /guides/:id/responses (surveys) · GET /guides/:id/responses/export.csv · GET /guides/:id/checklist-progress
Reports
Conversations by type, topic and outcome, issues pushed to trackers, and help by page; topics CRUD. See reports.md.
Product analytics
Details in product-analytics.md. GET /projects/:id/replays?env=&from=&to=&userId=&sessionId=&minDurationMs=&hasErrors=1&hasRageClicks=1&url=&guideId=&issueId=&hasNetworkErrors=1&console=&consoleLevel=error,warn&page= · GET /replays/:id (metadata + session event timeline) · GET /replays/:id/recording (rrweb events as { events }; ?format=ndjson streams a { meta: { start, end, chunkCount } } line then one event per line, and &part=tail|head&at=<ms> splits it at the snapshot before at: the tail is what a player needs to show at, the head the rest) · DELETE /replays/:id (admin) GET /projects/:id/pages?env=&from=&to=&groupIds=1&q=&compare= · GET /projects/:id/pages/detail?path=&env=&from=&to=&groupIds=1 · GET /projects/:id/heatmaps?path=&viewport=desktop|tablet|mobile&platform=all|web|app|ios|android&env=&from=&to=&groupIds=1 · GET /projects/:id/heatmaps/screens?platform=app|ios|android&env=&from=&to= (app screens with taps) GET /projects/:id/errors?env=&from=&to=&status=open|resolved|ignored|all&q=&userId=&sort=lastSeen|firstSeen|occurrences|users&page= · GET /errors/:id?env=&from=&to= · PATCH /errors/:id { status } (editor) GET /projects/:id/replay-alert-rules · POST /projects/:id/replay-alert-rules (editor) · PATCH /replay-alert-rules/:id · DELETE /replay-alert-rules/:id · POST /replay-alert-rules/:id/test (editor) · GET /projects/:id/replay-alert-rules/deliveries?ruleId=&page= GET /projects/:id/alert-rules · POST /projects/:id/alert-rules (editor) · PATCH /alert-rules/:id · DELETE /alert-rules/:id · POST /alert-rules/:id/test (editor) · GET /projects/:id/alert-rules/deliveries?ruleId=&page= POST /projects/:id/insights/funnel { env?, from?, to?, definition: { steps, windowHours } } · POST /projects/:id/insights/retention { env?, from?, to?, definition: { startEvent, returnEvent, period, periods } } · GET /projects/:id/insights · POST /projects/:id/insights { kind, name, definition } (editor) · PATCH /insights/:id · DELETE /insights/:id (editor)
Agent analytics
Analytics on your own AI agents and chatbots, with Scout as a built-in agent; see agent-analytics.md.
Sending turns from your servers: POST /api/v1/agent-events with Authorization: Bearer gly_sk_… (a project secret key with scope agents:write; 600 requests per minute per key; no CORS). The body (≤1 MB) is { turns: AgentTurnInput[], environment? }, a bare array of turns, or a single turn with environment beside its fields; environment is an environment key (development, staging, production (default) or one you added). Response 202 { accepted, duplicates, rejected?, overLimit? }: duplicates are turns already stored (same turnId), rejected turns for a new agent past the 50-agent limit or a conversation past 2,000 turns, overLimit turns past this month's product analytics allowance (not stored; don't resend them). 400 for an invalid body (nothing is stored), 401/403 for a missing, revoked or wrongly scoped key, 421 when the workspace's data lives in another region.
curl -X POST https://guidelytech.com/api/v1/agent-events \
-H "Authorization: Bearer $GUIDELY_AGENTS_KEY" -H "Content-Type: application/json" \
-d '{ "environment": "production", "turns": [
{ "conversationId": "c_123", "agentId": "support-bot", "turnId": "c_123:1", "role": "user",
"text": "Where is my order?", "userId": "user_42", "accountId": "acme", "occurredAt": "2026-10-26T14:03:00Z" },
{ "conversationId": "c_123", "agentId": "support-bot", "turnId": "c_123:2", "role": "assistant",
"text": "It ships tomorrow.", "latencyMs": 950, "toolCalls": [{ "name": "lookup_order", "status": "ok" }],
"outcome": "success", "taskSuccess": true } ] }'
AgentTurnInput (@guidelytech/shared): conversationId (≤128), agentId (≤64; scout is reserved), agentName?, turnId? (idempotency key, ≤128; without one a stable id is derived from role, occurredAt, text and tool names), role (user | assistant | tool | system), text? (≤20,000 characters), toolCalls? (≤50 { name, status?: ok|error, latencyMs? }; any other field, such as arguments, is dropped), latencyMs?, outcome? (success | failure | escalated | abandoned), taskSuccess?, occurredAt? (ISO 8601; default now, at most 5 minutes ahead), userId?, anonymousId?, accountId?, sessionId?, metadata? (flat string/number/boolean values; ≤30 keys, 4 KB; keys starting with $ or looking sensitive are dropped).
Dashboard (members of the workspace; reading needs the viewer role): GET /projects/:id/agent-analytics/overview?env=&from=&to=&tz=&agentId=&compare= (KPIs, previous period, series, per agent, top topics) · GET …/conversations?env=&from=&to=&agentId=&topicId=(id|none)&sentiment=(positive|neutral|negative|none)&outcome=&frustrated=1|0&user=&account=&page=&pageSize= · GET …/conversations/:conversationId (transcript; replay and per-turn replayOffsetMs only for members with View session replays) · DELETE …/conversations/:conversationId (Delete end-user data; Scout's are deleted in the Inbox) · GET …/users · GET …/retention (weekly cohorts, RetentionResult) · GET …/topics · GET …/agents · PATCH …/agents/:agentId { name?, description?, redaction? } (Developer settings; Scout's name can't change) · DELETE …/agents/:agentId (Developer settings; deletes its conversations; not Scout) · POST …/redaction-preview { redaction, text } → { text } (Developer settings; stores nothing) · GET …/settings → { classify, aiAvailable } · PATCH …/settings { classify } (Project settings). … is /projects/:id/agent-analytics.
AI assistants (MCP)
GET /mcp/connections (the signed-in user's approved apps and personal access tokens) · POST /mcp/connections { name, readOnly?, expiresInDays? } → { …, token } (a gly_pat_ token, shown once) · DELETE /mcp/connections/:id (disconnect) · GET /mcp/tools → { url, tools } · PATCH /workspaces/:id { mcpEnabled } (admin). The MCP server itself (POST /api/mcp) and its OAuth endpoints are described in mcp.md.
Source maps and upload keys
GET /projects/:id/api-keys · POST /projects/:id/api-keys { name, scopes: ["sourcemaps:write" | "flags:read" | "flags:code-refs" | "events:write" | "agents:write" | …], environments?: ["production", …] } → { …, token } (shown once; admin; environments empty or left out = every environment) · PATCH /api-keys/:id { environments } (admin) · DELETE /api-keys/:id (revoke; admin) · GET /projects/:id/sourcemaps?release=&q=&page= · DELETE /sourcemaps/:id · DELETE /projects/:id/sourcemaps?release= (admin)
Build-time API, authenticated with Authorization: Bearer gly_sk_… (scope sourcemaps:write): POST /sourcemaps/upload (multipart: release?, manifest = [{ field, path }], one file field per map, plain JSON or gzip; ≤100 MB per map uncompressed, ≤100 MB per request as sent, ≤200 maps) → { release, uploaded: [{ path, sizeBytes, sources, hasContent, replaced }], errors: [{ path, message }] } · GET /sourcemaps/whoami. Use the @guidelytech/sourcemaps CLI rather than calling these directly.
Resource center & integrations
GET /projects/:id/resource-center · PATCH · POST /projects/:id/resource-center/publish · …/collections CRUD (parentId nests a collection, at most 3 levels; deleting one moves its articles and sub-collections to its parent) · …/articles CRUD (collections and articles take audienceIds: empty = everyone; articles also take visibility: everyone or identified for logged-in users only; on a published article, title / summary / body / externalUrl edits are kept as unpublished changes (hasUnpublishedChanges) while the other fields apply at once, and published: true publishes them when the caller can publish) · POST …/articles/:aid/publish { notes? } (new version from the working copy; a no-op when nothing changed) · POST …/articles/:aid/unpublish (unpublished changes become the working copy) · DELETE …/articles/:aid/draft (discard unpublished changes; editor) · GET …/articles/:aid/versions · GET …/versions/:version (with content) · POST …/versions/:version/rollback (make that version live; the working copy is kept) · POST …/versions/:version/restore (copy it into the working copy; editor) · POST /projects/:id/media (editor; the raw file is the body with an exact Content-Length, optional X-File-Name; PNG/JPEG/GIF/WebP ≤10 MB, MP4/WebM ≤200 MB, PDF ≤50 MB, detected from the bytes) → 201 { id, url, contentType, size, kind: "image"|"video"|"file", fileName } · GET /media/:projectId/:file (public, supports Range) · GET /projects/:id/integrations · POST · PATCH /integrations/:id · DELETE (secret fields such as webhook URLs are returned masked; sending the masked value back keeps the stored secret)
Issue trackers & tickets
GET /workspaces/:id/ticket-integrations (viewer; never returns the key/token, only config.secretHint) · POST /workspaces/:id/ticket-integrations/verify (admin; { provider: "linear", apiKey? } → teams, or { provider: "jira", siteUrl, email, apiToken?, projectKey? } → projects and that project's issue types; a missing secret uses the saved one, for Jira only while site and email are unchanged) · POST /workspaces/:id/ticket-integrations (admin; connect or replace: Linear { teamId }, Jira { projectKey, issueType }, Zendesk { subdomain, email, apiToken?, autoHandoff }, Intercom { region, accessToken?, autoHandoff } (autoHandoff: open a ticket whenever Scout hands a conversation to the team); only https://<site>.atlassian.net / https://<subdomain>.zendesk.com hosts; tickets can also be opened for sourceType: "complaint") · PATCH /ticket-integrations/:id (name, enabled, fields, autoResolve: a Linear / Jira / GitHub ticket closed as done resolves its error issue, on by default) · DELETE · GET /projects/:id/tickets?sourceType=error|replay|conversation&sourceId= · GET /projects/:id/tickets/draft?sourceType=&sourceId= (editor; { title, description } in Markdown) · POST /projects/:id/tickets (editor; { integrationId, sourceType, sourceId, title, description, causeSessionIds?, allowDuplicate? } → 201 with key, url, integrationId, externalState and causeSessionIds; up to 10 recordings of the project picked as the cause, linked at the end of the description; needs replays.view). 409 conflict (with details.ticket) when the source already has a ticket in that tracker that isn't known to be closed (a recording also counts a ticket that named it as a cause): pass allowDuplicate: true to open a second one; a ticket still being created is always refused. POST /feedback-requests/:id/ticket likewise answers 409 when the request already links a ticket, unless replace: true. GET /projects/:id/tickets?sourceType=replay also lists tickets that picked the recording as their cause. GET /projects/:id/user-sessions?sourceType=conversation|replay&sourceId=&until=request|now (replays.view) → the person's last 10 recordings up to when they asked for help (request) or now, each with counts, duringConversation, isSource and tickets. Error and replay alert rules take ticketIntegrationId (one open ticket per issue, and per replay rule with later matching recordings added to its causeSessionIds; a new one only once the last is closed in the tracker; test alerts never create one).
Confluence
GET /workspaces/:id/confluence (viewer; the connection or null, never the token, only secretHint) · POST /workspaces/:id/confluence/verify (admin; { siteUrl, email, apiToken?, spaceId? } → { account, spaces, pages, tokenSource }; pages are the space's pages to pick a parent from; a missing token uses the saved one while site and email are unchanged, else the workspace's Jira token for the same site and email) · PUT /workspaces/:id/confluence (admin; { siteUrl, email, apiToken?, spaceId, parentId? }, checked against Confluence first) · PATCH { enabled } · DELETE (published pages stay). Only https://<site>.atlassian.net is ever called. Publishing: POST /how-tos/:id/confluence, POST /how-to-pages/:id/confluence (howtos.edit; 30 per user every 10 minutes).
Scout, inbox & knowledge imports
GET /projects/:id/scout/workflows · POST (admin; { name, enabled?, trigger: "conversation_started"|"handoff", audience: "anonymous"|"identified"|"everyone", finish: "scout"|"team", steps }, see scout.md) · PUT /projects/:id/scout/workflows/order { ids } (admin) · GET /scout/workflows/:id · PATCH · DELETE (admin; conversations keep the answers) · GET /projects/:id/scout · PUT (admin; slackIntegrationId picks the project Slack integration live-conversation requests are posted to, null stops; anthropicApiKey sets the project's write-only Anthropic key, null removes it; responses carry aiKeySource and anthropicKeyHint, never the key) · GET /projects/:id/scout/stats (includes howTosInApp) · POST /projects/:id/scout/slack-test { integrationId } (admin; posts an example request now) · POST /projects/:id/scout/playground { messages, environment?, instructions?, productName?, productContext? } → event stream (delta, done, error; editor) · GET /projects/:id/conversations?filter=needs_reply|scout|closed|mine|all&page= · GET /projects/:id/conversations/unread · GET /conversations/:id · PATCH /conversations/:id { status?, assigneeId? } (editor) · POST /conversations/:id/messages { message } (editor) · GET /projects/:id/knowledge/imports · POST (multipart file, collectionId?; ≤10 MB; editor) · POST /projects/:id/knowledge/imports/intercom { accessToken, region?: "us"|"eu"|"au", collectionId?, publish? } (editor; token checked against Intercom, kept encrypted until the import finishes, never returned; without collectionId Intercom's collections are recreated; articles already imported are skipped) · GET /knowledge/imports/:id · DELETE (editor)
Integrations and data sync (integrations.md): GET /projects/:id/sync-connections → { connections, catalog, metrics, datasets, cdpEndpoint } (viewer) · PUT /projects/:id/sync-connections/:provider { name?, enabled?, schedule?: off|hourly|daily, config?, credentials? } (create or update; credentials are checked with the vendor, never returned; a new Segment connection returns inboundKey once) · GET /projects/:id/sync-connections/:provider/oauth[?sandbox=1] (redirects to Salesforce / HubSpot; they return to GET /sync/oauth/:vendor/callback) · DELETE /sync-connections/:id · GET /sync-connections/:id/runs?limit= · POST /sync-connections/:id/runs { backfill?: { from, to, datasets? } } (sync now or backfill) · GET /sync-connections/:id/fields?entity=account|visitor (CRM fields for mapping) · POST /sync-connections/:id/inbound-key (new Segment key, returned once) · POST /integrations/:id/secret (new webhook signing secret, returned once; POST /projects/:id/integrations returns it once for a new webhook) · GET /integrations/:id/deliveries. Changes need developer.manage. CDP ingestion: POST /cdp/v1/{batch,identify,track,page,screen,group,alias} or POST /cdp, authenticated with the inbound key (Basic username, Bearer, ?key= or writeKey).
Complaints (complaints.md): GET /projects/:id/complaints?status=active|open|in_review|resolved|all&categoryId=&assignee=me|none|<userId>&q=&page= → { complaints, hasMore, stats } · GET /projects/:id/complaints/open · GET|PATCH /complaints/:id { status?, assigneeId?, categoryId? } (inbox.reply) · POST /complaints/:id/reply { message, resolve? } · POST /complaints/:id/notes { body } · GET /complaints/:id/attachments/:attachmentId (the screenshot) · GET|POST /projects/:id/complaint-categories · PUT /projects/:id/complaint-categories/order { ids } · PATCH|DELETE /complaint-categories/:id (archived to archive; delete only without complaints) · GET|POST /projects/:id/complaint-webhooks { name, kind: "url"|"slack", url? | integrationId?, events, categoryIds, environments } (POST returns the signing secret once) · GET /projects/:id/complaint-webhooks/example · PATCH|DELETE /complaint-webhooks/:id · POST /complaint-webhooks/:id/test · POST /complaint-webhooks/:id/rotate-secret · GET /complaint-webhooks/:id/deliveries · POST /complaint-webhook-deliveries/:id/retry. Categories, the complaint switches (complaintsEnabled, complaintsScoutOffer, complaintsAnonymous on PUT /projects/:id/scout) and webhooks need scout.manage.
Authoring
POST /guides/:id/authoring-sessions { environment, targetUrl } → { id, token, url } · GET /authoring-sessions/:id (picks, status) · DELETE /authoring-sessions/:id
Feature flags & experiments
Reading needs viewer. Flags, segments, attributes, namespaces and experiments need flags.edit (editor); any change to what production serves (including archiving or copying a flag that is on there, and starting / stopping an experiment that runs there) also needs flags.publishProduction (admin); approving needs flags.review (admin); holdouts, webhooks and flag settings need flags.manage (admin). Every mutation is audited.
Flags belong to a project or to the workspace (scope; see feature-flags.md). Keys are unique across the workspace's scopes (409 conflict, details.reason: "key_conflict"); workspace routes check the same permissions on the workspace, and other workspaces get 404. Flags: GET /projects/:id/flags?q=&tag=&type=&status=active|archived|stale|all&scope=all|project|workspace → FlagSummary[] (default active, scope all = the project's flags and the workspace flags that apply to it) · POST /projects/:id/flags CreateFlagInput (keys are lower-cased; ^[a-z0-9][a-z0-9._-]{0,99}$; creates published version 1; scope: "workspace" + optional projectIds (null = every project) creates a workspace flag) · GET|POST /workspaces/:id/flags (workspace flags only) · POST /flags/:id/move MoveFlagInput → FlagDetail (a published revision; 409 with details.reason has_experiments, uses_project_segments, used_by_other_projects or key_conflict) · GET|PATCH /workspaces/:id/flag-settings (approvals, required comments, staleness and custom fields for workspace flags; PATCH needs flags.manage) · PATCH /flags/:id also takes projectIds for workspace flags (bumps every project gained or lost) · GET|PATCH /flags/:id (UpdateFlagMetaInput: metadata, no approval; a new jsonSchema must accept every current value) · DELETE /flags/:id (archived flags no other flag depends on) · POST /flags/:id/archive { archived } (archived flags leave every payload) · POST /flags/:id/duplicate { key, name } · GET /flags/:id/usage?days=30 · GET /flags/:id/code-refs · GET /flags/:id/audit Revisions: POST /flags/:id/revisions SaveRevisionInput → SaveRevisionOutput (publishes at once unless a changed environment requires approval or draft; 409 conflict when baseVersion is not the live version; 400 when nothing changed, a value has the wrong type or fails the JSON schema (the message names the path), a referenced flag / segment / namespace is unknown, or references form a cycle) · GET /flags/:id/revisions · POST /flags/:id/toggle { environment, enabled, comment? } (off = immediate kill switch, even with approvals) · POST /flag-revisions/:id/review { decision: approve|request_changes|comment, comment? } (no self-approval unless allowSelfApproval) · POST /flag-revisions/:id/publish · POST /flag-revisions/:id/discard. Only one revision per flag is open at a time: a newer save discards older ones. Import from ConfigCat (editor; mapping production needs flags.publishProduction; body credentials are used for the request only, never stored or returned): POST /projects/:id/flags/import/configcat/connect { username, password } → ConfigCatConnectResult (products with configs and environments) · POST /projects/:id/flags/import/configcat/preview ConfigCatImportInput { username, password, productId, configIds, environments: { <environment key>: <ConfigCat environment id or null> } } (one entry per Guidely environment, e.g. development, staging, production, qa; unmapped environments start off) → ConfigCatImportReport (nothing written) · POST /projects/:id/flags/import/configcat same body → ConfigCatImportReport with imported / failed statuses (flags already in the project are skipped; see feature-flags.md). ConfigCat errors (bad credentials, no access) are 400 validation_error. Testing: POST /projects/:id/flags/evaluate EvaluateInput → { results } (live configs or an unsaved config for flagKey, server-only flags included) · GET /projects/:id/flags/payload?environment= (what a public key receives) Targeting: GET|POST /projects/:id/flag-segments (GET includes workspace segments; POST scope: "workspace" creates one) · GET|POST /workspaces/:id/flag-segments · GET|PATCH|DELETE /flag-segments/:id (in-use segments can't be deleted or re-keyed) · GET|POST /projects/:id/flag-attributes (GET includes the built-ins, ids builtin:<key>) · PATCH|DELETE /flag-attributes/:id · GET|POST /projects/:id/flag-namespaces · PATCH|DELETE /flag-namespaces/:id · GET|POST /projects/:id/flag-holdouts · PATCH|DELETE /flag-holdouts/:id Experiments: GET|POST /projects/:id/experiments · GET|PATCH|DELETE /experiments/:id (running experiments can't be deleted) · POST /experiments/:id/start · POST /experiments/:id/stop { winnerVariationId? } (payloads then serve the winner as a force rule, or drop the rule) · GET /experiments/:id/results?environment= → ExperimentResults. A published experiment rule whose key has no experiment creates one (running, linked to the flag). Webhooks & settings: GET|POST /projects/:id/flag-webhooks (POST returns the signing secret once) · PATCH|DELETE /flag-webhooks/:id · POST /flag-webhooks/:id/test → { ok, status, error } · GET|PATCH /projects/:id/flag-settings (decryptionKey only for flags.manage; turning exposure / encryption changes bumps the environment's version) · POST /projects/:id/flag-settings/rotate-key { environment }
Webhook deliveries are POSTed as JSON { type: "flag.published" | "flag.kill_switch" | "experiment.stopped" | "webhook.test", projectId, environments, flag?: { key, version }, experiment?: { key, winnerVariationId }, actor, at } with X-Guidely-Event, X-Guidely-Webhook and X-Guidely-Signature: sha256=<hex HMAC-SHA256 of the body with the secret>, to public hosts only (10 s timeout), retried with exponential backoff (30 s, 1, 2, 4 min) up to 5 attempts.
Code references, authenticated with Authorization: Bearer gly_sk_… (scope flags:code-refs): POST /flags/code-refs CodeRefsUpload (≤5000 refs, snippets ≤300 characters) → { repo, branch, removed, stored, flags }; replaces every reference of that repo and branch.
How-tos
Reading needs viewer; everything else the howtos.edit permission (editors by default). See how-tos.md. GET /projects/:id/how-tos?q=&page= · POST /projects/:id/how-tos { title, description? } · POST /projects/:id/how-tos/capture { environment, targetUrl, howToId?, title? } → { howToId, sessionId, url } (open url: it carries ?guidely_capture=<token>) · DELETE /capture-sessions/:id (stop recording) · GET /how-tos/:id (steps, sharing, inAppHelp, scoutCitations / scoutCitedAt, capture while a recording is open) · PATCH { title?, description? } · DELETE (screenshots are deleted with it) · POST /how-tos/:id/duplicate · POST /how-tos/:id/steps { kind: text|heading|tip|alert, title?, body?, afterId?, atStart? } · PUT /how-tos/:id/steps/order { order: stepId[] } · PATCH /how-tos/:id/steps/:stepId { title?, body?, showHighlight?, zoom?, highlight?, annotations?, crop?, keep? } (annotations: up to 30 HowToAnnotations — arrow / text / box in fractions of the image; crop: a NormalizedRect or null) (keep: true dismisses a stray-step flag) · DELETE · PUT /how-tos/:id/steps/:stepId/screenshot { mediaId | null } (an image uploaded with POST /projects/:id/media) · POST /how-tos/:id/steps/:stepId/redact { regions: NormalizedRect[] } (pixelated on the server; the original is deleted) · POST /how-tos/:id/share { enabled, rotate? } → shareUrl (/share/:token) and embedUrl (/embed/:token) · POST /how-tos/:id/in-app-help { enabled } (available to Scout and in-app help: readable by the app's end users; audited) · GET /how-tos/:id/export?format=md|html|docx (download; Word exports at most 30 per user every 10 minutes) · POST /how-tos/:id/confluence (create or update the page in the workspace's Confluence space; images uploaded as attachments) → { url, created, howTo } (howTo.confluence = { pageId, url, publishedAt }) · PUT /how-tos/:id/video { mediaId | null } (a video uploaded with POST /projects/:id/media, played on the share page and embed as video; the replaced one is deleted) · GET /how-tos/:id/steps/:stepId/image (viewer; the original screenshot from the dashboard's origin, for the in-browser video maker) · POST /how-tos/:id/ai (rewrite everything and flag stray steps with the project's Anthropic key; 503 without one; finishing a recording queues the same for unedited steps, shown as writing on the how-to) · POST /how-tos/:id/tour (draft flow guide; needs guides.edit too) → { guideId } · POST /how-tos/:id/article { publish? } (create or update the linked help article; needs articles.edit, and articles.publish to publish) · public: POST /share/:token/view (counts a view, once per viewer IP every 30 minutes)
Optimize (viewers; see how-tos.md): GET /projects/:id/how-tos/optimize?env=&from=&to= → { range, urlsCollected, hasAutocapture, total, analysed, rows } (the 20 most recently updated recorded how-tos ranked by opportunity, each with sessionsStarted, completionRate, biggestDrop and effort) · GET /how-tos/:id/optimize?env=&from=&to= → { plan, tracked, usage, effort, findings, funnel, ai }: plan says how each step is matched (match.confidence, match.explanation) or why it's skipped; usage (null when no step matches) has the per-step funnel with drop-off and median / p90 times, rage clicks, errors with their issueId, and replays (null without replays.view); funnel is an Insights funnel definition; ai is { available, analysis }, the cached write-up with stale once the steps or findings changed · POST /how-tos/:id/optimize { env?, from?, to? } (writes the AI recommendations and caches them per environment; needs howtos.edit; 503 without an Anthropic key, 429 after 5 in 10 minutes per how-to or 30 an hour per project). The dashboard opens an unsaved funnel with /app/:projectId/insights?funnel=<FunnelDefinition JSON>.
Pages (same permissions): GET /projects/:id/how-to-pages?q=&page= · POST /projects/:id/how-to-pages { title, description?, howToIds? } · GET|PATCH|DELETE /how-to-pages/:id · POST /how-to-pages/:id/blocks { kind: howto|heading|text|tip|alert|image|video|link, title?, body?, howToId?, url?, mediaId?, afterId?, atStart? } (videos only from YouTube, Vimeo, Loom or Wistia; howToId and mediaId must belong to the project) · PATCH|DELETE /how-to-pages/:id/blocks/:blockId · PUT /how-to-pages/:id/blocks/order { order } · POST /how-to-pages/:id/share { enabled, rotate? } → /share/pages/:token, /embed/pages/:token · GET /how-to-pages/:id/export?format=md|html|docx · POST /how-to-pages/:id/confluence → { url, created, page } · GET /how-tos/:id/pages (pages containing the how-to) · public: POST /share/pages/:token/view
Comments (any member, viewers included; :item is how-tos/:id or how-to-pages/:id): GET /:item/comments → threads (anchorId = step or block, resolvedAt, replies, and canEdit / canDelete / canResolve for the caller) · POST /:item/comments { body, anchorId?, parentId? } (plain text ≤5000; mentions are <@userId> tokens of workspace members, others become "@someone"; each newly mentioned member gets an email linking to /app/:projectId/how-tos/[pages/]:id?comment=:threadId; a reply reopens a resolved thread; 60 per user per 10 minutes) → the thread · PATCH /how-to-comments/:id { body?, resolved? } (body: author only; resolved: thread author or howtos.edit) → the thread · DELETE /how-to-comments/:id (author, or admin/owner: audited as howto.comment_delete / howto_page.comment_delete)
Versions: GET /:item/versions (viewer; newest first, with reason auto|manual|recording|ai|restore, name, note, createdBy, changes) · POST /:item/versions { name? } (howtos.edit; 201 with created: true, or 200 with the latest version when nothing changed) · GET /:item/versions/:versionId (viewer; read-only steps or blocks) · POST /:item/versions/:versionId/restore (howtos.edit; saves the current state first, 400 while a recording is open; audited as howto.restore / howto_page.restore) → the how-to or page