Skip to main content
POST
/
v1
/
subscribe
Subscribe to Church
curl --request POST \
  --url https://api.thefaithapp.com/v1/subscribe \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --header 'X-API-Key: <x-api-key>' \
  --data '
{
  "fcm_token": "<string>"
}
'
{
  "message": "<string>",
  "user": "<string>"
}

Documentation Index

Fetch the complete documentation index at: https://docs.thefaithapp.com/llms.txt

Use this file to discover all available pages before exploring further.

Subscribes the authenticated Firebase user to the church represented by the API key and stores the device FCM token for push notifications.

Example request

curl -X POST https://api.thefaithapp.com/v1/subscribe \
  -H "X-API-Key: your-client-api-key" \
  -H "Authorization: Bearer your-firebase-id-token" \
  -H "Content-Type: application/json" \
  -d '{"fcm_token":"user-device-fcm-token"}'

Request inputs

X-API-Key
string
required
Your client API key from the dashboard (Settings page).
fcm_token
string
required
User’s FCM device token.

Response fields

message
string
required
Confirms the church the Firebase user has just been subscribed to.
user
string
required
The Firebase user identifier that was associated with the church subscription.

Example response

{
  "message": "Church subscribed to Example Church",
  "user": "firebase-user-123"
}