API ReferenceDeal Wizards

Get the next wizard question

POST
/api/v1/orgs/{orgId}/wizards/{wizardId}/next

Validates the answers so far and returns the next question to ask, required or optional. Send every answer on every call; the server keeps no run state. Answer null to skip an optional question. When the wizard binds to property data and the key holds api_deals_create, a complete address triggers a property lookup whose values come back in prefill.

Requires one of api_deals_list or api_deals_create.

Authorization

bearerAuth
AuthorizationBearer <token>

Bearer token using a Clai API key secret (clai_live_*).

In: header

Path Parameters

NameTypeDescription
orgId
required
string

Organization ID the key is operating in

wizardId
required
string

Wizard ID from listDealWizards or matchDealWizard

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

NameTypeDescription
answers
required
object

Every answer so far, keyed by question id. Send null to skip an optional question. See each question answerFormat.

[key: string]any
definitionVersionstring

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://app.goclai.com/api/v1/orgs/org_2abc123/wizards/starter-real-estate-deal/next" \  -H "Content-Type: application/json" \  -d '{    "answers": {      "property1": null,      "property2": null    }  }'
{
  "definitionVersion": "string",
  "wizardName": "string",
  "complete": true,
  "question": {
    "id": "string",
    "label": "string",
    "helpText": "string",
    "kind": "string",
    "required": true,
    "answerFormat": "string",
    "options": [
      {
        "value": "string",
        "label": "string"
      }
    ],
    "min": 0,
    "max": 0,
    "suffix": "string",
    "placeholder": "string",
    "base": {
      "questionId": "string"
    },
    "propertyLookup": true,
    "folderTypeKey": "string",
    "withinQuestionId": "string",
    "groupId": "string",
    "groupLabel": "string"
  },
  "prefill": {
    "property1": null,
    "property2": null
  },
  "lookup": "not_needed",
  "progress": {
    "position": 1,
    "total": 1
  }
}
{
  "error": {
    "code": "ERROR_CODE",
    "message": "Human-readable error message",
    "details": {}
  }
}
{
  "error": {
    "code": "ERROR_CODE",
    "message": "Human-readable error message",
    "details": {}
  }
}
{
  "error": {
    "code": "ERROR_CODE",
    "message": "Human-readable error message",
    "details": {}
  }
}
{
  "error": {
    "code": "ERROR_CODE",
    "message": "Human-readable error message",
    "details": {}
  }
}
{
  "error": {
    "code": "ERROR_CODE",
    "message": "Human-readable error message",
    "details": {}
  }
}
{
  "error": {
    "code": "ERROR_CODE",
    "message": "Human-readable error message",
    "details": {}
  }
}
{
  "error": {
    "code": "ERROR_CODE",
    "message": "Human-readable error message",
    "details": {}
  }
}