> ## Documentation Index
> Fetch the complete documentation index at: https://docs.xenia.team/llms.txt
> Use this file to discover all available pages before exploring further.

# Complete Action

> Mark an open assigned action as done, with an optional note and photos.

Marks an open assigned action as done, as the key's user. Logged actions are saved as done when they're created, so only assigned actions can be completed.

> [!NOTE]
>
> Actions must be enabled for your workspace. Contact Xenia to enable it. Until then, every Actions endpoint returns `403` with "Actions are not enabled for this workspace."

## Permissions

The key acts as its default user, or the user in the `x-client-user` header (who must be in the workspace). That user's location access and role permissions apply.

The user must be one of the action's assignees (directly, or through their team, their location, or their role at the store) or the user who created it. Without **Can View Actions** on the user's role, only an assignee can complete it.

## Path parameters

**workspaceId** `string\<uuid\>` *required*

UUID of the workspace. Must be the workspace your API key is bound to.

**actionId** `string\<uuid\>` *required*

UUID of the action.

## Body

All fields are optional.

**note** `string`

Up to 10,000 characters. A blank note is saved as no note.

**attachments** `string[]`

Up to 20 file keys from [Upload a File](https://docs.xenia.team/api-reference/endpoints/actions/upload-file.md). At least one is required when the action's `evidenceRequired` is `photo`.

## Response

Returns `200` with `{ "data": <action> }`. The action now has `status: "done"`, and `completion` is `{ "kind": "done", "completedAt", "completedBy": { "id", "name" }, "note", "attachments" }`.

## Errors

Errors return the message at `error.message`.

| Status | When |
| - | - |
| `401` | Invalid client credentials |
| `403` | Actions are not enabled for this workspace |
| `403` | "Only an assignee or the creator can complete this action." |
| `404` | "Action not found." The id is unknown or not a uuid, or the user can't see the action |
| `409` | "This action is already done." This includes the second of two completions sent at the same time |
| `409` | "A logged action is already done; only assigned actions can be completed." |
| `422` | "This action needs a photo to be completed." The action's `evidenceRequired` is `photo` and no attachment was sent |
| `422` | "attachments must be file keys returned by this workspace's create-signed-upload-url". An attachment isn't a file key from [Upload a File](https://docs.xenia.team/api-reference/endpoints/actions/upload-file.md), such as an `https://` URL |
| `422` | A bad `note` or `attachments`, such as "attachments must be at most 20 non-empty strings" |

> [!NOTE]
>
> The `422` body is `{ "error": { "message": "..." } }` only, without the extra fields shown on the [Error handling](https://docs.xenia.team/guides/error-handling.md) page.

```bash cURL theme={null}
curl -X POST "https://api.xenia.team/api/v1/ops/workspaces/{workspaceId}/actions/{actionId}/complete" \
  -H "x-client-key: YOUR_CLIENT_KEY" \
  -H "x-client-secret: YOUR_CLIENT_SECRET" \
  -H "Content-Type: application/json" \
  -d '{
    "note": "Paint aisle re-faced.",
    "attachments": ["4a2e…/9d03…/1795200000000/paint-aisle.jpg"]
  }'
```

```json 200 theme={null}
{
  "data": {
    "id": "c41a…",
    "kind": "assigned",
    "status": "done",
    "location": { "id": "8f1c…", "name": "Downtown" },
    "title": "Re-face the paint aisle",
    "note": null,
    "createdVia": "api",
    "evidenceRequired": "photo",
    "recheckAt": null,
    "dueAt": "2026-11-20T17:00:00.000Z",
    "attachments": [],
    "coached": [],
    "assignees": [{ "type": "user", "id": "2b7e…", "name": "Sam Lee" }],
    "completion": {
      "kind": "done",
      "completedAt": "2026-11-20T16:40:03.000Z",
      "completedBy": { "id": "9d03…", "name": "Alex Kim" },
      "note": "Paint aisle re-faced.",
      "attachments": ["4a2e…/9d03…/1795200000000/paint-aisle.jpg"]
    },
    "createdBy": { "id": "9d03…", "name": "Alex Kim" },
    "createdAt": "2026-11-16T18:02:11.482Z",
    "updatedAt": "2026-11-20T16:40:03.000Z"
  }
}
```

```json 409 theme={null}
{ "error": { "message": "This action is already done." } }
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.