# get_publish_timeline

Source: https://modulify.ai/docs/api/publishing/get-publish-timeline

Reads a publish step by step, with when each step started and finished and how long it took.

- Title: Read the steps of a publish
- Scope: `sites:read`
- Access: Read only
- Endpoint: `POST /v1/get_publish_timeline`

The steps are provisioning, creating and starting the build machine, compiling, uploading, then creating the deploy machine, downloading, the health check and the switch. Each carries its status and, where it ran, its start and finish times and its length in `durationMs`, so this answers why a publish was slow rather than only whether it worked.

Leave out `deploymentId` for the most recent publish. A publish that finished before step tracking existed comes back with `synthesised` true, meaning the steps were inferred from the final status rather than recorded as they happened. See [Watch a publish as it happens](https://modulify.ai/docs/publish/publish-history#watch-a-publish-as-it-happens).

## Request

Call it with a `POST` to `https://api.modulify.ai/v1/get_publish_timeline`, sending the inputs below as a JSON object. The token needs the `sites:read` scope.

It only reads and changes nothing, so retrying it is safe.

```bash
curl -X POST https://api.modulify.ai/v1/get_publish_timeline \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"projectId":"PROJECT_ID"}'
```

Over MCP, the same method is the [get_publish_timeline tool](https://modulify.ai/docs/mcp/publishing/get-publish-timeline).

## Inputs

| Input | Type | Required | Description |
| --- | --- | --- | --- |
| `projectId` | string | Yes | The site id. |
| `deploymentId` | string | No | A specific publish, from `list_deployments`. Leave it out for the most recent one. |

## Response

Every call answers with the [JSON envelope](https://modulify.ai/docs/api/requests-and-responses#the-response) of `success`, `message`, `data`, `code` and `version`. `data` holds the result described above, and on a method that returns a total, `count` carries it. The [response headers](https://modulify.ai/docs/api/requests-and-responses#headers-on-every-method-call) carry the call's `X-Request-Id` and what is left of your per-minute budget in `X-RateLimit-Limit`, `X-RateLimit-Remaining` and `X-RateLimit-Reset`. [Errors](https://modulify.ai/docs/api/errors) explains every status code a call can answer with.