Skip to main content
POST
/
tasks
/
{id}
/
execute
Execute and complete a task
curl --request POST \
  --url https://api.reply.io/v3/tasks/{id}/execute \
  --header 'Content-Type: application/json' \
  --header 'X-API-Key: <api-key>' \
  --data '
{
  "content": {
    "body": "<string>",
    "subject": "<string>"
  },
  "emailAccountId": 123
}
'
{
  "id": 123,
  "taskType": 123,
  "status": 123,
  "assignedUserId": 123,
  "creationSource": 123,
  "createdAt": "2023-11-07T05:31:56Z",
  "startAt": "2023-11-07T05:31:56Z",
  "dueTo": "2023-11-07T05:31:56Z",
  "isFailed": true,
  "isScheduled": true,
  "contactId": 123,
  "linkedInTaskType": 123,
  "sequenceId": 123,
  "sequenceStepId": 123,
  "sequenceStepDisplayName": "<string>",
  "finishedAt": "2023-11-07T05:31:56Z",
  "template": {
    "body": "<string>",
    "subject": "<string>",
    "attachmentIdList": [
      123
    ]
  },
  "content": {
    "body": "<string>",
    "subject": "<string>"
  },
  "deliveryInfo": {
    "email": "<string>",
    "phoneNumber": "<string>",
    "linkedInUrl": "<string>"
  }
}

Authorizations

X-API-Key
string
header
required

API key passed in the X-API-Key header

Path Parameters

id
integer
required

Task ID.

Body

application/json

Request body for executing a task (send email/SMS) and completing it. Only ManualEmail (7) and Sms (8) task types support execution. All fields are optional — an empty object {} uses server-rendered template and default email account.

content
TaskContent · object

Final rendered content to send. If omitted, the server renders the stored template automatically.

emailAccountId
integer<int64> | null

Email account to send from. Only for non-sequence ManualEmail tasks. If omitted, the user's default email account is used. Ignored for sequence tasks (account resolved from sequence configuration).

Response

Task executed and completed successfully. Returns the updated task.

Full task detail returned by GET by ID, Create, and Update endpoints.

id
integer
required

Task ID.

taskType
integer
required

Task type enum value. 0 = ToDo, 2 = Call, 4 = Meeting, 5 = LinkedIn, 7 = ManualEmail, 8 = Sms, 9 = WhatsApp.

status
integer
required

Task status enum value. 0 = New, 1 = Finished, 3 = Cancelled, 4 = Archived, 5 = SequenceDetached.

assignedUserId
integer
required

ID of the user this task is assigned to.

creationSource
integer
required

How the task was created. 0 = User, 1 = Sequence, 2 = Meeting.

createdAt
string<date-time>
required

When the task was created.

startAt
string<date-time>
required

Task start time. When isScheduled is true, this is the scheduled execution time.

dueTo
string<date-time>
required

Task due time.

isFailed
boolean
required

Whether the task execution failed.

isScheduled
boolean
required

Whether the task is scheduled for automatic execution.

contactId
integer | null

Associated contact (prospect) ID.

linkedInTaskType
integer | null

LinkedIn action subtype. Only present for LinkedIn tasks. 0 = Message, 1 = Connect, 2 = InMail, 3 = ViewProfile.

sequenceId
integer | null

Sequence ID if this task was created by a sequence.

sequenceStepId
integer | null

Sequence step ID. Available when the ExtendedFilterInTasks feature is enabled.

sequenceStepDisplayName
string | null

Human-readable sequence step name (e.g. "Step 2 - Email").

finishedAt
string<date-time> | null

When the task was completed. Null for active tasks.

template
TaskTemplate · object

Raw task template. For active tasks, may contain {{variable}} placeholders. For finished tasks, contains the final content (raw version is no longer available).

content
TaskContent · object

Rendered content with variables resolved. Only populated when includeContent=true query parameter is set. Null by default.

deliveryInfo
TaskDeliveryInfo · object

Delivery target information. Populated for ManualEmail (email), Call/SMS (phone), and LinkedIn (URL) tasks. Null for ToDo, Meeting, and WhatsApp tasks.