# Create GnuPG key

This function generates a GnuPG (GPG) key. The system saves the key in the user's .gnupg directory.

Note:

This function uses the system's entropy) to generate the key. Systems with low entropy levels may cause long generation times or timeouts.

Endpoint: GET /GPG/generate_key
Version: 11.136.0.19
Security: BasicAuth

## Query parameters:

  - `email` (string, required)
    The user's email address.
    Example: "user@example.com"

  - `name` (string, required)
    The name of the user for whom to generate the key.
    Example: "username"

  - `passphrase` (string, required)
    The key's password.
    Example: "123456luggage"

  - `comment` (string)
    A comment about the key.
    Example: "Username's Key"

  - `expire` (string)
    The desired expiration date of the key
as a timestamp in Unix time format.

Note:

This will default to one year from the current date.
    Example: "1560363242"

  - `keysize` (integer)
    The new key's size, in bytes.

Note:

Large keys require more time to generate.
    Enum: 1024, 2048, 3072, 4096

  - `no_expire` (integer)
    Whether to generate the key without an expiration date.

* 0 - The key will expire.
* 1 - The key will not expire.
    Enum: 0, 1

## Response 200 fields (application/json):

  - `apiversion` (integer)
    The version of the API.
    Example: 3

  - `func` (string)
    The name of the method called.
    Example: "generate_key"

  - `module` (string)
    The name of the module called.
    Example: "GPG"

  - `result` (object)

  - `result.data` (object,null)

  - `result.errors` (array,null)
    List of errors if the API failed.

  - `result.messages` (array,null)
    List of messages generated by the API.

  - `result.metadata` (object)

  - `result.status` (integer)
    - 1 - Success.
- 0 - Failed. Check the errors field for more details.
    Enum: 0, 1

  - `result.warnings` (array,null)
    List of warnings generated by the API. Warnings describe non-critical failures or other problematic conditions noted while running a API.


