API Integration
This guide covers connecting external systems to GXP via the REST API.
Authentication
All API requests require authentication using bearer tokens:
curl -X GET "https://api.gramercy.cloud/api/v1/projects" \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Accept: application/json"
See the Authentication Overview for detailed information on obtaining and managing tokens.
First API Call
List all projects accessible to your account:
curl -X GET "https://api.gramercy.cloud/api/v1/projects" \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Accept: application/json"
Response:
{
"data": [
{
"id": 1,
"name": "Annual Conference 2024",
"slug": "annual-conference-2024",
"created_at": "2024-01-15T10:00:00Z"
}
]
}
API Versions
The GxP API uses URL-based versioning. The current stable version is v1.
| Version | Base URL | Status |
|---|---|---|
| v1 | /api/v1/ | Stable |
| v2 | /api/v2/ | Coming Soon |
See API Versioning for the full versioning policy.
Rate Limiting
API requests are subject to rate limiting to ensure fair usage:
| Endpoint Type | Limit |
|---|---|
| Standard endpoints | 60 requests per minute |
| Bulk operations | 10 requests per minute |
| Search/export | 20 requests per minute |
When rate limited, you'll receive a 429 Too Many Requests response with a Retry-After header.
Response Format
All API responses follow a consistent JSON format.
Success Response
{
"data": {
"id": 1,
"name": "Example"
}
}
Collection Response
{
"data": [...],
"meta": {
"current_page": 1,
"per_page": 15,
"total": 100
},
"links": {
"first": "...",
"last": "...",
"prev": null,
"next": "..."
}
}
Error Response
{
"message": "The given data was invalid.",
"errors": {
"email": ["The email field is required."]
}
}
Next Steps
- Authentication Overview — Token types and authentication methods
- API Versioning — Version policy and migration guides
- REST API Reference — Complete endpoint documentation
- WebSocket Events — Subscribe to real-time updates
- Webhooks — Configure webhook integrations