ghl_clientportal_apply_project_change
Applies a signed change plan to a client portal project exactly once, returning the original result on repeated applies and flagging stale or expired plans.
Instructions
CLIENT PORTAL AI BUILDER API (/ai-builder-api) — side-effecting: opens/edits sandboxes and starts builds. Edit a sandbox only once sandbox.status is ready; checkpoint after edits and before starting the run that builds them; 409 means a cloud build owns the sandbox or it is not running.
Apply a signed plan once.
Idempotent on planId: a second (or concurrent) apply of the same plan
returns the first apply's result without writing again (queued while
the first is still running). Apply re-checks the stored change against
what exists now; when it moved, the answer is 409 change_plan_stale
with a fix (plan again). An expired plan is 409 too. A partial result
stays open: applying the same plan again finishes only what is left.
Another location's or project's plan is 404.
Endpoint: POST /ai-builder-api/projects/{projectId}/changes/apply (Version header: v3; source: v3/clientportal-ai-v3.json)
OAuth scopes: clientportal-ai.write
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| body | Yes | Request body (schema carried verbatim from the official OpenAPI spec). | |
| projectId | Yes | The project's id. |