iotoms Docs

Confirm an AI customer proposal

POST
/api/v1/ai/agent/confirm/{proposalId}

Applies a pending AI proposal, creating or updating the customer. Pass edits to override extracted fields first. Each proposal can be confirmed once and expires after 5 minutes.

How to use it

  1. Take the proposalId from Propose a customer change with AI, within 5 minutes.
  2. Optionally send edits to correct proposed fields; new customers need at least a first name and an email.
  3. The customer is created (ACTIVE) or updated and marked as AI-assisted; the proposal is used up. A failed confirm can be retried with corrections.

Authorization

BearerAuth
headerAuthorizationBearer <JWT>

Path Parameters

proposalId*string

ID of the proposal returned by /propose

Header Parameters

Request Body

application/json
  1. body
edits?|

Optional corrections to the proposed fields before saving, keyed by field name (e.g. {"email": "a@b.com"}). The target customer number cannot be changed.

Response Body

OK

*/*
  1. response
status*string

Outcome of the call: SUCCESS when the request was handled, ERROR otherwise.

message*string

Short human-readable message describing the outcome, e.g. which record was fetched or saved.

data?

Which customer was created or updated from the proposal.

Example Request
curl -X POST 'https://beta.iotoms.com/api/v1/ai/agent/confirm/string' \  -H 'Content-Type: application/json' \  -d '{}'
Example Response
{  "status": "string",  "message": "string",  "data": {    "entityType": "CUSTOMER",    "entityId": "string",    "message": "string",    "aiSessionId": "string"  }}