Ask an agent on a call, deal or account
Changed onAsks the Modjo AI on a single call, deal or account and waits for the answer, returned as JSON matching the provided schema. The answer is generated by an artificial intelligence system and can be inaccurate, so review it before relying on it and disclose to end users that it was generated by AI. Answers usually take 30 seconds to 2 minutes and can take up to 5 minutes, so set your HTTP client timeout to at least 300 seconds. 502 and 504 errors are safe to retry. With background: true, the API answers 202 at once instead, and you read the result with GET /agents/ask/{runUuid}. This is a private feature: contact your Modjo account manager to learn more and request access.
Request
- Base URLhttps://api.modjo.ai/v2
- URLhttps://api.modjo.ai/v2/agents/ask
- AuthHTTP bearer
Request body
Example request
{
"scope": {
"id": 1
},
"instructions": "Answer in English and stay factual.",
"responseFormat": {
"json_schema": {
"name": "call_qualification",
"schema": {
"type": "object",
"properties": {
"budget": {
"type": "string",
"description": "Budget mentioned by the prospect"
},
"nextStep": {
"type": "string",
"description": "Next step agreed with the prospect"
}
},
"required": [
"budget",
"nextStep"
],
"additionalProperties": false
}
}
}
}Response
Structured answer
Example response
{
"id": "0b7efa49c2d84e5f9a1b3c5d7e9f0a12",
"scope": {
"id": 1
},
"output": {
"budget": "50k EUR",
"nextStep": null
}
}Changes
- info
added the new optional request property
- info
added the non-success response with the status
- info
added the success response with the status
- info
- info
endpoint added
- info