Skip to content

Create a consultation

POST
/consultation
curl --request POST \
--url https://client-api.abi.ai/consultation \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "userId": "abi12345", "question": "I have a burning sensation after dinner. Could this be acid reflux?", "attachments": [ "https://clientdomain.example/attachments/consultation-image.jpg" ] }'
Media typeapplication/json

Create one medical question for an existing Abi user. Attachments must be approved, reachable URLs.

object
userId
required

The Abi identifier of the user submitting the consultation.

string
Example
abi12345
question
required

The medical question submitted by the user.

string
Example
I have a burning sensation after dinner. Could this be acid reflux?
attachments

Optional approved image or document URLs supplied with the question.

Array<string>
Example
[
"https://clientdomain.example/attachments/consultation-image.jpg"
]
Example
{
"userId": "abi12345",
"question": "I have a burning sensation after dinner. Could this be acid reflux?",
"attachments": [
"https://clientdomain.example/attachments/consultation-image.jpg"
]
}

Consultation created. The new consultation is open and does not yet include a professional answer.

Media typeapplication/json

Core consultation details returned immediately after creation. Retrieve the consultation to view its full current state.

object
consultationId
required

The Abi identifier assigned to the new consultation.

string
status
required

The initial consultation workflow status.

string
userId
required

The Abi identifier of the user who submitted the consultation.

string
createdAt
required

The date and time the consultation was created in Abi.

string format: date-time
key
additional properties
any
Example
{
"consultationId": "8910zyx321cba",
"status": "open",
"userId": "abi12345",
"createdAt": "2025-08-28T10:12:30.000Z",
"questions": [
{
"question": "I have a burning sensation after dinner. Could this be acid reflux?",
"attachments": [
"https://clientdomain.example/attachments/consultation-image.jpg"
]
}
],
"lastClaim": {},
"paymentInformation": {
"userIsRequiredToPay": false
}
}

Request could not be completed.

Media typeapplication/json
object
code

Short machine-readable error code.

string
message

Human-readable explanation of the error.

string
Examplegenerated
{
"code": "example",
"message": "example"
}

Request could not be completed.

Media typeapplication/json
object
code

Short machine-readable error code.

string
message

Human-readable explanation of the error.

string
Examplegenerated
{
"code": "example",
"message": "example"
}

An open consultation already exists for this user. The id identifies that consultation.

Media typeapplication/json
object
name

Indicates the user already has an open consultation.

string
Allowed values: alreadyCreated
id

Identifier of the existing open consultation.

string
Example
{
"name": "alreadyCreated",
"id": "8910zyx321cba"
}