Skip to main content
POST
/
solutions
/
generate
Generate solutions
curl --request POST \
  --url https://app2.freyavoice.ai/api/v2/solutions/generate \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "agentId": "<string>",
  "workspaceId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "problemIds": [
    "3c90c3cc-0d44-4b50-8888-8dd25736052a"
  ]
}
'
{
  "success": true,
  "data": {
    "message": "<string>",
    "result": {
      "success": true,
      "run": {
        "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
        "workspaceId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
        "agentId": "<string>",
        "status": "generating",
        "problemCount": 123,
        "solutionCount": 123,
        "acceptedCount": 123,
        "rejectedCount": 123,
        "createdAt": "<string>",
        "error": "<string>",
        "completedAt": "<string>",
        "solutions": [
          {
            "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
            "runId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
            "title": "<string>",
            "change": {
              "path": "<string>",
              "operation": "set",
              "oldValue": "<unknown>",
              "newValue": "<unknown>",
              "diff": "<string>"
            },
            "explanation": "<string>",
            "status": "pending",
            "displayOrder": 123,
            "createdAt": "<string>",
            "reviewedAt": "<string>",
            "problemIds": [
              "3c90c3cc-0d44-4b50-8888-8dd25736052a"
            ],
            "problems": [
              {
                "problem": "<string>",
                "id": "<string>",
                "workspaceId": "<string>",
                "callId": "<string>",
                "agentId": "<string>",
                "description": "<string>",
                "type": "system",
                "severity": 0.5,
                "status": "open",
                "assignedTo": "<string>",
                "createdBy": "ai",
                "messageId": "<string>",
                "resolved": false,
                "resolvedAt": "<string>",
                "resolvedBy": "<string>",
                "solutionId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
                "createdAt": "<string>",
                "updatedAt": "<string>",
                "callStartedAt": "<string>",
                "customerNumber": "<string>",
                "agentName": "<string>",
                "resolvedByName": "<string>",
                "assignees": [
                  {
                    "userId": "<string>",
                    "assignedAt": "<string>",
                    "userName": "<string>"
                  }
                ],
                "commentsCount": 123,
                "isArchived": false
              }
            ],
            "patchDecisions": {}
          }
        ]
      },
      "error": "<string>"
    }
  }
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json
agentId
string
required
workspaceId
string<uuid>
required
problemIds
string<uuid>[]

Response

Solution generation started

success
enum<boolean>
required
Available options:
true,
false
data
object
required