# Approval Notification Variables and Templates

API product subscription notifications sent to contact points can include dynamic approval data. Use approval variables in email content and webhook messages to identify the applicant, approval, and API product.

Approval variables use Go template syntax and are delimited by `{{` and `}}`, for example, `{{ .ApprovalID }}`. Variables are not evaluated in the email subject.

## Approval Variables[​](#approval-variables "Direct link to Approval Variables")

The following variables are available:

| Variable               | Description                                                                                                             |
| ---------------------- | ----------------------------------------------------------------------------------------------------------------------- |
| `{{ .ApplicantID }}`   | ID of the developer who requested the subscription.                                                                     |
| `{{ .ApplicantName }}` | Display name of the developer who requested the subscription.                                                           |
| `{{ .AppliedAt }}`     | Time when the subscription request was submitted, formatted as a 24-hour timestamp, for example, `2026-07-28 14:30:45`. |
| `{{ .ApprovalID }}`    | ID of the approval record.                                                                                              |
| `{{ .ResourceID }}`    | ID of the API product associated with the subscription.                                                                 |
| `{{ .ResourceName }}`  | Name of the API product associated with the subscription.                                                               |
| `{{ .Event }}`         | Approval resource type. For API product subscription notifications, the value is `api_product_subscription`.            |

The notification event configured on the API product, such as `subscription_approval_created` or `subscription_approval_accepted`, determines when the notification is sent. That lifecycle event is not exposed as a template variable.

## Email Content Template[​](#email-content-template "Direct link to Email Content Template")

The following example creates a plain-text email body:

```
Approval request {{ .ApprovalID }}



Applicant: {{ .ApplicantName }} ({{ .ApplicantID }})

API product: {{ .ResourceName }} ({{ .ResourceID }})

Submitted at: {{ .AppliedAt }}

Approval type: {{ .Event }}
```

## Webhook Message Template[​](#webhook-message-template "Direct link to Webhook Message Template")

Use the `escape` template function for values that can contain quotation marks, backslashes, or control characters. This keeps the rendered message valid JSON.

```
{

  "applicant": "{{ .ApplicantName | escape }}",

  "applicant_id": "{{ .ApplicantID }}",

  "timestamp": "{{ .AppliedAt }}",

  "approval_id": "{{ .ApprovalID }}",

  "resource_id": "{{ .ResourceID }}",

  "resource": "{{ .ResourceName | escape }}",

  "event": "{{ .Event }}"

}
```
