Enable template analytics setting

Use this API to confirm template analytics on Meta.

<PartnerPortalWarning />

<br />

## Request Parameters

| Key           | Description                                     | Value                 | Type    | Required/Optional | Constraints                                |
| :------------ | :---------------------------------------------- | :-------------------- | :------ | :---------------- | :----------------------------------------- |
| Authorization | Access Token for the application                | `{user.PARTNER_APP_TOKEN}` | String  | Required          | Should be a valid Partner App Access Token |
| APP_ID        | App ID to fetch the access token                | `{user.APP_ID}`            | String  | Required          | The ID should be a valid app ID of Gupshup |
| enable        | Flag to enable template analytics setting       | True/False            | Boolean | Required          |                                            |
| enableOnUi    | Flag to enable template analytics setting on UI | True/False            | Boolean | Optional          |                                            |

## Sample Request

```curl
curl --location --request POST '{user.BASE_URL}/partner/app/{user.APP_ID}/template/analytics' \
--header 'Authorization: {user.PARTNER_APP_TOKEN}' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--data-urlencode 'enable=true' \
--data-urlencode 'enableOnUi=true'

Sample Response

{
    "status": "success"
}

Status Codes

Status CodeResponseComments
Success
200{ "status": "success" }Successful response
Error
400{ "status": "error", "message": "Bad Request" }Bad request
429{ "status": "error", "message": "Too Many Requests" }10 Requests per Minute
500{ "status": "error", "message": "Internal server error. Please try again later and If Issue still persist than contact Gupshup Dev Support" }For any Internal Error
Language
Click Try It! to start a request and see the response here!