Tasks & automations
Tasks are your team's CRM to-dos: a follow-up call, a save attempt, a reply to a bad review. Each belongs to one app, can be tied to one customer, and sits in a column of your team's task board. Automation rules create tasks for you when something happens to a customer; the API can read those rules and every run they made, and add a customer to an automation that starts by hand.
Tasks, read and written, require the crm.access permission; automations require crm.automations (see Permissions). On keys created before permissions, reads need the crm:read scope and writes (creating, updating, and deleting tasks, and enrolling a customer) need crm:write. Automations are otherwise read-only in v1: the only automation write is enrolling a customer. Responses are a plain { "data": ... } object, not the paginated object: "list" envelope. A customer's ID (installation_id, :installation) comes from the Customers endpoints.
List tasks
Returns the app's tasks, earliest due date first, with undated tasks last. Returns at most 200 tasks and is not paginated. By default only open tasks are returned. Requires crm.access.
Path parameter
- Name
app- Type
- string
- Description
The team app's ULID, e.g.
01JN4HKQX0000000000000000.
Query parameters
- Name
status- Type
- string
- Description
open(default),done,cancelled, orall. When you filter byboard_column_idand omitstatus, every task in that column is returned.
- Name
assignee_user_id- Type
- integer
- Description
Only tasks assigned to this user.
- Name
installation_id- Type
- integer
- Description
Only tasks for this customer.
- Name
board_column_id- Type
- integer
- Description
Only tasks in this board column.
Request
curl -G https://ranksyapp.com/api/v1/apps/01JN4HKQX0000000000000000/tasks \
-H "Authorization: Bearer rk_live_..." \
-d status=open
Response
{
"data": [
{
"id": "01JR8Y4Q2N6V7K3M5T9WXCZB1D",
"title": "Renewal call",
"body": "Walk through the Pro plan before their trial ends.",
"status": "open",
"priority": "high",
"source": "api",
"due_at": "2026-10-20T10:00:00+00:00",
"is_overdue": false,
"assignee": { "id": 7, "name": "John Doe" },
"created_by": { "id": 7, "name": "John Doe" },
"customer": {
"id": 4210,
"name": "Acme Store",
"domain": "acme-store.myshopify.com",
"health_score": 62,
"url": "/customers/01JN4HKQX0000000000000000/68134502401?tab=tasks"
},
"app": { "ulid": "01JN4HKQX0000000000000000", "name": "Acme Reviews" },
"column": { "id": 31, "name": "To do", "is_done": false },
"customer_note_id": null,
"completed_at": null,
"created_at": "2026-10-15T09:12:00+00:00",
"updated_at": "2026-10-15T09:12:00+00:00"
}
]
}
Create a task
Creates a task. title is required. The task's source is api. Requires crm.access. Returns 201 Created with the task.
The new task goes into the first open column of your board (To do on the default board) unless you pick one with board_column_id. The column sets the status: a task created in the Done column is created done. If the assignee is someone other than the user the request runs as, they get an assignment notification.
Request body
- Name
title- Type
- string
- Description
Task title, max 255 characters.
- Name
body- Type
- string
- Description
Task details, max 10,000 characters.
- Name
due_at- Type
- string
- Description
Due date and time, ISO 8601. Omit for an undated task.
- Name
priority- Type
- string
- Description
low,medium(default),high, orhighest.
- Name
assignee_user_id- Type
- integer
- Description
The user to assign. Must be a member of your team with CRM access. Omit it to assign the user the request runs as (for an API key, the member who created the key); send
nullto leave the task unassigned.
- Name
installation_id- Type
- integer
- Description
The customer the task is about. Must be a customer of this app.
- Name
board_column_id- Type
- integer
- Description
The board column to create the task in. Must be a column on your team's board. Column IDs appear in each task's
column.
Request
curl -X POST https://ranksyapp.com/api/v1/apps/01JN4HKQX0000000000000000/tasks \
-H "Authorization: Bearer rk_live_..." \
-H "Content-Type: application/json" \
-d '{
"title": "Renewal call",
"body": "Walk through the Pro plan before their trial ends.",
"due_at": "2026-10-20T10:00:00Z",
"priority": "high",
"assignee_user_id": 7,
"installation_id": 4210
}'
201 — Created
{
"data": {
"id": "01JR8Y4Q2N6V7K3M5T9WXCZB1D",
"title": "Renewal call",
"body": "Walk through the Pro plan before their trial ends.",
"status": "open",
"priority": "high",
"source": "api",
"due_at": "2026-10-20T10:00:00+00:00",
"is_overdue": false,
"assignee": { "id": 7, "name": "John Doe" },
"created_by": { "id": 7, "name": "John Doe" },
"customer": {
"id": 4210,
"name": "Acme Store",
"domain": "acme-store.myshopify.com",
"health_score": 62,
"url": "/customers/01JN4HKQX0000000000000000/68134502401?tab=tasks"
},
"app": { "ulid": "01JN4HKQX0000000000000000", "name": "Acme Reviews" },
"column": { "id": 31, "name": "To do", "is_done": false },
"customer_note_id": null,
"completed_at": null,
"created_at": "2026-10-15T09:12:00+00:00",
"updated_at": "2026-10-15T09:12:00+00:00"
}
}
Update a task
Updates a task. Send only the fields you change; the fields are the same as on create, except installation_id (a task's customer can't be changed), plus status. Send null for body or due_at to clear it, or for assignee_user_id to unassign. Requires crm.access. Returns the updated task.
Status and board column move together:
board_column_iddecides the status: the Done column completes the task, any other column reopens it. If you send both, the column wins.statusalone moves the task:doneto the Done column;openkeeps it in its open column, or moves it to the first open column if it was done or cancelled;cancelledtakes it off the board, so itscolumnbecomesnull.
Completing a task sets completed_at; reopening or cancelling it clears it. Moving due_at re-arms the task's due-date reminder.
Path parameter
- Name
task- Type
- string
- Description
The task's
id(a ULID).
Request body
- Name
status- Type
- string
- Description
open,done, orcancelled.
- Name
title, body, due_at, priority, assignee_user_id, board_column_id- Type
- mixed
- Description
As on create.
titlecan't be cleared.
Request
curl -X PATCH https://ranksyapp.com/api/v1/apps/01JN4HKQX0000000000000000/tasks/01JR8Y4Q2N6V7K3M5T9WXCZB1D \
-H "Authorization: Bearer rk_live_..." \
-H "Content-Type: application/json" \
-d '{ "status": "done" }'
200 — Updated
{
"data": {
"id": "01JR8Y4Q2N6V7K3M5T9WXCZB1D",
"title": "Renewal call",
"body": "Walk through the Pro plan before their trial ends.",
"status": "done",
"priority": "high",
"source": "api",
"due_at": "2026-10-20T10:00:00+00:00",
"is_overdue": false,
"assignee": { "id": 7, "name": "John Doe" },
"created_by": { "id": 7, "name": "John Doe" },
"customer": {
"id": 4210,
"name": "Acme Store",
"domain": "acme-store.myshopify.com",
"health_score": 62,
"url": "/customers/01JN4HKQX0000000000000000/68134502401?tab=tasks"
},
"app": { "ulid": "01JN4HKQX0000000000000000", "name": "Acme Reviews" },
"column": { "id": 34, "name": "Done", "is_done": true },
"customer_note_id": null,
"completed_at": "2026-10-18T15:40:00+00:00",
"created_at": "2026-10-15T09:12:00+00:00",
"updated_at": "2026-10-18T15:40:00+00:00"
}
}
Delete a task
Permanently deletes the task. Requires crm.access. Returns 204 No Content with an empty body.
Request
curl -X DELETE https://ranksyapp.com/api/v1/apps/01JN4HKQX0000000000000000/tasks/01JR8Y4Q2N6V7K3M5T9WXCZB1D \
-H "Authorization: Bearer rk_live_..."
List a customer's tasks
Returns one customer's tasks in every status: open tasks first, earliest due date first, then the rest, most recently updated first. Returns at most 100 tasks and takes no query parameters. Requires crm.access.
Path parameter
- Name
installation- Type
- integer
- Description
The customer's ID, from the Customers endpoints.
Request
curl https://ranksyapp.com/api/v1/apps/01JN4HKQX0000000000000000/customers/4210/tasks \
-H "Authorization: Bearer rk_live_..."
Response
{
"data": [
{
"id": "01JR8Y4Q2N6V7K3M5T9WXCZB1D",
"title": "Renewal call",
"status": "open",
"priority": "high",
"source": "api",
"due_at": "2026-10-20T10:00:00+00:00",
"column": { "id": 31, "name": "To do", "is_done": false }
}
]
}
The example is shortened; each row is a full task.
List automation rules
Returns the app's automation rules, enabled rules first, then by name — the same list as the Automations page in Ranksy, including the disabled rules from the template catalog. meta.count is the number of rules. Requires crm.automations.
Each rule has a trigger, conditions that a customer must match, and actions: creating a task, or adding or removing a customer tag. The title and body of a task action are templates: placeholders such as {shop} and {plan} are filled in for the customer when the rule fires.
Request
curl https://ranksyapp.com/api/v1/apps/01JN4HKQX0000000000000000/automations/rules \
-H "Authorization: Bearer rk_live_..."
Response
{
"data": [
{
"id": 12,
"name": "Save the cancel",
"enabled": true,
"template_key": "save_the_cancel",
"trigger_type": "event",
"trigger_config": { "events": ["CHURNED"] },
"conditions": { "status": "active" },
"actions": [
{
"type": "create_task",
"title": "Save attempt: {shop} cancelled {plan}",
"body": "{shop} cancelled {plan} ({mrr} MRR) on {event_date}.\n\n- Email {email} within a day\n- Profile: {customer_url}",
"priority": "high",
"due_offset_days": 1,
"assignee": { "type": "owner" }
}
],
"cohort_lookback_days": 0,
"require_tracked_activity": false,
"cooldown_days": 30,
"fired_last_7_days": 3,
"open_tasks_created": 2,
"first_activated_at": "2026-09-02T08:00:00+00:00",
"created_at": "2026-09-02T08:00:00+00:00",
"published_version": null,
"definition": null
}
],
"meta": { "count": 1 }
}
Retrieve an automation rule
Returns one rule as { "data": rule }, with the same counts as the list. Requires crm.automations.
Path parameter
- Name
rule- Type
- integer
- Description
The rule's
id. A rule that belongs to another app returns404.
Request
curl https://ranksyapp.com/api/v1/apps/01JN4HKQX0000000000000000/automations/rules/12 \
-H "Authorization: Bearer rk_live_..."
List rule runs
Returns a rule's most recent 100 runs, newest first. A run is one check of the rule against one customer: either it fired and created work, or it was skipped, and the run says why. Requires crm.automations.
Path parameter
- Name
rule- Type
- integer
- Description
The rule's
id. A rule that belongs to another app returns404.
Request
curl https://ranksyapp.com/api/v1/apps/01JN4HKQX0000000000000000/automations/rules/12/runs \
-H "Authorization: Bearer rk_live_..."
Response
{
"data": [
{
"id": 9051,
"rule_version": 1,
"installation_id": 4210,
"trigger_ref": "event:88231",
"outcome": "fired",
"details": { "task_id": 512 },
"created_at": "2026-10-14T07:03:00+00:00",
"status": null,
"current_node_id": null,
"wake_at": null,
"exit_reason": null,
"finished_at": null
},
{
"id": 9050,
"rule_version": 1,
"installation_id": 3977,
"trigger_ref": "event:88190",
"outcome": "skipped_cooldown",
"details": { "cooldown_days": 30 },
"created_at": "2026-10-13T18:41:00+00:00",
"status": null,
"current_node_id": null,
"wake_at": null,
"exit_reason": null,
"finished_at": null
}
]
}
Enroll a customer in an automation
Adds one customer to an automation that starts by hand (trigger_type manual). Each call is its own enrollment, and the automation's entry checks (already in the automation, conditions, cooldown) still apply, so the run can come back skipped. Requires crm.automations. Returns 201 Created with the run.
Path parameter
- Name
rule- Type
- integer
- Description
The rule's
id. A rule that belongs to another app returns404.
Request body
- Name
installation_id- Type
- integer
- Description
The customer to enroll. Required unless you send
shop_domain; must be a customer of this app.
- Name
shop_domain- Type
- string
- Description
The customer's
.myshopify.comdomain, instead ofinstallation_id(case-insensitive, max 255 characters).
- Name
payload- Type
- object
- Description
Extra data for this enrollment, passed to the automation as the trigger's event data.
Request
curl -X POST https://ranksyapp.com/api/v1/apps/01JN4HKQX0000000000000000/automations/rules/14/enroll \
-H "Authorization: Bearer rk_live_..." \
-H "Content-Type: application/json" \
-d '{ "installation_id": 4210 }'
201 — Created
{
"data": {
"id": 9102,
"rule_version": 2,
"installation_id": 4210,
"trigger_ref": "manual:01jr9a6v3k8m2n4p6q8r0s2t4v",
"outcome": "fired",
"details": null,
"created_at": "2026-10-16T10:20:00+00:00",
"status": "completed",
"current_node_id": null,
"wake_at": null,
"exit_reason": null,
"finished_at": "2026-10-16T10:20:01+00:00"
}
}
Response shapes
Task
- Name
id- Type
- string
- Description
The task's ULID. Use it as
:taskto update or delete the task.
- Name
title- Type
- string
- Description
Task title.
- Name
body- Type
- string | null
- Description
Task details.
- Name
status- Type
- string
- Description
open,done, orcancelled.
- Name
priority- Type
- string
- Description
low,medium,high, orhighest.
- Name
source- Type
- string
- Description
Where the task came from:
manual(created in Ranksy),api,mcp,note(a note's reminder), orrule(an automation rule).
- Name
due_at- Type
- string | null
- Description
Due date and time, ISO 8601.
- Name
is_overdue- Type
- boolean
- Description
truewhen the task is open and its due date has passed.
- Name
assignee- Type
- object | null
- Description
{ id, name }of the assigned user, ornullwhen unassigned.
- Name
created_by- Type
- object | null
- Description
{ id, name }of the user who created the task, ornull(for example, a task an automation rule created).
- Name
customer- Type
- object | null
- Description
The customer the task is about:
{ id, name, domain, health_score, url }.idis the customer's ID,domainits.myshopify.comdomain, andurlthe path of the customer's Tasks tab in the Ranksy web app.nullfor a task with no customer.
- Name
app- Type
- object
- Description
{ ulid, name }of the app the task belongs to.
- Name
column- Type
- object | null
- Description
The board column the task is in:
{ id, name, is_done }.nullfor cancelled tasks, which leave the board.
- Name
customer_note_id- Type
- integer | null
- Description
The note whose reminder created this task, if any.
- Name
completed_at- Type
- string | null
- Description
When the task was completed, ISO 8601.
- Name
created_at- Type
- string
- Description
When the task was created, ISO 8601.
- Name
updated_at- Type
- string
- Description
When the task last changed, ISO 8601.
Automation rule
- Name
id- Type
- integer
- Description
The rule's ID.
- Name
name- Type
- string
- Description
The rule's name.
- Name
enabled- Type
- boolean
- Description
Whether the rule is running.
- Name
template_key- Type
- string | null
- Description
The catalog template the rule came from, e.g.
save_the_cancel, ornullfor a custom rule.
- Name
trigger_type- Type
- string
- Description
What wakes the rule:
event(a customer lifecycle event such asCHURNED),review(a new App Store review),cap_alert(a customer near a usage cap),trial_ending,health_drop,inactive(no app activity for a while),task_moved(a task moved to a board column),manual(customers added by hand, through the Customers page or enrollment),webhook(another system calls the automation's webhook URL),tag(a tag added to or removed from a customer),task(a task on a customer created or completed),date(some days before or after a customer date), orsegment(a customer enters or leaves a Customers filter, checked every 15 minutes).
- Name
trigger_config- Type
- object
- Description
Settings for the trigger, e.g.
{ "events": ["CHURNED"] },{ "max_rating": 3 }, or{ "days": 14 }. The keys depend ontrigger_type.
- Name
conditions- Type
- object
- Description
What the customer must match for the rule to fire, e.g.
{ "status": "active", "paid_only": true }. Empty when every customer qualifies.
- Name
actions- Type
- array
- Description
What the rule does when it fires:
create_task,add_tag, orremove_tag. Acreate_taskaction carries the task template:title,body,priority,due_offset_days(days from firing to the due date), andassignee. A tag action carries thetagname.
- Name
cohort_lookback_days- Type
- integer
- Description
A rule acts only on customers whose current install started after the rule was first enabled. This widens that window back by this many days, up to 90.
- Name
cooldown_days- Type
- integer
- Description
Minimum days between two firings for the same customer.
- Name
fired_last_7_days- Type
- integer
- Description
Runs with outcome
firedin the last 7 days.
- Name
open_tasks_created- Type
- integer
- Description
Tasks this rule created that are still open.
- Name
first_activated_at- Type
- string | null
- Description
When the rule was first enabled, ISO 8601.
- Name
created_at- Type
- string
- Description
When the rule was created, ISO 8601.
- Name
published_version- Type
- integer | null
- Description
The version number of the automation's published flow, or
nulluntil it is first published.
- Name
definition- Type
- object | null
- Description
The published flow definition (its
nodesand theirconfig), ornulluntil it is first published. Webhook secrets and tokens are never returned: they read[redacted]when set andnullwhen not.
Rule run
- Name
id- Type
- integer
- Description
The run's ID.
- Name
rule_version- Type
- integer
- Description
The version of the rule that ran. It goes up when the rule is edited.
- Name
installation_id- Type
- integer
- Description
The customer the rule ran for.
- Name
trigger_ref- Type
- string
- Description
What woke the rule, as
{kind}:{id}, e.g.event:88231(a lifecycle event),review:5120(a review), ormanual:…(an enrollment). A rule runs at most once per trigger and customer.
- Name
outcome- Type
- string
- Description
fired(the only outcome that created work),skipped_condition(the customer didn't match the conditions),skipped_cooldown(fired for this customer too recently),skipped_duplicate,skipped_cap(the daily run cap was reached), orerror.
- Name
details- Type
- object | null
- Description
Extra facts about the outcome, e.g.
{ "task_id": 512 }for a run that fired (Ranksy's internal task number, not the task's ULIDid),{ "cooldown_days": 30 }, or{ "error": "The rule failed to run." }(the error text is always this generic message).
- Name
created_at- Type
- string
- Description
When the run happened, ISO 8601.
- Name
status- Type
- string | null
- Description
Where a flow run is:
running,waiting,completed,exited,failed, orcancelled.nullfor skipped runs and for runs from before flows.
- Name
current_node_id- Type
- string | null
- Description
The flow node the run is on.
- Name
wake_at- Type
- string | null
- Description
When a
waitingrun resumes, ISO 8601.
- Name
exit_reason- Type
- string | null
- Description
Why the run left the flow early, if it did.
- Name
finished_at- Type
- string | null
- Description
When the run finished, ISO 8601.
Errors
Beyond the universal 401 / 403 / 429 (see Errors):
404— the task, rule, or customer does not exist or belongs to another app. This includes aninstallation_idon create, or aninstallation_id/shop_domainon enroll, that isn't a customer of this app.422 validation_failed— a bad field. Common causes: an assignee who isn't on your team or has no CRM access (paramisassignee_user_id), a column that isn't on your team's board (board_column_id), an unknownstatusorpriority, or adue_atthat isn't a date. On enroll: neitherinstallation_idnorshop_domainsent, or a rule that doesn't start by hand or is paused or archived (paramisrule).403 insufficient_permissions— the key, or the member who created it, lackscrm.accessfor tasks orcrm.automationsfor automations, or an older key lacks thecrm:read/crm:writescope.