---
title: "Set the active Ed25519 key for the Repository."
method: POST
path: "/repos/{owner}/{identifier}/ed25519/"
tags: ["repos"]
---

# Set the active Ed25519 key for the Repository.

`POST /repos/{owner}/{identifier}/ed25519/`

Set the active Ed25519 key for the Repository.

## Request body

- RepositoryEd25519KeyCreate
  - `ed25519_passphrase` string — The Ed25519 passphrase used for signing.
  - `ed25519_private_key` string, required — The Ed25519 private key.

## Response `200`

The provided Ed25519 key is the same as the current Ed25519 key.

- RepositoryEd25519Key
  - `active` boolean — If selected this is the active key for this repository.
  - `created_at` string, date-time
  - `default` boolean — If selected this is the default key for this repository.
  - `fingerprint` string — Uppercase hex-encoded SHA-256 fingerprint of the public key.
  - `fingerprint_short` string
  - `public_key` string — The public key given to repository users.
  - `public_key_wire` string — The public key in `<name>:<base64>` wire format, ready to paste into Nix `trusted-public-keys`.

## Other responses

- `201` — The provided Ed25519 key was assigned to the Repository.
- `400` — The provided Ed25519 key is not valid
- `402` — Custom Ed25519 keys are not active; upgrade your account!
- `404` — Organization/Repository does not exist, or you do not have permissions.
- `422` — Missing or invalid parameters (see detail).

---

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