---
title: "Issue a new deploy token for a site. The old one stops working immediately."
method: POST
path: "/api/v1/sites/{id}/deploy-token"
tags: ["sites"]
---

# Issue a new deploy token for a site. The old one stops working immediately.

`POST /api/v1/sites/{id}/deploy-token`

## Request

- Base URL: `https://harvis.dev`
- URL: `https://harvis.dev/api/v1/sites/{id}/deploy-token`
- Auth: one of:
  - HTTP bearer
  - API key in cookie `better-auth.session_token`

A deploy token is scoped to one site and can only redeploy it — that is what the GitHub Action and `harvis link` use. An account key does strictly more; this exists for handing a single site to something you would rather not trust with the account.

## Path parameters

- `id` string, required

## Response `200`

Issue a new deploy token for a site. The old one stops working immediately.

- DeployTokenResult
  - `deployToken` string, required

## Other responses

- `401`: `unauthorized`
- `403`: `suspended`
- `404`: `siteNotFound`

---

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