Skip to main content

Create a user public key

post/v1/public_keys

Request​

Authorization

  • Authorizationstringheaderrequired

    Key in the format Bearer <API-key>. Create a key on the API keys page.

Request body

    descriptionstringrequired

    Key description

    public_keystringrequired

    Public key in OpenSSH format

Response

    bitsinteger<int64>

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

    Example: 4096
    created_atstring<date-time>

    Creation date

    descriptionstring

    Description

    Example: work laptop
    fingerprintstring

    Fingerprint

    Example: SHA256:nThbg6kXUpJWGl7E1IGOCspRomTxdCARLviKw6E5SY8
    idinteger<int64>

    Public key ID

    Example: 42
    last_used_atstring<date-time>

    Last used date

    owner object
    activeboolean

    Active flag

    avatar_urlstring

    Avatar

    Example: https://www.gravatar.com/avatar/00000000000000000000000000000000
    emailstring

    Email

    Example: jane@example.com
    idinteger<int64>

    Identifier

    Example: 42
    namestring

    Name

    Example: Jane Doe
    rolestring

    Role

    Possible values: [primary_owner, owner, admin, member]

    Example: member
    provisioned_bystring

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

    securitystring

    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: ok
    typestring

    Type

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

    Example: ssh-ed25519