Skip to main content
GET
/
v1beta
/
api-keys
TypeScript
import { Factify } from "@factify/sdk";

const factify = new Factify({
  bearerAuth: "<YOUR_BEARER_TOKEN_HERE>",
});

async function run() {
  const result = await factify.apiKeys.list({
    organizationId: "<id>",
  });

  for await (const page of result) {
    console.log(page);
  }
}

run();
{
  "pagination": {
    "has_more": true,
    "next_page_token": "eyJpZCI6ImRvY18wMWgyeGNlanF0ZjJuYnJleHgzdnFqaHA0MSIsImQiOiJuZXh0In0",
    "prev_page_token": "eyJpZCI6ImRvY18wMWgyeGNlanF0ZjJuYnJleHgzdnFqaHA0MSIsImQiOiJwcmV2In0"
  },
  "items": [
    {
      "created_at": "2023-11-07T05:31:56Z",
      "id": "key_01jd4h5mck9gq6zrp8bn2t4w3x",
      "is_active": true,
      "key_prefix": "ffy_prod_01jd4h5...",
      "name": "Production",
      "organization_id": "org_01h2xcejqtf2nbrexx3vqjhp41",
      "expires_at": "2023-11-07T05:31:56Z",
      "revoked_at": "2023-11-07T05:31:56Z"
    }
  ]
}

Authorizations

Authorization
string
header
required

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

Query Parameters

organization_id
string
required

Organization ID to list keys for. Pattern: org_[0-9a-hjkmnp-tv-z]{26}

Pattern: ^org_[0-9a-hjkmnp-tv-z]{26}$
include_revoked
boolean

Whether to include revoked keys in the response. Default: false (only active and expired-but-not-revoked keys are returned). When true, all keys including revoked ones are returned. Note: Expired keys are always included unless also revoked; use is_active to filter.

page_token
string

Opaque pagination token from a previous response.

page_size
integer<int32>

Maximum number of items to return per page (1-100). Default: 50.

Required range: 1 <= x <= 100

Response

Success

ListApiKeysResponse contains a page of API keys.

pagination
pagination · object
required

Pagination metadata.

items
ApiKey · object[]

List of API keys (secrets are never included).