---
title: "Add an authorized SSH key"
method: POST
path: "/setup/api/settings/authorized-keys"
tags: ["enterprise-admin"]
---

# Add an authorized SSH key

`POST /setup/api/settings/authorized-keys`

**Note:** The request body for this operation must be submitted as `application/x-www-form-urlencoded` data. You can submit a parameter value as a string, or you can use a tool such as `curl` to submit a parameter value as the contents of a text file. For more information, see the [`curl` documentation](https://curl.se/docs/manpage.html#--data-urlencode).

## Response `201`

Response

- SshKey[]
  - `key` string
  - `pretty-print` string

## Other responses

- `401` — Unauthorized

---

[API](https://skmtc.net/github/apis/github-v3-rest-api-5.md) · [All operations](https://skmtc.net/github/apis/github-v3-rest-api-5/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/github/github-v3-rest-api-5/versions/50ae54440071/schema)
