Getting Started
The ImperialCAD API is designed to give communities fast, reliable access to core features while preventing misuse and protecting system performance.
ALL requests follow this standard format:
POST https://imperialcad.app/api/1.1/wf/<API_WORKFLOW_NAME>
Setup & Convars
ImperialCAD scripts rely on two required convars for identifying your community and authenticating workflow requests. These must be configured before any endpoint will function properly.
Server.cfg Configuration
Add the following to your server.cfg above the ImperialCAD resource:
setr imperial_community_id "YOUR_COMMUNITY_ID"
set imperialAPI "YOUR_API_SECRET"You can find these values in
Admin > Settings > API
Accessing Convars
local communityId = GetConvar("imperial_community_id", "")
local apiKey = GetConvar("imperialAPI", "") -- server-side only
print("ImperialCAD Community ID:", communityId)
print("ImperialCAD API Key:", apiKey ~= "")imperial_community_idcan be accessed on both server and client.imperialAPIshould remain server-side only for security purposes.
API Authorization
All POST endpoints require the following header:
{
"Content-Type": "application/json",
"APIKEY": GetConvar("imperialAPI", "")
}Rate Limits
200 OK - Rate Limiting Responses
{
"status": "RATE_LIMIT",
"message": "You're sending request too frequently, please slow down."
}Reasoning: A workflow executed for the same user within the last minute. Duplicate triggers are suppressed to prevent unnecessary calls.
{
"status": "RATE_LIMIT",
"message": "Threshold Reached"
}Reasoning: The request is valid, but the workflow is at maximum active concurrency. This limit protects server stability and may adjust as usage scales.
400 Bad Request - Workflow Not Executed
{
"status": "NOT_RUN",
"message": "The condition for the workflow is not met. Workflow won't run."
}Reasoning: Required conditions for the workflow were not met. Typical causes include:
Missing or invalid community ID
Missing or invalid API key
Invalid Discord user ID (user must exist and be apart of the community)
Data mismatch preventing workflow validation
Advanced API is turned off (some endpoints only).
Licensing
© Imperial Software Solutions, LLC. All rights reserved. Unauthorized use, reproduction, or distribution is strictly prohibited.
Last updated
Was this helpful?