---
title: "Set the SFTP keys"
description: "Other routes API"
---

> Documentation Index
> Fetch the complete documentation index at: https://docs.certinvo.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Set the SFTP keys

{/* Generated by apps/docs/scripts/generate.ts from contracts/api/openapi.yaml. Do not edit. */}
<div class="cvo-op">
<div class="cvo-op-main">

<div class="cvo-op-header">
<div class="cvo-op-path-row">
<span class="cvo-method" data-method="put">PUT</span>
<code class="cvo-op-path-code">/v1/sftp</code>
</div>
</div>

Replaces the public keys that may log in, up to 10, each one OpenSSH line (ed25519, ECDSA, or RSA of at least 3072 bits). An empty list lets nobody in and keeps the username. The first save makes the username. Only a signed-in person may change it.

## Request body

`application/json`, required

## Response

A `200` answer carries these fields.

## Status codes

| Status | Meaning |
|---|---|
| `200` | The login as it now is. |
| `400` | A key is not one OpenSSH public key, is weak, is listed twice, or there are more than 10 (`invalid_sftp_key`). Nothing was saved. |
| `401` | No usable credential was sent (`invalid_credentials`), or it is not a signed-in person (`session_required`). |
| `503` | This deployment runs no SFTP server or stores nothing (`sftp_not_configured`). Nothing was saved. |

</div>
<div class="cvo-op-aside">

</div>
</div>

Source: https://docs.certinvo.com/reference/api/other/set-the-sftp-keys/index.mdx
