Create an API key pair
Create a new API key pair.
api-key-pairs.write scope.Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
The display name for the API key pair.
1 - 200"Production key"
The ID of the role to assign to the API key pair. Exactly one role is supported. The caller can only assign a role whose scopes are a subset of its own.
1 element["8f4b8c1a-1b2c-4d3e-9f5a-6b7c8d9e0f1a"]The algorithm to use to generate the API key pair.
ECDSA, RSA "ECDSA"
Whether the API key pair should be active and usable once created.
true
The IDs of the merchant accounts to associate with the API key pair. An empty list grants access to all merchant accounts. The caller can only assign merchant accounts it has access to.
["merchant-12345"]A PEM-encoded ECDSA P-521 (ES512) public key. Provide this to register your own key pair (bring your own key); If omitted, Gr4vy will generate the key pair and return the private key.
"-----BEGIN PUBLIC KEY-----\nMIGbMBAGByqGSM49AgEGBSuBBAAjA4GGAAQB...\n-----END PUBLIC KEY-----"
Response
Successful Response
The ID for the API key pair.
"fe26475d-ec3e-4884-9553-f7356683f7f9"
The unique thumbprint that identifies the API key pair.
"6zsbrjs0Cp4M4Ebz8sfHqUKGiG9Sd0lF2sfKp5-w-nk"
The display name for the API key pair.
1 - 200"Production key"
The algorithm used to generate the API key pair.
ECDSA, RSA "ECDSA"
Whether the API key pair is active and can be used to authenticate.
true
The date and time when this API key pair was created.
"2013-07-16T19:23:00.000+00:00"
The date and time when this API key pair was last updated.
"2013-07-16T19:23:00.000+00:00"
The type of this resource.
"api-key-pair"The PEM-encoded private key. Only returned once, in the response to creating the API key pair, and only when Gr4vy generated the key pair. Store it securely, as it cannot be retrieved later.
The user or API key pair that created this API key pair.
The merchant accounts this API key pair has access to. An empty list means it has access to all merchant accounts.
The roles assigned to this API key pair.