> Markdown version of https://tuna.am/en/docs/api/public-key-add/. Documentation index: [llms.txt](https://tuna.am/en/llms.txt), full text in one file: [llms-full.txt](https://tuna.am/en/llms-full.txt). Any page is available as Markdown: append `.md` to its URL without the trailing slash.

# Create a user public key

post`/v1/public_keys`

## Request

### Authorization

* **Authorization**stringheaderrequired

  Key in the format `Bearer <API-key>`. Create a key on the [API keys](https://my.tuna.am/api_keys) page.

### Request body

application/json

* **description**stringrequired

  Key description

  **public_key**stringrequired

  Public key in OpenSSH format

### Response

200application/json

* **bits**integer\<int64>

  Key length in bits, 0 if it couldn't be determined

  **Example:&#x20;**`4096`

  **created_at**string\<date-time>

  Creation date

  **description**string

  Description

  **Example:&#x20;**`work laptop`

  **fingerprint**string

  Fingerprint

  **Example:&#x20;**`SHA256:nThbg6kXUpJWGl7E1IGOCspRomTxdCARLviKw6E5SY8`

  **id**integer\<int64>

  Public key ID

  **Example:&#x20;**`42`

  **last_used_at**string\<date-time>

  Last used date

  **owner** object

  **active**boolean

  Active flag

  **avatar_url**string

  Avatar

  **Example:&#x20;**`https://www.gravatar.com/avatar/00000000000000000000000000000000`

  **email**string

  Email

  **Example:&#x20;**`jane@example.com`

  **id**integer\<int64>

  Identifier

  **Example:&#x20;**`42`

  **name**string

  Name

  **Example:&#x20;**`Jane Doe`

  **role**string

  Role

  **Possible values:** \[`primary_owner`, `owner`, `admin`, `member`]

  **Example:&#x20;**`member`

  **provisioned_by**string

  What created or modified the object: terraform means the Terraform provider, empty means another client

  **security**string

  Key rating: ok, weak — RSA shorter than 2048 bits, unsupported — DSA or RSA shorter than 1024 bits, which the server rejects

  **Possible values:** \[`ok`, `weak`, `unsupported`]

  **Example:&#x20;**`ok`

  **type**string

  Type

  **Possible values:** \[`ssh-ed25519`, `ssh-rsa`, `ecdsa-sha2-nistp256`, `ecdsa-sha2-nistp384`, `ecdsa-sha2-nistp521`, `ssh-dss`]

  **Example:&#x20;**`ssh-ed25519`
