Skip to main content
PATCH
/
unit-tests
/
{unitTestId}
Update unit test
curl --request PATCH \
  --url https://app.freyavoice.ai/api/v2/unit-tests/{unitTestId} \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "name": "<string>",
  "expectation": "<string>",
  "ordinal": 123,
  "isArchived": true
}
'
{
  "success": true,
  "data": {
    "message": "<string>",
    "result": {
      "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "workspaceId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "entityId": "<string>",
      "name": "<string>",
      "expectation": "<string>",
      "input": {
        "schemaVersion": 1,
        "messages": [
          {
            "role": "<string>",
            "message": "<string>",
            "content": "<string>",
            "messageId": "<string>",
            "nodeId": "<string>",
            "secondsFromStart": 123,
            "duration": 123,
            "timestamp": "<string>",
            "endTime": 123,
            "wasBlocked": true,
            "was_blocked": true,
            "blockedContent": "<string>",
            "blocked_content": "<string>",
            "workflowSnapshot": "<unknown>"
          }
        ],
        "customerVariables": {},
        "authoredAgainstVersionId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
      },
      "seedCallId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "seedMessageId": "<string>",
      "ordinal": 123,
      "isArchived": true,
      "createdBy": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "updatedBy": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "createdAt": "<string>",
      "updatedAt": "<string>"
    }
  }
}

Authorizations

Authorization
string
header
required

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

Path Parameters

unitTestId
string<uuid>
required

Body

application/json
name
string
Required string length: 1 - 180
expectation
string
Required string length: 1 - 50000
input
object
ordinal
integer
isArchived
boolean

Response

Unit test updated

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