PRODUCT GUIDE / 2026.10
Service accounts and AI ticket access
Configure an owned service identity and its scoped ticket API access.
Open in your workspaceBefore you start
Before you start: A native human workspace administrator manages this feature with Integrations enabled. The accountable owner must remain a current native human administrator. Delegated MSP or machine access cannot manage it.
Create a disabled account and set team membership
- Open Administration → Service accounts (#/admin/service-accounts) and New service account.
- Enter Service account name, select Accountable human administrator and supply Reason for change.
- Select Create disabled service account. No scopes, queues, credentials, invitation or human password are supplied by creation.
- Before editing the service policy, use Review teams and queues to add this machine principal to the actual teams whose queues it will use. The native team setup can include the disabled account; it does not grant ticket or knowledge reading access.
- Return to Service accounts and select the saved account. Keep the current human owner and module setup valid throughout the remaining steps.
Search queues and save an enabled reviewed policy
- Choose the required Approved action scopes. Include tickets.read for ticket reading or knowledge.read for knowledge reading; named restricted read grants require the corresponding scope.
- Under Allowed queues, enter a queue or team name in Find an active queue, then select Search queues.
- Review Search results, returned in bounded pages of 50 items. Select Load more queues when more results are available.
- Select only the intended queues. One service account can have at most 100 selected grants; this is an account grant limit, not a workspace catalogue limit. A transfer requires both source and destination queues to be allowed.
- Inspect Selected grants. Current active selections remain selected when you search or load another page; absence from the current results does not mean a grant is retired.
- Deliberately use Remove grant for an active grant you want to end, or Remove unavailable grant when the saved metadata identifies a retired queue or team. If current availability is not verified, refresh and review it rather than inferring retirement or dropping it automatically.
- Review the owner, scope/queue selections, actual team membership and Reason for change. Select Enable after reviewing this policy, then Save reviewed policy.
Configure restricted reading audiences after policy review
- Confirm that the service policy is reviewed and enabled, with the required read scope, current human owner, enabled modules and current allowed queue/team membership. A disabled empty-policy account is not eligible for a named ticket or knowledge READ grant.
- Configure named minimum-READ service grants through the existing authenticated native HUMAN administrator policy APIs, using that administrator's own current same-origin session and recent authentication. Current ordinary ticket pickers and Article governance choices do not expose these read-only or knowledge-only service subjects. Keep tickets.read or knowledge.read; do not add claim/write scopes merely to make a subject appear in a picker, and never give the agent a human session.
- For restricted ticket reading, GET /api/admin/ticket-audiences/queues/:queueId or /api/admin/ticket-audiences/tickets/:ticketId with the human expectedOrgId and expectedUserId. Review policy.version and existing grants, then PATCH the same path with that version, expectedContext {orgId,userId} for the human administrator, mode restricted, the reviewed requesterAccess value, reason and complete reviewed grants array. Add {principalType: member, principalId: serviceAccountId, operations: [read], fieldGroups: the minimum required groups}; preserve the intended human grants. Queue selection alone grants no ticket audience access.
- For restricted knowledge reading, GET /api/admin/knowledge/:articleId/policy with the current human read context and read its version and articleVersion. An authorized human editor can also GET /api/admin/knowledge/:articleId to review the article. PUT the policy path using the current version, articleVersion, human expectedContext, reason and reviewed ownerId/reviewAt/expiresAt/contribute fields. Set read to {mode: restricted, memberIds: the intended human readers plus the enabled knowledge.read serviceAccountId, teamIds: the intended teams}. Keep contribution, article owner and reviewers human-only.
- After a knowledge policy change, an authorized human contributor reloads the current article version and submits through POST /api/knowledge/:articleId/submit with human expectedContext. A different eligible human administrator approves via POST /api/knowledge/:articleId/approve, then publishes via POST /api/knowledge/:articleId/publish, supplying the current article version and their own context at each step. The policy API change alone does not publish guidance.
- Review current audience access before issuing a credential. If the service owner, policy, queues or team authority changes, review the service policy first and then recheck its named reading grants; old grants do not revive automatically.
Issue, rotate or revoke credentials
- Complete the policy, team and applicable restricted reading-audience setup above, then open Credentials and tokens for the current saved account. Resolve readiness issues before issuance.
- Select Issue credential, enter its reason and optional UTC expiry, then confirm. Default credential expiry is 30 days; maximum is 90 days. At most two active credentials are permitted.
- Copy the Client ID and one-time Client secret into the external tool's secret manager, then I stored it — close receipt.
- Use Rotate with reason when replacing a credential; rotation revokes the old credential and its access tokens.
- Use Revoke to end a credential. Revoke all access tokens stops existing tokens while an otherwise current credential can request a new one.
- After policy/owner changes, review team/audience authority and issue a fresh credential. Do not expect old authority to revive automatically.
Service account access boundary
A native service account is a non-admin machine identity with a current native human administrator owner. It is not a person's password login, SSO account, invitation, MFA enrollment or cookie session. It starts disabled with no queues or scopes. Access must be explicitly narrowed to approved queues/teams, finite scopes, native audience/field permission and workflow permission. A human owner does not make the machine a human actor or organization administrator.
Client-credential authentication uses Basic authentication to issue an opaque Bearer access token lasting 900 seconds. There is no refresh token or browser session. The API supplies 17 finite scopes. Replies persist on the local ticket; no tickets.reply.send scope, email sender or external mail delivery is supplied.
Agent API reference
| Surface | Supported contract |
|---|---|
| POST /api/agent/token | Basic credential UUID/secret; form grant_type=client_credentials and optional approved scope subset; expires_in=900. |
| POST /api/agent/revoke | Basic credential authentication; form token and optional token_type_hint=access_token. |
| GET /api/agent/v1/context | Current machine identity, approved scopes/queues and contextDigest for subsequent commands. |
| GET /api/agent/v1/queues, /queues/:id/tickets | Authorized queue workload; native queue permission and tickets.read. |
| GET /api/agent/v1/tickets, /tickets/:id, /tickets/:id/work, /tickets/:id/activity | Native readable projection/public activity and tickets.read. |
| GET /api/agent/v1/tickets/:id/internal-notes | tickets.read plus tickets.internal_notes.read and current native internal audience. |
| GET /api/agent/v1/knowledge, /knowledge/:id | knowledge.read and native published reading audience. |
| GET /api/agent/v1/tickets/:id/knowledge-suggestions | tickets.read, knowledge.read and knowledge.suggestions; current readable ticket/article context. |
| GET /api/agent/v1/tickets/:id/attachments | tickets.read and attachments.metadata.read; safe native metadata. |
| GET /api/agent/v1/tickets/:id/attachments/:attachmentId/download | tickets.read, attachments.metadata.read and attachments.download; current clean/downloadable state. |
| POST /api/agent/v1/tickets | tickets.create, exact current context/authority, explicit team/queue; ordinary incident/request creation only. |
| POST /api/agent/v1/tickets/:id/work-actions/:action | The finite action's scope, current version/context/authority and allowed native workflow. |
| POST /api/agent/v1/tickets/:id/activity | tickets.comment for public; tickets.internal_notes.write for internal; current version/context/authority. |
| POST /api/agent/v1/tickets/:id/replies | tickets.comment; local persisted public reply and separate delivery outcome. |
Existing legacy /api/v1 developer keys remain read-only. The finite work actions are claim, assign, transfer, priority, hold, resume, resolve, reopen and escalate. Ordinary imported/managed work mutation, close, approval/configuration, HR/AD and escalation acknowledgement/end/cancellation are unsupported by this agent surface.
Expected result
Every successful mutation is attributable to the machine. A reply result with localReply.persisted and delivery.state not_requested/unavailable means a local reply was saved; it never means email was delivered.
Use the scoped ticket API
- Complete native team membership, enable the reviewed service policy, configure any applicable restricted reading audiences and then issue a current credential in that order.
- Request a token from /api/agent/token with Basic credential authentication and form grant_type=client_credentials. Use only an approved scope subset. The token expires after 900 seconds; request a new token rather than using a refresh flow.
- Read /api/agent/v1/context with the Bearer token and retain the returned organization/machine identity and current contextDigest for this request sequence.
- Read permitted queues/tickets/work/knowledge/attachment metadata through their finite GET routes. Fetch the current ticket version before a command.
- Supply the exact expectedContext organization/machine user ID, string expectedAuthority from current contextDigest, and current ticket version for a write. Creation uses exact context/authority and explicit team/queue, with no pre-existing version.
- Use only the action's approved scope and native allowed workflow. Inspect a reply's local persistence and separate delivery state.
- Revoke an access token through the supported revoke endpoint; an administrator revokes/disables the credential/account through the current accepted management controls.
The exact finite scope strings in the current adapter source are: tickets.read, tickets.create, tickets.claim, tickets.assign, tickets.comment, tickets.internal_notes.read, tickets.internal_notes.write, tickets.priority, tickets.hold, tickets.resume, tickets.resolve, tickets.reopen, tickets.escalate, knowledge.read, knowledge.suggestions, attachments.metadata.read and attachments.download. Transfer uses tickets.assign. Internal-note reads require tickets.read plus tickets.internal_notes.read; suggestions require tickets.read plus both knowledge scopes; attachment download requires tickets.read plus metadata/download. A mutation uses its own action scope and still passes the native permission intersection.
Placeholder token and context examples
The token request needs a complete Authorization Basic header containing Base64 of the issued client ID, a colon and its client secret. Have your approved secret manager provide that header through curl standard input using --header @-; do not type or substitute live credentials into a shell command, terminal input, process arguments or logs. Your tool can instead manage a private curl configuration file with mode 0600 outside source control. Client credentials belong only in the Authorization header, never in the URL, query or form body. Token requests are form encoded and accept no cookies or query parameters. The example below contains no credentials and expects the header to be supplied by that approved tool.
curl --request POST \
--url 'https://<your-verified-worknowhub-host>/api/agent/token' \
--header @- \
--header 'Content-Type: application/x-www-form-urlencoded' \
--data-urlencode 'grant_type=client_credentials' \
--data-urlencode 'scope=tickets.read knowledge.read'For the context request, the secret manager supplies the complete Authorization Bearer header through the same standard-input mechanism. The command does not contain an access token. Keep token response handling inside the approved tool without printing token values into logs.
curl --request GET \
--url 'https://<your-verified-worknowhub-host>/api/agent/v1/context' \
--header @-Current command requirements
Work actions are claim, assign/transfer, priority, hold, resume, resolve, reopen and escalate. Assign/transfer uses explicit allowed team/queue/assignee and reason. Priority uses impact/urgency and reason; hold uses typed reason and any required public question; resolve uses resolutionCode/resolutionNotes. No arbitrary PATCH/action name or privileged system purpose is accepted.
Ticket list filters are q, type, state, priority, view, team/queue/category/subcategory, limit/offset and supported sort/order. Limit is 1–100 and offset 0–10,000. Queue workload uses page/pageSize. Read context/authority can be supplied to detect stale selection. Writes reject query parameters and unknown body fields. Context/authority change requires a fresh context read; record-version conflict requires fresh record review. Do not synthesize the authority string or use a human owner's ID as machine expectedContext.userId.
Replies accept local or email_if_available deliveryMode, but this release's adapter persists locally. Inspect the returned localReply.persisted and delivery.state. No tickets.reply.send scope or verified outbound agent mail capability is provided.
Attachment downloads require current clean screening and storage readiness. Pending, failed or unconfigured screening does not provide downloadable clean content; a metadata result alone does not establish download availability.
Troubleshooting
Disabled/empty-authority state is deliberately unusable. Credential/token revocation, owner/queue/scope changes and native permission changes must affect later access. Use the service account's own client credential rather than a person's sign-in credentials. Confirm the workspace setup and current authority before retrying a denied action.