> ## Documentation Index
> Fetch the complete documentation index at: https://docs.ycloud.com/llms.txt
> Use this file to discover all available pages before exploring further.

# whatsapp.template.correct_category_detection

> Occurs when Meta detects non-utility content in Utility Direct Send. Subscribe through the webhook endpoint API.

Use `whatsapp.template.correct_category_detection` to handle this event at your webhook endpoint.

## Triggers

Occurs when Meta detects non-utility content in Utility Direct Send. Subscribe through the webhook endpoint API.

Subscribe to `whatsapp.template.correct_category_detection` when you [configure your webhook endpoint](https://docs.ycloud.com/en/api-reference/guides/api-fundamentals/configure-webhooks.md).

Subscribe to this event through the webhook endpoint API. This event reports category detection for Utility Direct Send; use `whatsapp.business_account.updated` to observe account restrictions.

## Syntax

YCloud sends an HTTP `POST` request to your configured webhook URL. The following shape shows one payload variant. Angle-bracket values are placeholders; their types are listed under **Parameters**. Optional fields and other variants are described below.

```json theme={"theme":{"light":"github-light","dark":"github-dark"}}
{
  "id": "<ID>",
  "type": "whatsapp.template.correct_category_detection",
  "apiVersion": "<API_VERSION>",
  "createTime": "<CREATE_TIME>",
  "whatsappTemplate": {
    "officialTemplateId": "<OFFICIAL_TEMPLATE_ID>",
    "wabaId": "<WABA_ID>",
    "name": "<NAME>",
    "language": "<LANGUAGE>",
    "category": "<CATEGORY>",
    "previousCategory": "<PREVIOUS_CATEGORY>"
  }
}
```

## Parameters

Validate the `YCloud-Signature` HTTP header before you process the JSON body. See [signature validation](https://docs.ycloud.com/en/api-reference/guides/api-fundamentals/configure-webhooks.md).

### Event envelope

| Parameter | Type | Required | Description |
| - | - | - | - |
| `id` | string | Yes | Unique ID for the event. Minimum length: `6`. Maximum length: `128`. |
| `type` | string | Yes | Always `whatsapp.template.correct_category_detection`. |
| `apiVersion` | string | Yes | The API version used to render this event. |
| `createTime` | string (date-time) | Yes | The time at which this event was created, formatted in [RFC 3339](https://datatracker.ietf.org/doc/html/rfc3339). e.g., `2022-06-01T12:00:00.000Z`. |

### Event payload

| Parameter | Type | Required | Description |
| - | - | - | - |
| `whatsappTemplate` | object | No | Event-specific `whatsappTemplate` payload. |

The four common envelope fields are required. Payload fields depend on the event variant. In each object table, **Required** applies when its parent object is present. Optional fields can be omitted; a sample does not make a field required.

#### whatsappTemplate

| Parameter | Type | Required | Description |
| - | - | - | - |
| `officialTemplateId` | string | No | Official template ID assigned by WhatsApp. This ID is used to identify the template in WhatsApp's system. |
| `wabaId` | string | Yes | WhatsApp Business Account ID. |
| `name` | string | Yes | Name of the template.Maximum length: `512`. Pattern: `[a-z0-9]{1,512}`. |
| `language` | string | Yes | Language code of the template. See [Supported Languages](https://developers.facebook.com/documentation/business-messaging/whatsapp/templates/supported-languages) for all codes. |
| `category` | string | No | Category of WhatsApp templates.<ul><li>`AUTHENTICATION`: Enable businesses to authenticate users with one-time passcodes, potentially at multiple steps in the login process (e.g., account verification, account recovery, integrity challenges).</li><li>`MARKETING`: Include promotions or offers, informational updates, or invitations for customers to respond / take action. Any conversation that does not qualify as utility or authentication is a marketing conversation.</li><li>`UTILITY`: Facilitate a specific, agreed-upon request or transaction or update to a customer about an ongoing transaction, including post-purchase notifications and recurring billing statements.</li></ul> |
| `previousCategory` | string | No | This field indicates the template's previous category (or `null`, for newly created templates after April 1, 2023). Compare this value to the template's `category` field value, which indicates the template's current category. |

## Example

The following JSON is the body delivered to your receiver. IDs, phone numbers, and other account values are illustrative.

Meta detected marketing content in a Utility Direct Send message. Subscribe to this event through the webhook endpoint API.

```json theme={"theme":{"light":"github-light","dark":"github-dark"}}
{
  "id": "evt_direct_send_category_123",
  "type": "whatsapp.template.correct_category_detection",
  "apiVersion": "v2",
  "createTime": "2026-09-17T08:00:00.000Z",
  "whatsappTemplate": {
    "officialTemplateId": "official-template-id",
    "wabaId": "whatsapp-business-account-id",
    "name": "auto_generated_sample",
    "language": "en_US",
    "category": "MARKETING",
    "previousCategory": "UTILITY"
  }
}
```

After verifying the signature and durably accepting the event, return a `2xx` response. Process slow work asynchronously.

```http theme={"theme":{"light":"github-light","dark":"github-dark"}}
HTTP/1.1 200 OK
```

For scenario walkthroughs, see [annotated examples](https://docs.ycloud.com/en/api-reference/guides/examples/webhook-examples/whatsapp-template-reviewed-webhook-examples).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.