API Reference
Complete reference for all SoapBox API endpoints.
Base URL
https://api.soapboxsuperapp.com/api/v1Common Parameters
| Parameter | Type | Description |
|---|---|---|
page | integer | Page number (default: 1) |
limit | integer | Items per page (default: 20, max: 100) |
Churches
Access church and community data
GET
/churchesList all churches
Scope:
read:churchesGET
/churches/:idGet church details
Scope:
read:churchesGET
/churches/:id/members/countGet member count
Scope:
read:churchesEvents
Manage church events and registrations
GET
/eventsList events
Scope:
read:eventsGET
/events/:idGet event details
Scope:
read:eventsGET
/events/upcomingGet upcoming events
Scope:
read:eventsPOST
/events/:id/registerRegister for event
Scope:
write:eventsDELETE
/events/:id/registerUnregister from event
Scope:
write:eventsUsers
Access user profiles and memberships
GET
/users/:idGet user profile
Scope:
read:usersGET
/users/meGet current user
Scope:
read:usersGET
/users/:id/churchesGet user's churches
Scope:
read:usersPrayers
Prayer request management
GET
/prayersList prayer requests
Scope:
read:prayersGET
/prayers/:idGet prayer details
Scope:
read:prayersPOST
/prayersCreate prayer request
Scope:
write:prayersPOST
/prayers/:id/prayRecord a prayer
Scope:
write:prayersPOST
/prayers/:id/answeredMark as answered
Scope:
write:prayersDonations
Access donation records (requires special approval)
GET
/donationsList donations
Scope:
read:donationsGET
/donations/:idGet donation details
Scope:
read:donationsGET
/donations/summaryGet donation summary
Scope:
read:donationsGroups
Small group management
GET
/groupsList small groups
Scope:
read:groupsGET
/groups/:idGet group details
Scope:
read:groupsGET
/groups/:id/membersGet group members
Scope:
read:groupsPOST
/groups/:id/joinJoin a group
Scope:
write:groupsDELETE
/groups/:id/leaveLeave a group
Scope:
write:groupsExample: List Churches
Request
curl https://api.soapboxsuperapp.com/api/v1/churches \
-H "Authorization: Bearer YOUR_API_KEY"Response
{
"data": [
{
"id": 1,
"name": "First Baptist Church",
"description": "A welcoming community...",
"city": "Dallas",
"state": "TX",
"country": "USA",
"website": "https://firstbaptist.org",
"memberCount": 1500,
"createdAt": "2024-01-15T10:00:00Z"
}
],
"pagination": {
"page": 1,
"limit": 20,
"total": 150,
"hasMore": true
}
}Example: Create Prayer Request
Request
curl -X POST https://api.soapboxsuperapp.com/api/v1/prayers \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"communityId": 123,
"content": "Please pray for my family during this difficult time.",
"isAnonymous": false
}'Response
{
"data": {
"id": 456,
"communityId": 123,
"userId": 789,
"content": "Please pray for my family during this difficult time.",
"isAnonymous": false,
"isAnswered": false,
"prayerCount": 0,
"createdAt": "2024-03-10T15:30:00Z"
}
}Error Handling
All errors follow a consistent format:
{
"error": "NotFound",
"message": "Church with ID 999 not found",
"statusCode": 404
}| Status Code | Description |
|---|---|
| 400 | Bad Request - Invalid parameters |
| 401 | Unauthorized - Invalid or missing credentials |
| 403 | Forbidden - Insufficient permissions |
| 404 | Not Found - Resource doesn't exist |
| 429 | Too Many Requests - Rate limit exceeded |
| 500 | Internal Server Error |