POST
/
v1
/
forms
cURL
curl --request POST \
  --url https://platform.thena.ai/v1/forms \
  --header 'Content-Type: application/json' \
  --header 'x-api-key: <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>",
    "order": 123
  },
  "status": true,
  "message": "<string>",
  "timestamp": "2023-11-07T05:31:56Z"
}

Authorizations

x-api-key
string
header
required

Enter your API key

Body

application/json

Response

201
application/json

Operation successful

The response is of type object.