POST
/
v1
/
forms
curl --request POST \
  --url https://platform.thena.ai/v1/forms \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --header 'x-org-id: <api-key>' \
  --data '{
  "name": "<string>",
  "description": "<string>",
  "conditions": [
    {
      "triggerFieldId": "<string>",
      "triggerFieldValue": {},
      "conditionType": "<string>",
      "targetFields": [
        {
          "id": "<string>",
          "type": "<string>",
          "value": {},
          "options": [
            {}
          ]
        }
      ],
      "forVendor": true,
      "forUser": true,
      "teamId": "<string>"
    }
  ],
  "fields": [
    {
      "field": "<string>",
      "defaultValue": {},
      "mandatoryOnCreation": true,
      "mandatoryOnClose": true,
      "visibleToCustomer": true,
      "editableByCustomer": true
    }
  ],
  "isActive": true,
  "channels": [
    "<string>"
  ],
  "teamId": "<string>"
}'
{
  "data": {
    "id": "<string>",
    "name": "<string>",
    "description": "<string>",
    "fields": [
      {
        "field": "<string>",
        "defaultValue": {},
        "mandatoryOnCreation": true,
        "mandatoryOnClose": true,
        "visibleToCustomer": true,
        "editableByCustomer": true
      }
    ],
    "conditions": [
      {
        "triggerFieldId": "<string>",
        "triggerFieldValue": {},
        "conditionType": "<string>",
        "targetFields": [
          {
            "id": "<string>",
            "type": "<string>",
            "value": {},
            "options": [
              {}
            ]
          }
        ],
        "forVendor": true,
        "forUser": true,
        "teamId": "<string>"
      }
    ],
    "version": 123,
    "isActive": true,
    "default": true,
    "createdAt": "2023-11-07T05:31:56Z",
    "updatedAt": "2023-11-07T05:31:56Z",
    "channels": [
      "<string>"
    ],
    "teamId": "<string>"
  },
  "status": true,
  "message": "<string>",
  "timestamp": "2023-11-07T05:31:56Z"
}

Authorizations

Authorization
string
header
required

Enter JWT bearer token

x-org-id
string
header
required

Enter organization ID

Body

application/json
name
string
required

The name of the form

description
string

The description of the form

conditions
object[]

Conditions of the form

fields
object[]

Fields of the form

isActive
boolean

Indicates if the form is active

channels
string[]

Channels of the form

teamId
string

The ID of the team

Response

201
application/json
Operation successful
data
object
required
status
boolean
required
message
string
required
timestamp
string
required