Dashboard HTTP API
This page documents the REST HTTP endpoints for dashboard operations. All endpoints are prefixed with /api/personas/{persona_id}/dashboard/.
All endpoints support an optional callback_url parameter. When provided, Ema sends the result to the callback URL upon completion instead of requiring polling.
Upload and Run Rows
Upload a file and automatically create and trigger rows.
| Property | Value |
|---|
| URL | /api/personas/{persona_id}/dashboard/upload-and-run-rows |
| HTTP Method | POST |
| Protocol | REST (multipart/form-data) |
| Header | Type | Required | Description |
|---|
Authorization | string | Yes | Bearer token |
Content-Type | string | Yes | multipart/form-data |
Path Parameters
| Parameter | Type | Description |
|---|
persona_id | string | UUID of the AI Employee |
| Field | Type | Required | Description |
|---|
file | file | Yes | CSV or XLSX file with row data |
callback_url | string | No | URL to receive results upon completion |
Example
curl -X POST https://your-instance.ema.co/api/personas/<persona_id>/dashboard/upload-and-run-rows \
-H "Authorization: Bearer <access_token>" \
-F "[email protected]" \
-F "callback_url=https://your-server.com/webhook"
Response
| Field | Type | Description |
|---|
row_ids | array | UUIDs of the created rows |
Get Row Result
Retrieve the result of a single processed row.
| Property | Value |
|---|
| URL | /api/personas/{persona_id}/dashboard/get-row-result |
| HTTP Method | GET |
| Protocol | REST (HTTP/JSON) |
| Header | Type | Required | Description |
|---|
Authorization | string | Yes | Bearer token |
Query Parameters
| Parameter | Type | Required | Description |
|---|
row_id | string | Yes | UUID of the row |
Example
curl -X GET "https://your-instance.ema.co/api/personas/<persona_id>/dashboard/get-row-result?row_id=<row_id>" \
-H "Authorization: Bearer <access_token>"
Response
Returns a DashboardRowResult with the row's state and output values.
Get All Row Results
Retrieve results for all rows in the dashboard.
| Property | Value |
|---|
| URL | /api/personas/{persona_id}/dashboard/get-all-row-results |
| HTTP Method | GET |
| Protocol | REST (HTTP/JSON) |
| Header | Type | Required | Description |
|---|
Authorization | string | Yes | Bearer token |
Example
curl -X GET https://your-instance.ema.co/api/personas/<persona_id>/dashboard/get-all-row-results \
-H "Authorization: Bearer <access_token>"
Response
Returns an array of DashboardRowResult objects.
Add Row
Add a single row to the dashboard.
| Property | Value |
|---|
| URL | /api/personas/{persona_id}/dashboard/add-row |
| HTTP Method | POST |
| Protocol | REST (HTTP/JSON) |
| Header | Type | Required | Description |
|---|
Authorization | string | Yes | Bearer token |
Content-Type | string | Yes | application/json |
Request Body
| Field | Type | Required | Description |
|---|
column_values | object | Yes | Map of column name to value |
callback_url | string | No | URL to receive results |
Example
curl -X POST https://your-instance.ema.co/api/personas/<persona_id>/dashboard/add-row \
-H "Authorization: Bearer <access_token>" \
-H "Content-Type: application/json" \
-d '{
"column_values": {
"company_name": "Acme Corp",
"website": "https://acme.com"
}
}'
Update Row
Update values in an existing row.
| Property | Value |
|---|
| URL | /api/personas/{persona_id}/dashboard/update-row |
| HTTP Method | POST |
| Protocol | REST (HTTP/JSON) |
| Header | Type | Required | Description |
|---|
Authorization | string | Yes | Bearer token |
Content-Type | string | Yes | application/json |
Request Body
| Field | Type | Required | Description |
|---|
row_id | string | Yes | UUID of the row to update |
column_values | object | Yes | Map of column name to new value |
Example
curl -X POST https://your-instance.ema.co/api/personas/<persona_id>/dashboard/update-row \
-H "Authorization: Bearer <access_token>" \
-H "Content-Type: application/json" \
-d '{
"row_id": "<row-uuid>",
"column_values": {
"company_name": "Acme Corporation"
}
}'
Delete Rows
Delete one or more rows from the dashboard.
| Property | Value |
|---|
| URL | /api/personas/{persona_id}/dashboard/delete-rows |
| HTTP Method | POST |
| Protocol | REST (HTTP/JSON) |
| Header | Type | Required | Description |
|---|
Authorization | string | Yes | Bearer token |
Content-Type | string | Yes | application/json |
Request Body
| Field | Type | Required | Description |
|---|
row_ids | array | Yes | List of row UUIDs to delete |
Example
curl -X POST https://your-instance.ema.co/api/personas/<persona_id>/dashboard/delete-rows \
-H "Authorization: Bearer <access_token>" \
-H "Content-Type: application/json" \
-d '{
"row_ids": ["<row-uuid-1>", "<row-uuid-2>"]
}'
Trigger Row
Trigger workflow processing for a specific row.
| Property | Value |
|---|
| URL | /api/personas/{persona_id}/dashboard/trigger-row |
| HTTP Method | POST |
| Protocol | REST (HTTP/JSON) |
| Header | Type | Required | Description |
|---|
Authorization | string | Yes | Bearer token |
Content-Type | string | Yes | application/json |
Request Body
| Field | Type | Required | Description |
|---|
row_id | string | Yes | UUID of the row to trigger |
callback_url | string | No | URL to receive results |
Example
curl -X POST https://your-instance.ema.co/api/personas/<persona_id>/dashboard/trigger-row \
-H "Authorization: Bearer <access_token>" \
-H "Content-Type: application/json" \
-d '{
"row_id": "<row-uuid>",
"callback_url": "https://your-server.com/webhook"
}'
Get Continuation Message
Retrieve the HITL continuation message for a paused row.
| Property | Value |
|---|
| URL | /api/personas/{persona_id}/dashboard/get-continuation-message |
| HTTP Method | GET |
| Protocol | REST (HTTP/JSON) |
Query Parameters
| Parameter | Type | Required | Description |
|---|
row_id | string | Yes | UUID of the paused row |
Example
curl -X GET "https://your-instance.ema.co/api/personas/<persona_id>/dashboard/get-continuation-message?row_id=<row_id>" \
-H "Authorization: Bearer <access_token>"
Response
Returns the HITL message (form, buttons, or text prompt) that the workflow is waiting for.
Continue Row
Submit a HITL response to resume a paused workflow.
| Property | Value |
|---|
| URL | /api/personas/{persona_id}/dashboard/continue-row |
| HTTP Method | POST |
| Protocol | REST (HTTP/JSON) |
| Header | Type | Required | Description |
|---|
Authorization | string | Yes | Bearer token |
Content-Type | string | Yes | application/json |
Request Body
| Field | Type | Required | Description |
|---|
row_id | string | Yes | UUID of the paused row |
response | object | Yes | The user's response to the HITL prompt |
callback_url | string | No | URL to receive results |
Example
curl -X POST https://your-instance.ema.co/api/personas/<persona_id>/dashboard/continue-row \
-H "Authorization: Bearer <access_token>" \
-H "Content-Type: application/json" \
-d '{
"row_id": "<row-uuid>",
"response": {
"approved": true,
"comment": "Looks good, proceed."
}
}'