Skip to main content

Overview

API tokens allow you to access the ZeroPath API programmatically — from CI/CD pipelines, the CLI, the VS Code extension, the MCP server, or custom integrations.

Creating Tokens

  1. Navigate to Settings → API Tokens in the ZeroPath dashboard (zeropath.com/app/settings/api).
  2. Click “Create Token”.
  3. Provide a name (optional, for identification).
  4. Set an expiration (1–365 days, default: 30 days).
  5. Click Create.
  6. Copy the Token Secret immediately — it is shown only once and cannot be retrieved later.
You’ll receive two values:
  • Token ID — a UUID identifying the token (safe to log).
  • Token Secret — the secret key (treat like a password).

Authentication Headers

Every API request must include both headers:

Optional: Client identification header

You can optionally send an X-ZeroPath-Client header to identify which surface your integration is calling from. When present, this value is recorded in the audit log so API-token actions are attributed to a specific tool rather than a generic token call:
Unknown or absent values fall back to a generic API token attribution. The CLI sends this header automatically — no configuration is needed.

Example

Supported API Surfaces

API tokens authenticate requests to both the V1 and V2 ZeroPath APIs. The V2 API provides expanded coverage including:
  • Vulnerabilities — list, search, and manage security findings, including remediation and patch metadata when available. When a Jira issue is linked to a finding, the API response includes the Jira issue title alongside the existing issue ID and URL. You can filter the issue list by runtime validation verdict to narrow results to issues with specific validation outcomes. When an issue has been manually marked as non-exploitable, the response includes a nonExploitableReason field containing the human triage rationale (distinct from the system-generated validationSecurityAssessment). The issue detail response also includes an exploitationSetup field — a plain-language description of the configuration or modification a running application would need before the finding can be exploited (empty string when the validator did not characterize it). Patch status metadata now includes the current generation stage, so you can track patch progress in real time. You can retrieve all human triage rationales recorded against a repository’s findings — including false positives, non-exploitable verdicts, true positives, and severity changes — with a per-entry disposition field indicating the triage action. You can update free-form user notes on individual issues (org-shared, up to 5,000 characters; passing an empty or whitespace-only value clears the note). You can also regenerate patches for issues — and if an issue has been marked unpatchable, you can pass force=true to override that flag and request a fresh patch attempt. When regenerating, you can supply optional feedback (up to 4,000 characters of free-form guidance forwarded to the patch agent) and a variantCount (1–3) to generate multiple alternative patch candidates instead of applying one directly; the issue detail response includes a patchCandidates array listing each pending alternative (with its diff, PR title, PR description, and blast-radius report) so you can review them before choosing; use issues.selectPatchCandidate to promote your preferred candidate into the issue patch and discard the rest. You can update the severity rating of an issue by label (e.g., downgrade a “High” to “Medium”) — the platform adjusts the underlying severity score to land in the requested band. Cross-repository evidence is included in issue details when the scanner identifies related code across multiple repositories, giving you full visibility into multi-repo vulnerability chains. You can exclude specific repository branches from issue list results using excludedRepositoryBranches filters
  • SCA — list dependency vulnerabilities with severity, reachability data, and patch status metadata when a remediation exists. You can filter SCA alerts and vulnerabilities to only those associated with applications exposed by Wiz. SCA advisories now include exploit intelligence fields — CISA KEV status (isKnownExploited, kevDateAdded, kevKnownRansomware) and FIRST EPSS scores (epssScore, epssPercentile) — so you can prioritize based on real-world exploitation data. You can list dependency-resolution coverage warnings to identify manifests where the dependency tree could not be fully resolved, and query per-ecosystem resolution coverage to quantify how complete your dependency scanning is across repositories
  • Reports — generate security reports in DOCX, CSV, SARIF, or SBOM format. If report generation fails, the report status is updated to failed with an error message describing what went wrong
  • Custom Reports — create, list, and delete saved filter configurations, retrieve aggregated statistics (severity distribution, top vulnerability classes, MTTR, trends), and discover available filter fields via the filter schema endpoint
  • Endpoints — semantic search across detected endpoints and data handlers
  • Agent — manage event triggers, patches, pull requests, global agent instructions, trigger history, real-time job streaming via SSE, and playbooks (activate, pause, and uninstall pre-built security automation workflows from a template library). Playbook templates support rich parameter types including text, number, boolean toggles, and select dropdowns, giving you fine-grained control when activating workflows. Read-only operations — including listing event triggers, playbook instances, trigger history, retrieving a specific trigger event, and reading global instructions — require only the Agent View permission; you do not need Agent Run to query these resources. Agent conversations and jobs are scoped by repository-level access control — if a conversation is bound to a repository, only users who hold view access on that repository can list, read, send messages to, or archive the conversation. Losing repository access automatically hides those conversations and jobs from all agent endpoints
  • On-Demand Code Scans Beta — submit diffs, files, and snippets for asynchronous security review from CLIs, IDEs, pre-commit hooks, and custom integrations
  • Rule Packs — browse curated bundles of natural-language SAST rule templates covering compliance, privacy, logging, and more; enable or disable individual templates or entire packs for your organization
  • Custom Rules — create, update, and list natural-language security rules. Rules can be scoped to all repositories (default), specific repositories, or by tag — pass tagIds without repositoryIds to scope a rule to repositories carrying those tags. Each rule’s response includes a scope field (allRepositories, repositories, or tags) so you can see how it is applied. List and get responses also include a source field (USER or SECURITY_COMPASS) indicating whether the rule was created manually or auto-generated from an SD Elements countermeasure
  • Organizations — manage organizations, list/invite/remove members, and update member roles. When inviting a new member, you can optionally specify a role (ADMIN or MEMBER); the default is MEMBER, and inviting as ADMIN requires admin-level permission. The member list returns a clear status for each member — active, pendingInvite, or scimDeprovisioned — so you can distinguish active members from outstanding invitees and identity-provider-deprovisioned users. Removing a member works for active members and for pending or expired invitees (their outstanding invitation is automatically revoked); active admins cannot be removed directly — demote them to a regular member first. SCIM-deprovisioned members must be managed through your identity provider instead. Re-inviting an email address that already has a pending or expired invitation automatically revokes the old invitation and sends a fresh one. GitHub team sync status includes a lastTeamSyncAt timestamp showing when the most recent sync completed, and you can trigger an immediate on-demand sync via the API or the dashboard
  • Repositories — list, add by URL (public repos), delete, and manage repository settings. Repository responses include VCS-specific configuration for GitHub, GitLab, Bitbucket, Azure DevOps, and generic Git repositories, so you can identify the source provider and connection status for each repository. For monorepo setups, you can atomically delete all partitions of a monorepo in a single operation, and previously deleted repositories can be re-imported without issues. Tags can be marked as default (isDefault: true) so they are automatically applied to every newly added repository, ensuring consistent tagging and team access from the moment a repository is imported
  • Container Scanning — submit container images for vulnerability scanning by registry reference or by uploading an image archive (for air-gapped environments). You can list and retrieve tracked container images, view scan results with per-layer attribution and base-image upgrade recommendations, list vulnerability findings grouped by package with aggregated CVEs, and manage recurring monitoring schedules via cron expressions. The container dashboard summary provides organization-wide statistics including image counts, findings by severity, and top base-image upgrade opportunities. You can link images to repositories, delete tracked images, and check whether container scanning is enabled for your organization
  • Scans — trigger full scans, cancel running scans, and manage cron-based scan schedules with branch targeting. Scan responses include repository identifiers for all supported VCS providers (GitHub, GitLab, Bitbucket, and Azure DevOps). You can scan all VCS-attached repositories at once by passing allRepositories: true, optionally excluding specific repositories with excludedRepositoryIds. You can filter the scan list by severity level (Critical, High, Medium, Low) and group PR scans by pull request to see only the latest scan per PR along with a count of related rescans. If a full scan is already in progress for the same repository and branch, the API returns an error rather than starting a duplicate scan. When rescanning a PR, the force flag now runs a full scan instead of an incremental refresh. For credit-billed scans, if the repository’s usage estimate is still being computed at quote time, the scan proceeds immediately and is billed at the pricing policy’s minimum charge — the estimatedBillableTokens field in the quote response will be null in this case rather than a token count
  • Runtime Validation — dynamically test confirmed findings inside isolated containers. You can auto-provision a source-build validation profile for a single application (runtimeValidation.autoProvisionAndValidate) or for every detected application in a repository at once (runtimeValidation.autoProvisionAndValidateRepository) — no manual profile configuration or uploaded artifact required, just supply a completed scan id. Applications already queued are skipped automatically. Runtime validation profiles now support a SOURCE_BUILD target mode in addition to REMOTE_CONNECTIVITY and LOCAL_ARTIFACT; source-build profiles are built and run directly from the repository source inside the validation environment. Each finding carries a setupRequirement field (DEFAULT_SETUP, REQUIRES_MODIFICATION, or UNKNOWN) indicating whether it is reachable under the default provisioned environment. After a run completes you can call runtimeValidation.listExploitChains to retrieve multi-step exploit chains — sequences of confirmed findings that, when chained together, reach higher combined impact than any individual finding — ordered by combined severity and including per-step roles, configuration requirements, proof-of-concept instructions, and a setup requirement for the chain as a whole
  • Teams — create teams, manage memberships, configure granular organization/repository/team permissions, and manage default permission templates that can be applied to all teams or specific teams in your organization. Repository access can be granted globally (all repos), per-repository, or by tag — tag-based grants automatically cover every repository that belongs to the tag, so access stays in sync as repositories are added or removed. Updating or deleting a tag that has team permission grants requires the TEAM_MANAGE permission, and repository IDs supplied when creating or updating a tag are validated to belong to your organization. When reading a team’s permissions, the response includes a structured repoAccess field that explicitly indicates the access mode (universal or selected) along with the effective permissions, repository IDs, and tag IDs. The Agent Run permission implicitly includes Agent View — granting a team the ability to run the agent automatically grants view access as well, so you do not need to assign both permissions separately
  • Custom Sources — create, list, update, toggle, and delete custom security source declarations that tell the scanner about additional untrusted data entry points in your code
  • Custom Sinks — create, list, update, toggle, and delete custom security sink declarations that tell the scanner about additional security-sensitive operations in your code
  • Custom Source Packs — browse curated bundles of source declaration templates, enable or disable individual templates or entire packs
  • Custom Sink Packs — browse curated bundles of sink declaration templates, enable or disable individual templates or entire packs
  • Integrations — read data from third-party integrations such as Wiz CSPM, including retrieving Wiz settings, listing Wiz projects, and searching Wiz cloud assets and network exposures
  • Security Compass — manage the SD Elements integration end-to-end via the public REST API (/api/v2/securityCompass/*): read the integration and project mappings, test the connection, add and remove project-to-repository mappings, trigger countermeasure-to-rule syncs, retrieve the per-countermeasure coverage audit, fetch linked findings for a countermeasure, and view the Security Compass audit log. Credentials (the SD Elements API token and base URL) are managed only in the ZeroPath dashboard — the API never accepts or returns them. Managing the integration requires the admin role; read operations are available to all members. See the Security Compass integration guide for the full workflow
  • Scanner Settings — configure scan modules, confidence thresholds, auto-patching, and file ignore patterns at org, repo, or app scope. Enabled scan modules now include CONTAINER alongside SAST, IAC, SECRETS, EOL, SCA, and AI. The release track for full scans and PR scans accepts STABLE in addition to EDGE. The allowPrCheckBypass setting controls whether contributors can bypass the ZeroPath PR check status without disabling PR scanning entirely. The fullScanAutoProvisionRuntimeValidation setting enables automatic source-build runtime validation provisioning after each full scan, so detected applications are validated without any manual profile configuration
  • Stats — retrieve aggregate issue counts and scan activity by scope, including a breakdown of issues by application with open and resolved counts per repository. Dashboard statistics endpoints accept optional application filters to narrow results to specific applications within repositories. The security posture summary includes a reachableExploitableIssues count alongside the existing severity-level counts
For a full list of available endpoints, see the API Reference.

Token Scopes

Tokens are organization-scoped. A token created under a specific organization grants access to all resources within that organization, subject to the same permissions as the user who created it. There is no fine-grained scope selection at token creation time — the token inherits the creating user’s permissions in the organization.

Managing Tokens

From the API Tokens settings page, you can:
  • View all active tokens with their names, creation dates, and expiration dates.
  • Delete tokens that are no longer needed or may be compromised.
Tokens cannot be edited after creation. To change a token’s expiration or name, delete it and create a new one.

Token Lifecycle

  • Tokens have a fixed expiration date set at creation (1–365 days).
  • Expired tokens are automatically rejected — there is no automatic renewal.
  • When a token expires, create a new one and update your integrations.
  • Token secrets are cryptographically hashed before storage — ZeroPath never stores the plaintext secret.

Best Practices

  1. Use descriptive names — name tokens after their purpose (e.g., “CI/CD Pipeline”, “VS Code Extension”, “MCP Server”).
  2. Set short expirations — use the shortest practical expiration for your use case.
  3. Rotate regularly — create new tokens and retire old ones on a schedule.
  4. Never commit tokens to source control — use environment variables or a secrets manager.
  5. One token per integration — avoid sharing a single token across multiple systems so you can revoke individually.
  6. Delete compromised tokens immediately — if a token may have been exposed, delete it and create a replacement.