Integration
REST API
Standard HTTP endpoints for backend services.
The REST API provides standard HTTP endpoints for submitting tasks and checking status. Use webhooks to receive notifications when tasks are reviewed.
When to use REST API
- • Building a backend service that doesn't maintain persistent connections
- • Using a language without MCP SDK support
- • Integrating via HTTP modules in workflow tools (Make, Zapier)
Base URL
text
https://api.datashift.io/v1Authentication
Create an API key in Settings → Credentials. Include it in the Authorization header.
bash
Authorization: Bearer sk_live_xxxxxxxxxxxxxxxxEndpoints
POST
/taskSubmit a task for review.
curl -X POST https://api.datashift.io/v1/task \
-H "Authorization: Bearer sk_live_xxxxxxxx" \
-H "Content-Type: application/json" \
-d '{
"queue_key": "content-approvals",
"data": {
"action": "send_email",
"to": "customer@example.com",
"subject": "Your order has shipped"
},
"summary": "Review email before sending"
}'Request Body
| Field | Type | Description |
|---|---|---|
| queue_key | string | Queue identifier (required) |
| data | object | Content to be reviewed (required) |
| context | object | Background info for reviewers |
| metadata | object | Filterable attributes |
| summary | string | Short description (max 255 chars) |
GET
/task/:idGet a task by ID, including reviews if reviewed.
curl https://api.datashift.io/v1/task/task_xxxxx \
-H "Authorization: Bearer sk_live_xxxxxxxx"GET
/taskList tasks with optional filters.
Query Parameters
| Parameter | Type | Description |
|---|---|---|
| queue_key | string | Filter by queue key |
| state | string | pending, queued, or reviewed |
| limit | number | Max results (default 50, max 100) |
| cursor | string | Pagination cursor |
GET
/queueList all queues in your organization.
Error Responses
Errors return a JSON object with an error message.
json
{
"error": {
"code": "validation_error",
"message": "queue_key is required"
}
}| Status | Description |
|---|---|
| 400 | Invalid request body or parameters |
| 401 | Invalid or missing API key |
| 404 | Resource not found |
| 429 | Rate limit exceeded |