Organizations and Members
Account Registration
POST /api/auth/registration/
Request Body
Parameters
string (email)
Yes
password1
string
Yes
password2
string
Yes
name
string
Yes
company
string
Yes
referralCode
string
No
authSource
object (contains 2 properties: id, name)
No
authSource.id
string (uuid)
Yes
Request Structure Example
{
"email": string (email)
"password1": string
"password2": string
"name": string
"company": string
"referralCode"?: string // Optional
"authSource"?: // Optional
{
"id": string (uuid)
}
}Request Example Value
{
"email": "[email protected]",
"password1": "Example String",
"password2": "Example String",
"name": "Example Name",
"company": "Example String",
"referralCode": "Example String",
"authSource": {
"id": "550e8400-e29b-41d4-a716-446655440000"
}
}Code Examples
# Call API Example (Shell)
curl -X POST "https://api.maiagent.ai/api/auth/registration/" \
-H "Authorization: Api-Key YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"email": "[email protected]",
"password1": "sample_string",
"password2": "sample_string",
"name": "Sample Name",
"company": "sample_string",
"referralCode": "sample_string",
"authSource": {
"id": "550e8400-e29b-41d4-a716-446655440000"
}
}'
# Please replace YOUR_API_KEY and verify the request data before execution.const axios = require('axios');
// Set request headers
const config = {
headers: {
'Authorization': 'Api-Key YOUR_API_KEY',
'Content-Type': 'application/json'
}
};
// Request payload
const data = {
"email": "[email protected]",
"password1": "example string",
"password2": "example string",
"name": "example name",
"company": "example string",
"referralCode": "example string",
"authSource": {
"id": "550e8400-e29b-41d4-a716-446655440000"
}
};
axios.post("https://api.maiagent.ai/api/auth/registration/", data, config)
.then(response => {
console.log('Successfully received response:');
console.log(response.data);
})
.catch(error => {
console.error('An error occurred with the request:');
console.error(error.response?.data || error.message);
});import requests
url = "https://api.maiagent.ai/api/auth/registration/"
headers = {
"Authorization": "Api-Key YOUR_API_KEY",
"Content-Type": "application/json"
}
# Request payload
data = {
"email": "[email protected]",
"password1": "example_string",
"password2": "example_string",
"name": "example_name",
"company": "example_string",
"referralCode": "example_string",
"authSource": {
"id": "550e8400-e29b-41d4-a716-446655440000"
}
}
response = requests.post(url, json=data, headers=headers)
try:
print("Successfully received response:")
print(response.json())
except Exception as e:
print("An error occurred during the request:", e)<?php
require 'vendor/autoload.php';
$client = new GuzzleHttp\Client();
try {
$response = $client->post("https://api.maiagent.ai/api/auth/registration/", [
'headers' => [
'Authorization' => 'Api-Key YOUR_API_KEY',
'Content-Type' => 'application/json'
],
'json' => {
"email": "[email protected]",
"password1": "Example String",
"password2": "Example String",
"name": "Example Name",
"company": "Example String",
"referralCode": "Example String",
"authSource": {
"id": "550e8400-e29b-41d4-a716-446655440000"
}
}
]);
$data = json_decode($response->getBody(), true);
echo "Successfully received response:\n";
print_r($data);
} catch (Exception $e) {
echo 'Request failed: ' . $e->getMessage();
}
?>Response Body
Status Code: 201
Response Schema Example
{
"detail": string
}Response Example Value
{
"detail": "Response string"
}Change Password
POST /api/auth/password/change/
Request Body
Request Parameters
oldPassword
string
Yes
newPassword1
string
Yes
newPassword2
string
Yes
Request Structure Example
{
"oldPassword": string
"newPassword1": string
"newPassword2": string
}Request Example Value
{
"oldPassword": "Sample String",
"newPassword1": "Sample String",
"newPassword2": "Sample String"
}Code Examples
# Call API Example (Shell)
curl -X POST "https://api.maiagent.ai/api/auth/password/change/" \
-H "Authorization: Api-Key YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"oldPassword": "example_string",
"newPassword1": "example_string",
"newPassword2": "example_string"
}'
# Please replace YOUR_API_KEY and verify the request data before execution.const axios = require('axios');
// Set request headers
const config = {
headers: {
'Authorization': 'Api-Key YOUR_API_KEY',
'Content-Type': 'application/json'
}
};
// Request payload
const data = {
"oldPassword": "example string",
"newPassword1": "example string",
"newPassword2": "example string"
};
axios.post("https://api.maiagent.ai/api/auth/password/change/", data, config)
.then(response => {
console.log('Successfully received response:');
console.log(response.data);
})
.catch(error => {
console.error('An error occurred with the request:');
console.error(error.response?.data || error.message);
});import requests
url = "https://api.maiagent.ai/api/auth/password/change/"
headers = {
"Authorization": "Api-Key YOUR_API_KEY",
"Content-Type": "application/json"
}
# Request payload
data = {
"oldPassword": "string",
"newPassword1": "string",
"newPassword2": "string"
}
response = requests.post(url, json=data, headers=headers)
try:
print("Successfully received response:")
print(response.json())
except Exception as e:
print("An error occurred during the request:", e)<?php
require 'vendor/autoload.php';
$client = new GuzzleHttp\Client();
try {
$response = $client->post("https://api.maiagent.ai/api/auth/password/change/", [
'headers' => [
'Authorization' => 'Api-Key YOUR_API_KEY',
'Content-Type' => 'application/json'
],
'json' => {
"oldPassword": "string",
"newPassword1": "string",
"newPassword2": "string"
}
]);
$data = json_decode($response->getBody(), true);
echo "Response received successfully:\n";
print_r($data);
} catch (Exception $e) {
echo 'An error occurred during the request: ' . $e->getMessage();
}
?>Response Body
Status Code: 200
Response Schema Example
{
"detail": string
}Response Example Value
{
"detail": "Response string"
}Create a New Organization
POST /api/organizations/
Request Body
Request Parameters
name
string
Yes
compactLogo
string (uri)
No
fullLogo
string (uri)
No
Request Structure Example
{
"name": string
"compactLogo"?: string (uri) // Optional
"fullLogo"?: string (uri) // Optional
}Request Example Value
{
"name": "Example Name",
"compactLogo": "https://example.com/file.jpg",
"fullLogo": "https://example.com/file.jpg"
}Code Examples
# API Call Example (Shell)
curl -X POST "https://api.maiagent.ai/api/organizations/" \
-H "Authorization: Api-Key YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"name": "Example Name",
"compactLogo": "https://example.com/file.jpg",
"fullLogo": "https://example.com/file.jpg"
}'
# Please replace YOUR_API_KEY and verify the request data before execution.const axios = require('axios');
// Set request headers
const config = {
headers: {
'Authorization': 'Api-Key YOUR_API_KEY',
'Content-Type': 'application/json'
}
};
// Request payload
const data = {
"name": "Example Name",
"compactLogo": "https://example.com/file.jpg",
"fullLogo": "https://example.com/file.jpg"
};
axios.post("https://api.maiagent.ai/api/organizations/", data, config)
.then(response => {
console.log('Successfully received response:');
console.log(response.data);
})
.catch(error => {
console.error('An error occurred with the request:');
console.error(error.response?.data || error.message);
});import requests
url = "https://api.maiagent.ai/api/organizations/"
headers = {
"Authorization": "Api-Key YOUR_API_KEY",
"Content-Type": "application/json"
}
# Request payload
data = {
"name": "Example Name",
"compactLogo": "https://example.com/file.jpg",
"fullLogo": "https://example.com/file.jpg"
}
response = requests.post(url, json=data, headers=headers)
try:
print("Successfully received response:")
print(response.json())
except Exception as e:
print("An error occurred during the request:", e)<?php
require 'vendor/autoload.php';
$client = new GuzzleHttp\Client();
try {
$response = $client->post("https://api.maiagent.ai/api/organizations/", [
'headers' => [
'Authorization' => 'Api-Key YOUR_API_KEY',
'Content-Type' => 'application/json'
],
'json' => {
"name": "Example Name",
"compactLogo": "https://example.com/file.jpg",
"fullLogo": "https://example.com/file.jpg"
}
]);
$data = json_decode($response->getBody(), true);
echo "Successfully received response:\n";
print_r($data);
} catch (Exception $e) {
echo 'An error occurred during the request: ' . $e->getMessage();
}
?>Response Body
Status Code: 201
Response Schema Example
{
"id": string (uuid)
"name": string
"createdAt": string (timestamp)
"compactLogo"?: string (uri) // Optional
"fullLogo"?: string (uri) // Optional
"usageStatistics": object
"organizationPlan": object
"maigptInboxId": string (uuid)
}Response Example Value
{
"id": "550e8400-e29b-41d4-a716-446655440000",
"name": "Response String",
"createdAt": "Response String",
"compactLogo": "https://example.com/file.jpg",
"fullLogo": "https://example.com/file.jpg",
"usageStatistics": {
"id": "550e8400-e29b-41d4-a716-446655440000",
"name": "Example Response Name",
"description": "Example Response Description"
},
"organizationPlan": {
"id": "550e8400-e29b-41d4-a716-446655440000",
"name": "Example Response Name",
"description": "Example Response Description"
},
"maigptInboxId": "550e8400-e29b-41d4-a716-446655440000"
}Add Member to a Specific Organization
POST /api/organizations/{organizationPk}/members/
Parameters
organizationPk
✅
string
A UUID string identifying this Organization ID
Request Body
Request Parameters
string (email)
Yes
organization
string (uuid)
No
Request Structure Example
{
"email": string (email)
"organization"?: string (uuid) // optional
}Request Example Value
{
"organization": "613c86f7-a45f-4e29-b255-29caff89de32",
"is_owner": false
}Code Examples
# API Call Example (Shell)
curl -X POST "https://api.maiagent.ai/api/organizations/550e8400-e29b-41d4-a716-446655440000/members/" \
-H "Authorization: Api-Key YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"organization": "613c86f7-a45f-4e29-b255-29caff89de32",
"is_owner": false
}'
# Please replace YOUR_API_KEY and verify the request data before execution.const axios = require('axios');
// Set request headers
const config = {
headers: {
'Authorization': 'Api-Key YOUR_API_KEY',
'Content-Type': 'application/json'
}
};
// Request payload
const data = {
"organization": "613c86f7-a45f-4e29-b255-29caff89de32",
"is_owner": false
};
axios.post("https://api.maiagent.ai/api/organizations/550e8400-e29b-41d4-a716-446655440000/members/", data, config)
.then(response => {
console.log('Successfully received response:');
console.log(response.data);
})
.catch(error => {
console.error('An error occurred during the request:');
console.error(error.response?.data || error.message);
});import requests
url = "https://api.maiagent.ai/api/organizations/550e8400-e29b-41d4-a716-446655440000/members/"
headers = {
"Authorization": "Api-Key YOUR_API_KEY",
"Content-Type": "application/json"
}
# Request payload
data = {
"organization": "613c86f7-a45f-4e29-b255-29caff89de32",
"is_owner": false
}
response = requests.post(url, json=data, headers=headers)
try:
print("Successfully received response:")
print(response.json())
except Exception as e:
print("An error occurred during the request:", e)<?php
require 'vendor/autoload.php';
$client = new GuzzleHttp\Client();
try {
$response = $client->post("https://api.maiagent.ai/api/organizations/550e8400-e29b-41d4-a716-446655440000/members/", [
'headers' => [
'Authorization' => 'Api-Key YOUR_API_KEY',
'Content-Type' => 'application/json'
],
'json' => {
"organization": "613c86f7-a45f-4e29-b255-29caff89de32",
"is_owner": false
}
]);
$data = json_decode($response->getBody(), true);
echo "Successfully got response:\n";
print_r($data);
} catch (Exception $e) {
echo 'Request failed: ' . $e->getMessage();
}
?>Response Body
Status Code: 201
Response Schema Example
{
"organization": string (uuid) // Organization ID
"is_owner": boolean // Whether the user is the organization owner
}Response Example Value
{
"organization": "613c86f7-a45f-4e29-b255-29caff89de32",
"is_owner": false
}Get Organization List
GET /api/organizations/
Parameters
page
❌
integer
A page number within the paginated result set.
pageSize
❌
integer
Number of results to return per page.
pagination
❌
string
Whether to paginate (true/false)
Code Examples
# Call API Example (Shell)
curl -X GET "https://api.maiagent.ai/api/organizations/?page=1&pageSize=1&pagination=example" \
-H "Authorization: Api-Key YOUR_API_KEY"
# Please replace YOUR_API_KEY and verify the request data before execution.const axios = require('axios');
// Set request headers
const config = {
headers: {
'Authorization': 'Api-Key YOUR_API_KEY'
}
};
axios.get("https://api.maiagent.ai/api/organizations/?page=1&pageSize=1&pagination=example", config)
.then(response => {
console.log('Successfully got response:');
console.log(response.data);
})
.catch(error => {
console.error('Request failed:');
console.error(error.response?.data || error.message);
});import requests
url = "https://api.maiagent.ai/api/organizations/?page=1&pageSize=1&pagination=example"
headers = {
"Authorization": "Api-Key YOUR_API_KEY"
}
response = requests.get(url, headers=headers)
try:
print("Successfully got response:")
print(response.json())
except Exception as e:
print("Request failed:", e)<?php
require 'vendor/autoload.php';
$client = new GuzzleHttp\Client();
try {
$response = $client->get("https://api.maiagent.ai/api/organizations/?page=1&pageSize=1&pagination=example", [
'headers' => [
'Authorization' => 'Api-Key YOUR_API_KEY'
]
]);
$data = json_decode($response->getBody(), true);
echo "Successfully received response:\n";
print_r($data);
} catch (Exception $e) {
echo 'Request failed: ' . $e->getMessage();
}
?>Response Body
Status Code: 200
Response Schema Example
{
"count": integer
"next"?: string (uri) // optional
"previous"?: string (uri) // optional
"results": [
{
"id": string (uuid)
"name": string
"createdAt": string (timestamp)
}
]
}Response Example Value
{
"count": 123,
"next": "http://api.example.org/accounts/?page=4",
"previous": "http://api.example.org/accounts/?page=2",
"results": [
{
"id": "550e8400-e29b-41d4-a716-446655440000",
"name": "Response String",
"createdAt": "Response String"
}
]
}Get Specific Organization Information
GET /api/organizations/{id}/
Parameters
id
✅
string
A UUID string identifying this organization.
Code Examples
# API Call Example (Shell)
curl -X GET "https://api.maiagent.ai/api/organizations/550e8400-e29b-41d4-a716-446655440000/" \
-H "Authorization: Api-Key YOUR_API_KEY"
# Please replace YOUR_API_KEY and verify the request data before execution.const axios = require('axios');
// Set request headers
const config = {
headers: {
'Authorization': 'Api-Key YOUR_API_KEY'
}
};
axios.get("https://api.maiagent.ai/api/organizations/550e8400-e29b-41d4-a716-446655440000/", config)
.then(response => {
console.log('Successfully retrieved response:');
console.log(response.data);
})
.catch(error => {
console.error('An error occurred during the request:');
console.error(error.response?.data || error.message);
});import requests
url = "https://api.maiagent.ai/api/organizations/550e8400-e29b-41d4-a716-446655440000/"
headers = {
"Authorization": "Api-Key YOUR_API_KEY"
}
response = requests.get(url, headers=headers)
try:
print("Successfully retrieved response:")
print(response.json())
except Exception as e:
print("An error occurred during the request:", e)<?php
require 'vendor/autoload.php';
$client = new GuzzleHttp\Client();
try {
$response = $client->get("https://api.maiagent.ai/api/organizations/550e8400-e29b-41d4-a716-446655440000/", [
'headers' => [
'Authorization' => 'Api-Key YOUR_API_KEY'
]
]);
$data = json_decode($response->getBody(), true);
echo "Successfully got response:\n";
print_r($data);
} catch (Exception $e) {
echo 'Request failed: ' . $e->getMessage();
}
?>Response Body
Status Code: 200
Response Schema Example
{
"id": string (uuid)
"name": string
"createdAt": string (timestamp)
"compactLogo"?: string (uri) // Optional
"fullLogo"?: string (uri) // Optional
"usageStatistics": object
"organizationPlan": object
"maigptInboxId": string (uuid)
}Response Example Value
{
"id": "550e8400-e29b-41d4-a716-446655440000",
"name": "Response String",
"createdAt": "Response String",
"compactLogo": "https://example.com/file.jpg",
"fullLogo": "https://example.com/file.jpg",
"usageStatistics": {
"id": "550e8400-e29b-41d4-a716-446655440000",
"name": "Example Response Name",
"description": "Example Response Description"
},
"organizationPlan": {
"id": "550e8400-e29b-41d4-a716-446655440000",
"name": "Example Response Name",
"description": "Example Response Description"
},
"maigptInboxId": "550e8400-e29b-41d4-a716-446655440000"
}Get Current User Details
GET /api/users/current/
Code Example
# API Call Example (Shell)
curl -X GET "https://api.maiagent.ai/api/users/current/" \
-H "Authorization: Api-Key YOUR_API_KEY"
# Please replace YOUR_API_KEY and verify the request data before execution.const axios = require('axios');
// Set request headers
const config = {
headers: {
'Authorization': 'Api-Key YOUR_API_KEY'
}
};
axios.get("https://api.maiagent.ai/api/users/current/", config)
.then(response => {
console.log('Successfully got response:');
console.log(response.data);
})
.catch(error => {
console.error('An error occurred during the request:');
console.error(error.response?.data || error.message);
});import requests
url = "https://api.maiagent.ai/api/users/current/"
headers = {
"Authorization": "Api-Key YOUR_API_KEY"
}
response = requests.get(url, headers=headers)
try:
print("Successfully retrieved response:")
print(response.json())
except Exception as e:
print("An error occurred with the request:", e)<?php
require 'vendor/autoload.php';
$client = new GuzzleHttp\Client();
try {
$response = $client->get("https://api.maiagent.ai/api/users/current/", [
'headers' => [
'Authorization' => 'Api-Key YOUR_API_KEY'
]
]);
$data = json_decode($response->getBody(), true);
echo "Successfully received response:\n";
print_r($data);
} catch (Exception $e) {
echo 'An error occurred during the request: ' . $e->getMessage();
}
?>Response Body
Status Code: 200
Response Schema Example
{
"id": string (uuid)
"avatar"?: string (uri) // Optional
"name": string
"email": string (email)
"authSource":
{
"id": string (uuid)
"name": string
}
"company"?: string // Optional
"invitationCode"?: string // Optional
"apiKeys": [
object
]
"permissions": [
string
]
}Response Example Value
{
"id": "550e8400-e29b-41d4-a716-446655440000",
"avatar": "https://example.com/file.jpg",
"name": "Response string",
"email": "[email protected]",
"authSource": {
"id": "550e8400-e29b-41d4-a716-446655440000",
"name": "Response string"
},
"company": "Response string",
"invitationCode": "Response string",
"apiKeys": [
{
"id": "550e8400-e29b-41d4-a716-446655440000",
"name": "Response example name",
"description": "Response example description"
}
],
"permissions": [
"Response string"
]
}Get Current User Permissions
GET /api/permissions/
Code Examples
# API Call Example (Shell)
curl -X GET "https://api.maiagent.ai/api/permissions/" \
-H "Authorization: Api-Key YOUR_API_KEY"
# Please replace YOUR_API_KEY and verify the request data before execution.const axios = require('axios');
// Set request headers
const config = {
headers: {
'Authorization': 'Api-Key YOUR_API_KEY'
}
};
axios.get("https://api.maiagent.ai/api/permissions/", config)
.then(response => {
console.log('Successfully received response:');
console.log(response.data);
})
.catch(error => {
console.error('An error occurred during the request:');
console.error(error.response?.data || error.message);
});import requests
url = "https://api.maiagent.ai/api/permissions/"
headers = {
"Authorization": "Api-Key YOUR_API_KEY"
}
response = requests.get(url, headers=headers)
try:
print("Successfully received response:")
print(response.json())
except Exception as e:
print("An error occurred during the request:", e)<?php
require 'vendor/autoload.php';
$client = new GuzzleHttp\Client();
try {
$response = $client->get("https://api.maiagent.ai/api/permissions/", [
'headers' => [
'Authorization' => 'Api-Key YOUR_API_KEY'
]
]);
$data = json_decode($response->getBody(), true);
echo "Successfully received response:\n";
print_r($data);
} catch (Exception $e) {
echo 'An error occurred during the request: ' . $e->getMessage();
}
?>Response Body
Status Code: 200
Response Schema Example
[
{
"id": string (uuid)
"name": string
"description"?: string // Optional
}
]Response Example Value
[
{
"id": "550e8400-e29b-41d4-a716-446655440000",
"name": "Response String",
"description": "Response String"
}
]Get a list of members for a specific organization
GET /api/organizations/{organizationPk}/members/
Parameters
organizationPk
✅
string
A UUID string identifying this Organization ID
page
❌
integer
A page number within the paginated result set.
pageSize
❌
integer
Number of results to return per page.
pagination
❌
string
Whether to paginate (true/false)
query
❌
string
Code Examples
# Call API Example (Shell)
curl -X GET "https://api.maiagent.ai/api/organizations/550e8400-e29b-41d4-a716-446655440000/members/?page=1&pageSize=1&pagination=example&query=example" \
-H "Authorization: Api-Key YOUR_API_KEY"
# Please replace YOUR_API_KEY and check the request data before execution.const axios = require('axios');
// Set request headers
const config = {
headers: {
'Authorization': 'Api-Key YOUR_API_KEY'
}
};
axios.get("https://api.maiagent.ai/api/organizations/550e8400-e29b-41d4-a716-446655440000/members/?page=1&pageSize=1&pagination=example&query=example", config)
.then(response => {
console.log('Successfully got response:');
console.log(response.data);
})
.catch(error => {
console.error('An error occurred during the request:');
console.error(error.response?.data || error.message);
});import requests
url = "https://api.maiagent.ai/api/organizations/550e8400-e29b-41d4-a716-446655440000/members/?page=1&pageSize=1&pagination=example&query=example"
headers = {
"Authorization": "Api-Key YOUR_API_KEY"
}
response = requests.get(url, headers=headers)
try:
print("Successfully retrieved response:")
print(response.json())
except Exception as e:
print("An error occurred with the request:", e)<?php
require 'vendor/autoload.php';
$client = new GuzzleHttp\Client();
try {
$response = $client->get("https://api.maiagent.ai/api/organizations/550e8400-e29b-41d4-a716-446655440000/members/?page=1&pageSize=1&pagination=example&query=example", [
'headers' => [
'Authorization' => 'Api-Key YOUR_API_KEY'
]
]);
$data = json_decode($response->getBody(), true);
echo "Successfully received response:\n";
print_r($data);
} catch (Exception $e) {
echo 'Request failed: ' . $e->getMessage();
}
?>Response Body
Status Code: 200
Response Schema Example
{
"count": integer
"next"?: string (uri) // Optional
"previous"?: string (uri) // Optional
"results": [
{
"id": string (uuid)
"name": string
"email": string
"isOwner": boolean // Check if the member is the organization owner (via OWNER Group)
"permissions": object
"createdAt": string (timestamp)
}
]
}Response Example Value
{
"count": 123,
"next": "http://api.example.org/accounts/?page=4",
"previous": "http://api.example.org/accounts/?page=2",
"results": [
{
"id": "550e8400-e29b-41d4-a716-446655440000",
"name": "Response string",
"email": "Response string",
"isOwner": false,
"permissions": {
"id": "550e8400-e29b-41d4-a716-446655440000",
"name": "Response sample name",
"description": "Response sample description"
},
"createdAt": "Response string"
}
]
}Get Specific Member Details
GET /api/organizations/{organizationPk}/members/{id}/
Parameters
id
✅
string
A UUID string identifying this Member.
organizationPk
✅
string
A UUID string identifying this Organization ID
Code Examples
# API Call Example (Shell)
curl -X GET "https://api.maiagent.ai/api/organizations/550e8400-e29b-41d4-a716-446655440000/members/550e8400-e29b-41d4-a716-446655440000/" \
-H "Authorization: Api-Key YOUR_API_KEY"
# Please replace YOUR_API_KEY and verify the request data before execution.const axios = require('axios');
// Set request headers
const config = {
headers: {
'Authorization': 'Api-Key YOUR_API_KEY'
}
};
axios.get("https://api.maiagent.ai/api/organizations/550e8400-e29b-41d4-a716-446655440000/members/550e8400-e29b-41d4-a716-446655440000/", config)
.then(response => {
console.log('Successfully retrieved response:');
console.log(response.data);
})
.catch(error => {
console.error('An error occurred with the request:');
console.error(error.response?.data || error.message);
});import requests
url = "https://api.maiagent.ai/api/organizations/550e8400-e29b-41d4-a716-446655440000/members/550e8400-e29b-41d4-a716-446655440000/"
headers = {
"Authorization": "Api-Key YOUR_API_KEY"
}
response = requests.get(url, headers=headers)
try:
print("Successfully retrieved response:")
print(response.json())
except Exception as e:
print("An error occurred with the request:", e)<?php
require 'vendor/autoload.php';
$client = new GuzzleHttp\Client();
try {
$response = $client->get("https://api.maiagent.ai/api/organizations/550e8400-e29b-41d4-a716-446655440000/members/550e8400-e29b-41d4-a716-446655440000/", [
'headers' => [
'Authorization' => 'Api-Key YOUR_API_KEY'
]
]);
$data = json_decode($response->getBody(), true);
echo "Successfully got response:\n";
print_r($data);
} catch (Exception $e) {
echo 'Request failed: ' . $e->getMessage();
}
?>Response Body
Status Code: 200
Response Schema Example
{
"id": string (uuid)
"name": string
"email": string
"isOwner": boolean // Check if the member is the organization owner (via OWNER Group)
"permissions": object
"createdAt": string (timestamp)
}Response Example Value
{
"id": "550e8400-e29b-41d4-a716-446655440000",
"name": "Response String",
"email": "Response String",
"isOwner": false,
"permissions": {
"id": "550e8400-e29b-41d4-a716-446655440000",
"name": "Response Sample Name",
"description": "Response Sample Description"
},
"createdAt": "Response String"
}Update Organization Information
PUT /api/organizations/{id}/
Parameters
id
✅
string
A UUID string identifying this organization.
Request Body
Request Parameters
name
string
Yes
compactLogo
string (uri)
No
fullLogo
string (uri)
No
Request Structure Example
{
"name": string
"compactLogo"?: string (uri) // Optional
"fullLogo"?: string (uri) // Optional
}Request Example Value
{
"id": "5b01e0b9-0b0e-4079-8150-d12015576d2c",
"name": "Updated Org Name",
"created_at": "1748336288000",
"usage_statistics": {
"chatbots_count": 0,
"can_create_chatbot": true,
"has_create_chatbot_limit": true,
"current_month_words_count_total": 1000000,
"current_month_used_words_count_total": 0,
"current_month_used_conversations_count_total": 0,
"available_upload_files_size_total": 104857600,
"used_upload_file_size_total": 0
},
"organization_plan": {
"id": "cac825e8-cb9b-4a16-b440-4ff6b2e73911",
"plan_name": "Free Plan",
"expired_at": null
}
}Code Examples
# API Call Example (Shell)
curl -X PUT "https://api.maiagent.ai/api/organizations/550e8400-e29b-41d4-a716-446655440000/" \
-H "Authorization: Api-Key YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"id": "5b01e0b9-0b0e-4079-8150-d12015576d2c",
"name": "Updated Org Name",
"created_at": "1748336288000",
"usage_statistics": {
"chatbots_count": 0,
"can_create_chatbot": true,
"has_create_chatbot_limit": true,
"current_month_words_count_total": 1000000,
"current_month_used_words_count_total": 0,
"current_month_used_conversations_count_total": 0,
"available_upload_files_size_total": 104857600,
"used_upload_file_size_total": 0
},
"organization_plan": {
"id": "cac825e8-cb9b-4a16-b440-4ff6b2e73911",
"plan_name": "Free Plan",
"expired_at": null
}
}'
# Please replace YOUR_API_KEY and verify the request data before execution.const axios = require('axios');
// Set request headers
const config = {
headers: {
'Authorization': 'Api-Key YOUR_API_KEY',
'Content-Type': 'application/json'
}
};
// Request payload
const data = {
"id": "5b01e0b9-0b0e-4079-8150-d12015576d2c",
"name": "Updated Org Name",
"created_at": "1748336288000",
"usage_statistics": {
"chatbots_count": 0,
"can_create_chatbot": true,
"has_create_chatbot_limit": true,
"current_month_words_count_total": 1000000,
"current_month_used_words_count_total": 0,
"current_month_used_conversations_count_total": 0,
"available_upload_files_size_total": 104857600,
"used_upload_file_size_total": 0
},
"organization_plan": {
"id": "cac825e8-cb9b-4a16-b440-4ff6b2e73911",
"plan_name": "Free Plan",
"expired_at": null
}
};
axios.put("https://api.maiagent.ai/api/organizations/550e8400-e29b-41d4-a716-446655440000/", data, config)
.then(response => {
console.log('Successfully received response:');
console.log(response.data);
})
.catch(error => {
console.error('An error occurred with the request:');
console.error(error.response?.data || error.message);
});import requests
url = "https://api.maiagent.ai/api/organizations/550e8400-e29b-41d4-a716-446655440000/"
headers = {
"Authorization": "Api-Key YOUR_API_KEY",
"Content-Type": "application/json"
}
# Request payload
data = {
"id": "5b01e0b9-0b0e-4079-8150-d12015576d2c",
"name": "Updated Org Name",
"created_at": "1748336288000",
"usage_statistics": {
"chatbots_count": 0,
"can_create_chatbot": true,
"has_create_chatbot_limit": true,
"current_month_words_count_total": 1000000,
"current_month_used_words_count_total": 0,
"current_month_used_conversations_count_total": 0,
"available_upload_files_size_total": 104857600,
"used_upload_file_size_total": 0
},
"organization_plan": {
"id": "cac825e8-cb9b-4a16-b440-4ff6b2e73911",
"plan_name": "Free Plan",
"expired_at": null
}
}
response = requests.put(url, json=data, headers=headers)
try:
print("Successfully received response:")
print(response.json())
except Exception as e:
print("An error occurred during the request:", e)<?php
require 'vendor/autoload.php';
$client = new GuzzleHttp\Client();
try {
$response = $client->put("https://api.maiagent.ai/api/organizations/550e8400-e29b-41d4-a716-446655440000/", [
'headers' => [
'Authorization' => 'Api-Key YOUR_API_KEY',
'Content-Type' => 'application/json'
],
'json' => {
"id": "5b01e0b9-0b0e-4079-8150-d12015576d2c",
"name": "Updated Org Name",
"created_at": "1748336288000",
"usage_statistics": {
"chatbots_count": 0,
"can_create_chatbot": true,
"has_create_chatbot_limit": true,
"current_month_words_count_total": 1000000,
"current_month_used_words_count_total": 0,
"current_month_used_conversations_count_total": 0,
"available_upload_files_size_total": 104857600,
"used_upload_file_size_total": 0
},
"organization_plan": {
"id": "cac825e8-cb9b-4a16-b440-4ff6b2e73911",
"plan_name": "Free Plan",
"expired_at": null
}
}
]);
$data = json_decode($response->getBody(), true);
echo "Successfully got response:\n";
print_r($data);
} catch (Exception $e) {
echo 'Request failed: ' . $e->getMessage();
}
?>Response Body
Status Code: 200
Response Schema Example
{
"id": string (uuid) // Organization ID
"name": string // Organization name
"created_at": string (timestamp) // Creation timestamp
"usage_statistics": { // Usage statistics
{
"chatbots_count"?: integer // Number of chatbots (optional)
"can_create_chatbot"?: boolean // Whether a chatbot can be created (optional)
"has_create_chatbot_limit"?: boolean // Whether there is a limit on creating chatbots (optional)
"current_month_words_count_total"?: integer // Total word count limit for the current month (optional)
"current_month_used_words_count_total"?: integer // Words used in the current month (optional)
"current_month_used_conversations_count_total"?: integer // Conversations used in the current month (optional)
"available_upload_files_size_total"?: integer // Total available upload file size (bytes) (optional)
"used_upload_file_size_total"?: integer // Total used upload file size (bytes) (optional)
}
}
"organization_plan": { // Organization plan information
{
"id"?: string (uuid) // Plan ID (optional)
"plan_name"?: string // Plan name (optional)
"expired_at"?: string (date-time) // Expiration time (optional)
}
}
}Response Example Value
{
"id": "5b01e0b9-0b0e-4079-8150-d12015576d2c",
"name": "Updated Org Name",
"created_at": "1748336288000",
"usage_statistics": {
"chatbots_count": 0,
"can_create_chatbot": true,
"has_create_chatbot_limit": true,
"current_month_words_count_total": 1000000,
"current_month_used_words_count_total": 0,
"current_month_used_conversations_count_total": 0,
"available_upload_files_size_total": 104857600,
"used_upload_file_size_total": 0
},
"organization_plan": {
"id": "cac825e8-cb9b-4a16-b440-4ff6b2e73911",
"plan_name": "Free Plan",
"expired_at": null
}
}Update Current User Details
PUT /api/users/current/
Request Body
Request Parameters
avatar
string (uri)
No
name
string
Yes
string (email)
Yes
company
string
No
invitationCode
string
No
Request Structure Example
{
"avatar"?: string (uri) // Optional
"name": string
"email": string (email)
"company"?: string // Optional
"invitationCode"?: string // Optional
}Request Example Value
{
"avatar": "https://example.com/file.jpg",
"name": "Example Name",
"email": "[email protected]",
"company": "Example String",
"invitationCode": "Example String"
}Code Examples
# Call API Example (Shell)
curl -X PUT "https://api.maiagent.ai/api/users/current/" \
-H "Authorization: Api-Key YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"avatar": "https://example.com/file.jpg",
"name": "Example Name",
"email": "[email protected]",
"company": "Example String",
"invitationCode": "Example String"
}'
# Please replace YOUR_API_KEY and verify the request data before execution.const axios = require('axios');
// Set request headers
const config = {
headers: {
'Authorization': 'Api-Key YOUR_API_KEY',
'Content-Type': 'application/json'
}
};
// Request payload
const data = {
"avatar": "https://example.com/file.jpg",
"name": "Sample Name",
"email": "[email protected]",
"company": "Sample String",
"invitationCode": "Sample String"
};
axios.put("https://api.maiagent.ai/api/users/current/", data, config)
.then(response => {
console.log('Successfully received response:');
console.log(response.data);
})
.catch(error => {
console.error('An error occurred with the request:');
console.error(error.response?.data || error.message);
});import requests
url = "https://api.maiagent.ai/api/users/current/"
headers = {
"Authorization": "Api-Key YOUR_API_KEY",
"Content-Type": "application/json"
}
# Request payload
data = {
"avatar": "https://example.com/file.jpg",
"name": "Sample Name",
"email": "[email protected]",
"company": "Sample String",
"invitationCode": "Sample String"
}
response = requests.put(url, json=data, headers=headers)
try:
print("Successfully received response:")
print(response.json())
except Exception as e:
print("An error occurred during the request:", e)<?php
require 'vendor/autoload.php';
$client = new GuzzleHttp\Client();
try {
$response = $client->put("https://api.maiagent.ai/api/users/current/", [
'headers' => [
'Authorization' => 'Api-Key YOUR_API_KEY',
'Content-Type' => 'application/json'
],
'json' => {
"avatar": "https://example.com/file.jpg",
"name": "Example Name",
"email": "[email protected]",
"company": "Example String",
"invitationCode": "Example String"
}
]);
$data = json_decode($response->getBody(), true);
echo "Successfully received response:\n";
print_r($data);
} catch (Exception $e) {
echo 'An error occurred with the request: ' . $e->getMessage();
}
?>Response Body
Status Code: 200
Response Schema Example
{
"id": string (uuid)
"avatar"?: string (uri) // Optional
"name": string
"email": string (email)
"authSource":
{
"id": string (uuid)
"name": string
}
"company"?: string // Optional
"invitationCode"?: string // Optional
"apiKeys": [
object
]
"permissions": [
string
]
}Response Example Value
{
"id": "550e8400-e29b-41d4-a716-446655440000",
"avatar": "https://example.com/file.jpg",
"name": "Response string",
"email": "[email protected]",
"authSource": {
"id": "550e8400-e29b-41d4-a716-446655440000",
"name": "Response string"
},
"company": "Response string",
"invitationCode": "Response string",
"apiKeys": [
{
"id": "550e8400-e29b-41d4-a716-446655440000",
"name": "Response example name",
"description": "Response example description"
}
],
"permissions": [
"Response string"
]
}Delete a specific member
DELETE /api/organizations/{organizationPk}/members/{id}/
Parameters
id
✅
string
A UUID string identifying this member.
organizationPk
✅
string
A UUID string identifying this organization ID
Code Examples
# API Call Example (Shell)
curl -X DELETE "https://api.maiagent.ai/api/organizations/550e8400-e29b-41d4-a716-446655440000/members/550e8400-e29b-41d4-a716-446655440000/" \
-H "Authorization: Api-Key YOUR_API_KEY"
# Please replace YOUR_API_KEY and verify the request data before execution.const axios = require('axios');
// Set request headers
const config = {
headers: {
'Authorization': 'Api-Key YOUR_API_KEY'
}
};
// Request payload
const data = null;
axios.delete("https://api.maiagent.ai/api/organizations/550e8400-e29b-41d4-a716-446655440000/members/550e8400-e29b-41d4-a716-446655440000/", data, config)
.then(response => {
console.log('Successfully received response:');
console.log(response.data);
})
.catch(error => {
console.error('An error occurred during the request:');
console.error(error.response?.data || error.message);
});import requests
url = "https://api.maiagent.ai/api/organizations/550e8400-e29b-41d4-a716-446655440000/members/550e8400-e29b-41d4-a716-446655440000/"
headers = {
"Authorization": "Api-Key YOUR_API_KEY"
}
response = requests.delete(url, headers=headers)
try:
print("Successfully received response:")
print(response.json())
except Exception as e:
print("An error occurred during the request:", e)<?php
require 'vendor/autoload.php';
$client = new GuzzleHttp\Client();
try {
$response = $client->delete("https://api.maiagent.ai/api/organizations/550e8400-e29b-41d4-a716-446655440000/members/550e8400-e29b-41d4-a716-446655440000/", [
'headers' => [
'Authorization' => 'Api-Key YOUR_API_KEY'
]
]);
$data = json_decode($response->getBody(), true);
echo "Successfully received response:\n";
print_r($data);
} catch (Exception $e) {
echo 'An error occurred during the request: ' . $e->getMessage();
}
?>Response
204
No response body
Last updated
Was this helpful?
