gmail.users.settings.cse.keypairs.create
Creates and uploads an S/MIME public key certificate chain and private key metadata for Gmail client-side encryption, letting users or delegated admins set up key pairs.
Instructions
Creates and uploads a client-side encryption S/MIME public key certificate chain and private key metadata for the authenticated user. For administrators managing identities and keypairs for users in their organization, requests require authorization with a service account that has domain-wide delegation authority to impersonate users with the https://www.googleapis.com/auth/gmail.settings.basic scope. For users managing their ow [HTTP POST] — creates or triggers a change; refused under --readonly safety profiles. Returns the API's response resource as JSON — request body is a JSON CseKeyPair object accepting disableTime, enablementState, keyPairId, pem, pkcs7, privateKeyMetadata, subjectEmailAddresses; pass it via params or whole via body_file Siblings over the same resource: disable, enable, get, list, obliterate.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| query | No | Extra KEY=VALUE query pairs for endpoints whose parameters Discovery does not describe. | |
| params | No | Parameter map merged into the request; typed parameters win. | |
| userId | Yes | [URL path segment] The requester's primary email address. To indicate the authenticated user, you can use the special value `me`. | me |
| dry_run | No | Return the request that would be sent, without sending it. | |
| body_file | No | Read the request body from this file ('-' for stdin) instead of building one from the parameters. The body is a JSON CseKeyPair object. | |
| request_body | No | Request body of type CseKeyPair: pass it via `params` (merged into the built body) or whole via `body_file`. | |
| chainValidation | No | [query parameter] The type of certificate chain validation to perform at creation. The request will be rejected if the uploaded chain fails to satisfy the requested validation ch Values: `all` = Enable all certificate chain validation and certificate revocation checks. Recommended for normal use.; `none` = Disable all certificate chain validation and certificate revocation checks. This may be useful when deliberately creating key pairs with invalid, out-of-use certificate chains to be used only for decryption of historical S/MIME messages. Key pairs created with invalid or revoked certificates cannot be used in a CseIdentity object.. | all |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| pem | No | ||
| pkcs7 | No | ||
| keyPairId | No | ||
| disableTime | No | ||
| enablementState | No | ||
| privateKeyMetadata | No | ||
| subjectEmailAddresses | No |