MENU navbar-image

Introduction

API Documentation for Family/Tribe Management Application

This documentation provides all the information you need to work with the Family Tribe App API.

The API supports Arabic and English localization via the `Accept-Language` header.

<aside>As you scroll, you'll see code examples for working with the API in different programming languages in the dark area to the right (or as part of the content on mobile).
You can switch the language used with the tabs at the top right (or from the nav menu at the top left on mobile).</aside>

Authenticating requests

To authenticate requests, include an Authorization header with the value "Bearer {YOUR_AUTH_TOKEN}".

All authenticated endpoints are marked with a requires authentication badge in the documentation below.

Authenticate via the POST /api/v1/auth/login endpoint to receive a Bearer token. Include it in the Authorization header as Bearer {token}.

Authentication

APIs for user authentication and registration.

Login

Authenticate user with phone number or national ID.

Example request:
curl --request POST \
    "http://algfari.test/api/v1/auth/login" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "Accept-Language: ar" \
    --data "{
    \"login\": \"0551234567\",
    \"password\": \"secret123\"
}"
const url = new URL(
    "http://algfari.test/api/v1/auth/login"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
    "Accept-Language": "ar",
};

let body = {
    "login": "0551234567",
    "password": "secret123"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (200, success):


{
    "user": {
        "id": "9a8b7c6d-1234-5678-abcd-ef0123456789",
        "full_name": "محمد القحطاني",
        "phone_number": "0551234567",
        "national_id": "1234567890",
        "email": "mohammed@example.com",
        "city": "الرياض",
        "region": "منطقة الرياض",
        "gender": "male",
        "role": "member",
        "status": "active",
        "is_featured": false,
        "profile_image": null
    },
    "token": "1|a2b3c4d5e6f7g8h9i0jklmnopqrstuvwxyz"
}
 

Example response (401, invalid credentials):


{
    "message": "بيانات الدخول غير صحيحة"
}
 

Example response (403, inactive account):


{
    "message": "الحساب غير مفعل"
}
 

Request      

POST api/v1/auth/login

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

Accept-Language        

Example: ar

Body Parameters

login   string     

Phone number or National ID. Example: 0551234567

password   string     

User password. Example: secret123

Send OTP

Send a one-time password to the given phone number.

Example request:
curl --request POST \
    "http://algfari.test/api/v1/auth/send-otp" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "Accept-Language: ar" \
    --data "{
    \"phone_number\": \"0551234567\",
    \"purpose\": \"register\"
}"
const url = new URL(
    "http://algfari.test/api/v1/auth/send-otp"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
    "Accept-Language": "ar",
};

let body = {
    "phone_number": "0551234567",
    "purpose": "register"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (200):


{
    "message": "تم إرسال رمز التحقق"
}
 

Request      

POST api/v1/auth/send-otp

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

Accept-Language        

Example: ar

Body Parameters

phone_number   string     

The phone number. Example: 0551234567

purpose   string     

The OTP purpose. Example: register

Verify OTP

Verify the OTP code sent to the phone number.

Example request:
curl --request POST \
    "http://algfari.test/api/v1/auth/verify-otp" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "Accept-Language: ar" \
    --data "{
    \"phone_number\": \"0551234567\",
    \"code\": \"123456\",
    \"purpose\": \"architecto\"
}"
const url = new URL(
    "http://algfari.test/api/v1/auth/verify-otp"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
    "Accept-Language": "ar",
};

let body = {
    "phone_number": "0551234567",
    "code": "123456",
    "purpose": "architecto"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (200):


{
    "message": "تم التحقق بنجاح",
    "verified": true
}
 

Example response (422):


{
    "message": "رمز التحقق غير صالح"
}
 

Request      

POST api/v1/auth/verify-otp

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

Accept-Language        

Example: ar

Body Parameters

phone_number   string     

The phone number. Example: 0551234567

code   string     

The OTP code. Example: 123456

purpose   string     

One of: register, reset, verify. For password recovery use reset (then call reset-password without code). Example: architecto

Join Request

Submit a request to join the family/tribe.

Example request:
curl --request POST \
    "http://algfari.test/api/v1/auth/join-request" \
    --header "Content-Type: multipart/form-data" \
    --header "Accept: application/json" \
    --header "Accept-Language: ar" \
    --form "full_name=محمد أحمد القحطاني"\
    --form "phone_number=0551234567"\
    --form "national_id=1234567890"\
    --form "email=mohammed@example.com"\
    --form "pending_family_name=architecto"\
    --form "city=الرياض"\
    --form "region=منطقة الرياض"\
    --form "password=secret123"\
    --form "password_confirmation=secret123"\
    --form "profile_image=@C:\Users\hp\AppData\Local\Temp\php45E.tmp" 
const url = new URL(
    "http://algfari.test/api/v1/auth/join-request"
);

const headers = {
    "Content-Type": "multipart/form-data",
    "Accept": "application/json",
    "Accept-Language": "ar",
};

const body = new FormData();
body.append('full_name', 'محمد أحمد القحطاني');
body.append('phone_number', '0551234567');
body.append('national_id', '1234567890');
body.append('email', 'mohammed@example.com');
body.append('pending_family_name', 'architecto');
body.append('city', 'الرياض');
body.append('region', 'منطقة الرياض');
body.append('password', 'secret123');
body.append('password_confirmation', 'secret123');
body.append('profile_image', document.querySelector('input[name="profile_image"]').files[0]);

fetch(url, {
    method: "POST",
    headers,
    body,
}).then(response => response.json());

Example response (201, success):


{
    "message": "تم تقديم طلب الانضمام بنجاح",
    "join_request": {
        "id": "a1b2c3d4-5678-9abc-def0-123456789abc",
        "full_name": "محمد أحمد القحطاني",
        "phone_number": "0551234567",
        "national_id": "1234567890",
        "email": "mohammed@example.com",
        "pending_family_name": "الجربوع",
        "city": "الرياض",
        "region": "منطقة الرياض",
        "status": "pending",
        "created_at": "2026-04-13T10:00:00.000000Z"
    }
}
 

Request      

POST api/v1/auth/join-request

Headers

Content-Type        

Example: multipart/form-data

Accept        

Example: application/json

Accept-Language        

Example: ar

Body Parameters

full_name   string     

Full name of the applicant. Example: محمد أحمد القحطاني

phone_number   string     

Phone number. Example: 0551234567

national_id   string  optional    

National ID number. Example: 1234567890

email   string  optional    

Email address. Example: mohammed@example.com

pending_family_name   string  optional    

Optional free-text family name (stored until admin links the member after approval). Example: architecto

city   string  optional    

City name. Example: الرياض

region   string  optional    

Region name. Example: منطقة الرياض

password   string     

Password (min 6 chars). Example: secret123

profile_image   file  optional    

Profile image (max 5MB, image format). Example: C:\Users\hp\AppData\Local\Temp\php45E.tmp

password_confirmation   string     

Password confirmation. Example: secret123

Reset Password

Step 3 of password recovery (UI): set a new password after OTP was verified in verify-otp with purpose reset. Does not accept the code again.

Example request:
curl --request POST \
    "http://algfari.test/api/v1/auth/reset-password" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "Accept-Language: ar" \
    --data "{
    \"phone_number\": \"0551234567\",
    \"password\": \"newsecret123\",
    \"password_confirmation\": \"newsecret123\"
}"
const url = new URL(
    "http://algfari.test/api/v1/auth/reset-password"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
    "Accept-Language": "ar",
};

let body = {
    "phone_number": "0551234567",
    "password": "newsecret123",
    "password_confirmation": "newsecret123"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (200):


{
    "message": "تم إعادة تعيين كلمة المرور بنجاح"
}
 

Example response (404):


{
    "message": "المستخدم غير موجود"
}
 

Example response (422):


{
    "message": "..."
}
 

Request      

POST api/v1/auth/reset-password

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

Accept-Language        

Example: ar

Body Parameters

phone_number   string     

Same phone used for send-otp / verify-otp. Example: 0551234567

password   string     

New password (min 6 chars). Example: newsecret123

password_confirmation   string     

Password confirmation. Example: newsecret123

Change Password

requires authentication

Change the authenticated user's password.

Example request:
curl --request PUT \
    "http://algfari.test/api/v1/auth/change-password" \
    --header "Authorization: Bearer {YOUR_AUTH_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "Accept-Language: ar" \
    --data "{
    \"current_password\": \"oldsecret123\",
    \"password\": \"newsecret123\",
    \"password_confirmation\": \"newsecret123\"
}"
const url = new URL(
    "http://algfari.test/api/v1/auth/change-password"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "Accept-Language": "ar",
};

let body = {
    "current_password": "oldsecret123",
    "password": "newsecret123",
    "password_confirmation": "newsecret123"
};

fetch(url, {
    method: "PUT",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (200):


{
    "message": "تم تغيير كلمة المرور بنجاح"
}
 

Example response (422):


{
    "message": "كلمة المرور الحالية غير صحيحة"
}
 

Request      

PUT api/v1/auth/change-password

Headers

Authorization        

Example: Bearer {YOUR_AUTH_TOKEN}

Content-Type        

Example: application/json

Accept        

Example: application/json

Accept-Language        

Example: ar

Body Parameters

current_password   string     

Current password. Example: oldsecret123

password   string     

New password (min 6 chars). Example: newsecret123

password_confirmation   string     

Password confirmation. Example: newsecret123

Logout

requires authentication

Revoke the current access token.

Example request:
curl --request POST \
    "http://algfari.test/api/v1/auth/logout" \
    --header "Authorization: Bearer {YOUR_AUTH_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "Accept-Language: ar"
const url = new URL(
    "http://algfari.test/api/v1/auth/logout"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "Accept-Language": "ar",
};


fetch(url, {
    method: "POST",
    headers,
}).then(response => response.json());

Example response (200):


{
    "message": "تم تسجيل الخروج بنجاح"
}
 

Request      

POST api/v1/auth/logout

Headers

Authorization        

Example: Bearer {YOUR_AUTH_TOKEN}

Content-Type        

Example: application/json

Accept        

Example: application/json

Accept-Language        

Example: ar

Members

APIs for managing family/tribe members.

List Members

requires authentication

Get a paginated list of active members. Supports search and filtering.

Example request:
curl --request GET \
    --get "http://algfari.test/api/v1/members?search=%D9%85%D8%AD%D9%85%D8%AF&family=architecto&family_id=16&city=%D8%A7%D9%84%D8%B1%D9%8A%D8%A7%D8%B6&gender=male&is_featured=1&per_page=15" \
    --header "Authorization: Bearer {YOUR_AUTH_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "Accept-Language: ar"
const url = new URL(
    "http://algfari.test/api/v1/members"
);

const params = {
    "search": "محمد",
    "family": "architecto",
    "family_id": "16",
    "city": "الرياض",
    "gender": "male",
    "is_featured": "1",
    "per_page": "15",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "Accept-Language": "ar",
};


fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (200, success):


{
    "data": [
        {
            "id": "9a8b7c6d-1234-5678-abcd-ef0123456789",
            "full_name": "محمد القحطاني",
            "phone_number": "0551234567",
            "national_id": "1234567890",
            "email": "mohammed@example.com",
            "city": "الرياض",
            "region": "منطقة الرياض",
            "bio": "مهندس برمجيات",
            "gender": "male",
            "role": "member",
            "status": "active",
            "is_featured": false,
            "profile_image": null,
            "created_at": "2026-04-01T10:00:00.000000Z"
        }
    ],
    "links": {
        "first": "http://algfari.test/api/v1/members?page=1",
        "last": "http://algfari.test/api/v1/members?page=1",
        "prev": null,
        "next": null
    },
    "meta": {
        "current_page": 1,
        "last_page": 1,
        "per_page": 15,
        "total": 1
    }
}
 

Request      

GET api/v1/members

Headers

Authorization        

Example: Bearer {YOUR_AUTH_TOKEN}

Content-Type        

Example: application/json

Accept        

Example: application/json

Accept-Language        

Example: ar

Query Parameters

search   string  optional    

Search by name or phone. Example: محمد

family   string  optional    

Search member family name (partial match). Example: architecto

family_id   integer  optional    

Filter by linked family id. Example: 16

city   string  optional    

Filter by city. Example: الرياض

gender   string  optional    

Filter by gender (male/female). Example: male

is_featured   boolean  optional    

Filter featured members only. Example: true

per_page   integer  optional    

Items per page. Example: 15

Member Details

requires authentication

Get detailed information about a specific member.

Example request:
curl --request GET \
    --get "http://algfari.test/api/v1/members/1" \
    --header "Authorization: Bearer {YOUR_AUTH_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "Accept-Language: ar"
const url = new URL(
    "http://algfari.test/api/v1/members/1"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "Accept-Language": "ar",
};


fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (200, success):


{
    "data": {
        "id": "9a8b7c6d-1234-5678-abcd-ef0123456789",
        "full_name": "محمد القحطاني",
        "phone_number": "0551234567",
        "national_id": "1234567890",
        "email": "mohammed@example.com",
        "city": "الرياض",
        "region": "منطقة الرياض",
        "bio": "مهندس برمجيات",
        "gender": "male",
        "role": "member",
        "status": "active",
        "is_featured": false,
        "social_links": {
            "twitter": "https://twitter.com/mohammed"
        },
        "profile_image": "http://algfari.test/storage/media/1/profile.jpg",
        "created_at": "2026-04-01T10:00:00.000000Z"
    }
}
 

Request      

GET api/v1/members/{id}

Headers

Authorization        

Example: Bearer {YOUR_AUTH_TOKEN}

Content-Type        

Example: application/json

Accept        

Example: application/json

Accept-Language        

Example: ar

URL Parameters

id   integer     

The ID of the member. Example: 1

member   string     

The member UUID. Example: 9a8b7c6d-1234-5678-abcd-ef0123456789

Update Member

requires authentication

Update a member's profile information.

Example request:
curl --request PUT \
    "http://algfari.test/api/v1/members/1" \
    --header "Authorization: Bearer {YOUR_AUTH_TOKEN}" \
    --header "Content-Type: multipart/form-data" \
    --header "Accept: application/json" \
    --header "Accept-Language: ar" \
    --form "full_name=محمد أحمد"\
    --form "email=mohammed@example.com"\
    --form "family_id=16"\
    --form "pending_family_name=architecto"\
    --form "workplace=g"\
    --form "current_job=z"\
    --form "city=الرياض"\
    --form "region=منطقة الرياض"\
    --form "bio=مطور برمجيات"\
    --form "profile_image=@C:\Users\hp\AppData\Local\Temp\php49E.tmp" 
const url = new URL(
    "http://algfari.test/api/v1/members/1"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_TOKEN}",
    "Content-Type": "multipart/form-data",
    "Accept": "application/json",
    "Accept-Language": "ar",
};

const body = new FormData();
body.append('full_name', 'محمد أحمد');
body.append('email', 'mohammed@example.com');
body.append('family_id', '16');
body.append('pending_family_name', 'architecto');
body.append('workplace', 'g');
body.append('current_job', 'z');
body.append('city', 'الرياض');
body.append('region', 'منطقة الرياض');
body.append('bio', 'مطور برمجيات');
body.append('profile_image', document.querySelector('input[name="profile_image"]').files[0]);

fetch(url, {
    method: "PUT",
    headers,
    body,
}).then(response => response.json());

Example response (200, success):


{
    "message": "تم التحديث بنجاح",
    "user": {
        "id": "9a8b7c6d-1234-5678-abcd-ef0123456789",
        "full_name": "محمد أحمد",
        "phone_number": "0551234567",
        "email": "mohammed@example.com",
        "city": "الرياض",
        "region": "منطقة الرياض",
        "bio": "مطور برمجيات",
        "gender": "male",
        "role": "member",
        "status": "active",
        "is_featured": false
    }
}
 

Example response (422, validation error):


{
    "message": "The given data was invalid.",
    "errors": {
        "email": [
            "The email has already been taken."
        ]
    }
}
 

Request      

PUT api/v1/members/{id}

PATCH api/v1/members/{id}

Headers

Authorization        

Example: Bearer {YOUR_AUTH_TOKEN}

Content-Type        

Example: multipart/form-data

Accept        

Example: application/json

Accept-Language        

Example: ar

URL Parameters

id   integer     

The ID of the member. Example: 1

member   string     

The member UUID. Example: 9a8b7c6d-1234-5678-abcd-ef0123456789

Body Parameters

full_name   string  optional    

Full name. Example: محمد أحمد

email   string  optional    

Email address. Example: mohammed@example.com

family_id   integer  optional    

Admin only: set linked family. Example: 16

pending_family_name   string  optional    

Free-text family name (creates admin review request). Send empty to withdraw. Example: architecto

workplace   string  optional    

validation.max. Example: g

current_job   string  optional    

validation.max. Example: z

city   string  optional    

City. Example: الرياض

region   string  optional    

Region. Example: منطقة الرياض

bio   string  optional    

Biography. Example: مطور برمجيات

social_links   object  optional    

Social media links.

profile_image   file  optional    

Profile image (max 5MB). Example: C:\Users\hp\AppData\Local\Temp\php49E.tmp

Member Card

requires authentication

Get the membership card information for a member.

Example request:
curl --request GET \
    --get "http://algfari.test/api/v1/members/1/card" \
    --header "Authorization: Bearer {YOUR_AUTH_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "Accept-Language: ar"
const url = new URL(
    "http://algfari.test/api/v1/members/1/card"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "Accept-Language": "ar",
};


fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (200, success):


{
    "data": {
        "id": "9a8b7c6d-1234-5678-abcd-ef0123456789",
        "full_name": "محمد القحطاني",
        "phone_number": "0551234567",
        "national_id": "1234567890",
        "city": "الرياض",
        "region": "منطقة الرياض",
        "gender": "male",
        "role": "member",
        "profile_image": "http://algfari.test/storage/media/1/profile.jpg"
    }
}
 

Request      

GET api/v1/members/{member_id}/card

Headers

Authorization        

Example: Bearer {YOUR_AUTH_TOKEN}

Content-Type        

Example: application/json

Accept        

Example: application/json

Accept-Language        

Example: ar

URL Parameters

member_id   integer     

The ID of the member. Example: 1

member   string     

The member UUID. Example: 9a8b7c6d-1234-5678-abcd-ef0123456789

News

APIs for browsing family/tribe news.

List News

requires authentication

Get a paginated list of published news articles. Pinned articles appear first.

Example request:
curl --request GET \
    --get "http://algfari.test/api/v1/news?category=family&search=%D8%A7%D8%AC%D8%AA%D9%85%D8%A7%D8%B9&per_page=15" \
    --header "Authorization: Bearer {YOUR_AUTH_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "Accept-Language: ar"
const url = new URL(
    "http://algfari.test/api/v1/news"
);

const params = {
    "category": "family",
    "search": "اجتماع",
    "per_page": "15",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "Accept-Language": "ar",
};


fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (200, success):


{
    "data": [
        {
            "id": "b2c3d4e5-6789-0abc-def1-234567890abc",
            "title": "اجتماع مجلس العائلة السنوي",
            "summary": "ملخص عن الاجتماع السنوي للعائلة",
            "content": "تفاصيل الخبر الكاملة هنا...",
            "category": "family",
            "is_pinned": true,
            "views_count": 150,
            "published_at": "2026-04-10T08:00:00.000000Z",
            "author": {
                "id": "9a8b7c6d-1234-5678-abcd-ef0123456789",
                "full_name": "أحمد المشرف"
            },
            "cover_image": "http://algfari.test/storage/media/5/cover.jpg",
            "created_at": "2026-04-10T08:00:00.000000Z"
        }
    ],
    "links": {
        "first": "http://algfari.test/api/v1/news?page=1",
        "last": "http://algfari.test/api/v1/news?page=1",
        "prev": null,
        "next": null
    },
    "meta": {
        "current_page": 1,
        "last_page": 1,
        "per_page": 15,
        "total": 1
    }
}
 

Request      

GET api/v1/news

Headers

Authorization        

Example: Bearer {YOUR_AUTH_TOKEN}

Content-Type        

Example: application/json

Accept        

Example: application/json

Accept-Language        

Example: ar

Query Parameters

category   string  optional    

Filter by category (family/general). Example: family

search   string  optional    

Search in title (Arabic). Example: اجتماع

per_page   integer  optional    

Items per page. Example: 15

News Details

requires authentication

Get details of a specific news article. Increments the view count.

Example request:
curl --request GET \
    --get "http://algfari.test/api/v1/news/1" \
    --header "Authorization: Bearer {YOUR_AUTH_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "Accept-Language: ar"
const url = new URL(
    "http://algfari.test/api/v1/news/1"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "Accept-Language": "ar",
};


fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (200, success):


{
    "data": {
        "id": "b2c3d4e5-6789-0abc-def1-234567890abc",
        "title": "اجتماع مجلس العائلة السنوي",
        "summary": "ملخص عن الاجتماع السنوي للعائلة",
        "content": "نص الخبر الكامل مع جميع التفاصيل والمعلومات المهمة عن الاجتماع السنوي لمجلس العائلة.",
        "category": "family",
        "is_pinned": true,
        "views_count": 43,
        "published_at": "2026-04-10T08:00:00.000000Z",
        "author": {
            "id": "9a8b7c6d-1234-5678-abcd-ef0123456789",
            "full_name": "أحمد المشرف"
        },
        "cover_image": "http://algfari.test/storage/media/5/cover.jpg",
        "gallery": [
            "http://algfari.test/storage/media/6/photo1.jpg",
            "http://algfari.test/storage/media/7/photo2.jpg"
        ],
        "created_at": "2026-04-10T08:00:00.000000Z"
    }
}
 

Request      

GET api/v1/news/{id}

Headers

Authorization        

Example: Bearer {YOUR_AUTH_TOKEN}

Content-Type        

Example: application/json

Accept        

Example: application/json

Accept-Language        

Example: ar

URL Parameters

id   integer     

The ID of the news. Example: 1

news   string     

The news UUID. Example: 9a8b7c6d-1234-5678-abcd-ef0123456789

Events

APIs for browsing events and managing RSVPs.

List Events

requires authentication

Get a paginated list of active events.

Example request:
curl --request GET \
    --get "http://algfari.test/api/v1/events?event_type=wedding&upcoming=1&per_page=15" \
    --header "Authorization: Bearer {YOUR_AUTH_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "Accept-Language: ar"
const url = new URL(
    "http://algfari.test/api/v1/events"
);

const params = {
    "event_type": "wedding",
    "upcoming": "1",
    "per_page": "15",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "Accept-Language": "ar",
};


fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (200, success):


{
    "data": [
        {
            "id": "c3d4e5f6-7890-1abc-def2-345678901bcd",
            "title": "حفل زفاف آل محمد",
            "description": "حفل زفاف الأخ محمد بن عبدالله، يسعدنا دعوتكم للحضور.",
            "event_type": "wedding",
            "event_date": "2026-05-01T18:00:00.000000Z",
            "end_date": "2026-05-01T23:00:00.000000Z",
            "location_name": "قاعة الأمير سلطان - الرياض",
            "location_lat": "24.71370000",
            "location_lng": "46.67530000",
            "is_active": true,
            "attendees_count": 45,
            "creator": {
                "id": "9a8b7c6d-1234-5678-abcd-ef0123456789",
                "full_name": "عبدالله القحطاني"
            },
            "cover_image": "http://algfari.test/storage/media/10/event-cover.jpg",
            "created_at": "2026-04-05T12:00:00.000000Z"
        }
    ],
    "links": {
        "first": "http://algfari.test/api/v1/events?page=1",
        "last": "http://algfari.test/api/v1/events?page=1",
        "prev": null,
        "next": null
    },
    "meta": {
        "current_page": 1,
        "last_page": 1,
        "per_page": 15,
        "total": 1
    }
}
 

Request      

GET api/v1/events

Headers

Authorization        

Example: Bearer {YOUR_AUTH_TOKEN}

Content-Type        

Example: application/json

Accept        

Example: application/json

Accept-Language        

Example: ar

Query Parameters

event_type   string  optional    

Filter by type (wedding/death/other). Example: wedding

upcoming   boolean  optional    

Show only upcoming events. Example: true

per_page   integer  optional    

Items per page. Example: 15

Event Details

requires authentication

Get details of a specific event with attendee count.

Example request:
curl --request GET \
    --get "http://algfari.test/api/v1/events/1" \
    --header "Authorization: Bearer {YOUR_AUTH_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "Accept-Language: ar"
const url = new URL(
    "http://algfari.test/api/v1/events/1"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "Accept-Language": "ar",
};


fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (200, success):


{
    "data": {
        "id": "c3d4e5f6-7890-1abc-def2-345678901bcd",
        "title": "حفل زفاف آل محمد",
        "description": "حفل زفاف الأخ محمد بن عبدالله، يسعدنا دعوتكم للحضور والمشاركة في هذه المناسبة السعيدة.",
        "event_type": "wedding",
        "event_date": "2026-05-01T18:00:00.000000Z",
        "end_date": "2026-05-01T23:00:00.000000Z",
        "location_name": "قاعة الأمير سلطان - الرياض",
        "location_lat": "24.71370000",
        "location_lng": "46.67530000",
        "is_active": true,
        "attendees_count": 45,
        "creator": {
            "id": "9a8b7c6d-1234-5678-abcd-ef0123456789",
            "full_name": "عبدالله القحطاني"
        },
        "cover_image": "http://algfari.test/storage/media/10/event-cover.jpg",
        "created_at": "2026-04-05T12:00:00.000000Z"
    }
}
 

Request      

GET api/v1/events/{id}

Headers

Authorization        

Example: Bearer {YOUR_AUTH_TOKEN}

Content-Type        

Example: application/json

Accept        

Example: application/json

Accept-Language        

Example: ar

URL Parameters

id   integer     

The ID of the event. Example: 1

event   string     

The event UUID. Example: 9a8b7c6d-1234-5678-abcd-ef0123456789

RSVP to Event

requires authentication

Submit or update your RSVP status for an event.

Example request:
curl --request POST \
    "http://algfari.test/api/v1/events/1/rsvp" \
    --header "Authorization: Bearer {YOUR_AUTH_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "Accept-Language: ar" \
    --data "{
    \"status\": \"going\"
}"
const url = new URL(
    "http://algfari.test/api/v1/events/1/rsvp"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "Accept-Language": "ar",
};

let body = {
    "status": "going"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (200):


{
    "message": "تم تحديث الحضور"
}
 

Request      

POST api/v1/events/{event_id}/rsvp

Headers

Authorization        

Example: Bearer {YOUR_AUTH_TOKEN}

Content-Type        

Example: application/json

Accept        

Example: application/json

Accept-Language        

Example: ar

URL Parameters

event_id   integer     

The ID of the event. Example: 1

event   string     

The event UUID. Example: 9a8b7c6d-1234-5678-abcd-ef0123456789

Body Parameters

status   string     

RSVP status (going/maybe/declined). Example: going

Offers

APIs for browsing member offers and services.

List Offers

requires authentication

Get a paginated list of active, non-expired offers.

Example request:
curl --request GET \
    --get "http://algfari.test/api/v1/offers?category=commercial&per_page=15" \
    --header "Authorization: Bearer {YOUR_AUTH_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "Accept-Language: ar"
const url = new URL(
    "http://algfari.test/api/v1/offers"
);

const params = {
    "category": "commercial",
    "per_page": "15",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "Accept-Language": "ar",
};


fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (200, success):


{
    "data": [
        {
            "id": "d4e5f6a7-8901-2bcd-ef34-567890123cde",
            "title": "خدمة صيانة المكيفات",
            "description": "صيانة وتركيب جميع أنواع المكيفات بأسعار مخفضة لأبناء القبيلة",
            "category": "contractor",
            "service_address": "الرياض - حي النسيم",
            "contact_phone": "0559876543",
            "contact_whatsapp": "0559876543",
            "is_active": true,
            "expires_at": "2026-06-01T00:00:00.000000Z",
            "offered_by": {
                "id": "9a8b7c6d-1234-5678-abcd-ef0123456789",
                "full_name": "خالد العتيبي"
            },
            "offer_image": "http://algfari.test/storage/media/15/offer.jpg",
            "created_at": "2026-04-01T10:00:00.000000Z"
        }
    ],
    "links": {
        "first": "http://algfari.test/api/v1/offers?page=1",
        "last": "http://algfari.test/api/v1/offers?page=1",
        "prev": null,
        "next": null
    },
    "meta": {
        "current_page": 1,
        "last_page": 1,
        "per_page": 15,
        "total": 1
    }
}
 

Request      

GET api/v1/offers

Headers

Authorization        

Example: Bearer {YOUR_AUTH_TOKEN}

Content-Type        

Example: application/json

Accept        

Example: application/json

Accept-Language        

Example: ar

Query Parameters

category   string  optional    

Filter by category (commercial/contractor). Example: commercial

per_page   integer  optional    

Items per page. Example: 15

Offer Details

requires authentication

Get details of a specific offer.

Example request:
curl --request GET \
    --get "http://algfari.test/api/v1/offers/1" \
    --header "Authorization: Bearer {YOUR_AUTH_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "Accept-Language: ar"
const url = new URL(
    "http://algfari.test/api/v1/offers/1"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "Accept-Language": "ar",
};


fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (200, success):


{
    "data": {
        "id": "d4e5f6a7-8901-2bcd-ef34-567890123cde",
        "title": "خدمة صيانة المكيفات",
        "description": "صيانة وتركيب جميع أنواع المكيفات بأسعار مخفضة لأبناء القبيلة. نوفر خدمة منزلية.",
        "category": "contractor",
        "service_address": "الرياض - حي النسيم",
        "contact_phone": "0559876543",
        "contact_whatsapp": "0559876543",
        "is_active": true,
        "expires_at": "2026-06-01T00:00:00.000000Z",
        "offered_by": {
            "id": "9a8b7c6d-1234-5678-abcd-ef0123456789",
            "full_name": "خالد العتيبي"
        },
        "offer_image": "http://algfari.test/storage/media/15/offer.jpg",
        "gallery": [
            "http://algfari.test/storage/media/16/gallery1.jpg",
            "http://algfari.test/storage/media/17/gallery2.jpg"
        ],
        "created_at": "2026-04-01T10:00:00.000000Z"
    }
}
 

Request      

GET api/v1/offers/{id}

Headers

Authorization        

Example: Bearer {YOUR_AUTH_TOKEN}

Content-Type        

Example: application/json

Accept        

Example: application/json

Accept-Language        

Example: ar

URL Parameters

id   integer     

The ID of the offer. Example: 1

offer   string     

The offer UUID. Example: 9a8b7c6d-1234-5678-abcd-ef0123456789

Family Fund

APIs for viewing family fund transactions and summary.

List Transactions

requires authentication

Get a paginated list of approved fund transactions.

Example request:
curl --request GET \
    --get "http://algfari.test/api/v1/fund?type=donation&per_page=15" \
    --header "Authorization: Bearer {YOUR_AUTH_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "Accept-Language: ar"
const url = new URL(
    "http://algfari.test/api/v1/fund"
);

const params = {
    "type": "donation",
    "per_page": "15",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "Accept-Language": "ar",
};


fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (200, success):


{
    "data": [
        {
            "id": "e5f6a7b8-9012-3cde-f456-789012345def",
            "amount": "500.00",
            "transaction_type": "donation",
            "description": "تبرع شهري لصندوق العائلة",
            "status": "approved",
            "approved_at": "2026-04-10T12:00:00.000000Z",
            "contributor": {
                "id": "9a8b7c6d-1234-5678-abcd-ef0123456789",
                "full_name": "سعد القحطاني"
            },
            "receipt": "http://algfari.test/storage/media/20/receipt.pdf",
            "created_at": "2026-04-09T10:00:00.000000Z"
        },
        {
            "id": "f6a7b8c9-0123-4def-a567-890123456ef0",
            "amount": "200.00",
            "transaction_type": "expense",
            "description": "مصاريف إصلاح مجلس العائلة",
            "status": "approved",
            "approved_at": "2026-04-11T14:00:00.000000Z",
            "contributor": null,
            "receipt": null,
            "created_at": "2026-04-11T09:00:00.000000Z"
        }
    ],
    "links": {
        "first": "http://algfari.test/api/v1/fund?page=1",
        "last": "http://algfari.test/api/v1/fund?page=1",
        "prev": null,
        "next": null
    },
    "meta": {
        "current_page": 1,
        "last_page": 1,
        "per_page": 15,
        "total": 2
    }
}
 

Request      

GET api/v1/fund

Headers

Authorization        

Example: Bearer {YOUR_AUTH_TOKEN}

Content-Type        

Example: application/json

Accept        

Example: application/json

Accept-Language        

Example: ar

Query Parameters

type   string  optional    

Filter by transaction type (donation/expense). Example: donation

per_page   integer  optional    

Items per page. Example: 15

Fund Summary

requires authentication

Get the family fund financial summary (total donations, expenses, and balance).

Example request:
curl --request GET \
    --get "http://algfari.test/api/v1/fund/summary" \
    --header "Authorization: Bearer {YOUR_AUTH_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "Accept-Language: ar"
const url = new URL(
    "http://algfari.test/api/v1/fund/summary"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "Accept-Language": "ar",
};


fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (200):


{
    "total_donations": 15000,
    "total_expenses": 5000,
    "balance": 10000,
    "transactions_count": 42
}
 

Request      

GET api/v1/fund/summary

Headers

Authorization        

Example: Bearer {YOUR_AUTH_TOKEN}

Content-Type        

Example: application/json

Accept        

Example: application/json

Accept-Language        

Example: ar

Suggestions

APIs for submitting member suggestions.

Submit Suggestion

requires authentication

Submit a new suggestion to the administration.

Example request:
curl --request POST \
    "http://algfari.test/api/v1/suggestions" \
    --header "Authorization: Bearer {YOUR_AUTH_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "Accept-Language: ar" \
    --data "{
    \"title\": {
        \"ar\": \"اقتراح جديد\",
        \"en\": \"New suggestion\"
    },
    \"description\": {
        \"ar\": \"وصف الاقتراح\",
        \"en\": \"Suggestion description\"
    }
}"
const url = new URL(
    "http://algfari.test/api/v1/suggestions"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "Accept-Language": "ar",
};

let body = {
    "title": {
        "ar": "اقتراح جديد",
        "en": "New suggestion"
    },
    "description": {
        "ar": "وصف الاقتراح",
        "en": "Suggestion description"
    }
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (201, success):


{
    "message": "تم تقديم الاقتراح بنجاح",
    "suggestion": {
        "id": 1,
        "title": {
            "ar": "اقتراح جديد",
            "en": "New suggestion"
        },
        "description": {
            "ar": "وصف الاقتراح",
            "en": "Suggestion description"
        },
        "submitted_by": 1,
        "status": "pending",
        "created_at": "2026-04-13T10:00:00.000000Z",
        "updated_at": "2026-04-13T10:00:00.000000Z"
    }
}
 

Example response (422, validation error):


{
    "message": "The given data was invalid.",
    "errors": {
        "title": [
            "The title field is required."
        ]
    }
}
 

Request      

POST api/v1/suggestions

Headers

Authorization        

Example: Bearer {YOUR_AUTH_TOKEN}

Content-Type        

Example: application/json

Accept        

Example: application/json

Accept-Language        

Example: ar

Body Parameters

title   object     

Title in Arabic and English.

ar   string     

Title in Arabic. Example: اقتراح جديد

en   string     

Title in English. Example: New suggestion

description   object     

Description in Arabic and English.

ar   string     

Description in Arabic. Example: وصف الاقتراح

en   string     

Description in English. Example: Suggestion description

Notifications

APIs for managing user notifications.

List Notifications

requires authentication

Get a paginated list of the authenticated user's notifications.

Example request:
curl --request GET \
    --get "http://algfari.test/api/v1/notifications" \
    --header "Authorization: Bearer {YOUR_AUTH_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "Accept-Language: ar"
const url = new URL(
    "http://algfari.test/api/v1/notifications"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "Accept-Language": "ar",
};


fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (200, success):


{
    "data": [
        {
            "id": "b8c9d0e1-2345-6f78-a901-234567890bcd",
            "title": "خبر جديد: اجتماع مجلس العائلة",
            "body": "تم نشر خبر جديد بعنوان اجتماع مجلس العائلة السنوي",
            "type": "news",
            "is_read": false,
            "created_at": "2026-04-13T10:00:00.000000Z"
        },
        {
            "id": "c9d0e1f2-3456-7a89-b012-345678901cde",
            "title": "فعالية جديدة: حفل زفاف",
            "body": "تم إنشاء فعالية جديدة بعنوان حفل زفاف آل محمد",
            "type": "event",
            "is_read": true,
            "created_at": "2026-04-12T14:30:00.000000Z"
        }
    ],
    "current_page": 1,
    "last_page": 1,
    "per_page": 20,
    "total": 2
}
 

Request      

GET api/v1/notifications

Headers

Authorization        

Example: Bearer {YOUR_AUTH_TOKEN}

Content-Type        

Example: application/json

Accept        

Example: application/json

Accept-Language        

Example: ar

Mark Notification as Read

requires authentication

Mark a single notification as read.

Example request:
curl --request PUT \
    "http://algfari.test/api/v1/notifications/9a8b7c6d-1234-5678-abcd-ef0123456789/read" \
    --header "Authorization: Bearer {YOUR_AUTH_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "Accept-Language: ar"
const url = new URL(
    "http://algfari.test/api/v1/notifications/9a8b7c6d-1234-5678-abcd-ef0123456789/read"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "Accept-Language": "ar",
};


fetch(url, {
    method: "PUT",
    headers,
}).then(response => response.json());

Example response (200):


{
    "message": "تم قراءة الإشعار"
}
 

Example response (404):


{
    "message": "غير موجود"
}
 

Request      

PUT api/v1/notifications/{id}/read

Headers

Authorization        

Example: Bearer {YOUR_AUTH_TOKEN}

Content-Type        

Example: application/json

Accept        

Example: application/json

Accept-Language        

Example: ar

URL Parameters

id   string     

The notification UUID. Example: 9a8b7c6d-1234-5678-abcd-ef0123456789

Mark All Notifications as Read

requires authentication

Mark all unread notifications as read for the authenticated user.

Example request:
curl --request PUT \
    "http://algfari.test/api/v1/notifications/read-all" \
    --header "Authorization: Bearer {YOUR_AUTH_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "Accept-Language: ar"
const url = new URL(
    "http://algfari.test/api/v1/notifications/read-all"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "Accept-Language": "ar",
};


fetch(url, {
    method: "PUT",
    headers,
}).then(response => response.json());

Example response (200):


{
    "message": "تم قراءة جميع الإشعارات"
}
 

Request      

PUT api/v1/notifications/read-all

Headers

Authorization        

Example: Bearer {YOUR_AUTH_TOKEN}

Content-Type        

Example: application/json

Accept        

Example: application/json

Accept-Language        

Example: ar

Devices

Register Device

requires authentication

Register a device for push notifications.

Example request:
curl --request POST \
    "http://algfari.test/api/v1/devices" \
    --header "Authorization: Bearer {YOUR_AUTH_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "Accept-Language: ar" \
    --data "{
    \"device_token\": \"fcm-token-abc123xyz\",
    \"platform\": \"android\"
}"
const url = new URL(
    "http://algfari.test/api/v1/devices"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "Accept-Language": "ar",
};

let body = {
    "device_token": "fcm-token-abc123xyz",
    "platform": "android"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (200):


{
    "message": "تم تسجيل الجهاز بنجاح"
}
 

Request      

POST api/v1/devices

Headers

Authorization        

Example: Bearer {YOUR_AUTH_TOKEN}

Content-Type        

Example: application/json

Accept        

Example: application/json

Accept-Language        

Example: ar

Body Parameters

device_token   string     

The FCM device token. Example: fcm-token-abc123xyz

platform   string     

The device platform. Example: android