Check one flow definition
const url = 'https://api-dev.mindflow.io/v1/organizations/%24CURRENT_ORGANIZATION_ID/compile';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"source":"import { flow, http, success, trigger } from \"@mindflow-dev/ai-build-workflow-sdk\"\n\nexport const sdkVersion = \"1.0.0\"\n\nconst hook = trigger.webhook(\"Receive an IP\")\n\nexport default flow(\"ip-lookup\", { triggers: [hook], outputs: { country: { type: \"string\" } } }, () => [\n lookup,\n done,\n])\n\nconst lookup = http(\"Look up the IP\", { method: \"GET\", url: `https://ipinfo.io/${hook.body.value.ip}/json` })\n\nconst done = success(\"Return the country\", { country: lookup.body.country })\n","path":"src/ip-lookup.ts"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://api-dev.mindflow.io/v1/organizations/%24CURRENT_ORGANIZATION_ID/compile \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "source": "import { flow, http, success, trigger } from \"@mindflow-dev/ai-build-workflow-sdk\"\n\nexport const sdkVersion = \"1.0.0\"\n\nconst hook = trigger.webhook(\"Receive an IP\")\n\nexport default flow(\"ip-lookup\", { triggers: [hook], outputs: { country: { type: \"string\" } } }, () => [\n lookup,\n done,\n])\n\nconst lookup = http(\"Look up the IP\", { method: \"GET\", url: `https://ipinfo.io/${hook.body.value.ip}/json` })\n\nconst done = success(\"Return the country\", { country: lookup.body.country })\n", "path": "src/ip-lookup.ts" }'Compiles one Workflow SDK TypeScript definition against the organization’s catalog: syntax, structure, catalog operations and parameters, functions, models, and feature flags. Does not save a flow or a version, and never returns an import document.
On success, returns HTTP 200 with { ok: true, findings, sdkVersion }, where findings holds warnings only.
On failure, returns HTTP 400 Problem Details with code: FLOW_COMPILATION_FAILED and a findings array. Each
finding has a ruleId, a severity, and, when it comes from the source, a line and column. Fix the
TypeScript source and resubmit.
502 BAD_GATEWAY when the integration catalog cannot be read; retry later.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”Opaque id of the organization that owns the resource. In a playbook step this can be filled from the current organization when the caller leaves it unset.
Example
ORGA-57b858ed-ec60-4507-b2ef-ea58244ac742Organization that scopes the compile check. Pass the value unchanged.
Request Bodyrequired
Section titled “Request Bodyrequired”Request body for checking one Workflow SDK TypeScript definition.
object
Workflow SDK TypeScript source to compile.
Relative path for findings. Defaults to workflow.ts when omitted.
Optional SHA-256 of source. Mismatch fails closed.
Example
{ "source": "import { flow, http, success, trigger } from \"@mindflow-dev/ai-build-workflow-sdk\"\n\nexport const sdkVersion = \"1.0.0\"\n\nconst hook = trigger.webhook(\"Receive an IP\")\n\nexport default flow(\"ip-lookup\", { triggers: [hook], outputs: { country: { type: \"string\" } } }, () => [\n lookup,\n done,\n])\n\nconst lookup = http(\"Look up the IP\", { method: \"GET\", url: `https://ipinfo.io/${hook.body.value.ip}/json` })\n\nconst done = success(\"Return the country\", { country: lookup.body.country })\n", "path": "src/ip-lookup.ts"}Responses
Section titled “Responses”The definition compiles. findings lists warnings, if any.
Successful definition check (ok is always true on HTTP 200). No import document is returned.
object
Always true on HTTP 200.
Warnings only; any error returns HTTP 400 instead.
One compile, decompile or save finding. error findings block the request; warning findings are advice and
never block. When the finding comes from the TypeScript source, line and column locate it (1-based).
object
Stable rule identifier for the finding, grouped by layer (for example syntax.parse, structure.reference, catalog.operation, save.renamed).
error blocks the request; warning is advice.
What is wrong, in one sentence.
How to fix it, when the rule knows.
Relative path of the TypeScript file the finding is about.
1-based line where the construct starts.
1-based column where the construct starts.
1-based line where the construct ends.
1-based column where the construct ends.
Step id from the definition when the finding is about one step.
Dotted option path inside the step (for example fields.channel) when the finding is about one option.
Workflow SDK version of the server that handled the request. A definition whose sdkVersion has another major
version fails with an sdk.version finding: update the plugin, then rewrite the definition.
Examples
Clean compile
The definition compiled with no findings.
{ "ok": true, "findings": [], "sdkVersion": "1.0.0"}Headers
Section titled “Headers”Example
1000Maximum number of requests allowed in the current window. Present when this response is rate limited.
Example
42Number of requests still allowed in the current window. 0 means the next call can return 429 until the window resets.
Example
2026-03-20T15:31:00.000ZTime when the current window resets, as ISO 8601 UTC. After this time, X-RateLimit-Remaining starts over.
Example
30HTTP Retry-After value in seconds. Wait at least this long before retrying a 429 response.
Example
*CORS Access-Control-Allow-Origin value. Origin allowed to read this response from a browser. * means any origin may read it.
Invalid request, or the definition does not compile.
- Missing
sourceor other request validation → shared Bad Request (code: BAD_REQUEST). - Compile findings →
FlowDefinitionCompileFailedProblemDetails(code: FLOW_COMPILATION_FAILED) withfindings.
RFC 9457 Problem Details for HTTP APIs. All 4xx/5xx responses use this shape. Extension members (e.g. machine-readable code) are allowed.
object
URI reference identifying the problem type. When absent, “about:blank” per RFC 9457 Section 3.1.1.
Short, human-readable summary of the problem type (RFC 9457 Section 3.1.3).
HTTP status code for this occurrence (advisory; same as response status) (RFC 9457 Section 3.1.2).
Human-readable explanation specific to this occurrence (RFC 9457 Section 3.1.4).
URI reference identifying the specific occurrence (RFC 9457 Section 3.1.5).
Problem Details when the definition does not compile (code: FLOW_COMPILATION_FAILED).
object
URI reference identifying the problem type. When absent, “about:blank” per RFC 9457 Section 3.1.1.
Short, human-readable summary of the problem type (RFC 9457 Section 3.1.3).
HTTP status code for this occurrence (advisory; same as response status) (RFC 9457 Section 3.1.2).
Human-readable explanation specific to this occurrence (RFC 9457 Section 3.1.4).
URI reference identifying the specific occurrence (RFC 9457 Section 3.1.5).
Stable error code for a definition that does not compile.
Findings that blocked the request (at least one error), plus any warnings.
One compile, decompile or save finding. error findings block the request; warning findings are advice and
never block. When the finding comes from the TypeScript source, line and column locate it (1-based).
object
Stable rule identifier for the finding, grouped by layer (for example syntax.parse, structure.reference, catalog.operation, save.renamed).
error blocks the request; warning is advice.
What is wrong, in one sentence.
How to fix it, when the rule knows.
Relative path of the TypeScript file the finding is about.
1-based line where the construct starts.
1-based column where the construct starts.
1-based line where the construct ends.
1-based column where the construct ends.
Step id from the definition when the finding is about one step.
Dotted option path inside the step (for example fields.channel) when the finding is about one option.
Workflow SDK version of the server that handled the request. A definition whose sdkVersion has another major
version fails with an sdk.version finding: update the plugin, then rewrite the definition.
Examples
Unknown step option
The lookup step was given timout, an option the http step does not have.
{ "type": "about:blank", "status": 400, "title": "Bad Request", "detail": "Workflow compilation failed with 1 finding. Fix the TypeScript definition and resubmit.", "code": "FLOW_COMPILATION_FAILED", "findings": [ { "ruleId": "options.unknownKey", "severity": "error", "message": "Unknown option \"timout\".", "hint": "Did you mean \"timeout\"?", "filePath": "src/ip-lookup.ts", "line": 12, "column": 113, "endLine": 12, "endColumn": 123 } ], "sdkVersion": "1.0.0"}Headers
Section titled “Headers”Example
1000Maximum number of requests allowed in the current window. Present when this response is rate limited.
Example
42Number of requests still allowed in the current window. 0 means the next call can return 429 until the window resets.
Example
2026-03-20T15:31:00.000ZTime when the current window resets, as ISO 8601 UTC. After this time, X-RateLimit-Remaining starts over.
Example
30HTTP Retry-After value in seconds. Wait at least this long before retrying a 429 response.
Example
*CORS Access-Control-Allow-Origin value. Origin allowed to read this response from a browser. * means any origin may read it.
Authentication failed. The request lacks valid credentials or the provided credentials are invalid.
Ensure you have:
- A valid API key or token.
- Proper authentication headers.
- Required permissions.
object
URI reference identifying the problem type. When absent, “about:blank” per RFC 9457 Section 3.1.1.
Short, human-readable summary of the problem type (RFC 9457 Section 3.1.3).
HTTP status code for this occurrence (advisory; same as response status) (RFC 9457 Section 3.1.2).
Human-readable explanation specific to this occurrence (RFC 9457 Section 3.1.4).
URI reference identifying the specific occurrence (RFC 9457 Section 3.1.5).
Always MISSING_OR_INVALID_TOKEN on this response. Branch on this value, not on detail.
Example
{ "type": "about:blank", "title": "Unauthorized", "status": 401, "detail": "The bearer token is missing or invalid.", "code": "MISSING_OR_INVALID_TOKEN"}Headers
Section titled “Headers”Example
1000Maximum number of requests allowed in the current window. Present when this response is rate limited.
Example
42Number of requests still allowed in the current window. 0 means the next call can return 429 until the window resets.
Example
2026-03-20T15:31:00.000ZTime when the current window resets, as ISO 8601 UTC. After this time, X-RateLimit-Remaining starts over.
Example
30HTTP Retry-After value in seconds. Wait at least this long before retrying a 429 response.
Example
*CORS Access-Control-Allow-Origin value. Origin allowed to read this response from a browser. * means any origin may read it.
Forbidden. The server understood the request but refuses to authorize it.
For connector APIs, this often indicates insufficient permissions on the remote system (for example SFTP write access denied).
object
URI reference identifying the problem type. When absent, “about:blank” per RFC 9457 Section 3.1.1.
Short, human-readable summary of the problem type (RFC 9457 Section 3.1.3).
HTTP status code for this occurrence (advisory; same as response status) (RFC 9457 Section 3.1.2).
Human-readable explanation specific to this occurrence (RFC 9457 Section 3.1.4).
URI reference identifying the specific occurrence (RFC 9457 Section 3.1.5).
Always FORBIDDEN on this response. The token was accepted and the action is not allowed.
Example
{ "type": "about:blank", "title": "Forbidden", "status": 403, "detail": "You cannot perform this action.", "code": "FORBIDDEN"}Headers
Section titled “Headers”Example
1000Maximum number of requests allowed in the current window. Present when this response is rate limited.
Example
42Number of requests still allowed in the current window. 0 means the next call can return 429 until the window resets.
Example
2026-03-20T15:31:00.000ZTime when the current window resets, as ISO 8601 UTC. After this time, X-RateLimit-Remaining starts over.
Example
30HTTP Retry-After value in seconds. Wait at least this long before retrying a 429 response.
Example
*CORS Access-Control-Allow-Origin value. Origin allowed to read this response from a browser. * means any origin may read it.
Too many requests. The request rate limit has been exceeded.
Please wait until the rate limit window resets before making additional requests.
object
URI reference identifying the problem type. When absent, “about:blank” per RFC 9457 Section 3.1.1.
Short, human-readable summary of the problem type (RFC 9457 Section 3.1.3).
HTTP status code for this occurrence (advisory; same as response status) (RFC 9457 Section 3.1.2).
Human-readable explanation specific to this occurrence (RFC 9457 Section 3.1.4).
URI reference identifying the specific occurrence (RFC 9457 Section 3.1.5).
Always RATE_LIMIT_EXCEEDED on this response. Wait Retry-After seconds before retrying.
Example
{ "type": "about:blank", "title": "Too Many Requests", "status": 429, "detail": "The request rate limit has been exceeded.", "code": "RATE_LIMIT_EXCEEDED"}Headers
Section titled “Headers”Example
1000Maximum number of requests allowed in the current window. Present when this response is rate limited.
Example
42Number of requests still allowed in the current window. 0 means the next call can return 429 until the window resets.
Example
2026-03-20T15:31:00.000ZTime when the current window resets, as ISO 8601 UTC. After this time, X-RateLimit-Remaining starts over.
Example
30HTTP Retry-After value in seconds. Wait at least this long before retrying a 429 response.
Example
*CORS Access-Control-Allow-Origin value. Origin allowed to read this response from a browser. * means any origin may read it.
Internal server error. The server encountered an unexpected condition that prevented it from fulfilling the request.
Please try again later or contact support if the problem persists.
object
URI reference identifying the problem type. When absent, “about:blank” per RFC 9457 Section 3.1.1.
Short, human-readable summary of the problem type (RFC 9457 Section 3.1.3).
HTTP status code for this occurrence (advisory; same as response status) (RFC 9457 Section 3.1.2).
Human-readable explanation specific to this occurrence (RFC 9457 Section 3.1.4).
URI reference identifying the specific occurrence (RFC 9457 Section 3.1.5).
Always INTERNAL_ERROR on this response. Retry later. Do not retry a create in a tight loop.
Example
{ "type": "about:blank", "title": "Internal Server Error", "status": 500, "detail": "The request could not be completed.", "code": "INTERNAL_ERROR"}Headers
Section titled “Headers”Example
1000Maximum number of requests allowed in the current window. Present when this response is rate limited.
Example
42Number of requests still allowed in the current window. 0 means the next call can return 429 until the window resets.
Example
2026-03-20T15:31:00.000ZTime when the current window resets, as ISO 8601 UTC. After this time, X-RateLimit-Remaining starts over.
Example
30HTTP Retry-After value in seconds. Wait at least this long before retrying a 429 response.
Example
*CORS Access-Control-Allow-Origin value. Origin allowed to read this response from a browser. * means any origin may read it.
Bad gateway. The server received an invalid response from an upstream system (for example a connector or external API).
Verify upstream configuration and try again.
object
URI reference identifying the problem type. When absent, “about:blank” per RFC 9457 Section 3.1.1.
Short, human-readable summary of the problem type (RFC 9457 Section 3.1.3).
HTTP status code for this occurrence (advisory; same as response status) (RFC 9457 Section 3.1.2).
Human-readable explanation specific to this occurrence (RFC 9457 Section 3.1.4).
URI reference identifying the specific occurrence (RFC 9457 Section 3.1.5).
Always BAD_GATEWAY on this response. The upstream system answered in a way this API could not use.
Example
{ "type": "about:blank", "title": "Bad Gateway", "status": 502, "detail": "The upstream system returned an unusable response.", "code": "BAD_GATEWAY"}Headers
Section titled “Headers”Example
1000Maximum number of requests allowed in the current window. Present when this response is rate limited.
Example
42Number of requests still allowed in the current window. 0 means the next call can return 429 until the window resets.
Example
2026-03-20T15:31:00.000ZTime when the current window resets, as ISO 8601 UTC. After this time, X-RateLimit-Remaining starts over.
Example
30HTTP Retry-After value in seconds. Wait at least this long before retrying a 429 response.
Example
*CORS Access-Control-Allow-Origin value. Origin allowed to read this response from a browser. * means any origin may read it.