---
title: "Create an SSH key"
method: POST
path: "/api/pki/restapi/createsshkey"
tags: ["SSH Keys"]
---

# Create an SSH key

`POST /api/pki/restapi/createsshkey`

## Request

- Base URL: `https://Hostname:Port`
- URL: `https://Hostname:Port/api/pki/restapi/createsshkey`
- Auth: API key in header `AUTHTOKEN`
- TypeScript: <https://skmtc.dev/manageengine/apis/pam360-rest-api/docs/api/pki/restapi/createsshkey/post.ts> (a function with typed inputs; its response is checked against the schema)

## Headers

- `orgName` string

## Request body `application/x-www-form-urlencoded`

- object
  - `keyName` string: Name for the SSH key
  - `passPhrase` string: Passphrase for the key
  - `comment` string
  - `length` integer: Key length (e.g., 2048, 4096)
  - `keyType` string: Key type (e.g., RSA, DSA)

## Response `200`

SSH key created

- PkiResponse: Response from PKI module endpoints (SSH/SSL)
  - `result` object
    - `status` string
    - `message` string
  - `details` object: Response payload (varies by endpoint)

---

[API](https://skmtc.dev/manageengine/apis/pam360-rest-api.md) - [All operations](https://skmtc.dev/manageengine/apis/pam360-rest-api/llms.txt) - [OpenAPI document](https://skmtc.dev/manageengine/apis/pam360-rest-api/revisions/44a47abb4bdb?raw)
