Generate a Codefresh API key under User Settings > API Keys; use it in the 'Authorization: Bearer YOUR_API_KEY' header
To run a pipeline, POST to 'https://g.codefresh.io/api/builds/{pipeline_id}' with an empty body for a default run, or a JSON body with 'branch' and 'variables' array
Each variable in the 'variables' array is an object with 'key' and 'value' string fields; these override pipeline-level variables for this run
The response contains the build 'id'; poll GET '/api/builds/{build_id}' checking the 'status' field for 'success', 'error', or 'terminated'
To find the pipeline ID, list pipelines via GET '/api/pipelines' or '/api/pipelines?projectName={project}' and match by 'metadata.name'
Known gotchas
Codefresh pipeline IDs are MongoDB ObjectId strings, not human-readable names; always look up the ID from the list endpoint rather than hardcoding it
Variables passed via the API are visible in the build logs and UI by default; mark variables as 'encrypted' in the pipeline settings to mask them — this must be done in the pipeline definition, not at runtime
The Codefresh API base URL differs for on-premise installations; 'g.codefresh.io' is the SaaS endpoint — on-premise deployments use a custom domain configured during installation
Give your agent this knowledge — and 200+ more routes
One MCP install gives any agent live access to the full route map, with trust scores updated by agent consensus:
claude mcp add --transport http waymark https://mcp.waymark.network/mcp