Create an API key
curl --request POST \
--url https://api.useblueprints.ai/api/api-keys \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"scopes": []
}
'const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({name: '<string>', scopes: []})
};
fetch('https://api.useblueprints.ai/api/api-keys', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.useblueprints.ai/api/api-keys"
payload = {
"name": "<string>",
"scopes": []
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"scopes": [
"blueprints:read"
],
"createdAt": "2023-11-07T05:31:56Z",
"lastUsedAt": "2023-11-07T05:31:56Z",
"revokedAt": "2023-11-07T05:31:56Z",
"key": "bp_YOUR_API_KEY"
}{
"error": {
"message": "<string>"
},
"message": "<string>"
}{
"error": {
"message": "<string>"
},
"message": "<string>"
}API keys
Create an API key
Creates a new scoped key for trusted integrations and MCP clients. This endpoint accepts only the in-product browser session cookie — bp_ API keys cannot create other API keys. Use the in-app UI rather than calling this endpoint directly. The plaintext bp_ key is returned once; store it immediately.
POST
/
api
/
api-keys
Create an API key
curl --request POST \
--url https://api.useblueprints.ai/api/api-keys \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"scopes": []
}
'const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({name: '<string>', scopes: []})
};
fetch('https://api.useblueprints.ai/api/api-keys', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.useblueprints.ai/api/api-keys"
payload = {
"name": "<string>",
"scopes": []
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"scopes": [
"blueprints:read"
],
"createdAt": "2023-11-07T05:31:56Z",
"lastUsedAt": "2023-11-07T05:31:56Z",
"revokedAt": "2023-11-07T05:31:56Z",
"key": "bp_YOUR_API_KEY"
}{
"error": {
"message": "<string>"
},
"message": "<string>"
}{
"error": {
"message": "<string>"
},
"message": "<string>"
}Body
application/json
Required string length:
1 - 200Scopes granted to the new key. Send explicit least-privilege scopes for API-created keys.
Available options:
blueprints:read, blueprints:write, blueprints:deploy, orders:read, orders:write, market_data:read, portfolio:read, portfolio:write, risk:read, risk:write, api_keys:read, api_keys:write Response
Created API key including one-time plaintext key.
Available options:
blueprints:read, blueprints:write, blueprints:deploy, orders:read, orders:write, market_data:read, portfolio:read, portfolio:write, risk:read, risk:write, api_keys:read, api_keys:write Example:
"bp_YOUR_API_KEY"