---
title: "Update Next Action"
method: PATCH
path: "/invoice/{invoiceId}/collection/next-action"
tags: ["invoice > collection"]
---

# Update Next Action

`PATCH /invoice/{invoiceId}/collection/next-action`

## Request

- Base URL: `https://api.mercoa.com`
- URL: `https://api.mercoa.com/invoice/{invoiceId}/collection/next-action`
- Auth: HTTP bearer

Update the collection agent's next action on this invoice with natural language. Note that updating any APPROVED action will reset the action to SUGGESTED.  This endpoint will throw an error if there is no action to update.

## Path parameters

- `invoiceId` string, required

## Request body

- CollectionTypesUpdateNextActionRequest
  - `feedback` string, required: Natural language feedback to update the collection agent's next action

## Response `200`

Response with status 200

- CollectionTypesActionResponse
  - `type` 'email', required: Discriminator value: email
  - `id` string, required
  - `scheduledExecutionTime` string, date-time, required: The UTC timestamp for when this action is scheduled for execution. Actual execution may be delayed by a few minutes due to processing time.
  - `status` 'SUGGESTED' | 'APPROVED' | 'COMPLETED', required
  - `subject` string, required: The subject of the email
  - `body` string, required: The body of the email in plaintext

## Other responses

- `400`: Error response with status 400
- `401`: Error response with status 401
- `403`: Error response with status 403
- `404`: Error response with status 404
- `409`: Error response with status 409
- `500`: Error response with status 500
- `501`: Error response with status 501

---

[API](https://skmtc.dev/mercoa/apis/mercoa-2.md) - [All operations](https://skmtc.dev/mercoa/apis/mercoa-2/llms.txt) - [OpenAPI document](https://skmtc.dev/mercoa/apis/mercoa-2/revisions/00a8e403ae18?raw)
