Skip to main content
POST
/
insights
Create insight
curl --request POST \
  --url https://app.freyavoice.ai/api/v2/insights \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "workspaceId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "name": "<string>",
  "description": null,
  "type": "string",
  "enums": [],
  "defaultValue": null,
  "rangeMin": null,
  "rangeMax": null,
  "agentIds": [],
  "isRequired": true
}
'
{
  "success": true,
  "data": {
    "message": "<string>",
    "result": {
      "insight": {
        "id": "<string>",
        "workspaceId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
        "name": "<string>",
        "type": "<string>",
        "isRequired": true,
        "createdAt": "2023-11-07T05:31:56Z",
        "updatedAt": "2023-11-07T05:31:56Z",
        "createdBy": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
        "description": "<string>",
        "enums": [],
        "defaultValue": "<string>",
        "updatedBy": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
      }
    }
  }
}

Authorizations

Authorization
string
header
required

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

Body

application/json
workspaceId
string<uuid>
required
name
string
required
Required string length: 1 - 100
description
string | null
type
enum<string>
default:string
Available options:
string,
number,
rating,
checkbox,
range,
enum,
array
enums
string[]
defaultValue
string | null
rangeMin
number | null
rangeMax
number | null
agentIds
string<uuid>[]
isRequired
boolean
default:true

Response

Insight created

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