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

# Work Log API

> Log the work your team and its AI assistants start, finish or drop, and read it back through the Public API v1 and MCP

The work log is a shared record of what each staff member worked on: who, what, when, and how it ended. People and the AI assistants working for them add one entry per piece of work, such as a pull request or a customer proposal. Another assistant can then read the log to coordinate the team: check whether planned work was done, or spot work that was started and left aside.

Staff users read the log in AGO from **Work log** at the top of the Tasks page. See [Tasks](https://ago.mintlify.site/features/tasks.md#work-log).

## Before you start

* **Entries belong to an active staff user.** For an API key, that is the user who created the key. For OAuth, it is the user who granted access. No call accepts an author: give each person their own key or connection. If that user is not an active staff user, calls return `403` with code `staff_principal_required`.
* **Scopes**: `work_log:read` to read everyone's entries. `work_log:write` to log work and delete your own entries. `work_log:write` includes `work_log:read`.
* **The person must have turned the log on.** Nothing is logged for someone until they switch on **Let my AIs log my work** on the Work log page, and nothing is logged for anyone while a super admin has turned the work log off for the workspace. Until then, logging answers `403` with code `work_log_not_turned_on` or `work_log_disabled`. Reading and deleting entries still work, and so does sending a private category to have an entry forgotten.

Create the key in **Studio** > **API Keys**. See [API Key Authentication](https://ago.mintlify.site/security/api-key-authentication.md).

## Log work

Log a piece of work once when it starts and once when it ends, with the same `key`:

```bash theme={null}
curl -X POST "https://your-workspace.api.useago.com/api/v1/work-log" \
  -H "X-API-Key: ago_v1_sk_your_key_here" \
  -H "Content-Type: application/json" \
  -d '{
    "key": "billing-export",
    "status": "in_progress",
    "title": "Rework the billing export",
    "work_type": "feature",
    "category": "engineering",
    "tags": ["billing", "q4 launch"]
  }'
```

```bash theme={null}
curl -X POST "https://your-workspace.api.useago.com/api/v1/work-log" \
  -H "X-API-Key: ago_v1_sk_your_key_here" \
  -H "Content-Type: application/json" \
  -d '{
    "key": "billing-export",
    "status": "done",
    "reference_url": "https://git.example.com/acme/app/pull/42"
  }'
```

The first call answers `201` and the second `200`, both with the entry:

```json theme={null}
{
  "object": "work_log_entry",
  "id": "33333333-3333-4333-8333-333333333333",
  "author": {"id": "44444444-4444-4444-8444-444444444444", "name": "Alex Martin", "email": "alex@example.com"},
  "key": "billing-export",
  "title": "Rework the billing export",
  "comment": "",
  "category": "engineering",
  "work_type": "feature",
  "status": "done",
  "reference_url": "https://git.example.com/acme/app/pull/42",
  "source": "",
  "task": null,
  "team": {"id": "55555555-5555-4555-8555-555555555555", "name": "Product"},
  "tags": ["billing", "q4 launch"],
  "started_at": "2026-10-14T08:12:00Z",
  "ended_at": "2026-10-14T15:40:00Z",
  "updated_at": "2026-10-14T15:40:00Z"
}
```

| Field | Description |
| - | - |
| `status` | Required. `in_progress`, `done` or `abandoned` |
| `key` | Your own stable name for the work, up to 200 characters. Logging again with the same key updates your entry instead of adding one. Keys are per author. Without a key, every call adds an entry that cannot be updated later |
| `title` | What the work is, in one sentence, up to 200 characters. Required to add an entry, optional to update one |
| `comment` | Outcome, or the reason the work was dropped, up to 1,000 characters |
| `work_type` | The kind of work: `feature`, `fix`, `maintenance`, `research`, `documentation`, `customer_request`, `review` or `other` (default) |
| `category` | The area of the company: `engineering`, `product`, `sales`, `support`, `marketing`, `operations`, `finance` or `other` (default) |
| `reference_url` | Where the result lives. Must start with `https://` or `http://` |
| `source` | The tool that logged the entry, up to 40 characters. Through MCP, AGO sets it to the name the connected AI reports, or `mcp` when it reports none |
| `task_id` | A task of your [Tasks](https://ago.mintlify.site/features/tasks.md) board, as a UUID or an identifier such as `TASK-12`. Tasks must be enabled and you must have access to the task. Send `null` to remove the link |
| `team` | The team the work belongs to, as a name or an ID. Without it, a new entry goes to your team when you belong to exactly one, and to no team otherwise. Send `null` to remove the team |
| `tags` | Up to 10 free labels of 40 characters at most, such as a project or a product area. Tags are stored in lowercase. Sending `tags` replaces the entry's tags |

Teams are the ones of your workspace, managed with your users. Tags need no setup: reuse the same ones so they stay useful as filters.

An update only changes the fields you send. `started_at` is the time of the first call. `ended_at` is set when the status becomes `done` or `abandoned`, and cleared if the work goes back to `in_progress`.

## What the log never stores

Keep titles and comments high level: no customer data, people's names, credentials, figures or file contents.

Work sent with the category `hr`, `personal` or `sensitive_strategy` is never stored. The call answers `204` with no content, and an entry already logged under the same key is removed. Assistants should not log this kind of work at all.

Your workspace also excludes topics. By default, AGO leaves out anything unrelated to work, such as personal errands or leisure; staff users can replace this yes/no question in **Settings** on the Work log page, for example with "Is this work about recruiting or salaries?". AGO asks it about the title, comment and tags of each call that sends them. The check needs OpenAI as the fast model provider, or an AI gateway: without one, the default question is skipped. When the answer is yes, the work is not stored either: the call answers `204` and an entry already logged under the same key is removed. A call that only changes the status, such as the one that closes a piece of work, is not checked again.

## Read the log

```bash theme={null}
curl "https://your-workspace.api.useago.com/api/v1/work-log?author=alex@example.com&start_date=2026-10-14&end_date=2026-10-14" \
  -H "X-API-Key: ago_v1_sk_your_key_here"
```

Entries are listed most recently started first, 50 per page (`page`, `page_size` up to 100).

| Filter | Description |
| - | - |
| `author` | `me`, a user ID or an email |
| `team` | A team name or ID |
| `tag` | One tag, or several separated by commas to keep entries that carry all of them |
| `status` | `in_progress`, `done` or `abandoned` |
| `work_type` | One kind of work |
| `category` | One of the stored categories |
| `task_id` | Entries linked to this task |
| `start_date`, `end_date` | Work started or ended in the period. A date alone covers the whole day, in UTC |
| `inactive_days` | Work still `in_progress` that nobody updated for this many days (1 to 365) |

To find abandoned work, combine both signals: entries with the status `abandoned`, and `inactive_days` for work that was started and never closed.

## Delete an entry

`DELETE /api/v1/work-log/{entry_id}` removes one of your own entries and answers `204`. Someone else's entry answers `404`, like a missing one.

## Errors

| Code | Status | Meaning |
| - | - | - |
| `staff_principal_required` | 403 | The key's creator or the OAuth user is not an active staff user |
| `work_log_not_turned_on` | 403 | The person behind the key or connection has not turned on the work log |
| `work_log_disabled` | 403 | The work log is turned off for the workspace |
| `title_required` | 400 | A new entry needs a `title`: you sent no key, or no entry of yours has this key yet |
| `invalid_category`, `invalid_work_type` | 400 | Unknown value; the message lists the accepted ones |
| `invalid_status` | 400 | Unknown `status` filter when reading the log |
| `validation_error` | 422 | A field breaks its limit when logging: unknown `status`, a title, comment or key that is too long, or more than 10 tags |
| `unknown_team` | 400 | No team has this name or ID; the message lists the teams of your workspace |
| `invalid_tags` | 400 | A tag is longer than 40 characters |
| `invalid_reference_url` | 400 | `reference_url` does not start with `https://` or `http://` |
| `invalid_period` | 400 | `start_date` is after `end_date` |
| `work_log_entry_not_found` | 404 | No entry of yours has this ID |
| `topic_check_unavailable`, `topic_check_failed` | 503 | Your workspace excludes topics but the check could not run, so nothing was stored. Try again; if it persists, an admin should review the work log settings |

See [Errors](https://ago.mintlify.site/api/errors.md) for the error envelope.

## MCP tools

AI assistants connected to the [AGO MCP server](https://ago.mintlify.site/api/mcp-tool-api.md) get the same operations: `log_work`, `list_work_log` and `delete_work_log_entry`. Entries logged through an OAuth connection belong to the person who approved it.

For a person who turned the log on, AGO also tells the connected assistant to log their work: when to log, what to leave out, and one entry per piece of work. Nothing else is needed, for example in Claude. The connection needs the `work_log:write` scope: an assistant connected before that scope existed must be connected again. While the work log is turned off for the workspace, `log_work` is not listed; `list_work_log` and `delete_work_log_entry` stay available.

## Log work from Claude Code

Claude Code can log its own work while it helps you. Set the endpoint and your key in `~/.claude/settings.json`, and add a hook that gives Claude the instructions when a session starts:

```json theme={null}
{
  "env": {
    "AGO_WORK_LOG_URL": "https://your-workspace.api.useago.com/api/v1/work-log",
    "AGO_WORK_LOG_KEY": "ago_v1_sk_your_key_here"
  },
  "hooks": {
    "SessionStart": [
      {"hooks": [{"type": "command", "command": "cat ~/.claude/ago-work-log.md"}]}
    ]
  }
}
```

Then create `~/.claude/ago-work-log.md` with the instructions:

```markdown theme={null}
Log each piece of work to the AGO work log, once when it starts and once when it ends:

curl -sS -m 5 -X POST "$AGO_WORK_LOG_URL" -H "X-API-Key: $AGO_WORK_LOG_KEY" -H "Content-Type: application/json" \
  -d '{"key": "<repository>#<branch>", "status": "in_progress", "title": "<one high-level sentence>", "work_type": "<feature|fix|maintenance|research|documentation|customer_request|review|other>", "tags": ["<repository>"], "source": "claude_code"}'

End it with the same key and "status": "done" (add "reference_url" for a pull request) or "abandoned" (add a "comment" saying why).
Outside a repository, choose a short key that names the piece of work, or send no key to log one-off work in a single call.
One entry per piece of work, not per step or prompt. Skip questions and small lookups.
Never put customer data, people's names, credentials, figures or file contents in a title or comment.
Never log HR, personal or sensitive strategy work.
```

Use a key with the `work_log:write` scope only, one per person.


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