ai-credits

Update AI credit settings.

Changed on

Configures AI credit exhaustion behavior, usage alert thresholds, and the webhook endpoint for a project. The HMAC signing secret is generated the first time a webhook URL is set and returned exactly once in the response — store it securely; it is never shown again.

put/v3/projects/{id}/ai-credits/settings

Request

  • Base URL: https://api.unlayer.com
  • URL: https://api.unlayer.com/v3/projects/{id}/ai-credits/settings
  • Auth: one of:
    • HTTP bearer
    • HTTP bearer

Path parameters

idstring required

The resource ID

Request body

exhaustion_behavior'disable' | 'show_error'

What the editor does when the credit balance is exhausted.

threshold_alertsinteger[]

Usage percentages (1-100) at which a threshold_reached webhook fires, once per crossing per period.

webhook_urlstring uri nullable

HTTPS endpoint that receives AI credit webhooks.

Response

Default Response

exhaustion_behavior'disable' | 'show_error' required
threshold_alertsinteger[] required
webhook_urlstring nullable required
has_signing_secretboolean required
signing_secretstring

The HMAC signing secret. Returned ONLY on the response that first generates it.

Changes

    • breaking

      request body became required

    • warning

      added the new disable enum value to the response property for the response status

    • warning

      added the new show_error enum value to the response property for the response status

    • info

      the response property became required for the status

    • info

      the response property became required for the status

    • info

      the response property became required for the status

    • info

      the response property became required for the status