---
title: "Upload custom key"
method: PATCH
path: "/projects/{id}/upload_key"
tags: ["Projects"]
---

# Upload custom key

`PATCH /projects/{id}/upload_key`

## Request

- Base URL: `https://sg.deployhq.com`
- URL: `https://sg.deployhq.com/projects/{id}/upload_key`
- Auth: HTTP basic

Uploads a custom SSH private key for the project and returns the corresponding public key.

## Path parameters

- `id` string, required

## Request body

- ProjectObject4
  - `project` object, required
    - `custom_private_key` string, required

## Response `200`

Success

- PublicKeyObject
  - `public_key` string, required

## Other responses

- `401`: You are not authorized to access this resource. You need to authenticate yourself first.
- `403`: You are not allowed to access this resource. You do not have the necessary permissions.
- `422`: Unprocessable Entity
- `500`: An unexpected error occurred on the server. The server was unable to process the request.

---

[API](https://skmtc.dev/deployhq/apis/deployhq-api-interactive-documentation.md) · [All operations](https://skmtc.dev/deployhq/apis/deployhq-api-interactive-documentation/llms.txt) · [OpenAPI document](https://skmtc.dev/deployhq/apis/deployhq-api-interactive-documentation/revisions/830264ae58be?raw)
