Skip to main content
GET
/
api-key-pairs
C#
using Gr4vy;
using Gr4vy.Models.Components;
using Gr4vy.Models.Requests;

var sdk = new Gr4vySDK(
    id: "example",
    server: SDKConfig.Server.Sandbox,
    bearerAuthSource: Auth.WithToken(privateKey),
    merchantAccountId: "default"
);

ListApiKeyPairsResponse? res = await sdk.ApiKeyPairs.ListAsync(limit: 20);

while(res != null)
{
    // handle items

    res = await res.Next!();
}
{
  "items": [
    {
      "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "thumbprint": "<string>",
      "display_name": "<string>",
      "active": true,
      "created_at": "2023-11-07T05:31:56Z",
      "updated_at": "2023-11-07T05:31:56Z",
      "type": "api-key-pair",
      "private_key": "<string>",
      "creator": {
        "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
        "name": "<string>",
        "email_address": "john.doe@example.com",
        "thumbprint": "6zsbrjs0Cp4M4Ebz8sfHqUKGiG9Sd0lF2sfKp5-w-nk"
      },
      "merchant_accounts": [
        {
          "id": "<string>",
          "display_name": "<string>",
          "created_at": "2023-11-07T05:31:56Z",
          "updated_at": "2023-11-07T05:31:56Z",
          "type": "merchant-account",
          "over_capture_amount": 123,
          "over_capture_percentage": 123
        }
      ],
      "roles": [
        {
          "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
          "name": "<string>",
          "description": "<string>",
          "permissions": {
            "allow": [
              "<string>"
            ]
          },
          "type": "role"
        }
      ]
    }
  ],
  "limit": 20,
  "next_cursor": "ZXhhbXBsZTE",
  "previous_cursor": "Xkjss7asS"
}
This endpoint requires the api-key-pairs.read scope.

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Query Parameters

cursor
string | null

A pointer to the page of results to return.

Example:

"ZXhhbXBsZTE"

limit
integer
default:20

The maximum number of items that are returned.

Required range: 1 <= x <= 100
Example:

20

Response

Successful Response

items
APIKeyPair · object[]
required

A list of items returned for this request.

limit
integer
default:20

The number of items for this page.

Required range: 1 <= x <= 100
Example:

20

next_cursor
string | null

The cursor pointing at the next page of items.

Required string length: 1 - 1000
Example:

"ZXhhbXBsZTE"

previous_cursor
string | null

The cursor pointing at the previous page of items.

Required string length: 1 - 1000
Example:

"Xkjss7asS"