API Documentation
Welcome to DEV ENVIRONMENT API v2.51
DEV ENVIRONMENT is an online architectural space-planning application that lets users virtually inhabit a 3D world of their creation. Its intuitive tools are user-friendly for professionals, as well as novices.
The DEV ENVIRONMENT API enables third party apps and services to interact with the Space Designer database remotely to create tight integration with your website or application. This documentation will get you started coding quickly and make sure you always find what you're looking for.
Need Help? For technical support or partnership inquiries, please contact us.
Authentication
All API endpoints require a partnerId (Unique Partner ID) for authentication. You can obtain multiple partnerIds for different apps and services you provide.
Backward Compatibility: All endpoints support legacy parameter names for existing integrations:
- partnerId (modern) / upid (legacy)
- userKey (modern) / key (legacy)
- projectKey (modern) / key (legacy)
SECURITY WARNING: This is a server-side API. The partnerId is a secret credential and must NEVER be exposed to client-side code (JavaScript, mobile apps, etc.). Always implement API calls from your backend server to protect your credentials.
Rate Limiting: API calls are rate-limited to prevent abuse. Current limit: 60 requests per minute per partner/IP combination.
Server-Side Code Examples
Important: These examples show server-side implementations. Never expose your partnerId in client-side code.
Node.js Example - User Signup
const axios = require('axios');
const FormData = require('form-data');
// User signup example (using production URL)
async function signupUser() {
const apiUrl = 'https://dev.us-east-1.spacedesigner3d.com/api2/signup';
const formData = new FormData();
formData.append('partnerId', process.env.PARTNER_ID); // Store in environment variables
formData.append('username', 'newuser123');
formData.append('email', 'user@example.com');
formData.append('password', 'secure_password');
formData.append('firstName', 'John');
formData.append('lastName', 'Doe');
formData.append('planId', '1');
try {
const response = await axios.post(apiUrl, formData, {
headers: {
...formData.getHeaders(),
'Content-Type': 'multipart/form-data'
},
timeout: 30000
});
if (response.data.error) {
throw new Error(response.data.error);
}
console.log('Success! User ID:', response.data.data.id);
return response.data.data;
} catch (error) {
console.error('API Error:', error.message);
throw error;
}
}
// Project list example
async function getProjectList(userKey) {
const apiUrl = 'https://dev.us-east-1.spacedesigner3d.com/api2/projectList';
const formData = new FormData();
formData.append('partnerId', process.env.PARTNER_ID);
formData.append('userKey', userKey);
try {
const response = await axios.post(apiUrl, formData, {
headers: formData.getHeaders()
});
if (response.data.error) {
throw new Error(response.data.error);
}
return response.data.data;
} catch (error) {
console.error('Failed to fetch projects:', error.message);
throw error;
}
}
Security Note: Use
getProjectInfo
for public-facing features and readProject
for authenticated management operations. Never expose readProject
responses to unauthorized users.
When to Use Which Endpoint
Use Case | Recommended Endpoint | Parameters |
---|---|---|
Public project gallery/showcase | getProjectInfo |
projectKey only |
Project listings/previews | getProjectInfo |
summary=true for performance |
Authorized project viewing | getProjectInfo |
partnerId + projectKey |
Project management interface | readProject |
partnerId + projectKey |
Admin dashboard metadata | readProject |
minimal=true |
Legacy integrations | getProjectInfo |
key + upid (legacy format) |
HTTP Status Codes & Error Handling
Response Format: All API responses return JSON with a consistent structure:
{"data": {...}, "error": null}
for success{"data": null, "error": {"code": 401, "desc": "Authorization Error", "detail": "You are not authorized to perform this action."}}
for errors
Code | Description | Details & Examples |
---|---|---|
200 | Success | Request completed successfully. Check error field for API-level errors. |
400 | Bad Request |
Malformed request or missing required parameters.
Example: Missing partnerId, invalid JSON format |
401 | Unauthorized |
Authentication failed or user not authorized for action.
Example:
{
"data": null,
"error": {
"code": 401,
"desc": "Authorization Error",
"detail": "You are not authorized to perform this action."
}
}
|
403 | Validation Error |
Input validation failed. Response includes structured error format:
{
"data": null,
"error": {
"code": 403,
"desc": "Post Data Validation Error",
"detail": {
"username": ["required field"],
"email": [
"well formed email required",
"required field"
],
"password": ["minimum 6 characters"]
}
}
}
|
404 | Not Found |
Requested resource does not exist.
Example:
{
"data": null,
"error": {
"code": 404,
"desc": "Project Not Found",
"detail": "The project with the given key does not exist."
}
}
|
409 | Conflict |
Resource already exists or operation conflicts with current state.
Examples: "Email already registered", "Username taken" |
413 | Payload Too Large |
File upload exceeds size limit.
Example: "File too large. Maximum size: 50MB" |
415 | Unsupported Media Type |
File type not supported for upload.
Example: "Unsupported file type. Allowed: GLB, GLTF, JPG, PNG" |
429 | Rate Limited |
Too many requests. Current limit: 60 requests per minute per partner/IP.
Solution: Wait before making more requests |
500 | Internal Server Error |
Database error or server malfunction.
Examples:
|
503 | Service Unavailable |
API temporarily unavailable due to maintenance or high load.
Solution: Retry with exponential backoff |
💡 Best Practices
- Always check both HTTP status code AND the error field in the JSON response
- Implement retry logic for 429 (rate limit) and 503 (service unavailable) errors
- Validate input client-side to reduce 403 validation errors
- Handle file uploads gracefully with progress indicators and size checks
- Store and reuse userKey after successful authentication to avoid repeated logins
- Use HTTPS in production to protect sensitive data like partnerIds and userKeys