Skip to main content
PATCH
/
v1
/
csat
/
rules
/
{id}
Update a CSAT rule
curl --request PATCH \
  --url https://platform.thena.ai/v1/csat/rules/{id} \
  --header 'Content-Type: application/json' \
  --header 'x-api-key: <api-key>' \
  --data '{
  "name": "High Priority Ticket Survey",
  "description": "Sends CSAT surveys to customers with high priority tickets",
  "isActive": true,
  "allFilters": {
    "ticket": {
      "standardFields": [
        {
          "field": "status",
          "operator": "=",
          "value": "open"
        }
      ],
      "customFields": [
        {
          "field": "custom_CFLLXQWWY4Z",
          "customFieldId": "CFLLXQWWY4Z",
          "operator": "=",
          "value": "Value"
        }
      ]
    },
    "account": {
      "standardFields": [
        {
          "field": "status",
          "operator": "=",
          "value": "open"
        }
      ],
      "customFields": [
        {
          "field": "custom_CFLLXQWWY4Z",
          "customFieldId": "CFLLXQWWY4Z",
          "operator": "=",
          "value": "Value"
        }
      ]
    },
    "contact": {
      "standardFields": [
        {
          "field": "status",
          "operator": "=",
          "value": "open"
        }
      ],
      "customFields": [
        {
          "field": "custom_CFLLXQWWY4Z",
          "customFieldId": "CFLLXQWWY4Z",
          "operator": "=",
          "value": "Value"
        }
      ]
    }
  },
  "anyFilters": {
    "ticket": {
      "standardFields": [
        {
          "field": "status",
          "operator": "=",
          "value": "open"
        }
      ],
      "customFields": [
        {
          "field": "custom_CFLLXQWWY4Z",
          "customFieldId": "CFLLXQWWY4Z",
          "operator": "=",
          "value": "Value"
        }
      ]
    },
    "account": {
      "standardFields": [
        {
          "field": "status",
          "operator": "=",
          "value": "open"
        }
      ],
      "customFields": [
        {
          "field": "custom_CFLLXQWWY4Z",
          "customFieldId": "CFLLXQWWY4Z",
          "operator": "=",
          "value": "Value"
        }
      ]
    },
    "contact": {
      "standardFields": [
        {
          "field": "status",
          "operator": "=",
          "value": "open"
        }
      ],
      "customFields": [
        {
          "field": "custom_CFLLXQWWY4Z",
          "customFieldId": "CFLLXQWWY4Z",
          "operator": "=",
          "value": "Value"
        }
      ]
    }
  },
  "triggerConfig": {
    "triggerType": "always",
    "randomPercentage": 10,
    "triggerEvent": "ticket_resolved",
    "delayMinutes": 30
  },
  "feedbackConfig": {
    "enabled": true,
    "feedbackType": "star",
    "customTitle": "How was your experience?",
    "customMessage": "Please rate your satisfaction with our support.",
    "customThankYouMessage": "Thank you for your feedback!",
    "includeCommentField": true,
    "commentFieldLabel": "Additional Comments",
    "commentFieldPlaceholder": "Please share any additional feedback here...",
    "brandingColor": "#3366CC",
    "deliveryChannel": "email"
  },
  "priority": 1
}'
{
  "data": {
    "ok": true,
    "data": {
      "id": "e4d2a5b1-9c3f-4c8d-b1a2-3e4f5a6b7c8d",
      "name": "Updated High Priority Ticket Survey",
      "description": "Updated description for high priority ticket surveys",
      "isActive": false,
      "priority": 10,
      "allFilters": {
        "ticket": {
          "standardFields": [
            {
              "field": "status",
              "operator": "=",
              "value": "closed"
            }
          ],
          "customFields": []
        },
        "account": {
          "standardFields": [],
          "customFields": []
        },
        "contact": {
          "standardFields": [],
          "customFields": []
        }
      },
      "anyFilters": {
        "ticket": {
          "standardFields": [
            {
              "field": "priority",
              "operator": "=",
              "value": "high"
            }
          ],
          "customFields": []
        },
        "account": {
          "standardFields": [],
          "customFields": []
        },
        "contact": {
          "standardFields": [],
          "customFields": []
        }
      },
      "triggerConfig": {
        "enabled": true,
        "deliveryChannel": "email",
        "delayInMinutes": 5
      },
      "feedbackConfig": {
        "enabled": true,
        "feedbackType": "thumbs",
        "includeCommentField": false,
        "brandingColor": "#dc2626"
      },
      "createdAt": "2023-08-01T12:00:00Z",
      "updatedAt": "2023-08-02T14:30:00Z"
    }
  },
  "status": true,
  "message": "CSAT rule updated successfully",
  "timestamp": "2025-07-15T11:38:09.817Z"
}

Authorizations

x-api-key
string
header
required

Enter your API key

Path Parameters

id
string
required

Body

application/json
name
string

Name of the CSAT rule

Example:

"High Priority Ticket Survey"

description
string

Description of the CSAT rule

Example:

"Sends CSAT surveys to customers with high priority tickets"

isActive
boolean

Whether the rule is active

Example:

true

allFilters
object

Filters where ALL conditions must be met

anyFilters
object

Filters where ANY condition can be met

triggerConfig
object

Configuration for when and how the CSAT survey is triggered

feedbackConfig
object

Configuration for the CSAT survey appearance and behavior

priority
number

Priority of the CSAT rule

Example:

1

Response

Success - CSAT rule updated successfully

The response is of type any.

I