# GET /schemas/triggers/:trigger_type

**Resource:** [Schemas](./schemas.md)  
**Scopes:** _none_  
**Write operation:** no

Get the canonical schema for a single trigger type. Returns label, description, sample_trigger_data (a realistic example payload), available_variables[] (all {{token}} names extracted from the sample), and enriched_variables (CRM namespace reference). Returns 404 if the trigger_type is not recognised.

## Parameters

| Name | In | Type | Required | Description |
|------|----|------|----------|-------------|
| `trigger_type` | path | string | yes | Trigger type key (e.g. facebook_lead_ad, form_submitted, deal_updated, booking_created). Use GET /schemas/triggers to discover all values. |

## Request example

```bash
curl -X GET \
  "https://api.trustpager.com/functions/v1/api/v1/schemas/triggers/facebook_lead_ad" \
  -H "Authorization: Bearer YOUR_API_KEY"
```

## Response example

```json
{
  "data": {
    "trigger_type": "facebook_lead_ad",
    "label": "Facebook Lead Ad",
    "description": "When a Facebook Lead Ad form is submitted.",
    "sample_trigger_data": {
      "page_id": "123456789",
      "form_id": "form_abc123",
      "leadgen_id": "lead_xyz789",
      "first_name": "John",
      "last_name": "Doe",
      "email": "john@example.com",
      "phone": "+61431377068",
      "company_name": "Acme Corporation"
    },
    "available_variables": [
      "{{page_id}}",
      "{{form_id}}",
      "{{leadgen_id}}",
      "{{first_name}}",
      "{{last_name}}",
      "{{email}}",
      "{{phone}}",
      "{{company_name}}"
    ],
    "enriched_variables": {
      "contact.*": "Contact record fields (first_name, last_name, email, phone, custom fields) - populated after opportunity matching.",
      "deal.*": "Deal/opportunity fields (name, value, status, opportunity_type, tags).",
      "customer.*": "Customer/account record fields (name, abn, industry). Also available as account.*.",
      "today": "Today as YYYY-MM-DD in the company timezone.",
      "now": "Current timestamp as ISO 8601."
    }
  },
  "meta": { "credits_remaining": 10000 }
}
```

---
Base URL: `https://api.trustpager.com/functions/v1/api/v1` — Auth: `Authorization: Bearer YOUR_API_KEY`