---
title: "Prepare, confirm, or reject sandbox provider AI actions"
method: POST
path: "/providers/current/ai/actions"
tags: ["Provider AI"]
---

# Prepare, confirm, or reject sandbox provider AI actions

`POST /providers/current/ai/actions`

## Request

- Base URL: `https://platform-api.homejourney.sg/v1`
- URL: `https://platform-api.homejourney.sg/v1/providers/current/ai/actions`
- Auth: HTTP bearer

Prepares, confirms, or rejects a sandbox provider AI action through the REST API. Missing confirmation returns a safe continuation without writing. Confirmed and rejected actions require an action-specific provider scope, active provider grant, explicit disposition flag, and Idempotency-Key. Rejection records the no-side-effect decision; this route never calls external scheduler, CRM, accounting, DNS, payout, marketplace, or payment systems directly.

## Headers

- `X-Correlation-Id` string
- `Idempotency-Key` string, required

## Request body

- ProviderAiActionRequest
  - `action` 'prepare_reply' | 'confirm_reply' | 'prepare_website_draft' | 'apply_website_draft' | 'revoke_connection' | 'create_booking_request', required
  - `target_id` string
  - `instruction` string
  - `message` string
  - `draft_config` object
  - `connection_id` string
  - `provider_grant_status` 'active' | 'revoked'
  - `confirm_reply` true
  - `confirm_apply` true
  - `confirm_revoke` true
  - `confirm_create` true
  - `reject_action` true
  - `rejection_reason` string

## Response `200`

Prepared, confirmed, or rejected sandbox provider AI action.

- ProviderAiActionResponse
  - `ok` true, required
  - `action` 'prepare_reply' | 'confirm_reply' | 'prepare_website_draft' | 'apply_website_draft' | 'revoke_connection' | 'create_booking_request', required
  - `action_id` string, required
  - `status` 'prepared' | 'requires_confirmation' | 'confirmed' | 'rejected', required
  - `required_scope` 'organizations.read' | 'onboarding.write' | 'credentials.write' | 'listings.read' | 'listings.write' | 'viewings.read' | 'viewings.write' | 'webhooks.read' | 'webhooks.write' | 'sandbox.reset' | 'agent.profile.read' | 'agent.profile.write' | 'agent.listings.read' | 'agent.listings.write' | 'agent.listings.publish' | 'agent.leads.read' | 'agent.leads.write' | 'agent.clients.read' | 'agent.clients.write' | 'agent.viewings.read' | 'agent.viewings.write' | 'agent.distribution.read' | 'agent.distribution.manage' | 'agent.analytics.read' | 'agency.roster.read' | 'agency.roster.manage' | 'agency.teams.manage' | 'agency.listings.read' | 'agency.listings.manage' | 'agency.leads.route' | 'agency.analytics.read' | 'agency.audit.read' | 'agency.integrations.manage' | 'sites.read' | 'sites.write' | 'sites.publish' | 'sites.domains.manage' | 'forms.read' | 'forms.write' | 'forms.submissions.read' | 'scheduling.read' | 'scheduling.write' | 'crm.read' | 'crm.write' | 'crm.sync' | 'widgets.embed' | 'developers.projects.read' | 'developers.projects.write' | 'developers.inventory.read' | 'developers.inventory.write' | 'developers.inventory.publish' | 'developers.prices.read' | 'developers.prices.write' | 'developers.media.write' | 'developers.showflat.read' | 'developers.showflat.write' | 'developers.leads.read' | 'developers.leads.route' | 'renovations.projects.read' | 'renovations.projects.write' | 'development_professional_services.projects.read' | 'valuation_appraisal.cases.read' | 'valuations.read' | 'valuations.embed_keys.read' | 'valuations.embed_keys.write' | 'portfolio.read' | 'property_management.units.read' | 'geospatial.read' | 'insurance_move_in.cases.read' | 'insurance_move_in.cases.write' | 'advertising.campaigns.read' | 'advertising.campaigns.write' | 'advertising.analytics.read' | 'business_directory.profiles.read' | 'business_directory.profiles.write' | 'banks.frontends.read' | 'banks.frontends.write' | 'banks.frontends.publish' | 'banks.eligibility.read' | 'banks.rates.read' | 'banks.products.read' | 'banks.applications.read' | 'banks.applications.write' | 'banks.applications.status.write' | 'banks.documents.read' | 'banks.documents.manifest.write' | 'banks.callbacks.manage' | 'banks.staff.read' | 'banks.staff.manage' | 'banks.audit.read' | 'official_sources.read' | 'official_sources.datasets.read' | 'official_sources.freshness.read' | 'official_sources.audit.read' | 'official_sources.refresh' | 'official_sources.credentials.manage' | 'official_sources.admin' | 'services.bookings.read' | 'services.payments.read' | 'services.payments.write' | 'services.payouts.read' | 'services.payouts.manage' | 'services.payouts.admin' | 'services.settlement.reconcile' | 'platform.billing_owner_visibility.read' | 'platform.import_export_readiness.read' | 'provider_workspace.read' | 'provider_leads.read' | 'provider_leads.manage' | 'provider_bookings.read' | 'provider_bookings.manage' | 'provider_conversations.write' | 'provider_integrations.manage' | 'provider_integrations.sync' | 'provider_catalog.read' | 'provider_sites.read' | 'provider_sites.write' | 'provider_sites.publish' | 'provider_ai.permissions.manage' | 'transactions.read' | 'transactions.write' | 'transactions.documents.read' | 'transactions.documents.write' | 'transactions.milestones.write' | 'conveyancing.matters.read' | 'conveyancing.matters.write' | 'conveyancing.law_firms.manage' | 'conveyancing.audit.read' | 'conveyancing.shares.write' | 'stamp_duty.status.read' | 'stamp_duty.status.write' | 'consents.read' | 'consents.write' | 'document_shares.read' | 'document_shares.write' | 'agent_hosts.read' | 'agent_hosts.write', required: Approved additive platform scope string. Domain scopes are contract-defined for future routes but are not granted to the slice-1 sandbox fixture by default.
  - `required_confirmation` string, nullable, required
  - `idempotency_required` boolean, required
  - `provider` object, required
    - `id` 'sandbox-provider-cleaning', required
    - `environment` 'sandbox', required
  - `side_effects` ProviderAiActionSideEffects, required
    - `route_backed_audit` boolean, required
    - `direct_external_system_calls` false, required
    - `customer_visible_write` false, required
    - `provider_workspace_review_created` boolean, required
    - `website_draft_applied` boolean, required
    - `published` false, required
    - `appointment_confirmed` false, required
    - `booking_request_created` boolean, required
    - `connection_revoked` boolean, required
  - `continuation` ProviderAiActionContinuation, required
    - `url` string, uri, required
    - `handoff_required` boolean, required
    - `reason` string, nullable, required
  - `safety` ProviderAiActionSafety, required
    - `stale_external_scheduler_blocks_confirmation` boolean, required
    - `external_system_certified` false, required
    - `provider_grant_status` 'active', required
    - `confirmation_recorded` boolean, required
  - `principal` Principal, required (unresolved $ref)
  - `livemode` false, required
  - `request_id` string, required

## Other responses

- `400`: Request validation failed.
- `401`: Missing or invalid platform API key.
- `403`: Credential, environment, or scope is not allowed.
- `404`: Platform API feature or resource is not available.
- `409`: Idempotency key is in progress or conflicts with an earlier request body.
- `429`: Rate limit exceeded.
- `500`: Unexpected platform API failure.

---

[API](https://skmtc.dev/homejourney/apis/homejourney-platform-api.md) · [All operations](https://skmtc.dev/homejourney/apis/homejourney-platform-api/llms.txt) · [OpenAPI document](https://skmtc.dev/homejourney/apis/homejourney-platform-api/revisions/a2c6fe063db1?raw)
