Skip to main content
POST
Trigger a workflow run
This endpoint is experimental. It may change or be removed without notice and is not covered by API stability guarantees.

Authorizations

Authorization
string
header
required

Get access to data with your API token. Example header:

Authorization: Bearer 2991e2fb4b540fe75b8f90677b0b892b6314e4961cb001fe6eb452eee248a628

The token can be provisioned from the Tokens section in your Settings, and requires explicitly enabling Web API access.

Path Parameters

deploymentId
string<int64>
required

The unique numerical identifier of the deployment. Can be found via the Deployments Service or in your Settings in the web UI.

Example:

"1234"

Body

application/json
repoId
string<int64>

The unique numerical identifier of the repository to analyze.

workflowName
string

Name of the workflow to run, from the workflow registry.

gitRef
string

Branch, tag, or commit SHA to analyze. Without it or pr_id, the run uses the branch Managed Scans full-scan, else the primary branch.

baseBranch
string

Base branch of the pull request. Resolved from pr_id when omitted.

findingsAnalysisLimit
integer<int64>

Maximum number of findings to analyze (defaults to 500).

prId
string

Pull request number to analyze. Required for pull request workflows.

sideEffects
boolean

Whether the run may comment on or open pull requests and update Semgrep AppSec Platform data. Defaults to true.

inputs
object

Arbitrary user-provided inputs for dynamic workflow fields. Keys correspond to WorkflowInputField.name values from the registry input schema. Only user/advanced visibility fields should be sent; system/secret fields are always supplied by the backend and any user-supplied values for those are ignored. When absent or empty, existing callers are unaffected.

Response

200 - application/json

OK

jobId
string

Canonical job identifier. Use with the Workflow Jobs API to track status and retrieve results.