Create API Key
Create a new API key in your workspace. Learn more about Fireblocks API Keys management in the following guide. Endpoint Permission: Admin, Non-Signing Admin.
POST
/
management
/
api_users
TypeScript
const response: Promise<FireblocksResponse<void>> = fireblocks.apiUser.createApiUser(apiUserApiCreateApiUserRequest);CompletableFuture<ApiResponse<Void>> response = fireblocks.apiUser().createApiUser(createAPIUser, idempotencyKey);response = fireblocks.api_user.create_api_user(create_a_p_i_user, idempotency_key);curl --request POST \
--url https://api.fireblocks.io/v1/management/api_users \
--header 'Content-Type: application/json' \
--data '
{
"role": "<string>",
"name": "<string>",
"csrPem": "-----BEGIN CERTIFICATE REQUEST-----aaa-----END CERTIFICATE REQUEST-----",
"coSignerSetupType": "SGX_MACHINE",
"coSignerSetupIsFirstUser": true
}
'const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
role: '<string>',
name: '<string>',
csrPem: '-----BEGIN CERTIFICATE REQUEST-----aaa-----END CERTIFICATE REQUEST-----',
coSignerSetupType: 'SGX_MACHINE',
coSignerSetupIsFirstUser: true
})
};
fetch('https://api.fireblocks.io/v1/management/api_users', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.fireblocks.io/v1/management/api_users",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'role' => '<string>',
'name' => '<string>',
'csrPem' => '-----BEGIN CERTIFICATE REQUEST-----aaa-----END CERTIFICATE REQUEST-----',
'coSignerSetupType' => 'SGX_MACHINE',
'coSignerSetupIsFirstUser' => true
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.fireblocks.io/v1/management/api_users"
payload := strings.NewReader("{\n \"role\": \"<string>\",\n \"name\": \"<string>\",\n \"csrPem\": \"-----BEGIN CERTIFICATE REQUEST-----aaa-----END CERTIFICATE REQUEST-----\",\n \"coSignerSetupType\": \"SGX_MACHINE\",\n \"coSignerSetupIsFirstUser\": true\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}require 'uri'
require 'net/http'
url = URI("https://api.fireblocks.io/v1/management/api_users")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"role\": \"<string>\",\n \"name\": \"<string>\",\n \"csrPem\": \"-----BEGIN CERTIFICATE REQUEST-----aaa-----END CERTIFICATE REQUEST-----\",\n \"coSignerSetupType\": \"SGX_MACHINE\",\n \"coSignerSetupIsFirstUser\": true\n}"
response = http.request(request)
puts response.read_body{
"error": {
"type": "INTERNAL",
"message": "<string>"
}
}{
"error": {
"type": "INTERNAL",
"message": "<string>"
}
}{
"error": {
"type": "INTERNAL",
"message": "<string>"
}
}{
"message": "<string>",
"code": 123
}Headers
Body
application/json
CSR file that is used to verify API requests. read more https://developers.fireblocks.com/docs/quickstart
Example:
"-----BEGIN CERTIFICATE REQUEST-----aaa-----END CERTIFICATE REQUEST-----"
Response
User creation approval request has been sent
Was this page helpful?
⌘I
TypeScript
const response: Promise<FireblocksResponse<void>> = fireblocks.apiUser.createApiUser(apiUserApiCreateApiUserRequest);CompletableFuture<ApiResponse<Void>> response = fireblocks.apiUser().createApiUser(createAPIUser, idempotencyKey);response = fireblocks.api_user.create_api_user(create_a_p_i_user, idempotency_key);curl --request POST \
--url https://api.fireblocks.io/v1/management/api_users \
--header 'Content-Type: application/json' \
--data '
{
"role": "<string>",
"name": "<string>",
"csrPem": "-----BEGIN CERTIFICATE REQUEST-----aaa-----END CERTIFICATE REQUEST-----",
"coSignerSetupType": "SGX_MACHINE",
"coSignerSetupIsFirstUser": true
}
'const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
role: '<string>',
name: '<string>',
csrPem: '-----BEGIN CERTIFICATE REQUEST-----aaa-----END CERTIFICATE REQUEST-----',
coSignerSetupType: 'SGX_MACHINE',
coSignerSetupIsFirstUser: true
})
};
fetch('https://api.fireblocks.io/v1/management/api_users', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.fireblocks.io/v1/management/api_users",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'role' => '<string>',
'name' => '<string>',
'csrPem' => '-----BEGIN CERTIFICATE REQUEST-----aaa-----END CERTIFICATE REQUEST-----',
'coSignerSetupType' => 'SGX_MACHINE',
'coSignerSetupIsFirstUser' => true
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.fireblocks.io/v1/management/api_users"
payload := strings.NewReader("{\n \"role\": \"<string>\",\n \"name\": \"<string>\",\n \"csrPem\": \"-----BEGIN CERTIFICATE REQUEST-----aaa-----END CERTIFICATE REQUEST-----\",\n \"coSignerSetupType\": \"SGX_MACHINE\",\n \"coSignerSetupIsFirstUser\": true\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}require 'uri'
require 'net/http'
url = URI("https://api.fireblocks.io/v1/management/api_users")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"role\": \"<string>\",\n \"name\": \"<string>\",\n \"csrPem\": \"-----BEGIN CERTIFICATE REQUEST-----aaa-----END CERTIFICATE REQUEST-----\",\n \"coSignerSetupType\": \"SGX_MACHINE\",\n \"coSignerSetupIsFirstUser\": true\n}"
response = http.request(request)
puts response.read_body{
"error": {
"type": "INTERNAL",
"message": "<string>"
}
}{
"error": {
"type": "INTERNAL",
"message": "<string>"
}
}{
"error": {
"type": "INTERNAL",
"message": "<string>"
}
}{
"message": "<string>",
"code": 123
}