Skip to content
Elara One docs
CRM

Create a task

POST
/v1/merchant/crm/tasks

Authorization

tenantKeybearerAuth
headerX-Tenant-Key<token>

The public store key (pk_live_…). Required on every call.

headerAuthorizationBearer <token>

A customer token from POST /v1/auth/login, or a merchant API key, on routes that need one.

Header Parameters

X-Client-IP?string

Optional. IP address of the shopper (one IPv4/IPv6, no port, no list). Honoured only together with a valid X-Tenant-Secret; ignored otherwise. Used for rate limits and recorded with form submissions.

X-Tenant-Secret?string

Optional here. Server secret of the store: server-to-server only, never from a browser. Enables X-Client-IP.

Idempotency-Key?string

Optional; recommended (a UUID made once per user action, reused only to retry that action). Only a success is stored (24 hours): the same key with the same body, URI and credentials (Authorization, X-Cart-Token, X-Chat-Token) replays it (Idempotent-Replayed: true); anything else under that key is 422 IDEMPOTENCY_KEY_REUSED. An error is never stored: after a 4xx or 5xx, retrying with the same key runs the request again.

Request Body

application/json
  1. body

POST merchant/crm/tasks and PATCH merchant/crm/tasks/{id}. The shape only; the tasks service validates the rest (a recurring task needs a due date, an unknown assignee, a record that does not exist) with a 422.

due_date + due_time an all-day task (no time) or a timed one, in the store's timezone due_at or a moment (ISO-8601), a timed task; null clears the due date records the whole set of records it is about: ["contact:12", "company:3"]

title*string
Lengthlength <= 200
notes?|
Lengthlength <= 10000
type?string
Lengthlength <= 32
priority?integer
Range0 <= value <= 2
due_date?|
Formatdate
due_time?string|null
due_at?|
Formatdate-time
assignee_id?|
Range1 <= value
queue?|
Lengthlength <= 64
repeat_rule?|
Lengthlength <= 32
repeat_interval?integer
Range1 <= value <= 365
repeat_from?string
Lengthlength <= 32
records?array<>
Itemsitems <= 20

Response Body

Success.

application/json
  1. response
data*
Example Request
curl -X POST 'https://api.elaraone.app/api/v1/merchant/crm/tasks' \  -H 'X-Tenant-Key: pk_live_…' \  -H 'X-Tenant-Secret: your-server-secret' \  -H 'Content-Type: application/json' \  -d '{  "title": "string"}'
Example Response
{  "data": {    "id": 0,    "title": "string",    "notes": "string",    "type": "string",    "priority": 0,    "status": "string",    "due_at": "string",    "due_all_day": true,    "assignee_id": 0,    "queue": "string",    "records": [      "string"    ],    "repeat_rule": "string",    "repeat_interval": 0,    "repeat_from": "string",    "next_task_id": 0,    "created_by": {      "type": "string"    },    "completed_at": "string",    "cancelled_at": "string",    "created_at": "string",    "updated_at": "string"  }}