Create a consultation
const url = 'https://client-api.abi.ai/consultation';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"userId":"abi12345","question":"I have a burning sensation after dinner. Could this be acid reflux?","attachments":["https://clientdomain.example/attachments/consultation-image.jpg"]}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}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" ] }'Authorizations
Section titled “Authorizations”Request Bodyrequired
Section titled “Request Bodyrequired”Create one medical question for an existing Abi user. Attachments must be approved, reachable URLs.
object
The Abi identifier of the user submitting the consultation.
Example
abi12345The medical question submitted by the user.
Example
I have a burning sensation after dinner. Could this be acid reflux?Optional approved image or document URLs supplied with the question.
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" ]}Responses
Section titled “Responses”Consultation created. The new consultation is open and does not yet include a professional answer.
Core consultation details returned immediately after creation. Retrieve the consultation to view its full current state.
object
The Abi identifier assigned to the new consultation.
The initial consultation workflow status.
The Abi identifier of the user who submitted the consultation.
The date and time the consultation was created in Abi.
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.
object
Short machine-readable error code.
Human-readable explanation of the error.
Examplegenerated
{ "code": "example", "message": "example"}Request could not be completed.
object
Short machine-readable error code.
Human-readable explanation of the error.
Examplegenerated
{ "code": "example", "message": "example"}An open consultation already exists for this user. The id identifies that consultation.
object
Indicates the user already has an open consultation.
Identifier of the existing open consultation.
Example
{ "name": "alreadyCreated", "id": "8910zyx321cba"}