Skip to main content
POST
/
simulations
Create simulation
curl --request POST \
  --url https://app2.freyavoice.ai/api/v2/simulations \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "workspaceId": "<string>",
  "name": "<string>",
  "agentId": "<string>",
  "selectedPersonaIds": [
    "<string>"
  ],
  "description": "<string>",
  "assertions": [
    "<string>"
  ],
  "maxConcurrentCalls": 500,
  "maxCallDurationSeconds": 1830,
  "hangupOnTransfer": true
}
'
{
  "success": true,
  "data": {
    "message": "<string>",
    "result": {
      "simulation": {
        "id": "<string>",
        "workspaceId": "<string>",
        "agentId": "<string>",
        "name": "<string>",
        "status": "draft",
        "settings": {
          "maxConcurrentCalls": 10,
          "maxCallDurationSeconds": 600,
          "hangupOnTransfer": false
        },
        "createdAt": "<string>",
        "updatedAt": "<string>",
        "description": "<string>",
        "metrics": {
          "totalRuns": 0,
          "passedRuns": 0,
          "failedRuns": 0,
          "averageLatencyMs": null,
          "averageDurationSeconds": null,
          "agentSpeakingPercent": null
        },
        "createdBy": "<string>",
        "updatedBy": "<string>"
      }
    }
  }
}

Authorizations

Authorization
string
header
required

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

Body

application/json
workspaceId
string
required
Minimum string length: 1
name
string
required
Minimum string length: 1
agentId
string
required
selectedPersonaIds
string[]
required
Minimum array length: 1
description
string
assertions
string[]
maxConcurrentCalls
integer
Required range: 1 <= x <= 1000
maxCallDurationSeconds
integer
Required range: 60 <= x <= 3600
hangupOnTransfer
boolean

Response

Simulation created

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