# ApiUserApi All URIs are relative to https://developers.fireblocks.com/reference/ Method | HTTP request | Description ------------- | ------------- | ------------- [**createApiUser**](#createApiUser) | **POST** /management/api_users | Create API Key [**getApiUsers**](#getApiUsers) | **GET** /management/api_users | Get API Keys [**issueApiUserPairingToken**](#issueApiUserPairingToken) | **POST** /management/api_users/{userId}/pairing_token | Issue API user pairing token # **createApiUser** > createApiUser() Create a new API key in your workspace. Learn more about Fireblocks API Keys management in the following [guide](https://developers.fireblocks.com/docs/manage-api-keys). Endpoint Permission: Admin, Non-Signing Admin. ### Example ```typescript import { readFileSync } from 'fs'; import { Fireblocks, BasePath } from '@fireblocks/ts-sdk'; import type { FireblocksResponse, ApiUserApiCreateApiUserRequest } from '@fireblocks/ts-sdk'; // Set the environment variables for authentication process.env.FIREBLOCKS_BASE_PATH = BasePath.Sandbox; // or assign directly to "https://sandbox-api.fireblocks.io/v1" process.env.FIREBLOCKS_API_KEY = "my-api-key"; process.env.FIREBLOCKS_SECRET_KEY = readFileSync("./fireblocks_secret.key", "utf8"); const fireblocks = new Fireblocks(); let body: ApiUserApiCreateApiUserRequest = { // CreateAPIUser (optional) createAPIUser: param_value, // string | A unique identifier for the request. If the request is sent multiple times with the same idempotency key, the server will return the same response as the first request. The idempotency key is valid for 24 hours. (optional) idempotencyKey: idempotencyKey_example, }; fireblocks.apiUser.createApiUser(body).then((res: FireblocksResponse) => { console.log('API called successfully. Returned data: ' + JSON.stringify(res, null, 2)); }).catch((error:any) => console.error(error)); ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **createAPIUser** | **[CreateAPIUser](../models/CreateAPIUser.md)**| | **idempotencyKey** | [**string**] | A unique identifier for the request. If the request is sent multiple times with the same idempotency key, the server will return the same response as the first request. The idempotency key is valid for 24 hours. | (optional) defaults to undefined ### Return type void (empty response body) ### Authorization No authorization required ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| **200** | User creation approval request has been sent | * X-Request-ID -
| **400** | bad request | * X-Request-ID -
| **401** | Unauthorized. Missing / invalid JWT token in Authorization header. | * X-Request-ID -
| **403** | Lacking permissions. | * X-Request-ID -
| **5XX** | Internal error. | * X-Request-ID -
| **0** | Error Response | * X-Request-ID -
| [[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md) # **getApiUsers** > GetAPIUsersResponse getApiUsers() List all API keys in your workspace. - Please note that this endpoint is available only for API keys with Admin/Non Signing Admin permissions. Endpoint Permission: Admin, Non-Signing Admin. ### Example ```typescript import { readFileSync } from 'fs'; import { Fireblocks, BasePath } from '@fireblocks/ts-sdk'; import type { FireblocksResponse, GetAPIUsersResponse } from '@fireblocks/ts-sdk'; // Set the environment variables for authentication process.env.FIREBLOCKS_BASE_PATH = BasePath.Sandbox; // or assign directly to "https://sandbox-api.fireblocks.io/v1" process.env.FIREBLOCKS_API_KEY = "my-api-key"; process.env.FIREBLOCKS_SECRET_KEY = readFileSync("./fireblocks_secret.key", "utf8"); const fireblocks = new Fireblocks(); let body:any = {}; fireblocks.apiUser.getApiUsers(body).then((res: FireblocksResponse) => { console.log('API called successfully. Returned data: ' + JSON.stringify(res, null, 2)); }).catch((error:any) => console.error(error)); ``` ### Parameters This endpoint does not need any parameter. ### Return type **[GetAPIUsersResponse](../models/GetAPIUsersResponse.md)** ### Authorization No authorization required ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| **200** | got api users | * X-Request-ID -
| **401** | Unauthorized. Missing / invalid JWT token in Authorization header. | * X-Request-ID -
| **403** | Lacking permissions. | * X-Request-ID -
| **5XX** | Internal error. | * X-Request-ID -
| **0** | Error Response | * X-Request-ID -
| [[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md) # **issueApiUserPairingToken** > IssueApiUserPairingTokenResponse issueApiUserPairingToken() Issues a device pairing token for the given user and returns the user\'s info along with the token. - The API user must be in PENDING_ACTIVATION status. If the user is already set up (enabled), the request is rejected with a 409 Conflict. - Please note that this endpoint is available only for API keys with Owner/Admin/Non Signing Admin permissions. Endpoint Permission: Owner, Admin, Non-Signing Admin. ### Example ```typescript import { readFileSync } from 'fs'; import { Fireblocks, BasePath } from '@fireblocks/ts-sdk'; import type { FireblocksResponse, ApiUserApiIssueApiUserPairingTokenRequest, IssueApiUserPairingTokenResponse } from '@fireblocks/ts-sdk'; // Set the environment variables for authentication process.env.FIREBLOCKS_BASE_PATH = BasePath.Sandbox; // or assign directly to "https://sandbox-api.fireblocks.io/v1" process.env.FIREBLOCKS_API_KEY = "my-api-key"; process.env.FIREBLOCKS_SECRET_KEY = readFileSync("./fireblocks_secret.key", "utf8"); const fireblocks = new Fireblocks(); let body: ApiUserApiIssueApiUserPairingTokenRequest = { // string | The ID of the api user userId: userId_example, // string | A unique identifier for the request. If the request is sent multiple times with the same idempotency key, the server will return the same response as the first request. The idempotency key is valid for 24 hours. (optional) idempotencyKey: idempotencyKey_example, }; fireblocks.apiUser.issueApiUserPairingToken(body).then((res: FireblocksResponse) => { console.log('API called successfully. Returned data: ' + JSON.stringify(res, null, 2)); }).catch((error:any) => console.error(error)); ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **userId** | [**string**] | The ID of the api user | defaults to undefined **idempotencyKey** | [**string**] | A unique identifier for the request. If the request is sent multiple times with the same idempotency key, the server will return the same response as the first request. The idempotency key is valid for 24 hours. | (optional) defaults to undefined ### Return type **[IssueApiUserPairingTokenResponse](../models/IssueApiUserPairingTokenResponse.md)** ### Authorization No authorization required ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| **201** | Pairing token issued | * X-Request-ID -
| **401** | Unauthorized. Missing / invalid JWT token in Authorization header. | * X-Request-ID -
| **403** | Lacking permissions. | * X-Request-ID -
| **404** | API user not found for the given userId. | * X-Request-ID -
| **409** | Conflict. The API user is not in PENDING_ACTIVATION status (e.g. already set up / enabled). | * X-Request-ID -
| **5XX** | Internal error. | * X-Request-ID -
| **0** | Error Response | * X-Request-ID -
| [[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md)