Error Handling
The My Virtual Office API uses standard HTTP status codes to indicate the success or failure of requests. This guide explains the error responses you may encounter and how to handle them.Error Response Format
All error responses follow a consistent JSON format:HTTP Status Codes
Success Codes
| Code | Description |
|---|---|
| 200 | OK - Request succeeded |
| 201 | Created - Resource successfully created |
Client Error Codes
| Code | Description |
|---|---|
| 400 | Bad Request - Invalid request format or missing required fields |
| 401 | Unauthorized - Missing or invalid API key |
| 403 | Forbidden - Valid API key but insufficient permissions or limits reached |
| 404 | Not Found - Resource doesn’t exist |
| 409 | Conflict - Resource already exists (e.g., duplicate email) |
| 429 | Too Many Requests - Rate limit exceeded |
Server Error Codes
| Code | Description |
|---|---|
| 500 | Internal Server Error - Something went wrong on our end |
| 503 | Service Unavailable - API temporarily unavailable |
Common Errors and Solutions
Authentication Errors (401)
API key is missing
API key is missing
Invalid API key
Invalid API key
API key revoked
API key revoked
API key expired
API key expired
Validation Errors (400)
Missing required field
Missing required field
Invalid email format
Invalid email format
Business Logic Errors (403)
Customer limit reached
Customer limit reached
Conflict Errors (409)
Duplicate email
Duplicate email
Best Practices
1. Always Check Status Codes
2. Implement Retry Logic
For transient errors (5xx), implement retry with exponential backoff:3. Log Errors for Debugging
Keep detailed logs of API errors to help with debugging:4. Handle Rate Limiting
If you receive a 429 error, wait before retrying:Need Help?
If you’re encountering errors that you can’t resolve, please contact our support team at hello@my-virtual-office.com with:- The endpoint you’re calling
- The request body (with sensitive data removed)
- The full error response
- Your account email

