Communities API
This is the Communities API that provides programmatic access to various resources and services. The API supports the following areas: Participants Management, Communities Management. All endpoints require authentication using a Bearer token.
The communities model
The communities model contains all the information about your communities entities.
Properties
- Name
communityName- Type
- string
- Description
Value for communityName
- Name
description- Type
- string
- Description
Detailed description of description
- Name
category- Type
- string
- Description
Value for category
- Name
maxParticipants- Type
- integer
- Description
Integer value for maxParticipants
- Name
isPrivate- Type
- boolean
- Description
Boolean flag indicating isPrivate
- Name
initialRules- Type
- array
- Description
List of initialRules items
- Name
adminUserId- Type
- string
- Description
Value for adminUserId
- Name
logo- Type
- string
- Description
Value for logo
- Name
tags- Type
- array
- Description
List of tags items
Create Community
Establishes a new digital community with initial settings and membership.
Request
curl -X POST https://api.adiba.app/v1/communities \
-H "Authorization: Bearer {token}" \
-d '{
"communityName": "Family Savings Group",
"description": "Monthly savings group for family members",
"category": "SAVINGS",
"maxParticipants": 20,
"isPrivate": true,
"initialRules": [
"Monthly contribution of 50,000 NGN",
"Withdrawal only after 6 months"
],
"adminUserId": "USR_001",
"logo": "https://cdn.bank.com/communities/family-savings.png",
"tags": [
"family",
"savings",
"monthly"
]
}'
{
"status": "SUCCESS",
"communityId": "COM_001_20241201_001",
"communityName": "Family Savings Group",
"description": "Monthly savings group for family members",
"category": "SAVINGS",
"maxParticipants": 20,
"isPrivate": true,
"adminUserId": "USR_001",
"createdAt": "2024-12-01T10:30:00Z",
"inviteCode": "FAMILY2024",
"message": "Community created successfully"
}
Invite Participant
Sends an invitation to a user to join an existing community.
Required attributes
- Name
communityId- Type
- string
- Description
Unique identifier specified in the URL path
Request
curl -X POST https://api.adiba.app/v1/communities/{communityId}/participants \
-H "Authorization: Bearer {token}" \
-d '{
"inviteeEmail": "jane.smith@email.com",
"inviteePhone": "+2348012345679",
"inviteeName": "Jane Smith",
"role": "MEMBER",
"message": "Join our family savings group!",
"expiresAt": "2024-12-08T10:30:00Z"
}'
{
"status": "SUCCESS",
"invitationId": "INV_001_20241201_001",
"communityId": "COM_001_20241201_001",
"inviteeEmail": "jane.smith@email.com",
"inviteePhone": "+2348012345679",
"inviteeName": "Jane Smith",
"role": "MEMBER",
"invitedBy": "USR_001",
"invitedAt": "2024-12-01T10:35:00Z",
"expiresAt": "2024-12-08T10:30:00Z",
"inviteLink": "https://app.bank.com/communities/join/FAMILY2024",
"message": "Invitation sent successfully"
}
Remove Participant
Revokes a participant's membership from a community.
Required attributes
- Name
communityId- Type
- string
- Description
Unique identifier specified in the URL path
- Name
participantId- Type
- string
- Description
Unique identifier specified in the URL path
Request
curl -X DELETE https://api.adiba.app/v1/communities/{communityId}/participants/{participantId} \
-H "Authorization: Bearer {token}" \
-d '{
"example": "data"
}'
{
"status": "SUCCESS",
"communityId": "COM_001_20241201_001",
"participantId": "USR_002",
"removedBy": "USR_001",
"removedAt": "2024-12-01T11:00:00Z",
"message": "Participant removed successfully"
}
Accept/ Deny Invitation
Manages a user's response to a community invitation.
Required attributes
- Name
communityId- Type
- string
- Description
Unique identifier specified in the URL path
- Name
invitationId- Type
- string
- Description
Unique identifier specified in the URL path
Request
curl -X PUT https://api.adiba.app/v1/communities/{communityId}/invitations/{invitationId} \
-H "Authorization: Bearer {token}" \
-d '{
"action": "ACCEPT",
"message": "Happy to join the group!"
}'
{
"status": "SUCCESS",
"invitationId": "INV_001_20241201_001",
"communityId": "COM_001_20241201_001",
"action": "ACCEPT",
"participantId": "USR_002",
"processedAt": "2024-12-01T10:40:00Z",
"message": "Invitation accepted successfully",
"communityDetails": {
"communityName": "Family Savings Group",
"description": "Monthly savings group for family members",
"category": "SAVINGS"
}
}
Set Community Rules
Defines and updates the governing rules for a community.
Required attributes
- Name
communityId- Type
- string
- Description
Unique identifier specified in the URL path
Request
curl -X PUT https://api.adiba.app/v1/communities/{communityId} \
-H "Authorization: Bearer {token}" \
-d '{
"rules": [
"Monthly contribution of 50,000 NGN",
"Withdrawal only after 6 months",
"No late payments allowed",
"Emergency withdrawals require admin approval"
],
"maxParticipants": 25,
"isPrivate": true,
"autoApprove": false,
"contributionAmount": 50000,
"contributionFrequency": "MONTHLY",
"withdrawalPolicy": "6 months minimum holding period"
}'
{
"status": "SUCCESS",
"communityId": "COM_001_20241201_001",
"updatedBy": "USR_001",
"updatedAt": "2024-12-01T10:45:00Z",
"rules": [
"Monthly contribution of 50,000 NGN",
"Withdrawal only after 6 months",
"No late payments allowed",
"Emergency withdrawals require admin approval"
],
"maxParticipants": 25,
"isPrivate": true,
"autoApprove": false,
"contributionAmount": 50000,
"contributionFrequency": "MONTHLY",
"withdrawalPolicy": "6 months minimum holding period",
"message": "Community rules updated successfully"
}