Your Implementation Required These endpoints must be implemented on your server
Enginy creates tasks in your CRM when sequences trigger task actions. Your API must implement the following task endpoints.
Single Task Operations
Create Task
Creates a new task in your CRM.
Request Body
Field Type Required Description subjectstring ✅ Yes The task title/subject descriptionstring No Detailed description or notes for the task typestring No Task type (e.g., “call”, “email”, “meeting”) ownerIdstring No ID of the user who owns the task in your system dueDatestring (ISO 8601) No When the task is due (e.g., 2024-01-15T10:00:00Z) contactIdstring No ID of the associated contact/lead in your CRM companyIdstring No ID of the associated company in your CRM
Example Request
{
"subject" : "Follow up with John" ,
"description" : "Discuss pricing proposal from last meeting" ,
"type" : "call" ,
"ownerId" : "user-123" ,
"dueDate" : "2024-01-15T10:00:00Z" ,
"contactId" : "contact-456" ,
"companyId" : "company-789"
}
Response
Return the created task with at least an id field:
{
"id" : "task-abc123" ,
"subject" : "Follow up with John" ,
"description" : "Discuss pricing proposal from last meeting" ,
"type" : "call" ,
"ownerId" : "user-123" ,
"dueDate" : "2024-01-15T10:00:00Z" ,
"contactId" : "contact-456" ,
"companyId" : "company-789" ,
"completed" : false
}
The id field is required in the response. Enginy uses this to track the task.
Get Task
Retrieves a single task by ID.
Path Parameters
Parameter Type Description taskIdstring The task ID returned from create
Response
{
"id" : "task-abc123" ,
"subject" : "Follow up with John" ,
"description" : "Discuss pricing proposal from last meeting" ,
"type" : "call" ,
"ownerId" : "user-123" ,
"dueDate" : "2024-01-15T10:00:00Z" ,
"contactId" : "contact-456" ,
"companyId" : "company-789" ,
"completed" : false ,
"completedAt" : null
}
Update Task (Complete)
Updates a task, typically to mark it as completed.
Path Parameters
Parameter Type Description taskIdstring The task ID to update
Request Body
Field Type Description completedboolean Set to true to mark the task as completed
Example Request
Response
Return the updated task:
{
"id" : "task-abc123" ,
"subject" : "Follow up with John" ,
"completed" : true ,
"completedAt" : "2024-01-15T11:30:00Z"
}
Batch Operations
Enginy uses batch endpoints to minimize API calls and improve performance. Instead of making individual
requests for each task, Enginy will batch multiple operations into single requests.
Get Tasks Batch
Retrieves multiple tasks in a single request.
Request Body
Field Type Required Description idsstring[] ✅ Yes Array of task IDs to retrieve
Example Request
{
"ids" : [ "task-abc123" , "task-def456" , "task-ghi789" ]
}
Response
Return an array of tasks. Tasks that don’t exist should be omitted from the response (don’t return errors for missing tasks).
[
{
"id" : "task-abc123" ,
"subject" : "Follow up with John" ,
"completed" : false
},
{
"id" : "task-def456" ,
"subject" : "Send proposal" ,
"completed" : true ,
"completedAt" : "2024-01-15T11:30:00Z"
}
]
If a task ID doesn’t exist, simply omit it from the response array rather than returning an error.
Complete Tasks Batch
Marks multiple tasks as completed in a single request.
Request Body
Field Type Required Description idsstring[] ✅ Yes Array of task IDs to complete completedboolean ✅ Yes Set to true to mark tasks as completed
Example Request
{
"ids" : [ "task-abc123" , "task-def456" ],
"completed" : true
}
Response
Return an array of the updated tasks:
[
{
"id" : "task-abc123" ,
"subject" : "Follow up with John" ,
"completed" : true ,
"completedAt" : "2024-01-15T14:22:00Z"
},
{
"id" : "task-def456" ,
"subject" : "Send proposal" ,
"completed" : true ,
"completedAt" : "2024-01-15T14:22:00Z"
}
]
Task Schema Reference
Field Type Required Description idstring ✅ Yes Unique identifier for the task subjectstring ✅ Yes Task title/subject descriptionstring No Detailed notes typestring No Task category ownerIdstring No Assigned user ID dueDatestring (ISO 8601) No Due date/time contactIdstring No Associated contact ID companyIdstring No Associated company ID completedboolean No Completion status completedAtstring (ISO 8601) No When the task was completed
Testing Your Tasks API
Before connecting to Enginy, test your task endpoints:
Test Task Creation
curl -X POST https://your-api.com/tasks \
-H "X-API-Key: your-secret-key" \
-H "Content-Type: application/json" \
-d '{"subject": "Test task", "description": "Testing integration"}'
Test Batch Get Tasks
curl -X POST https://your-api.com/tasks/batch \
-H "X-API-Key: your-secret-key" \
-H "Content-Type: application/json" \
-d '{"ids": ["task-id-1", "task-id-2"]}'
Test Batch Complete Tasks
curl -X PATCH https://your-api.com/tasks/batch \
-H "X-API-Key: your-secret-key" \
-H "Content-Type: application/json" \
-d '{"ids": ["task-id-1", "task-id-2"], "completed": true}'