API Documentation
Welcome to the Disciply API documentation. This guide will help you integrate with our RESTful API to manage discipleship programs, groups, challenges, and more.
Getting Started
The Disciply API provides programmatic access to your discipleship management platform. To get started with the API, you'll need to:
- Register for an account at https://disciply.app/register
- Log in to your Disciply account
- Subscribe to a Pro plan - API access requires an active Pro subscription
- Generate your API token - Follow the authentication steps below
Base URL
Authentication
The Disciply API uses Laravel Sanctum for authentication. You'll need to include a Bearer token in the Authorization header of your API requests.
Generating Your API Token
To generate a Bearer token for API access:
- Log in to your account by making a POST request to the login endpoint:
Request Body
Response
Using Your API Token
Include the token in the Authorization header of all API requests:
Example Request with cURL
Groups API
Manage discipleship groups, memberships, and group activities.
Retrieve a list of all groups the authenticated user is a member of or has access to.
Response Example
Retrieve a list of groups available for the user to join.
Retrieve detailed information about a specific group.
Parameters
Parameter | Type | Required | Description |
---|---|---|---|
group |
integer | REQUIRED | The ID of the group |
Create a new discipleship group.
Request Body
Update an existing group's information.
Parameters
Parameter | Type | Required | Description |
---|---|---|---|
group |
integer | REQUIRED | The ID of the group |
name |
string | OPTIONAL | Updated group name |
description |
string | OPTIONAL | Updated description |
Delete a group. Requires group leader or admin privileges.
Join a discipleship group.
Request Body
Leave a discipleship group.
Retrieve a list of all members in a group.
Response Example
Retrieve all posts and discussions within a group.
Create a new post in a group.
Request Body
Submit a rating for a group.
Request Body
Challenges API
Manage discipleship challenges and track user progress through various courses and activities.
Retrieve a list of all available challenges.
Response Example
Retrieve challenges available for the authenticated user.
Create a new challenge. Requires leadership or admin privileges.
Request Body
Retrieve the authenticated user's progress across all challenges.
Response Example
Enroll the authenticated user in a challenge.
Parameters
Parameter | Type | Required | Description |
---|---|---|---|
challenge |
integer | REQUIRED | The ID of the challenge |
Mark a challenge as completed.
Parameters
Parameter | Type | Required | Description |
---|---|---|---|
challenge |
integer | REQUIRED | The ID of the challenge |
Retrieve statistics for challenges (admin/leader only).
Response Example
Retrieve a list of recent challenge completions (admin/leader only).
Journal API
Manage personal journal entries for spiritual growth and reflection.
Retrieve all journal entries for the authenticated user.
Response Example
Create a new journal entry.
Request Body
Parameters
Parameter | Type | Required | Description |
---|---|---|---|
title |
string | REQUIRED | Title of the journal entry |
content |
string | REQUIRED | Content of the journal entry |
date |
date | OPTIONAL | Date of the entry (defaults to today) |
Retrieve a specific journal entry.
Parameters
Parameter | Type | Required | Description |
---|---|---|---|
journal |
integer | REQUIRED | The ID of the journal entry |
Update an existing journal entry.
Request Body
Delete a journal entry.
Journey AI API
Leverage AI-powered insights and guidance for your spiritual journey.
Retrieve the user's spiritual journey data and milestones.
Response Example
Log a new activity or milestone in your spiritual journey.
Request Body
Parameters
Parameter | Type | Required | Description |
---|---|---|---|
activity_type |
string | REQUIRED | Type of activity (prayer, study, service, etc.) |
duration_minutes |
integer | OPTIONAL | Duration in minutes |
notes |
string | OPTIONAL | Additional notes or reflections |
date |
date | OPTIONAL | Date of the activity (defaults to today) |
Retrieve AI-powered insights and progress analytics for your journey.
Response Example
Training API
Manage training programs, qualifications, and leadership development.
Retrieve all available training qualifications and certifications.
Response Example
Retrieve the authenticated user's progress across all qualifications.
Response Example
Enroll the authenticated user in a training qualification.
Parameters
Parameter | Type | Required | Description |
---|---|---|---|
qualification |
integer | REQUIRED | The ID of the qualification |
Update progress for a specific qualification module or requirement.
Request Body
Parameters
Parameter | Type | Required | Description |
---|---|---|---|
qualification |
integer | REQUIRED | The ID of the qualification |
module_id |
integer | REQUIRED | The module being updated |
status |
string | REQUIRED | Status (in_progress, completed) |
Mark a qualification as completed and request certification.
Parameters
Parameter | Type | Required | Description |
---|---|---|---|
qualification |
integer | REQUIRED | The ID of the qualification |
Assign a training qualification to one or more users (admin/leader only).
Request Body
Parameters
Parameter | Type | Required | Description |
---|---|---|---|
qualification_id |
integer | REQUIRED | The ID of the qualification to assign |
user_ids |
array | REQUIRED | Array of user IDs to assign training to |
due_date |
date | OPTIONAL | Due date for completion |
Retrieve training progress for all users in your organization (admin/leader only).
Response Example
Error Handling
The API uses conventional HTTP response codes to indicate success or failure of requests.
HTTP Status Codes
Code | Meaning |
---|---|
200 | OK - Request succeeded |
201 | Created - Resource successfully created |
400 | Bad Request - Invalid request parameters |
401 | Unauthorized - Invalid or missing authentication token |
403 | Forbidden - Authenticated but insufficient permissions |
404 | Not Found - Resource does not exist |
422 | Unprocessable Entity - Validation errors |
429 | Too Many Requests - Rate limit exceeded |
500 | Internal Server Error - Something went wrong on our end |
Standard Error Response Format
Groups API Specific Error Responses
When joining or managing groups, the API returns specific error codes to help you handle business logic errors appropriately.
422 Group Full Error
Returned when attempting to join a group that has reached its maximum member capacity.
Error Response
Fields
Field | Type | Description |
---|---|---|
error_type |
string | Always "group_full" |
group_id |
integer | The ID of the full group |
current_members |
integer | Current number of members in the group |
max_members |
integer | Maximum members allowed (configured by system admin) |
422 Group Not Live Error
Returned when attempting to join a group that is still in draft mode and not yet accepting members.
Error Response
Fields
Field | Type | Description |
---|---|---|
error_type |
string | Always "group_not_live" |
group_id |
integer | The ID of the group |
status |
string | Current group status (draft, active, inactive) |
422 Leader Not Qualified Error
Returned when attempting to assign a leader to a group who has not completed required training/qualifications. This only occurs when the organization has enabled the "enforce_leader_qualifications" setting.
Error Response
Fields
Field | Type | Description |
---|---|---|
error_type |
string | Always "leader_not_qualified" |
leader_id |
integer | The ID of the unqualified leader |
redirect_url |
string | Suggested URL to manage qualifications/training |
422 Leader Limit Reached Error
Returned when attempting to assign a leader to a group who has already reached their maximum number of active group assignments.
Error Response
Fields
Field | Type | Description |
---|---|---|
error_type |
string | Always "leader_limit_reached" |
leader_id |
integer | The ID of the leader who has reached their limit |
current_groups |
integer | Number of active groups currently assigned to this leader |
max_groups |
integer | Maximum number of active groups allowed per leader (configured by system admin) |
Error Handling Best Practices
When building mobile or web applications, we recommend:
- Check error_type field: Use the
error_type
field to programmatically handle different error scenarios rather than parsing the message text. - Display user-friendly messages: The
message
field contains human-readable text suitable for displaying to end users. - Handle redirects: When a
redirect_url
is provided, consider navigating the user to that page for resolution. - Show specific details: Use fields like
current_members
,max_members
,current_groups
, etc. to provide context to users. - Implement retry logic: For transient errors (5xx codes), implement exponential backoff retry logic.
Example Error Handling (JavaScript)
Support
Need help with the API? We're here to assist you:
- Documentation Issues: If you find errors or have suggestions for improving this documentation, please contact us.
- Technical Support: For API-related questions or issues, reach out to our support team at support form.
- Feature Requests: Have ideas for new API endpoints? We'd love to hear from you through our contact form.
Rate Limits
To ensure fair usage, API requests are rate-limited. Pro plan users receive higher rate limits. Contact support if you need increased limits for your use case.