Get Current User
curl --request GET \
--url https://api.beamstudio.ai/v2/user/me \
--header 'x-api-key: <api-key>'import requests
url = "https://api.beamstudio.ai/v2/user/me"
headers = {"x-api-key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'x-api-key': '<api-key>'}};
fetch('https://api.beamstudio.ai/v2/user/me', 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.beamstudio.ai/v2/user/me",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"x-api-key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.beamstudio.ai/v2/user/me"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-api-key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.beamstudio.ai/v2/user/me")
.header("x-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.beamstudio.ai/v2/user/me")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-api-key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"id": "<string>",
"name": "<string>",
"email": "<string>",
"featureFlags": [
{
"name": "<string>",
"isGlobal": true,
"id": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z"
}
],
"createdAt": "2023-11-07T05:31:56Z",
"isInternalUser": true,
"avatarSrc": "<string>",
"accessToken": "<string>",
"refreshToken": "<string>",
"paymentProviderCustomerId": "<string>",
"workspaces": [
{
"id": "<string>",
"name": "<string>",
"role": {
"isOwner": true,
"isAdmin": true
},
"creditBalance": {
"totalCredits": 123,
"usedCredits": 123,
"lastUpdatedAt": "2023-11-07T05:31:56Z"
},
"createdAt": "2023-11-07T05:31:56Z",
"agent": {
"id": "agent-123e4567-e89b-12d3-a456-426614174000",
"name": "Customer Support Agent",
"creatorId": "<string>",
"vectorDbId": "<string>",
"creditUsage": 12.5,
"order": 123,
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"description": "<string>",
"settings": {
"prompts": [
"You are a helpful customer support agent.",
"Always be polite and professional."
],
"preferredModel": "gpt-4",
"instructions": "Focus on providing concise answers."
},
"config": {
"restrictions": "<string>",
"taskTemplates": [
{
"id": "<string>",
"objective": "<string>",
"description": "<string>",
"steps": [
{
"step": "<string>",
"toolId": "<string>",
"iconSrc": "<string>",
"iconUrl": "<string>",
"beamTool": true,
"gptTool": true,
"consentRequired": true,
"integrationId": "<string>",
"isIntegrationRequired": true,
"isIntegrationConnected": true,
"integrationProvider": "<string>",
"integrationIdentifier": "<string>",
"toolDetail": {},
"integrationCustomAuthParameters": {}
}
],
"default": true,
"category": {
"id": "<string>",
"title": "<string>"
},
"lastUpdatedAt": "2023-11-07T05:31:56Z"
}
],
"tools": [
"<string>"
],
"llmTools": [
{}
],
"sop": {},
"defaultTaskId": "<string>",
"workspaceId": "<string>"
},
"workspaceId": "<string>",
"defaultTaskId": "<string>",
"themeIconUrl": "https://example.com/icons/support-agent.png",
"agentCategoryId": "<string>",
"userAccessTokenId": "<string>",
"agentSetupSessionId": "<string>",
"agentIntroMessage": "<string>",
"agentSetupMessage": "<string>",
"skipAgentSetupSop": true,
"isAttachmentDataPulledIn": true
},
"iconSrc": "<string>",
"domain": "<string>",
"isPremium": true,
"allowNegativeCredits": true,
"notificationUserEmails": [
"<string>"
],
"subscription": {
"id": "<string>",
"status": "<string>",
"currentPeriodStart": "2023-11-07T05:31:56Z",
"currentPeriodEnd": "2023-11-07T05:31:56Z",
"cancelAtPeriodEnd": true,
"paymentProvider": "<string>",
"productId": "<string>",
"product": {
"id": "<string>",
"name": "<string>",
"productType": "<string>",
"priceAmount": 123,
"currency": "<string>",
"creditsAmount": 123,
"isActive": true,
"description": "<string>",
"billingPeriod": "<string>",
"iconSrc": "<string>",
"orderNumber": 123,
"metadata": {
"isPremium": true,
"isFree": true,
"creditsAmount": 123,
"unlimitedCredits": true
}
}
}
}
]
}User
Get Current User
Retrieve the profile information of the currently authenticated user, including their workspaces and permissions.
GET
/
v2
/
user
/
me
Get Current User
curl --request GET \
--url https://api.beamstudio.ai/v2/user/me \
--header 'x-api-key: <api-key>'import requests
url = "https://api.beamstudio.ai/v2/user/me"
headers = {"x-api-key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'x-api-key': '<api-key>'}};
fetch('https://api.beamstudio.ai/v2/user/me', 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.beamstudio.ai/v2/user/me",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"x-api-key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.beamstudio.ai/v2/user/me"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-api-key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.beamstudio.ai/v2/user/me")
.header("x-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.beamstudio.ai/v2/user/me")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-api-key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"id": "<string>",
"name": "<string>",
"email": "<string>",
"featureFlags": [
{
"name": "<string>",
"isGlobal": true,
"id": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z"
}
],
"createdAt": "2023-11-07T05:31:56Z",
"isInternalUser": true,
"avatarSrc": "<string>",
"accessToken": "<string>",
"refreshToken": "<string>",
"paymentProviderCustomerId": "<string>",
"workspaces": [
{
"id": "<string>",
"name": "<string>",
"role": {
"isOwner": true,
"isAdmin": true
},
"creditBalance": {
"totalCredits": 123,
"usedCredits": 123,
"lastUpdatedAt": "2023-11-07T05:31:56Z"
},
"createdAt": "2023-11-07T05:31:56Z",
"agent": {
"id": "agent-123e4567-e89b-12d3-a456-426614174000",
"name": "Customer Support Agent",
"creatorId": "<string>",
"vectorDbId": "<string>",
"creditUsage": 12.5,
"order": 123,
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"description": "<string>",
"settings": {
"prompts": [
"You are a helpful customer support agent.",
"Always be polite and professional."
],
"preferredModel": "gpt-4",
"instructions": "Focus on providing concise answers."
},
"config": {
"restrictions": "<string>",
"taskTemplates": [
{
"id": "<string>",
"objective": "<string>",
"description": "<string>",
"steps": [
{
"step": "<string>",
"toolId": "<string>",
"iconSrc": "<string>",
"iconUrl": "<string>",
"beamTool": true,
"gptTool": true,
"consentRequired": true,
"integrationId": "<string>",
"isIntegrationRequired": true,
"isIntegrationConnected": true,
"integrationProvider": "<string>",
"integrationIdentifier": "<string>",
"toolDetail": {},
"integrationCustomAuthParameters": {}
}
],
"default": true,
"category": {
"id": "<string>",
"title": "<string>"
},
"lastUpdatedAt": "2023-11-07T05:31:56Z"
}
],
"tools": [
"<string>"
],
"llmTools": [
{}
],
"sop": {},
"defaultTaskId": "<string>",
"workspaceId": "<string>"
},
"workspaceId": "<string>",
"defaultTaskId": "<string>",
"themeIconUrl": "https://example.com/icons/support-agent.png",
"agentCategoryId": "<string>",
"userAccessTokenId": "<string>",
"agentSetupSessionId": "<string>",
"agentIntroMessage": "<string>",
"agentSetupMessage": "<string>",
"skipAgentSetupSop": true,
"isAttachmentDataPulledIn": true
},
"iconSrc": "<string>",
"domain": "<string>",
"isPremium": true,
"allowNegativeCredits": true,
"notificationUserEmails": [
"<string>"
],
"subscription": {
"id": "<string>",
"status": "<string>",
"currentPeriodStart": "2023-11-07T05:31:56Z",
"currentPeriodEnd": "2023-11-07T05:31:56Z",
"cancelAtPeriodEnd": true,
"paymentProvider": "<string>",
"productId": "<string>",
"product": {
"id": "<string>",
"name": "<string>",
"productType": "<string>",
"priceAmount": 123,
"currency": "<string>",
"creditsAmount": 123,
"isActive": true,
"description": "<string>",
"billingPeriod": "<string>",
"iconSrc": "<string>",
"orderNumber": 123,
"metadata": {
"isPremium": true,
"isFree": true,
"creditsAmount": 123,
"unlimitedCredits": true
}
}
}
}
]
}Authorizations
Response
200 - application/json
User profile retrieved successfully
⌘I