---
title: "Publish the draft"
method: POST
path: "/{teamPid}/publish"
tags: ["Publishing"]
---

# Publish the draft

`POST /{teamPid}/publish`

## Request

- Base URL: `https://api.rightmessage.com/v1`
- URL: `https://api.rightmessage.com/v1/{teamPid}/publish`
- Auth: HTTP bearer

Publishes the project's draft configuration to the live site and rebuilds the tracking snippet. Returns 422 when there is nothing to publish or the draft fails validation, 409 while experiment activation is busy, and 402 when the project has no plan yet (`subscription_required`, or `demo_project` for an agency demo project).

Requires an API token with the `publish` ability. Tokens created without abilities have `*`, which grants every ability.

## Path parameters

- `teamPid` string, required

## Request body

- object
  - `tabId` string
  - `message` string

## Response `200`

- object
  - `message` string, required
  - `published_at` string, required

## Other responses

- `401`: Missing, invalid or revoked API token.
- `404`: Not found
- `429`: Rate limit exceeded: 120 requests per minute for project endpoints, 60 per minute for token and connection endpoints. Retry after the `Retry-After` seconds.

---

[API](https://skmtc.dev/rightmessage/apis/rightmessage-api.md) - [All operations](https://skmtc.dev/rightmessage/apis/rightmessage-api/llms.txt) - [OpenAPI document](https://skmtc.dev/rightmessage/apis/rightmessage-api/revisions/adec35e9720c?raw)
