---
title: "Create GPG Key"
method: POST
path: "/gpg_keys"
tags: ["gpg_keys", "GPG Keys"]
---

# Create GPG Key

`POST /gpg_keys`

Create GPG Key

## Response `201`

The GpgKeys object.

- GpgKeyEntity — GpgKeyEntity model
  - `id` integer — GPG key ID.
  - `workspace_id` integer — Workspace ID (0 for default workspace).
  - `expires_at` string, date-time — GPG key expiration date.
  - `name` string — GPG key name.
  - `partner_id` integer — Partner ID who owns this GPG Key, if applicable.
  - `partner_name` string — Name of the Partner who owns this GPG Key, if applicable.
  - `user_id` integer — User ID who owns this GPG Key, if applicable.
  - `public_key_md5` string — MD5 hash of the GPG public key
  - `private_key_md5` string — MD5 hash of the GPG private key.
  - `generated_public_key` string — GPG public key
  - `generated_private_key` string — GPG private key.
  - `private_key_password_md5` string — GPG private key password. Only required for password protected keys.

## Other responses

- `400` — Bad Request
- `401` — Unauthorized
- `403` — Forbidden
- `404` — Not Found
- `405` — Method Not Allowed
- `409` — Conflict
- `412` — Precondition Failed
- `422` — Unprocessable Entity
- `423` — Locked
- `429` — Too Many Requests

---

[API](https://skmtc.net/files/apis/files-com-api.md) · [All operations](https://skmtc.net/files/apis/files-com-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/files/files-com-api/revisions/c6d6f57e6da8/schema)
