GiveLinkDocs
API Reference

API Overview

Full REST API for building custom integrations with GiveLink.

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:

http://localhost:3001

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, ... }'

Response Format

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": []
  }
}

Pagination

List endpoints support cursor-based or page-based pagination depending on the endpoint:

ParameterTypeDefaultDescription
pageinteger1Page number (1-indexed)
limitinteger20-50Items per page (max 100)

Rate Limits

Endpoint TypeRate Limit
Public endpoints (donations, campaign views)100 requests/minute per IP
Authenticated endpoints600 requests/minute per user
Stripe webhook endpointNo client-facing limit (Stripe-controlled)

Rate limit headers are returned on all responses:

HeaderDescription
X-RateLimit-LimitMaximum requests allowed in the window
X-RateLimit-RemainingRequests remaining in the current window
X-RateLimit-ResetUnix 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.

How is this guide?

On this page