API Overview
Introduction to the Moqup API for developers building integrations.
The Moqup API enables developers to integrate Moqup into their applications and workflows. This guide provides an overview of the API capabilities and how to get started.
API Basics
Base URL
All API requests should be made to:
https://moqup.io/api/v1API Versioning
The API is versioned via the URL path:
v1- Current stable version- Version in URL ensures backward compatibility
- Breaking changes only in new versions
Response Format
All responses are JSON:
json
{
"success": true,
"data": { ... }
}Error Responses
Errors follow a consistent format:
json
{
"success": false,
"error": {
"code": "invalid_request",
"message": "The request was invalid"
}
}Quick Start
Step 1: Get API Key
- Log into Moqup
- Go to Settings > API
- Click Create API Key
- Copy your key securely
Step 2: Make First Request
bash
curl https://moqup.io/api/v1/projects \
-H "Authorization: Bearer YOUR_API_KEY"Step 3: Explore Endpoints
Browse available endpoints:
| Resource | Endpoints |
|---|---|
| Projects | /projects, /projects/{id} |
| Files | /projects/{id}/files, /files/{id} |
| Annotations | /files/{id}/annotations, /annotations/{id} |
| Clients | /clients, /clients/{id} |
Available Resources
Projects
Manage design projects:
GET /projects- List all projectsPOST /projects- Create new projectGET /projects/{id}- Get project detailsPATCH /projects/{id}- Update projectDELETE /projects/{id}- Delete project
Files
Handle design files:
GET /projects/{id}/files- List project filesPOST /projects/{id}/files- Upload fileGET /files/{id}- Get file detailsPATCH /files/{id}- Update fileDELETE /files/{id}- Delete file
Annotations
Work with feedback:
GET /files/{id}/annotations- List file annotationsPOST /files/{id}/annotations- Create annotationGET /annotations/{id}- Get annotationPATCH /annotations/{id}- Update annotationDELETE /annotations/{id}- Delete annotation
Clients
Manage client records:
GET /clients- List all clientsPOST /clients- Create clientGET /clients/{id}- Get client detailsPATCH /clients/{id}- Update clientDELETE /clients/{id}- Delete client
Common Use Cases
CI/CD Integration
Upload designs automatically:
bash
curl https://moqup.io/api/v1/projects/proj_123/files \
-X POST \
-H "Authorization: Bearer $MOQUP_API_KEY" \
-F "file=@dist/designs/homepage.png" \
-F "stage=Review"List Project Annotations
Get all feedback for a project:
javascript
async function getProjectAnnotations(projectId) {
// First get all files
const filesRes = await fetch(
`https://moqup.io/api/v1/projects/${projectId}/files`,
{ headers: { Authorization: `Bearer ${API_KEY}` } }
);
const files = await filesRes.json();
// Then get annotations for each file
const annotations = [];
for (const file of files.data) {
const annotRes = await fetch(
`https://moqup.io/api/v1/files/${file.id}/annotations`,
{ headers: { Authorization: `Bearer ${API_KEY}` } }
);
const fileAnnotations = await annotRes.json();
annotations.push(...fileAnnotations.data);
}
return annotations;
}Best Practices
Security
- Never expose API keys in client-side code
- Use environment variables for keys
- Rotate keys regularly
- Use minimum permissions
Performance
- Cache responses when possible
- Use pagination for large lists
- Respect rate limits
Error Handling
- Check status codes before parsing
- Implement retries for transient errors
- Handle rate limiting gracefully
Documentation
Support
- API status: status.moqup.io
- Email: api-support@moqup.io
Next Steps
- Authentication - Set up access
- Projects API - Core endpoints
- Rate Limits - Usage limits