---
title: "Create a build known host"
method: POST
path: "/projects/{project_id}/build_known_hosts"
tags: ["Build Known Hosts"]
---

# Create a build known host

`POST /projects/{project_id}/build_known_hosts`

## Request

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

Adds an SSH known host entry so the build server can connect to the specified hostname without host key verification prompts.

## Path parameters

- `project_id` string, required

## Request body

- BuildKnownHostObject
  - `build_known_host` object, required
    - `hostname` string, required
    - `public_key` string, required

## Response `201`

Success

- BuildKnownHost
  - `identifier` string
  - `hostname` string
  - `fingerprint` string

## 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)
