Skip to main content
Use this page when an API already exists and you need to decide the next operation. If you are operating through the CLI instead of raw HTTP, the equivalent commands are:

Quick choice

  • Choose revise when the website is still the right target and you need to change the build instructions, such as missing fields, extra fields, the wrong focus, or a tighter schema.
  • Choose rebuild when the website changed, runtime health recommends it, or endpoint calls now fail broadly.
  • Choose respond when the API is paused in needs_input.

What each operation does

  • GET /v1/apis/{api_id}
    • Returns the current API record.
    • Use it to inspect status, endpoints, endpoint runtime_policy and runtime_verification, failure, failure_reason_code, and user_input_prompt.
  • GET /v1/apis/{api_id}/health
    • Returns binding-level runtime health when an API is published, or build-stage health when it has not published a binding yet.
    • Use it to inspect status, task_status, detail, recommended_action, failure, counters, timestamps, and per-endpoint health.
  • POST /v1/apis/{api_id}/respond
    • Sends a response only when the API status is needs_input.
    • Optional body flags: wait_for_completion, timeout_ms.
  • POST /v1/apis/{api_id}/revise
    • Queues a revision with new instructions.
    • Use it when the target is still right but the build intent needs to change.
  • POST /v1/apis/{api_id}/rebuild
    • Queues a fresh rebuild from the same binding.
    • Use it when the underlying site or request surface likely changed.
The API id is the durable identity. Endpoint names and schemas can change after a successful revise or rebuild, so re-inspect the API before calling an updated endpoint.

Decision rules

Status handling

If runtime calls are failing on a previously healthy endpoint, the runtime error_code catalog in Errors helps you decide between retry, rebuild, and revise.

Health semantics

GET /v1/apis/{api_id}/health returns one of three health shapes. For a published API, it returns binding-level runtime health:
For an API that exists but has not published a binding, it returns build-stage health:
If the build failed before publishing, the same route returns status: "build_failed", task_status: "failed", failure_reason_code, a detail string with the build failure context, a top-level recommended_action copied from the structured failure, and the same structured failure object exposed by GET /v1/apis/{api_id}.

Re-validate after any update

Call the same endpoint name again after respond, revise, or rebuild.
Re-check:
  • api.status
  • api.failure
  • endpoint list
  • one or two critical runtime calls
If the endpoint contract changed unexpectedly, stop and inspect before widening usage. CLI equivalents: