---
title: "Mint a Replo API key granting repository access to one project. Requires the api_keys.write scope when called with an API key."
method: POST
path: "/api-keys"
tags: ["Api-keys"]
---

# Mint a Replo API key granting repository access to one project. Requires the api_keys.write scope when called with an API key.

`POST /api-keys`

**Beta** — this endpoint may change before general availability.

## Headers

- `Replo-Api-Version` '2026-08-21', required

## Request body

- object
  - `workspaceId` string, uuid, required
  - `projectId` string, uuid, required
  - `name` string, required
  - `scopes` string[], required

## Response `201`

Mint a Replo API key granting repository access to one project. Requires the api_keys.write scope when called with an API key.

- object
  - `object` 'api_key', required
  - `id` string, uuid, required
  - `name` string, required
  - `tokenPrefix` string, required
  - `workspaceId` string, uuid, required
  - `projectId` string, uuid, required
  - `scopes` string[], required
  - `secret` string, required
  - `createdAt` string, required

## Other responses

- `400` — Invalid request.
- `401` — Missing or invalid Replo Public API token.
- `403` — You are not authorized to access this resource.
- `404` — Not Found
- `409` — The resource is in a conflicting state.
- `429` — Too many requests. Please retry after the time indicated by the Retry-After header.
- `500` — An internal error occurred.
- `503` — Service temporarily unavailable.

---

[API](https://skmtc.dev/replo/apis/replo-public-api.md) · [All operations](https://skmtc.dev/replo/apis/replo-public-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/replo/replo-public-api/revisions/6f031f6819f4/schema)
