Keystone Developers
Open Keystone
API reference

Internal API

Website modifications

17 endpoints.

GET/api/v1/internal/businesses/{business_id}/website-mod/check-gate

Get Website Mod Check Gate

``{blocked, status, problems, message}``: whether the pending change's browser check holds it back (the inbox router's guard on a chat "yes").

Parameters

NameInTypeDescription
business_idrequiredpathstring (uuid)
x-internal-api-keyheaderstring | null

Responses

200Successful Response
application/jsonSuccessResponse_dict_str__Any__
FieldTypeDescription
request_idrequiredstring
successtruedefault true
datarequiredobject
metadataResponseMetadata | null
ResponseMetadata fields
FieldTypeDescription
paginationPaginationMetadata | null
PaginationMetadata fields
FieldTypeDescription
limitrequiredinteger
next_cursorstring | null
prev_cursorstring | null
has_morerequiredboolean
has_prevbooleandefault false
total_countinteger | null
status_countsobject | null
object | null fields

Map of string to integer

lifecycle_countsLifecycleCounts | null
LifecycleCounts fields
FieldTypeDescription
leadintegerdefault 0
prospectintegerdefault 0
customerintegerdefault 0
former_customerintegerdefault 0
classification_countsClassificationCounts | null
ClassificationCounts fields
FieldTypeDescription
signalobject
object fields

Nested object (not expanded)

touchobject
object fields

Nested object (not expanded)

stageobject
object fields

Nested object (not expanded)

metaResponseMeta | null
ResponseMeta fields
FieldTypeDescription
totalinteger | null
total_countinteger | null
pageinteger | null
per_pageinteger | null
  • 400Bad request
  • 401Unauthorized
  • 403Forbidden
  • 404Not found
  • 422Validation error
  • 500Internal server error
  • 503Service unavailable

Error bodies: ErrorResponse. See Errors.

GET/api/v1/internal/businesses/{business_id}/website-mod/context

Get Website Mod Context

Parameters

NameInTypeDescription
business_idrequiredpathstring (uuid)
verify_repoquerybooleandefault false
x-internal-api-keyheaderstring | null

Responses

200Successful Response
application/jsonSuccessResponse_dict_str__Any__
FieldTypeDescription
request_idrequiredstring
successtruedefault true
datarequiredobject
metadataResponseMetadata | null
ResponseMetadata fields

ResponseMetadata, expanded above.

metaResponseMeta | null
ResponseMeta fields

ResponseMeta, expanded above.

  • 400Bad request
  • 401Unauthorized
  • 403Forbidden
  • 404Not found
  • 422Validation error
  • 500Internal server error
  • 503Service unavailable

Error bodies: ErrorResponse. See Errors.

GET/api/v1/internal/businesses/{business_id}/website-mod/pending-changes

Get Pending Website Mod Changes

List console-safe pending website-mod changes for a business (no GitHub PR fields).

Parameters

NameInTypeDescription
business_idrequiredpathstring (uuid)
x-internal-api-keyheaderstring | null

Responses

200Successful Response
application/jsonSuccessResponse_dict_str__Any__
FieldTypeDescription
request_idrequiredstring
successtruedefault true
datarequiredobject
metadataResponseMetadata | null
ResponseMetadata fields

ResponseMetadata, expanded above.

metaResponseMeta | null
ResponseMeta fields

ResponseMeta, expanded above.

  • 400Bad request
  • 401Unauthorized
  • 403Forbidden
  • 404Not found
  • 422Validation error
  • 500Internal server error
  • 503Service unavailable

Error bodies: ErrorResponse. See Errors.

POST/api/v1/internal/businesses/{business_id}/website-mod/requirements/texts

Post Website Mod Requirement Texts

Return decoded requirement document text for router clarify / plan hydration.

Parameters

NameInTypeDescription
business_idrequiredpathstring (uuid)
x-internal-api-keyheaderstring | null

Request bodyrequired

application/jsonRequirementTextsRequest
FieldTypeDescription
file_idsstring[]max items 10
string[] fields

Responses

200Successful Response
application/jsonSuccessResponse_dict_str__Any__
FieldTypeDescription
request_idrequiredstring
successtruedefault true
datarequiredobject
metadataResponseMetadata | null
ResponseMetadata fields

ResponseMetadata, expanded above.

metaResponseMeta | null
ResponseMeta fields

ResponseMeta, expanded above.

  • 400Bad request
  • 401Unauthorized
  • 403Forbidden
  • 404Not found
  • 422Validation error
  • 500Internal server error
  • 503Service unavailable

Error bodies: ErrorResponse. See Errors.

POST/api/v1/internal/website-mod/agent-callback

Post Website Mod Agent Callback

Store agent job outcome for SOR plan polling (Redis, keyed by plan_request_id).

Parameters

NameInTypeDescription
x-internal-api-keyheaderstring | null

Request bodyrequired

application/jsonWebsiteModAgentCallbackRequest
FieldTypeDescription
plan_request_idrequiredstring
website_idrequiredstring | string (uuid)
string | string (uuid) fields
string
string (uuid)
statusrequiredstring
summarystringdefault ""
agent_messagestringdefault ""
file_updatesobject[]
object[] fields
primitivesobject[]
object[] fields
errorstringdefault ""
cost_usdnumber | null
duration_snumber | null
run_idstringdefault ""
smokeobject | null
confirmationobject | null
denied_commandsstring[]
string[] fields
stop_sourcestringdefault ""
modelstringdefault ""
usageobject | null
browser_checkobject | null
check_onlybooleandefault false
interruptobject | null
notes_deliveredstring[]
string[] fields
fetched_urlsobject[]
object[] fields
notes_pendingstring[]
string[] fields

Responses

200Successful Response
application/jsonSuccessResponse_dict_str__Any__
FieldTypeDescription
request_idrequiredstring
successtruedefault true
datarequiredobject
metadataResponseMetadata | null
ResponseMetadata fields

ResponseMetadata, expanded above.

metaResponseMeta | null
ResponseMeta fields

ResponseMeta, expanded above.

  • 400Bad request
  • 401Unauthorized
  • 403Forbidden
  • 404Not found
  • 422Validation error
  • 500Internal server error
  • 503Service unavailable

Error bodies: ErrorResponse. See Errors.

POST/api/v1/internal/website-mod/agent-progress

Post Website Mod Agent Progress

Append a sanitized progress event for the live console activity feed.

Parameters

NameInTypeDescription
x-internal-api-keyheaderstring | null

Request bodyrequired

application/jsonWebsiteModAgentProgressRequest
FieldTypeDescription
plan_request_idrequiredstring
website_idrequiredstring | string (uuid)
string | string (uuid) fields
string
string (uuid)
seqrequiredinteger
tsinteger | null
kindrequiredstring
stagestring | null
textstring | null
toolstring | null
labelstring | null
blockstring | null
statusstring | null
partialbooleandefault false
artifactstring | null

Responses

200Successful Response
application/jsonSuccessResponse_dict_str__Any__
FieldTypeDescription
request_idrequiredstring
successtruedefault true
datarequiredobject
metadataResponseMetadata | null
ResponseMetadata fields

ResponseMetadata, expanded above.

metaResponseMeta | null
ResponseMeta fields

ResponseMeta, expanded above.

  • 400Bad request
  • 401Unauthorized
  • 403Forbidden
  • 404Not found
  • 422Validation error
  • 500Internal server error
  • 503Service unavailable

Error bodies: ErrorResponse. See Errors.

POST/api/v1/internal/website-mod/check-artifacts

Post Website Mod Check Artifact

One browser-check screenshot from a session pod, while its run is going (or its "Check again" run is marked). The image is the raw request body.

Parameters

NameInTypeDescription
plan_request_idrequiredquerystring
routerequiredquerystring
viewportrequiredquerystring
kindquerystringdefault "fold"
x-internal-api-keyheaderstring | null

Responses

200Successful Response
application/jsonSuccessResponse_dict_str__Any__
FieldTypeDescription
request_idrequiredstring
successtruedefault true
datarequiredobject
metadataResponseMetadata | null
ResponseMetadata fields

ResponseMetadata, expanded above.

metaResponseMeta | null
ResponseMeta fields

ResponseMeta, expanded above.

  • 400Bad request
  • 401Unauthorized
  • 403Forbidden
  • 404Not found
  • 422Validation error
  • 500Internal server error
  • 503Service unavailable

Error bodies: ErrorResponse. See Errors.

POST/api/v1/internal/website-mod/deploy-reconcile

Post Website Mod Deploy Reconcile

Kairos HTTP callback: poll pending website-mod deploys and self-reschedule.

Parameters

NameInTypeDescription
x-internal-api-keyheaderstring | null

Responses

200Successful Response
application/jsonSuccessResponse_dict_str__Any__
FieldTypeDescription
request_idrequiredstring
successtruedefault true
datarequiredobject
metadataResponseMetadata | null
ResponseMetadata fields

ResponseMetadata, expanded above.

metaResponseMeta | null
ResponseMeta fields

ResponseMeta, expanded above.

  • 400Bad request
  • 401Unauthorized
  • 403Forbidden
  • 404Not found
  • 422Validation error
  • 500Internal server error
  • 503Service unavailable

Error bodies: ErrorResponse. See Errors.

POST/api/v1/internal/workflow-engine/website-mod/cancel-pending

Post Cancel Pending Website Mod

Clear Redis pending-change + release repo lock after reject/cancel.

``tombstone_run``: the engine, giving up on a plan, knows the run is over. The run's cancelled tombstone is laid FIRST — it is what stops a sor plan handler still executing past the engine's hangup from registering a change nobody can publish (it answers the cancelled terminal at its late check instead; prod KS-2485) — then the usual scoped cleanup runs.

Parameters

NameInTypeDescription
x-internal-api-keyheaderstring | null

Request bodyrequired

application/jsonobject

Responses

200Successful Response
application/jsonSuccessResponse_dict_str__Any__
FieldTypeDescription
request_idrequiredstring
successtruedefault true
datarequiredobject
metadataResponseMetadata | null
ResponseMetadata fields

ResponseMetadata, expanded above.

metaResponseMeta | null
ResponseMeta fields

ResponseMeta, expanded above.

  • 400Bad request
  • 401Unauthorized
  • 403Forbidden
  • 404Not found
  • 422Validation error
  • 500Internal server error
  • 503Service unavailable

Error bodies: ErrorResponse. See Errors.

POST/api/v1/internal/workflow-engine/website-mod/deploy-status

Post Deploy Status

Poll GitHub Actions deploy.yml status for a pending website-mod production deploy.

Parameters

NameInTypeDescription
x-internal-api-keyheaderstring | null

Request bodyrequired

application/jsonobject

Responses

200Successful Response
application/jsonSuccessResponse_dict_str__Any__
FieldTypeDescription
request_idrequiredstring
successtruedefault true
datarequiredobject
metadataResponseMetadata | null
ResponseMetadata fields

ResponseMetadata, expanded above.

metaResponseMeta | null
ResponseMeta fields

ResponseMeta, expanded above.

  • 400Bad request
  • 401Unauthorized
  • 403Forbidden
  • 404Not found
  • 422Validation error
  • 500Internal server error
  • 503Service unavailable

Error bodies: ErrorResponse. See Errors.

POST/api/v1/internal/workflow-engine/website-mod/gate-status

Post Website Mod Gate Status

Read-mostly gate probe (Redis + open Keystone PRs + lock) after GH reconcile.

Parameters

NameInTypeDescription
x-internal-api-keyheaderstring | null

Request bodyrequired

application/jsonobject

Responses

200Successful Response
application/jsonSuccessResponse_dict_str__Any__
FieldTypeDescription
request_idrequiredstring
successtruedefault true
datarequiredobject
metadataResponseMetadata | null
ResponseMetadata fields

ResponseMetadata, expanded above.

metaResponseMeta | null
ResponseMeta fields

ResponseMeta, expanded above.

  • 400Bad request
  • 401Unauthorized
  • 403Forbidden
  • 404Not found
  • 422Validation error
  • 500Internal server error
  • 503Service unavailable

Error bodies: ErrorResponse. See Errors.

POST/api/v1/internal/workflow-engine/website-mod/merge-deploy

Post Merge Deploy

Merge an approved PR and best-effort trigger ``deploy.yml``.

Parameters

NameInTypeDescription
x-internal-api-keyheaderstring | null

Request bodyrequired

application/jsonobject

Responses

200Successful Response
application/jsonSuccessResponse_dict_str__Any__
FieldTypeDescription
request_idrequiredstring
successtruedefault true
datarequiredobject
metadataResponseMetadata | null
ResponseMetadata fields

ResponseMetadata, expanded above.

metaResponseMeta | null
ResponseMeta fields

ResponseMeta, expanded above.

  • 400Bad request
  • 401Unauthorized
  • 403Forbidden
  • 404Not found
  • 422Validation error
  • 500Internal server error
  • 503Service unavailable

Error bodies: ErrorResponse. See Errors.

POST/api/v1/internal/workflow-engine/website-mod/plan-and-open-pr

Post Plan And Open Pr

Parameters

NameInTypeDescription
x-internal-api-keyheaderstring | null

Request bodyrequired

application/jsonPlanAndOpenPrRequest
FieldTypeDescription
business_idrequiredstring | string (uuid)
string | string (uuid) fields
string
string (uuid)
workflow_run_idstringdefault ""
thread_idstringdefault ""
extracted_dataobject | null
force_repo_map_refreshbooleandefault false
plan_modesstring[] | null
string[] | null fields

Responses

200Successful Response
application/jsonSuccessResponse_dict_str__Any__
FieldTypeDescription
request_idrequiredstring
successtruedefault true
datarequiredobject
metadataResponseMetadata | null
ResponseMetadata fields

ResponseMetadata, expanded above.

metaResponseMeta | null
ResponseMeta fields

ResponseMeta, expanded above.

  • 400Bad request
  • 401Unauthorized
  • 403Forbidden
  • 404Not found
  • 422Validation error
  • 500Internal server error
  • 503Service unavailable

Error bodies: ErrorResponse. See Errors.

POST/api/v1/internal/workflow-engine/website-mod/preview-status

Post Preview Status

Poll for the Cloudflare version preview URL of a website-mod PR branch.

Parameters

NameInTypeDescription
x-internal-api-keyheaderstring | null

Request bodyrequired

application/jsonobject

Responses

200Successful Response
application/jsonSuccessResponse_dict_str__Any__
FieldTypeDescription
request_idrequiredstring
successtruedefault true
datarequiredobject
metadataResponseMetadata | null
ResponseMetadata fields

ResponseMetadata, expanded above.

metaResponseMeta | null
ResponseMeta fields

ResponseMeta, expanded above.

  • 400Bad request
  • 401Unauthorized
  • 403Forbidden
  • 404Not found
  • 422Validation error
  • 500Internal server error
  • 503Service unavailable

Error bodies: ErrorResponse. See Errors.

POST/api/v1/internal/workflow-engine/website-mod/reconcile-pending

Post Website Mod Reconcile Pending

Align Redis + repo_locks with open Keystone website-mod PRs (GitHub = SoT).

Parameters

NameInTypeDescription
x-internal-api-keyheaderstring | null

Request bodyrequired

application/jsonobject

Responses

200Successful Response
application/jsonSuccessResponse_dict_str__Any__
FieldTypeDescription
request_idrequiredstring
successtruedefault true
datarequiredobject
metadataResponseMetadata | null
ResponseMetadata fields

ResponseMetadata, expanded above.

metaResponseMeta | null
ResponseMeta fields

ResponseMeta, expanded above.

  • 400Bad request
  • 401Unauthorized
  • 403Forbidden
  • 404Not found
  • 422Validation error
  • 500Internal server error
  • 503Service unavailable

Error bodies: ErrorResponse. See Errors.

POST/api/v1/internal/workflow-engine/website-mod/repo-lock/acquire

Post Acquire Repo Lock

Parameters

NameInTypeDescription
x-internal-api-keyheaderstring | null

Request bodyrequired

application/jsonobject

Responses

200Successful Response
application/jsonSuccessResponse_dict_str__Any__
FieldTypeDescription
request_idrequiredstring
successtruedefault true
datarequiredobject
metadataResponseMetadata | null
ResponseMetadata fields

ResponseMetadata, expanded above.

metaResponseMeta | null
ResponseMeta fields

ResponseMeta, expanded above.

  • 400Bad request
  • 401Unauthorized
  • 403Forbidden
  • 404Not found
  • 422Validation error
  • 500Internal server error
  • 503Service unavailable

Error bodies: ErrorResponse. See Errors.

POST/api/v1/internal/workflow-engine/website-mod/repo-lock/release

Post Release Repo Lock

Parameters

NameInTypeDescription
x-internal-api-keyheaderstring | null

Request bodyrequired

application/jsonobject

Responses

200Successful Response
application/jsonSuccessResponse_dict_str__Any__
FieldTypeDescription
request_idrequiredstring
successtruedefault true
datarequiredobject
metadataResponseMetadata | null
ResponseMetadata fields

ResponseMetadata, expanded above.

metaResponseMeta | null
ResponseMeta fields

ResponseMeta, expanded above.

  • 400Bad request
  • 401Unauthorized
  • 403Forbidden
  • 404Not found
  • 422Validation error
  • 500Internal server error
  • 503Service unavailable

Error bodies: ErrorResponse. See Errors.