PATCH
/
v1
/
forms
curl --request PATCH \
  --url https://platform.thena.ai/v1/forms \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --header 'x-org-id: <api-key>' \
  --data '{
  "formId": "<string>",
  "version": 123,
  "updates": {
    "name": "<string>",
    "description": "<string>",
    "default": true,
    "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>"
      }
    ],
    "channels": [
      "<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
formId
string
required

The ID of the form

version
number
required

The version of the form

updates
object
required

The updates to the form

Response

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