API Overview
GiveLink provides a full REST API that powers everything — our own frontend is built on it. Every feature available in the dashboard is accessible via the API.
Base URL
https://givelink-api-production.up.railway.app
For local development:
All endpoints are prefixed with /api — for example, GET /api/orgs/:id.
Authentication
All protected API requests require a Clerk session JWT passed as a Bearer token in the Authorization header:
curl -H "Authorization: Bearer <clerk-session-jwt>" \
https://givelink-api-production.up.railway.app/api/orgs/your-org-id
Session JWTs are issued by Clerk when a user signs in through the GiveLink frontend. They expire after the session duration configured in your Clerk dashboard (typically 1 hour, refreshed automatically in the browser).
Public endpoints (e.g., viewing a campaign page, submitting a donation) do not require authentication. Protected endpoints — reporting, org management, campaign creation — require a valid session.
Content-Type
All request bodies must be JSON. Include the Content-Type: application/json header on all POST, PUT, and PATCH requests:
curl -X POST https://givelink-api-production.up.railway.app/api/donations \
-H "Authorization: Bearer <clerk-session-jwt>" \
-H "Content-Type: application/json" \
-d '{ "campaignId": "...", "amount": 5000, ... }'
All responses are JSON. Successful responses return the resource directly:
{
"id": "clx1234567890",
"name": "My Campaign",
"status": "ACTIVE"
}
Errors return a consistent error object:
{
"error": "Campaign not found",
"status": 404
}
Validation errors include a details field:
{
"error": "Validation failed",
"details": {
"fieldErrors": {
"amount": ["Number must be greater than or equal to 100"]
},
"formErrors": []
}
}
List endpoints support cursor-based or page-based pagination depending on the endpoint:
| Parameter | Type | Default | Description |
|---|
page | integer | 1 | Page number (1-indexed) |
limit | integer | 20–50 | Items per page (max 100) |
Rate Limits
| Endpoint Type | Rate Limit |
|---|
| Public endpoints (donations, campaign views) | 100 requests/minute per IP |
| Authenticated endpoints | 600 requests/minute per user |
| Stripe webhook endpoint | No client-facing limit (Stripe-controlled) |
Rate limit headers are returned on all responses:
| Header | Description |
|---|
X-RateLimit-Limit | Maximum requests allowed in the window |
X-RateLimit-Remaining | Requests remaining in the current window |
X-RateLimit-Reset | Unix timestamp when the window resets |
When a rate limit is exceeded, the API returns 429 Too Many Requests.
Webhooks
GiveLink sends real-time webhook events for key actions (donations, payout events, campaign updates). See the Webhooks guide for setup details.
SDKs
Official SDKs are coming soon:
- JavaScript/TypeScript (npm)
- Python (pip)
In the meantime, use any HTTP client — the API is straightforward REST.