Skip to main content

Using the APIs

Riseact offers two API interfaces: GraphQL for flexible queries and mutations, and REST for standard CRUD operations. Both accept the same authentication token. See the previous page for how to obtain the token.

GraphQL

Endpoint: POST https://core.riseact.org/admin/graphql/

curl -X POST https://core.riseact.org/admin/graphql/ \
-H "Authorization: Bearer IL_TUO_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"query": "query { supporters(pagination: { first: 10 }) { edges { node { id firstName lastName email } } pageInfo { hasNextPage endCursor total } } }"
}'

For paginating GraphQL queries, see the GraphQL pagination guide.
For error handling, see the GraphQL errors guide.

REST

Base endpoint: https://core.riseact.org/api/v1/

# List supporters
curl https://core.riseact.org/api/v1/supporters/?limit=20&offset=0 \
-H "Authorization: Bearer IL_TUO_TOKEN"

# Single supporter
curl https://core.riseact.org/api/v1/supporters/123/ \
-H "Authorization: Bearer IL_TUO_TOKEN"

# Create a supporter
curl -X POST https://core.riseact.org/api/v1/supporters/ \
-H "Authorization: Bearer IL_TUO_TOKEN" \
-H "Content-Type: application/json" \
-d '{"first_name": "Mario", "last_name": "Rossi", "email": "mario@example.com"}'

For paginating REST lists, see the REST pagination guide.

Available REST endpoints

EndpointGET (list)GET (single)POSTPUTDELETE
/api/v1/supporters/
/api/v1/donations/---
/api/v1/payments/---
/api/v1/campaigns/---
/api/v1/checkouts/--
/api/v1/webhooks/