---
title: "Attach an org SSH key to a VM"
method: POST
path: "/v1/vms/{id}/ssh-keys"
tags: ["VMs"]
---

# Attach an org SSH key to a VM

`POST /v1/vms/{id}/ssh-keys`

## Path parameters

- `id` string, required

## Request body

- AttachSshKeyRequest
  - `sshKeyId` string, required

## Response `204`

Attached

## Other responses

- `400` — The request is invalid
- `401` — Missing or invalid API key
- `403` — API key lacks the required scope
- `404` — Resource not found
- `409` — The request conflicts with existing state

---

[API](https://skmtc.net/openrelay/apis/openrelay-api.md) · [All operations](https://skmtc.net/openrelay/apis/openrelay-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/openrelay/openrelay-api/versions/32905b8f44f8/schema)
