{"templateId":"markdown","sharedDataIds":{"sidebar":"sidebar-sidebars.yaml"},"props":{"metadata":{"markdoc":{"tagList":[]},"type":"markdown"},"seo":{"title":"Class: ApiKeyApi"},"dynamicMarkdocComponents":[],"compilationErrors":[],"ast":{"$$mdtype":"Tag","name":"article","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/sdk-reference/readme"},"children":["PERS SDK - v2.3.26"]}," / ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/sdk-reference/modules"},"children":["Exports"]}," / ApiKeyApi"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":1,"id":"class-apikeyapi","__idx":0},"children":["Class: ApiKeyApi"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Platform-Agnostic API Key API Client"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Handles API key management operations for tenant admins."," ","All operations require admin authentication and operate within tenant context."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"table-of-contents","__idx":1},"children":["Table of contents"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"constructors","__idx":2},"children":["Constructors"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/sdk-reference/classes/apikeyapi#constructor"},"children":["constructor"]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"methods","__idx":3},"children":["Methods"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/sdk-reference/classes/apikeyapi#gettenantapikeys"},"children":["getTenantApiKeys"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/sdk-reference/classes/apikeyapi#createapikey"},"children":["createApiKey"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/sdk-reference/classes/apikeyapi#revokeapikey"},"children":["revokeApiKey"]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"constructors-1","__idx":4},"children":["Constructors"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"constructor","__idx":5},"children":["constructor"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["• ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["new ApiKeyApi"]},"(",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["apiClient"]},"): ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/sdk-reference/classes/apikeyapi"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["ApiKeyApi"]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"parameters","__idx":6},"children":["Parameters"]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"align":"left","data-label":"Name"},"children":["Name"]},{"$$mdtype":"Tag","name":"th","attributes":{"align":"left","data-label":"Type"},"children":["Type"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["apiClient"]}]},{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/sdk-reference/classes/persapiclient"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["PersApiClient"]}]}]}]}]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"returns","__idx":7},"children":["Returns"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/sdk-reference/classes/apikeyapi"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["ApiKeyApi"]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"defined-in","__idx":8},"children":["Defined in"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"https://github.com/eXplorins/PERS-sdks/blob/main/packages/pers-sdk/packages/pers-sdk/src/api-key/api/api-key-api.ts#L21"},"children":["api-key/api/api-key-api.ts:21"]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"methods-1","__idx":9},"children":["Methods"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"gettenantapikeys","__idx":10},"children":["getTenantApiKeys"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["▸ ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["getTenantApiKeys"]},"(",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["type?"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["includeRevoked?"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["options?"]},"): ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Promise"]},"<",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["PaginatedResponseDTO"]},"<",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["ApiKeyDTO"]},">>"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["ADMIN: Get all tenant API keys"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"parameters-1","__idx":11},"children":["Parameters"]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"align":"left","data-label":"Name"},"children":["Name"]},{"$$mdtype":"Tag","name":"th","attributes":{"align":"left","data-label":"Type"},"children":["Type"]},{"$$mdtype":"Tag","name":"th","attributes":{"align":"left","data-label":"Default value"},"children":["Default value"]},{"$$mdtype":"Tag","name":"th","attributes":{"align":"left","data-label":"Description"},"children":["Description"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["type?"]}]},{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["IntegrationApiKeyType"]}]},{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["undefined"]}]},{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":["Optional filter by integration API key type (database-stored tokens that can be revoked)"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["includeRevoked"]}]},{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["boolean"]}]},{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["false"]}]},{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":["Include revoked API keys in results (default: false)"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["options?"]}]},{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["PaginationOptions"]}]},{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["undefined"]}]},{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":["Pagination options (page, limit, sortBy, sortOrder)"]}]}]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"returns-1","__idx":12},"children":["Returns"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Promise"]},"<",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["PaginatedResponseDTO"]},"<",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["ApiKeyDTO"]},">>"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Paginated response with API keys for the current tenant"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"defined-in-1","__idx":13},"children":["Defined in"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"https://github.com/eXplorins/PERS-sdks/blob/main/packages/pers-sdk/packages/pers-sdk/src/api-key/api/api-key-api.ts#L31"},"children":["api-key/api/api-key-api.ts:31"]}]},{"$$mdtype":"Tag","name":"hr","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"createapikey","__idx":14},"children":["createApiKey"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["▸ ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["createApiKey"]},"(",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["req"]},"): ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Promise"]},"<",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["ApiKeyCreatedDTO"]},">"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["ADMIN: Create new API key"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"parameters-2","__idx":15},"children":["Parameters"]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"align":"left","data-label":"Name"},"children":["Name"]},{"$$mdtype":"Tag","name":"th","attributes":{"align":"left","data-label":"Type"},"children":["Type"]},{"$$mdtype":"Tag","name":"th","attributes":{"align":"left","data-label":"Description"},"children":["Description"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["req"]}]},{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["ApiKeyRequestDTO"]}]},{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":["API key creation request containing type, name, and optional configuration"]}]}]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"returns-2","__idx":16},"children":["Returns"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Promise"]},"<",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["ApiKeyCreatedDTO"]},">"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Created API key with the actual key (store securely - only returned once)"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"defined-in-2","__idx":17},"children":["Defined in"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"https://github.com/eXplorins/PERS-sdks/blob/main/packages/pers-sdk/packages/pers-sdk/src/api-key/api/api-key-api.ts#L46"},"children":["api-key/api/api-key-api.ts:46"]}]},{"$$mdtype":"Tag","name":"hr","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"revokeapikey","__idx":18},"children":["revokeApiKey"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["▸ ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["revokeApiKey"]},"(",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["apiKeyId"]},"): ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Promise"]},"<",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["ApiKeyVerificationDTO"]},">"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["ADMIN: Revoke API key"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"parameters-3","__idx":19},"children":["Parameters"]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"align":"left","data-label":"Name"},"children":["Name"]},{"$$mdtype":"Tag","name":"th","attributes":{"align":"left","data-label":"Type"},"children":["Type"]},{"$$mdtype":"Tag","name":"th","attributes":{"align":"left","data-label":"Description"},"children":["Description"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["apiKeyId"]}]},{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["string"]}]},{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":["Unique identifier of the API key to revoke"]}]}]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"returns-3","__idx":20},"children":["Returns"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Promise"]},"<",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["ApiKeyVerificationDTO"]},">"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["API key verification details with revocation status"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"defined-in-3","__idx":21},"children":["Defined in"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"https://github.com/eXplorins/PERS-sdks/blob/main/packages/pers-sdk/packages/pers-sdk/src/api-key/api/api-key-api.ts#L56"},"children":["api-key/api/api-key-api.ts:56"]}]}]},"headings":[{"value":"Class: ApiKeyApi","id":"class-apikeyapi","depth":1},{"value":"Table of contents","id":"table-of-contents","depth":2},{"value":"Constructors","id":"constructors","depth":3},{"value":"Methods","id":"methods","depth":3},{"value":"Constructors","id":"constructors-1","depth":2},{"value":"constructor","id":"constructor","depth":3},{"value":"Parameters","id":"parameters","depth":4},{"value":"Returns","id":"returns","depth":4},{"value":"Defined in","id":"defined-in","depth":4},{"value":"Methods","id":"methods-1","depth":2},{"value":"getTenantApiKeys","id":"gettenantapikeys","depth":3},{"value":"Parameters","id":"parameters-1","depth":4},{"value":"Returns","id":"returns-1","depth":4},{"value":"Defined in","id":"defined-in-1","depth":4},{"value":"createApiKey","id":"createapikey","depth":3},{"value":"Parameters","id":"parameters-2","depth":4},{"value":"Returns","id":"returns-2","depth":4},{"value":"Defined in","id":"defined-in-2","depth":4},{"value":"revokeApiKey","id":"revokeapikey","depth":3},{"value":"Parameters","id":"parameters-3","depth":4},{"value":"Returns","id":"returns-3","depth":4},{"value":"Defined in","id":"defined-in-3","depth":4}],"frontmatter":{"seo":{"title":"Class: ApiKeyApi"}},"lastModified":"2026-08-21T18:40:55.000Z","pagePropGetterError":{"message":"","name":""}},"slug":"/sdk-reference/classes/apikeyapi","userData":{"isAuthenticated":false,"teams":["anonymous"]},"isPublic":true}