# Test Trigger

`GET /api/zapier/test/{resource}`

Returns sample data for testing automation triggers. Used by automation platforms to validate trigger configuration and show sample data structure to users.

- **Group:** Automation
- **Since:** v0.0.0
- **Authentication:** `authtoken` header, created under Setup > API > API Management
- **HTML version:** /apiguide/automation/test-trigger/

## Headers

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `authtoken` | String | **required** | Authentication token, generated from admin area |
| `Authorization` | String | optional | Bearer token (alternative to authtoken header) |

## Parameters

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `resource` | String | **required** | Resource name. Must be one of: customers, invoices, leads, tasks, tickets |

## Example request

```bash
curl -X GET "https://yoursite.com/api/zapier/test/customers" \
  -H "authtoken: YOUR_API_TOKEN"
```

## Success response

### Success-Response:

```json
HTTP/1.1 200 OK
{
  "status": true,
  "data": {
    "id": 1,
    "company": "Sample Company",
    "email": "sample@example.com",
    "phone": "+1234567890"
  }
}
```

## Error responses

### Error-Response:

```json
HTTP/1.1 400 Bad Request
{
  "status": false,
  "message": "Resource parameter required"
}
```

---

Perfex CRM REST API by Themesic Interactive. Full reference: /apiguide/
