curl --request PATCH \
--url https://api.trycomp.ai/v1/organization \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"name": "New Acme Corporation",
"slug": "new-acme-corp",
"logo": "https://example.com/logo.png",
"metadata": "{\"theme\": \"dark\", \"preferences\": {}}",
"website": "https://acme-corp.com",
"isFleetSetupCompleted": false,
"primaryColor": "#3B82F6",
"advancedModeEnabled": false,
"backgroundCheckStepEnabled": true,
"evidenceApprovalEnabled": false,
"deviceAgentStepEnabled": true,
"securityTrainingStepEnabled": true,
"whistleblowerReportEnabled": true,
"accessRequestFormEnabled": true,
"deviceAgentBlockQuit": false,
"deviceAgentBlockSignOut": false,
"deviceAgentForceStartAtLogin": false,
"deviceAgentForceTrayIcon": false
}
'const options = {
method: 'PATCH',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: 'New Acme Corporation',
slug: 'new-acme-corp',
logo: 'https://example.com/logo.png',
metadata: '{"theme": "dark", "preferences": {}}',
website: 'https://acme-corp.com',
isFleetSetupCompleted: false,
primaryColor: '#3B82F6',
advancedModeEnabled: false,
backgroundCheckStepEnabled: true,
evidenceApprovalEnabled: false,
deviceAgentStepEnabled: true,
securityTrainingStepEnabled: true,
whistleblowerReportEnabled: true,
accessRequestFormEnabled: true,
deviceAgentBlockQuit: false,
deviceAgentBlockSignOut: false,
deviceAgentForceStartAtLogin: false,
deviceAgentForceTrayIcon: false
})
};
fetch('https://api.trycomp.ai/v1/organization', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.trycomp.ai/v1/organization"
payload = {
"name": "New Acme Corporation",
"slug": "new-acme-corp",
"logo": "https://example.com/logo.png",
"metadata": "{\"theme\": \"dark\", \"preferences\": {}}",
"website": "https://acme-corp.com",
"isFleetSetupCompleted": False,
"primaryColor": "#3B82F6",
"advancedModeEnabled": False,
"backgroundCheckStepEnabled": True,
"evidenceApprovalEnabled": False,
"deviceAgentStepEnabled": True,
"securityTrainingStepEnabled": True,
"whistleblowerReportEnabled": True,
"accessRequestFormEnabled": True,
"deviceAgentBlockQuit": False,
"deviceAgentBlockSignOut": False,
"deviceAgentForceStartAtLogin": False,
"deviceAgentForceTrayIcon": False
}
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text){
"id": "org_abc123def456",
"name": "New Acme Corporation",
"slug": "new-acme-corp",
"logo": "https://example.com/logo.png",
"metadata": "{\"theme\": \"dark\", \"preferences\": {}}",
"website": "https://acme-corp.com",
"onboardingCompleted": true,
"hasAccess": true,
"fleetDmLabelId": 123,
"isFleetSetupCompleted": false,
"primaryColor": "#3B82F6",
"createdAt": "2023-11-07T05:31:56Z",
"authType": "api-key"
}{
"message": "Invalid slug format"
}{
"message": "Invalid or expired API key"
}{
"message": "Organization with ID org_abc123def456 not found"
}Update organization | Comp AI API
Partially updates the authenticated organization. Only provided fields will be updated.
curl --request PATCH \
--url https://api.trycomp.ai/v1/organization \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"name": "New Acme Corporation",
"slug": "new-acme-corp",
"logo": "https://example.com/logo.png",
"metadata": "{\"theme\": \"dark\", \"preferences\": {}}",
"website": "https://acme-corp.com",
"isFleetSetupCompleted": false,
"primaryColor": "#3B82F6",
"advancedModeEnabled": false,
"backgroundCheckStepEnabled": true,
"evidenceApprovalEnabled": false,
"deviceAgentStepEnabled": true,
"securityTrainingStepEnabled": true,
"whistleblowerReportEnabled": true,
"accessRequestFormEnabled": true,
"deviceAgentBlockQuit": false,
"deviceAgentBlockSignOut": false,
"deviceAgentForceStartAtLogin": false,
"deviceAgentForceTrayIcon": false
}
'const options = {
method: 'PATCH',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: 'New Acme Corporation',
slug: 'new-acme-corp',
logo: 'https://example.com/logo.png',
metadata: '{"theme": "dark", "preferences": {}}',
website: 'https://acme-corp.com',
isFleetSetupCompleted: false,
primaryColor: '#3B82F6',
advancedModeEnabled: false,
backgroundCheckStepEnabled: true,
evidenceApprovalEnabled: false,
deviceAgentStepEnabled: true,
securityTrainingStepEnabled: true,
whistleblowerReportEnabled: true,
accessRequestFormEnabled: true,
deviceAgentBlockQuit: false,
deviceAgentBlockSignOut: false,
deviceAgentForceStartAtLogin: false,
deviceAgentForceTrayIcon: false
})
};
fetch('https://api.trycomp.ai/v1/organization', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.trycomp.ai/v1/organization"
payload = {
"name": "New Acme Corporation",
"slug": "new-acme-corp",
"logo": "https://example.com/logo.png",
"metadata": "{\"theme\": \"dark\", \"preferences\": {}}",
"website": "https://acme-corp.com",
"isFleetSetupCompleted": False,
"primaryColor": "#3B82F6",
"advancedModeEnabled": False,
"backgroundCheckStepEnabled": True,
"evidenceApprovalEnabled": False,
"deviceAgentStepEnabled": True,
"securityTrainingStepEnabled": True,
"whistleblowerReportEnabled": True,
"accessRequestFormEnabled": True,
"deviceAgentBlockQuit": False,
"deviceAgentBlockSignOut": False,
"deviceAgentForceStartAtLogin": False,
"deviceAgentForceTrayIcon": False
}
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text){
"id": "org_abc123def456",
"name": "New Acme Corporation",
"slug": "new-acme-corp",
"logo": "https://example.com/logo.png",
"metadata": "{\"theme\": \"dark\", \"preferences\": {}}",
"website": "https://acme-corp.com",
"onboardingCompleted": true,
"hasAccess": true,
"fleetDmLabelId": 123,
"isFleetSetupCompleted": false,
"primaryColor": "#3B82F6",
"createdAt": "2023-11-07T05:31:56Z",
"authType": "api-key"
}{
"message": "Invalid slug format"
}{
"message": "Invalid or expired API key"
}{
"message": "Organization with ID org_abc123def456 not found"
}Authorizations
API key for authentication
Body
Organization update data
Organization name
"New Acme Corporation"
Organization slug
"new-acme-corp"
Organization logo URL
"https://example.com/logo.png"
Additional metadata in JSON format
"{\"theme\": \"dark\", \"preferences\": {}}"
Organization website URL
"https://acme-corp.com"
Whether FleetDM setup is completed
false
Organization primary color in hex format
"#3B82F6"
Whether advanced mode is enabled for the organization
false
Whether the background-check step is required during member onboarding. Set to false to turn off the "Require background checks" setting; true to require it.
true
Whether evidence requires approval before it is accepted.
false
Whether the device-agent step is enabled during member onboarding.
true
Whether the security-training step is enabled during member onboarding.
true
Whether the whistleblower reporting feature is enabled.
true
Whether the trust-portal access request form is enabled.
true
Remove Quit from the device agent so people cannot stop it from its menus. The OS can still end the process.
false
Remove Sign Out from the device agent.
false
Keep the device agent registered to start at login and stop people from turning it off.
false
Keep the device agent tray or menu bar icon visible and stop people from hiding it.
false
Response
Organization updated successfully
The organization ID
"org_abc123def456"
Organization name
"New Acme Corporation"
Organization slug
"new-acme-corp"
Organization logo URL
"https://example.com/logo.png"
Additional metadata in JSON format
"{\"theme\": \"dark\", \"preferences\": {}}"
Organization website URL
"https://acme-corp.com"
Whether onboarding is completed
true
Whether organization has access to the platform
true
FleetDM label ID for device management
123
Whether FleetDM setup is completed
false
Organization primary color in hex format
"#3B82F6"
When the organization was created
How the request was authenticated
api-key, session Was this page helpful?

