# GET /api/automation/sample/{resource} > Automation - Get a sample Automation record Returns one representative record for the resource - the most recent one - so an automation platform can show the user a real payload and let them map fields onto later steps. When the resource holds no records yet the endpoint still answers 200 with an empty field map built from the live table definition, so field mapping works on a fresh install; meta.source says which of the two you got ("record" or "schema"). The field list in meta.fields gives each returned column with its SQL type. Credential and sensitive columns are stripped exactly as they are everywhere else in this plugin, so they appear neither in the record nor in the field list. - **Endpoint:** `GET /api/automation/sample/{resource}` - **Group:** Automation - **Since:** v1.0.0 - **Defined in:** `RestApi/Controllers/AutomationController.php` ## Headers | Field | Type | Description | | --- | --- | --- | | `authtoken` | String | Authentication token, generated from admin area | ## Parameters | Field | Type | Required | Description | | --- | --- | --- | --- | | `resource` | String | yes | Resource key from /api/automation/resources. Hyphens are accepted in place of underscores, so both invoice-payments and invoice_payments work. | ## Request example ```bash curl -X GET "https://yoursite.com/index.php/api/automation/sample/clients" \ -H "authtoken: YOUR_API_TOKEN" ``` ## Responses ### Success - Success-Response: ```json HTTP/1.1 200 OK { "status": true, "resource": "clients", "data": { "id": "12", "company_name": "Acme Corporation", "type": "organization", "city": "San Francisco", "country": "United States", "created_date": "2026-07-14 09:21:45", "owner_id": "3", "created_by": "1", "is_lead": "0", "deleted": "0" }, "meta": { "source": "record", "label": "client", "plural": "clients", "dedupe_key": "id", "cursor_fields": ["created_date"], "order_by": "created_date", "detects_updates": false, "fields": [ { "name": "id", "type": "int" }, { "name": "company_name", "type": "varchar" }, { "name": "created_date", "type": "datetime" } ], "timezone": "UTC", "server_time": "2026-07-21T09:45:12+00:00" } } ``` ### Error - Unknown resource: ```json HTTP/1.1 404 Not Found { "status": false, "messages": { "error": "Unknown automation resource. Call /api/automation/resources for the resources that can be polled." } } ``` --- Part of the [REST API for RISE CRM](https://risecrm.themesic.com/apiguide/) documentation. Full page: https://risecrm.themesic.com/apiguide/automation/get-automation-sample/