MENU navbar-image

Introduction

This documentation aims to provide all the information you need to work with our API.

Base URL

https://peopleapi.hawiyyah.com

Authenticating requests

This API is authenticated by sending an Authorization header with the value "Bearer {YOUR_AUTH_KEY}".

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

You can retrieve your token by visiting your dashboard and clicking Generate API token.

Endpoints

GET api/callback/emulator

Example request:
curl --request GET \
    --get "https://peopleapi.hawiyyah.com/api/callback/emulator" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://peopleapi.hawiyyah.com/api/callback/emulator"
);

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

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

Example response (200):


{}
 

Request   

GET api/callback/emulator

Profile

APIs for create new profile user into our database or get user profile ,

Create New Profile

requires authentication

Example request:
curl --request POST \
    "https://peopleapi.hawiyyah.com/api/v1/profile" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"data_source\": \"facebook\",
    \"gender\": \"male\",
    \"date_of_birth\": \"1986-05-27\",
    \"place_of_birth\": \"JO\",
    \"names\": [
        {
            \"prefix\": \"Mr\",
            \"first\": \"Ahmad\",
            \"middle\": \"Ibrahim\",
            \"last\": \"Saleh\"
        },
        {
            \"first\": \"Feddes\",
            \"last\": \"Jawabkom\"
        }
    ],
    \"phones\": [
        {
            \"valid_since\": \"2021-10-10\",
            \"type\": \"mobile\",
            \"do_not_call_flag\": false,
            \"country_code\": \"JO\",
            \"original_number\": \"0788208255\",
            \"risky_phone\": false,
            \"disposable_phone\": false,
            \"carrier\": \"umniah\",
            \"purpose\": \"personal\",
            \"industry\": \"Anything\",
            \"possible_countries\": [
                \"US\",
                \"SA\"
            ]
        }
    ],
    \"addresses\": [
        {
            \"valid_since\": \"2021-10-10\",
            \"country\": \"JO\",
            \"state\": \"Amman\",
            \"city\": \"AlJubiha\",
            \"zip\": 11941,
            \"street\": \"AlGardenz Street\",
            \"building_number\": 22,
            \"display\": \"Amman-Jordan, AlJubiha, Algardenz street building number 22, flat number 3.\"
        }
    ],
    \"usernames\": [
        {
            \"valid_since\": \"2021-10-10\",
            \"username\": \"ahmadfds\"
        },
        {
            \"valid_since\": \"2021-10-10\",
            \"username\": \"ahmad_fds\"
        }
    ],
    \"emails\": [
        {
            \"valid_since\": \"2021-10-10\",
            \"email\": \"ahmad@mailinator.com\",
            \"type\": \"work\"
        },
        {
            \"valid_since\": \"2021-10-10\",
            \"email\": \"ahmad2@mailinator.com\",
            \"type\": \"personal\"
        }
    ],
    \"relationships\": [
        {
            \"valid_since\": \"2021-10-10\",
            \"type\": \"brother\",
            \"first_name\": \"Ibrahim\",
            \"last_name\": \"Saleh\"
        },
        {
            \"valid_since\": \"2021-10-10\",
            \"type\": \"friend\",
            \"first_name\": \"Yousef\",
            \"last_name\": \"Nabulsi\"
        }
    ],
    \"skills\": [
        {
            \"valid_since\": \"2021-10-10\",
            \"level\": \"Advanced\",
            \"skill\": \"PHP\"
        },
        {
            \"valid_since\": \"2021-10-10\",
            \"level\": \"Advanced\",
            \"skill\": \"MySQL\"
        }
    ],
    \"images\": [
        {
            \"valid_since\": \"2021-10-10\",
            \"original_url\": \"http:\\/\\/mad-distribution.film\\/img\\/lineup\\/movies\\/directors\\/Ahmad_Saleh.jpg\"
        },
        {
            \"valid_since\": \"2021-10-10\",
            \"original_url\": \"https:\\/\\/en.islamway.net\\/uploads\\/authors\\/3737.jpg\"
        }
    ],
    \"languages\": [
        {
            \"language\": \"en\",
            \"country\": \"US\"
        },
        {
            \"language\": \"ar\",
            \"country\": \"JO\"
        }
    ],
    \"jobs\": [
        {
            \"valid_since\": \"2021-10-10\",
            \"from\": \"2001-10-01\",
            \"to\": \"2005-02-05\",
            \"title\": \"Software Developer\",
            \"organization\": \"Jawabkom\",
            \"industry\": \"Information Technology\"
        }
    ],
    \"educations\": [
        {
            \"valid_since\": \"2021-10-10\",
            \"from\": \"2001-10-01\",
            \"to\": \"2005-02-05\",
            \"school\": \"Philadelphia University\",
            \"degree\": \"Bachelor Degree\",
            \"major\": \"Computer Science\"
        }
    ],
    \"social_profiles\": [
        {
            \"valid_since\": \"2021-10-10\",
            \"url\": \"https:\\/\\/www.facebook.com\\/ahmadfds\\/\",
            \"type\": \"facebook\",
            \"username\": \"ahmadfds\",
            \"account_id\": 10161047747102818
        }
    ],
    \"meta_data\": [
        {
            \"meta_key\": \"tracking_uuid\",
            \"meta_value\": \"any trackinguuid\"
        },
        {
            \"meta_key\": \"mapped_user_id\",
            \"meta_value\": \"5546544\"
        },
        {
            \"meta_key\": \"any_meta_key\",
            \"meta_value\": \"any any_meta_value\"
        }
    ]
}"
const url = new URL(
    "https://peopleapi.hawiyyah.com/api/v1/profile"
);

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

let body = {
    "data_source": "facebook",
    "gender": "male",
    "date_of_birth": "1986-05-27",
    "place_of_birth": "JO",
    "names": [
        {
            "prefix": "Mr",
            "first": "Ahmad",
            "middle": "Ibrahim",
            "last": "Saleh"
        },
        {
            "first": "Feddes",
            "last": "Jawabkom"
        }
    ],
    "phones": [
        {
            "valid_since": "2021-10-10",
            "type": "mobile",
            "do_not_call_flag": false,
            "country_code": "JO",
            "original_number": "0788208255",
            "risky_phone": false,
            "disposable_phone": false,
            "carrier": "umniah",
            "purpose": "personal",
            "industry": "Anything",
            "possible_countries": [
                "US",
                "SA"
            ]
        }
    ],
    "addresses": [
        {
            "valid_since": "2021-10-10",
            "country": "JO",
            "state": "Amman",
            "city": "AlJubiha",
            "zip": 11941,
            "street": "AlGardenz Street",
            "building_number": 22,
            "display": "Amman-Jordan, AlJubiha, Algardenz street building number 22, flat number 3."
        }
    ],
    "usernames": [
        {
            "valid_since": "2021-10-10",
            "username": "ahmadfds"
        },
        {
            "valid_since": "2021-10-10",
            "username": "ahmad_fds"
        }
    ],
    "emails": [
        {
            "valid_since": "2021-10-10",
            "email": "ahmad@mailinator.com",
            "type": "work"
        },
        {
            "valid_since": "2021-10-10",
            "email": "ahmad2@mailinator.com",
            "type": "personal"
        }
    ],
    "relationships": [
        {
            "valid_since": "2021-10-10",
            "type": "brother",
            "first_name": "Ibrahim",
            "last_name": "Saleh"
        },
        {
            "valid_since": "2021-10-10",
            "type": "friend",
            "first_name": "Yousef",
            "last_name": "Nabulsi"
        }
    ],
    "skills": [
        {
            "valid_since": "2021-10-10",
            "level": "Advanced",
            "skill": "PHP"
        },
        {
            "valid_since": "2021-10-10",
            "level": "Advanced",
            "skill": "MySQL"
        }
    ],
    "images": [
        {
            "valid_since": "2021-10-10",
            "original_url": "http:\/\/mad-distribution.film\/img\/lineup\/movies\/directors\/Ahmad_Saleh.jpg"
        },
        {
            "valid_since": "2021-10-10",
            "original_url": "https:\/\/en.islamway.net\/uploads\/authors\/3737.jpg"
        }
    ],
    "languages": [
        {
            "language": "en",
            "country": "US"
        },
        {
            "language": "ar",
            "country": "JO"
        }
    ],
    "jobs": [
        {
            "valid_since": "2021-10-10",
            "from": "2001-10-01",
            "to": "2005-02-05",
            "title": "Software Developer",
            "organization": "Jawabkom",
            "industry": "Information Technology"
        }
    ],
    "educations": [
        {
            "valid_since": "2021-10-10",
            "from": "2001-10-01",
            "to": "2005-02-05",
            "school": "Philadelphia University",
            "degree": "Bachelor Degree",
            "major": "Computer Science"
        }
    ],
    "social_profiles": [
        {
            "valid_since": "2021-10-10",
            "url": "https:\/\/www.facebook.com\/ahmadfds\/",
            "type": "facebook",
            "username": "ahmadfds",
            "account_id": 10161047747102818
        }
    ],
    "meta_data": [
        {
            "meta_key": "tracking_uuid",
            "meta_value": "any trackinguuid"
        },
        {
            "meta_key": "mapped_user_id",
            "meta_value": "5546544"
        },
        {
            "meta_key": "any_meta_key",
            "meta_value": "any any_meta_value"
        }
    ]
};

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

Example response (200):


{
    "profile_id": "8a04501b-53ee-481a-949a-0cc59d286ec8",
    "gender": "male",
    "date_of_birth": "1986-06-01",
    "place_of_birth": "JO",
    "data_source": "user_contacts",
    "names": [
        {
            "prefix": "Mr",
            "first": "Ahmad",
            "middle": "Ibrahim",
            "last": "Saleh",
            "display": "Mr Ahmad Ibrahim Saleh"
        },
        {
            "prefix": null,
            "first": "Feddes",
            "middle": null,
            "last": "Jawabkom",
            "display": "Feddes Jawabkom"
        }
    ],
    "phones": [
        {
            "type": "mobile",
            "do_not_call_flag": false,
            "country_code": "JO",
            "original_number": "0788208255",
            "formatted_number": "+962788208255",
            "valid_phone": true,
            "risky_phone": false,
            "disposable_phone": false,
            "carrier": "umniah",
            "purpose": "personal",
            "industry": "Anything",
            "valid_since": "2021-10-10"
        }
    ],
    "addresses": [
        {
            "valid_since": "2021-10-10",
            "country": "JO",
            "state": "Amman",
            "city": "AlJubiha",
            "zip": "11941",
            "street": "AlGardenz Street",
            "building_number": "22",
            "display": "Amman-Jordan, AlJubiha, Algardenz street building number 22, flat number 3."
        }
    ],
    "usernames": [
        {
            "valid_since": "2021-10-10",
            "username": "ahmadfds"
        },
        {
            "valid_since": "2021-10-10",
            "username": "ahmad_fds"
        }
    ],
    "emails": [
        {
            "valid_since": "2021-10-10",
            "email": "ahmad@mailinator.com",
            "esp_domain": "mailinator.com",
            "type": "work"
        },
        {
            "valid_since": "2021-10-10",
            "email": "ahmad2@mailinator.com",
            "esp_domain": "mailinator.com",
            "type": "personal"
        }
    ],
    "relationships": [
        {
            "valid_since": "2021-10-10",
            "type": "brother",
            "first_name": "Ibrahim",
            "last_name": "Saleh",
            "person_id": null
        },
        {
            "valid_since": "2021-10-10",
            "type": "friend",
            "first_name": "Yousef",
            "last_name": "Nabulsi",
            "person_id": null
        }
    ],
    "skills": [
        {
            "valid_since": "2021-10-10",
            "level": "Advanced",
            "skill": "PHP"
        },
        {
            "valid_since": "2021-10-10",
            "level": "Advanced",
            "skill": "MySQL"
        }
    ],
    "images": [
        {
            "original_url": "http://mad-distribution.film/img/lineup/movies/directors/Ahmad_Saleh.jpg",
            "local_path": null,
            "valid_since": "2021-10-10"
        },
        {
            "original_url": "https://en.islamway.net/uploads/authors/3737.jpg",
            "local_path": null,
            "valid_since": "2021-10-10"
        }
    ],
    "languages": [
        {
            "language": "en",
            "country": "US"
        },
        {
            "language": "ar",
            "country": "JO"
        }
    ],
    "jobs": [
        {
            "valid_since": "2021-10-10",
            "from": "2001-10-01",
            "to": "2005-02-05",
            "title": "Software Developer",
            "organization": "Jawabkom",
            "industry": "Information Technology"
        }
    ],
    "educations": [
        {
            "valid_since": "2021-10-10",
            "from": "2001-10-01",
            "to": "2005-02-05",
            "school": "Philadelphia University",
            "degree": "Bachelor Degree",
            "major": "Computer Science"
        }
    ],
    "social_profiles": [
        {
            "valid_since": "2021-10-10",
            "url": "https://www.facebook.com/ahmadfds/",
            "type": "facebook",
            "username": "ahmadfds",
            "account_id": "10161047747102818"
        }
    ],
    "criminal_records": [],
    "meta_data": [
        {
            "meta_key": "tracking_uuid",
            "meta_value": "any trackinguuid"
        },
        {
            "meta_key": "mapped_user_id",
            "meta_value": "5546544"
        },
        {
            "meta_key": "any_meta_key",
            "meta_value": "any any_meta_value"
        }
    ]
}
 

Request   

POST api/v1/profile

Body Parameters

data_source  string  

Set profile's data source such as (user_contacts, facebook, linkedin, ... etc).

gender  string optional  

The profile onwner gender, it could be male or female .

date_of_birth  string optional  

Profile owner's date of birth.

place_of_birth  string optional  

Profile owner's country of birth.

names  object[] optional  

A collection of profile owner names.

phones  object[] optional  

A collection of phone numbers.

addresses  object[] optional  

A collection of profile's related addresses.

usernames  object[] optional  

it's last or family name of the one you want to search for.

emails  object[] optional  

A collection of email addresses.

relationships  object[] optional  

A collection of relationships with other people.

skills  object[] optional  

A collection of profile owner's skills.

images  object[] optional  

A collection of profile owner's images.

languages  object[] optional  

A collection of locales.

jobs  object[] optional  

A collection of jobs and experiences gained by the profile owner.

educations  object[] optional  

A collection of schools attended by the profile owner.

social_profiles  object[] optional  

A collection of related social websites links.

meta_data  object[] optional  

Any other data you need to attach to profile.

Get Profile By profileId

requires authentication

Example request:
curl --request GET \
    --get "https://peopleapi.hawiyyah.com/api/v1/profile" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"profileId\": \"eb77e4e3-28cb-4959-ac97-396504b7c022\"
}"
const url = new URL(
    "https://peopleapi.hawiyyah.com/api/v1/profile"
);

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

let body = {
    "profileId": "eb77e4e3-28cb-4959-ac97-396504b7c022"
};

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

Example response (200):


{
    "profile_id": "8a04501b-53ee-481a-949a-0cc59d286ec8",
    "gender": "male",
    "date_of_birth": "1986-06-01",
    "place_of_birth": "JO",
    "data_source": "user_contacts",
    "names": [
        {
            "prefix": "Mr",
            "first": "Ahmad",
            "middle": "Ibrahim",
            "last": "Saleh",
            "display": "Mr Ahmad Ibrahim Saleh"
        },
        {
            "prefix": null,
            "first": "Feddes",
            "middle": null,
            "last": "Jawabkom",
            "display": "Feddes Jawabkom"
        }
    ],
    "phones": [
        {
            "type": "mobile",
            "do_not_call_flag": false,
            "country_code": "JO",
            "original_number": "0788208255",
            "formatted_number": "+962788208255",
            "valid_phone": true,
            "risky_phone": false,
            "disposable_phone": false,
            "carrier": "umniah",
            "purpose": "personal",
            "industry": "Anything",
            "valid_since": "2021-10-10"
        }
    ],
    "addresses": [
        {
            "valid_since": "2021-10-10",
            "country": "JO",
            "state": "Amman",
            "city": "AlJubiha",
            "zip": "11941",
            "street": "AlGardenz Street",
            "building_number": "22",
            "display": "Amman-Jordan, AlJubiha, Algardenz street building number 22, flat number 3."
        }
    ],
    "usernames": [
        {
            "valid_since": "2021-10-10",
            "username": "ahmadfds"
        },
        {
            "valid_since": "2021-10-10",
            "username": "ahmad_fds"
        }
    ],
    "emails": [
        {
            "valid_since": "2021-10-10",
            "email": "ahmad@mailinator.com",
            "esp_domain": "mailinator.com",
            "type": "work"
        },
        {
            "valid_since": "2021-10-10",
            "email": "ahmad2@mailinator.com",
            "esp_domain": "mailinator.com",
            "type": "personal"
        }
    ],
    "relationships": [
        {
            "valid_since": "2021-10-10",
            "type": "brother",
            "first_name": "Ibrahim",
            "last_name": "Saleh",
            "person_id": null
        },
        {
            "valid_since": "2021-10-10",
            "type": "friend",
            "first_name": "Yousef",
            "last_name": "Nabulsi",
            "person_id": null
        }
    ],
    "skills": [
        {
            "valid_since": "2021-10-10",
            "level": "Advanced",
            "skill": "PHP"
        },
        {
            "valid_since": "2021-10-10",
            "level": "Advanced",
            "skill": "MySQL"
        }
    ],
    "images": [
        {
            "original_url": "http://mad-distribution.film/img/lineup/movies/directors/Ahmad_Saleh.jpg",
            "local_path": null,
            "valid_since": "2021-10-10"
        },
        {
            "original_url": "https://en.islamway.net/uploads/authors/3737.jpg",
            "local_path": null,
            "valid_since": "2021-10-10"
        }
    ],
    "languages": [
        {
            "language": "en",
            "country": "US"
        },
        {
            "language": "ar",
            "country": "JO"
        }
    ],
    "jobs": [
        {
            "valid_since": "2021-10-10",
            "from": "2001-10-01",
            "to": "2005-02-05",
            "title": "Software Developer",
            "organization": "Jawabkom",
            "industry": "Information Technology"
        }
    ],
    "educations": [
        {
            "valid_since": "2021-10-10",
            "from": "2001-10-01",
            "to": "2005-02-05",
            "school": "Philadelphia University",
            "degree": "Bachelor Degree",
            "major": "Computer Science"
        }
    ],
    "social_profiles": [
        {
            "valid_since": "2021-10-10",
            "url": "https://www.facebook.com/ahmadfds/",
            "type": "facebook",
            "username": "ahmadfds",
            "account_id": "10161047747102818"
        }
    ],
    "criminal_records": [],
    "meta_data": [
        {
            "meta_key": "tracking_uuid",
            "meta_value": "any trackinguuid"
        },
        {
            "meta_key": "mapped_user_id",
            "meta_value": "5546544"
        },
        {
            "meta_key": "any_meta_key",
            "meta_value": "any any_meta_value"
        }
    ]
}
 

Request   

GET api/v1/profile

Body Parameters

profileId  string.  

Search

APIs for Search into our Cache first,then will be request to third party API if we don't found

Search By-Email Address

requires authentication

This endpoint lets you search in data profiles into db with related entities API.

Example request:
curl --request GET \
    --get "https://peopleapi.hawiyyah.com/api/v1/profile/search/byEmail" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"address\": \"ibrahim@example.com\",
    \"alias\": [
        \"itaque\"
    ],
    \"meta\": \"[\'process_id\'=>\'5656464\']\"
}"
const url = new URL(
    "https://peopleapi.hawiyyah.com/api/v1/profile/search/byEmail"
);

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

let body = {
    "address": "ibrahim@example.com",
    "alias": [
        "itaque"
    ],
    "meta": "['process_id'=>'5656464']"
};

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

Example response (200):


{
    "profile_id": "8a04501b-53ee-481a-949a-0cc59d286ec8",
    "gender": "male",
    "date_of_birth": "1986-06-01",
    "place_of_birth": "JO",
    "data_source": "user_contacts",
    "names": [
        {
            "prefix": "Mr",
            "first": "Ahmad",
            "middle": "Ibrahim",
            "last": "Saleh",
            "display": "Mr Ahmad Ibrahim Saleh"
        },
        {
            "prefix": null,
            "first": "Feddes",
            "middle": null,
            "last": "Jawabkom",
            "display": "Feddes Jawabkom"
        }
    ],
    "phones": [
        {
            "type": "mobile",
            "do_not_call_flag": false,
            "country_code": "JO",
            "original_number": "0788208255",
            "formatted_number": "+962788208255",
            "valid_phone": true,
            "risky_phone": false,
            "disposable_phone": false,
            "carrier": "umniah",
            "purpose": "personal",
            "industry": "Anything",
            "valid_since": "2021-10-10"
        }
    ],
    "addresses": [
        {
            "valid_since": "2021-10-10",
            "country": "JO",
            "state": "Amman",
            "city": "AlJubiha",
            "zip": "11941",
            "street": "AlGardenz Street",
            "building_number": "22",
            "display": "Amman-Jordan, AlJubiha, Algardenz street building number 22, flat number 3."
        }
    ],
    "usernames": [
        {
            "valid_since": "2021-10-10",
            "username": "ahmadfds"
        },
        {
            "valid_since": "2021-10-10",
            "username": "ahmad_fds"
        }
    ],
    "emails": [
        {
            "valid_since": "2021-10-10",
            "email": "ahmad@mailinator.com",
            "esp_domain": "mailinator.com",
            "type": "work"
        },
        {
            "valid_since": "2021-10-10",
            "email": "ibrahim@example.com",
            "esp_domain": "mailinator.com",
            "type": "personal"
        }
    ],
    "relationships": [
        {
            "valid_since": "2021-10-10",
            "type": "brother",
            "first_name": "Ibrahim",
            "last_name": "Saleh",
            "person_id": null
        },
        {
            "valid_since": "2021-10-10",
            "type": "friend",
            "first_name": "Yousef",
            "last_name": "Nabulsi",
            "person_id": null
        }
    ],
    "skills": [
        {
            "valid_since": "2021-10-10",
            "level": "Advanced",
            "skill": "PHP"
        },
        {
            "valid_since": "2021-10-10",
            "level": "Advanced",
            "skill": "MySQL"
        }
    ],
    "images": [
        {
            "original_url": "http://mad-distribution.film/img/lineup/movies/directors/Ahmad_Saleh.jpg",
            "local_path": null,
            "valid_since": "2021-10-10"
        },
        {
            "original_url": "https://en.islamway.net/uploads/authors/3737.jpg",
            "local_path": null,
            "valid_since": "2021-10-10"
        }
    ],
    "languages": [
        {
            "language": "en",
            "country": "US"
        },
        {
            "language": "ar",
            "country": "JO"
        }
    ],
    "jobs": [
        {
            "valid_since": "2021-10-10",
            "from": "2001-10-01",
            "to": "2005-02-05",
            "title": "Software Developer",
            "organization": "Jawabkom",
            "industry": "Information Technology"
        }
    ],
    "educations": [
        {
            "valid_since": "2021-10-10",
            "from": "2001-10-01",
            "to": "2005-02-05",
            "school": "Philadelphia University",
            "degree": "Bachelor Degree",
            "major": "Computer Science"
        }
    ],
    "social_profiles": [
        {
            "valid_since": "2021-10-10",
            "url": "https://www.facebook.com/ahmadfds/",
            "type": "facebook",
            "username": "ahmadfds",
            "account_id": "10161047747102818"
        }
    ],
    "criminal_records": [],
    "meta_data": [
        {
            "meta_key": "tracking_uuid",
            "meta_value": "any trackinguuid"
        },
        {
            "meta_key": "mapped_user_id",
            "meta_value": "5546544"
        },
        {
            "meta_key": "any_meta_key",
            "meta_value": "any any_meta_value"
        }
    ]
}
 

Request   

GET api/v1/profile/search/byEmail

Body Parameters

address  string  

must be valid email address .

alias  string[] optional  

should provider when you want search into our providers .

meta  string optional  

should be array have meta request data .

GET api/v1/profile/search/byPhone

Example request:
curl --request GET \
    --get "https://peopleapi.hawiyyah.com/api/v1/profile/search/byPhone" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"number\": \"provident\",
    \"possibleCountries\": [
        \"u\"
    ]
}"
const url = new URL(
    "https://peopleapi.hawiyyah.com/api/v1/profile/search/byPhone"
);

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

let body = {
    "number": "provident",
    "possibleCountries": [
        "u"
    ]
};

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

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
 

{
    "message": "Unauthenticated."
}
 

Request   

GET api/v1/profile/search/byPhone

Body Parameters

number  string  

possibleCountries  string[]  

Must be at least 2 characters. Must not be greater than 2 characters.

Search By Username

requires authentication

This endpoint lets you search in data profiles into db with related entities API.

Example request:
curl --request GET \
    --get "https://peopleapi.hawiyyah.com/api/v1/profile/search/byUsername" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"username\": \"ahmadfds,\",
    \"alias\": [
        \"in\"
    ],
    \"meta\": \"[\'process_id\'=>\'5656464\']\"
}"
const url = new URL(
    "https://peopleapi.hawiyyah.com/api/v1/profile/search/byUsername"
);

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

let body = {
    "username": "ahmadfds,",
    "alias": [
        "in"
    ],
    "meta": "['process_id'=>'5656464']"
};

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

Example response (200):


{
    "profile_id": "8a04501b-53ee-481a-949a-0cc59d286ec8",
    "gender": "male",
    "date_of_birth": "1986-06-01",
    "place_of_birth": "JO",
    "data_source": "user_contacts",
    "names": [
        {
            "prefix": "Mr",
            "first": "Ahmad",
            "middle": "Ibrahim",
            "last": "Saleh",
            "display": "Mr Ahmad Ibrahim Saleh"
        },
        {
            "prefix": null,
            "first": "Feddes",
            "middle": null,
            "last": "Jawabkom",
            "display": "Feddes Jawabkom"
        }
    ],
    "phones": [
        {
            "type": "mobile",
            "do_not_call_flag": false,
            "country_code": "JO",
            "original_number": "0788208255",
            "formatted_number": "+962788208255",
            "valid_phone": true,
            "risky_phone": false,
            "disposable_phone": false,
            "carrier": "umniah",
            "purpose": "personal",
            "industry": "Anything",
            "valid_since": "2021-10-10"
        }
    ],
    "addresses": [
        {
            "valid_since": "2021-10-10",
            "country": "JO",
            "state": "Amman",
            "city": "AlJubiha",
            "zip": "11941",
            "street": "AlGardenz Street",
            "building_number": "22",
            "display": "Amman-Jordan, AlJubiha, Algardenz street building number 22, flat number 3."
        }
    ],
    "usernames": [
        {
            "valid_since": "2021-10-10",
            "username": "ahmadfds"
        },
        {
            "valid_since": "2021-10-10",
            "username": "ahmad_fds"
        }
    ],
    "emails": [
        {
            "valid_since": "2021-10-10",
            "email": "ahmad@mailinator.com",
            "esp_domain": "mailinator.com",
            "type": "work"
        },
        {
            "valid_since": "2021-10-10",
            "email": "ibrahim@example.com",
            "esp_domain": "mailinator.com",
            "type": "personal"
        }
    ],
    "relationships": [
        {
            "valid_since": "2021-10-10",
            "type": "brother",
            "first_name": "Ibrahim",
            "last_name": "Saleh",
            "person_id": null
        },
        {
            "valid_since": "2021-10-10",
            "type": "friend",
            "first_name": "Yousef",
            "last_name": "Nabulsi",
            "person_id": null
        }
    ],
    "skills": [
        {
            "valid_since": "2021-10-10",
            "level": "Advanced",
            "skill": "PHP"
        },
        {
            "valid_since": "2021-10-10",
            "level": "Advanced",
            "skill": "MySQL"
        }
    ],
    "images": [
        {
            "original_url": "http://mad-distribution.film/img/lineup/movies/directors/Ahmad_Saleh.jpg",
            "local_path": null,
            "valid_since": "2021-10-10"
        },
        {
            "original_url": "https://en.islamway.net/uploads/authors/3737.jpg",
            "local_path": null,
            "valid_since": "2021-10-10"
        }
    ],
    "languages": [
        {
            "language": "en",
            "country": "US"
        },
        {
            "language": "ar",
            "country": "JO"
        }
    ],
    "jobs": [
        {
            "valid_since": "2021-10-10",
            "from": "2001-10-01",
            "to": "2005-02-05",
            "title": "Software Developer",
            "organization": "Jawabkom",
            "industry": "Information Technology"
        }
    ],
    "educations": [
        {
            "valid_since": "2021-10-10",
            "from": "2001-10-01",
            "to": "2005-02-05",
            "school": "Philadelphia University",
            "degree": "Bachelor Degree",
            "major": "Computer Science"
        }
    ],
    "social_profiles": [
        {
            "valid_since": "2021-10-10",
            "url": "https://www.facebook.com/ahmadfds/",
            "type": "facebook",
            "username": "ahmadfds",
            "account_id": "10161047747102818"
        }
    ],
    "criminal_records": [],
    "meta_data": [
        {
            "meta_key": "tracking_uuid",
            "meta_value": "any trackinguuid"
        },
        {
            "meta_key": "mapped_user_id",
            "meta_value": "5546544"
        },
        {
            "meta_key": "any_meta_key",
            "meta_value": "any any_meta_value"
        }
    ]
}
 

Request   

GET api/v1/profile/search/byUsername

Body Parameters

username  string  

username.

alias  string[] optional  

should provider when you want search into our providers .

meta  string optional  

should be array have meta request data .

Search By Name

requires authentication

This endpoint lets you search in data profiles into db with related entities API.

Example request:
curl --request GET \
    --get "https://peopleapi.hawiyyah.com/api/v1/profile/search/byName" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"Mr Ahmad Ibrahim Saleh,\",
    \"alias\": [
        \"dolorum\"
    ],
    \"meta\": \"[\'process_id\'=>\'5656464\']\"
}"
const url = new URL(
    "https://peopleapi.hawiyyah.com/api/v1/profile/search/byName"
);

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

let body = {
    "name": "Mr Ahmad Ibrahim Saleh,",
    "alias": [
        "dolorum"
    ],
    "meta": "['process_id'=>'5656464']"
};

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

Example response (200):


{
    "profile_id": "8a04501b-53ee-481a-949a-0cc59d286ec8",
    "gender": "male",
    "date_of_birth": "1986-06-01",
    "place_of_birth": "JO",
    "data_source": "user_contacts",
    "names": [
        {
            "prefix": "Mr",
            "first": "Ahmad",
            "middle": "Ibrahim",
            "last": "Saleh",
            "display": "Mr Ahmad Ibrahim Saleh"
        },
        {
            "prefix": null,
            "first": "Feddes",
            "middle": null,
            "last": "Jawabkom",
            "display": "Feddes Jawabkom"
        }
    ],
    "phones": [
        {
            "type": "mobile",
            "do_not_call_flag": false,
            "country_code": "JO",
            "original_number": "0788208255",
            "formatted_number": "+962788208255",
            "valid_phone": true,
            "risky_phone": false,
            "disposable_phone": false,
            "carrier": "umniah",
            "purpose": "personal",
            "industry": "Anything",
            "valid_since": "2021-10-10"
        }
    ],
    "addresses": [
        {
            "valid_since": "2021-10-10",
            "country": "JO",
            "state": "Amman",
            "city": "AlJubiha",
            "zip": "11941",
            "street": "AlGardenz Street",
            "building_number": "22",
            "display": "Amman-Jordan, AlJubiha, Algardenz street building number 22, flat number 3."
        }
    ],
    "usernames": [
        {
            "valid_since": "2021-10-10",
            "username": "ahmadfds"
        },
        {
            "valid_since": "2021-10-10",
            "username": "ahmad_fds"
        }
    ],
    "emails": [
        {
            "valid_since": "2021-10-10",
            "email": "ahmad@mailinator.com",
            "esp_domain": "mailinator.com",
            "type": "work"
        },
        {
            "valid_since": "2021-10-10",
            "email": "ibrahim@example.com",
            "esp_domain": "mailinator.com",
            "type": "personal"
        }
    ],
    "relationships": [
        {
            "valid_since": "2021-10-10",
            "type": "brother",
            "first_name": "Ibrahim",
            "last_name": "Saleh",
            "person_id": null
        },
        {
            "valid_since": "2021-10-10",
            "type": "friend",
            "first_name": "Yousef",
            "last_name": "Nabulsi",
            "person_id": null
        }
    ],
    "skills": [
        {
            "valid_since": "2021-10-10",
            "level": "Advanced",
            "skill": "PHP"
        },
        {
            "valid_since": "2021-10-10",
            "level": "Advanced",
            "skill": "MySQL"
        }
    ],
    "images": [
        {
            "original_url": "http://mad-distribution.film/img/lineup/movies/directors/Ahmad_Saleh.jpg",
            "local_path": null,
            "valid_since": "2021-10-10"
        },
        {
            "original_url": "https://en.islamway.net/uploads/authors/3737.jpg",
            "local_path": null,
            "valid_since": "2021-10-10"
        }
    ],
    "languages": [
        {
            "language": "en",
            "country": "US"
        },
        {
            "language": "ar",
            "country": "JO"
        }
    ],
    "jobs": [
        {
            "valid_since": "2021-10-10",
            "from": "2001-10-01",
            "to": "2005-02-05",
            "title": "Software Developer",
            "organization": "Jawabkom",
            "industry": "Information Technology"
        }
    ],
    "educations": [
        {
            "valid_since": "2021-10-10",
            "from": "2001-10-01",
            "to": "2005-02-05",
            "school": "Philadelphia University",
            "degree": "Bachelor Degree",
            "major": "Computer Science"
        }
    ],
    "social_profiles": [
        {
            "valid_since": "2021-10-10",
            "url": "https://www.facebook.com/ahmadfds/",
            "type": "facebook",
            "username": "ahmadfds",
            "account_id": "10161047747102818"
        }
    ],
    "criminal_records": [],
    "meta_data": [
        {
            "meta_key": "tracking_uuid",
            "meta_value": "any trackinguuid"
        },
        {
            "meta_key": "mapped_user_id",
            "meta_value": "5546544"
        },
        {
            "meta_key": "any_meta_key",
            "meta_value": "any any_meta_value"
        }
    ]
}
 

Request   

GET api/v1/profile/search/byName

Body Parameters

name  string optional  

could be first name mmiddle name,last name.

alias  string[] optional  

should provider when you want search into our providers .

meta  string optional  

should be array have meta request data .

Advance Search

requires authentication

This endpoint lets you search in data profiles into db with related entities API one of these required names(first,middle,last),phone,email and username.

Example request:
curl --request GET \
    --get "https://peopleapi.hawiyyah.com/api/v1/profile/search/advance" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"firstName\": \"Ahmad\",
    \"lastName\": \"saleh\",
    \"phone\": \"0788208255\",
    \"email\": \"Ahmad@example.com\",
    \"username\": \"Ahmadfds\",
    \"middleName\": \"fathi\",
    \"state\": \"Amman\",
    \"city\": \"Amman\",
    \"alias\": [
        \"eveniet\"
    ],
    \"meta\": \"[\'process_id\'=>\'5656464\']\"
}"
const url = new URL(
    "https://peopleapi.hawiyyah.com/api/v1/profile/search/advance"
);

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

let body = {
    "firstName": "Ahmad",
    "lastName": "saleh",
    "phone": "0788208255",
    "email": "Ahmad@example.com",
    "username": "Ahmadfds",
    "middleName": "fathi",
    "state": "Amman",
    "city": "Amman",
    "alias": [
        "eveniet"
    ],
    "meta": "['process_id'=>'5656464']"
};

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

Example response (200):


{
    "profile_id": "8a04501b-53ee-481a-949a-0cc59d286ec8",
    "gender": "male",
    "date_of_birth": "1986-06-01",
    "place_of_birth": "JO",
    "data_source": "user_contacts",
    "names": [
        {
            "prefix": "Mr",
            "first": "Ahmad",
            "middle": "Ibrahim",
            "last": "Saleh",
            "display": "Mr Ahmad Ibrahim Saleh"
        },
        {
            "prefix": null,
            "first": "Feddes",
            "middle": null,
            "last": "Jawabkom",
            "display": "Feddes Jawabkom"
        }
    ],
    "phones": [
        {
            "type": "mobile",
            "do_not_call_flag": false,
            "country_code": "JO",
            "original_number": "0788208255",
            "formatted_number": "+962788208255",
            "valid_phone": true,
            "risky_phone": false,
            "disposable_phone": false,
            "carrier": "umniah",
            "purpose": "personal",
            "industry": "Anything",
            "valid_since": "2021-10-10"
        }
    ],
    "addresses": [
        {
            "valid_since": "2021-10-10",
            "country": "JO",
            "state": "Amman",
            "city": "AlJubiha",
            "zip": "11941",
            "street": "AlGardenz Street",
            "building_number": "22",
            "display": "Amman-Jordan, AlJubiha, Algardenz street building number 22, flat number 3."
        }
    ],
    "usernames": [
        {
            "valid_since": "2021-10-10",
            "username": "ahmadfds"
        },
        {
            "valid_since": "2021-10-10",
            "username": "ahmad_fds"
        }
    ],
    "emails": [
        {
            "valid_since": "2021-10-10",
            "email": "ahmad@mailinator.com",
            "esp_domain": "mailinator.com",
            "type": "work"
        },
        {
            "valid_since": "2021-10-10",
            "email": "ibrahim@example.com",
            "esp_domain": "mailinator.com",
            "type": "personal"
        }
    ],
    "relationships": [
        {
            "valid_since": "2021-10-10",
            "type": "brother",
            "first_name": "Ibrahim",
            "last_name": "Saleh",
            "person_id": null
        },
        {
            "valid_since": "2021-10-10",
            "type": "friend",
            "first_name": "Yousef",
            "last_name": "Nabulsi",
            "person_id": null
        }
    ],
    "skills": [
        {
            "valid_since": "2021-10-10",
            "level": "Advanced",
            "skill": "PHP"
        },
        {
            "valid_since": "2021-10-10",
            "level": "Advanced",
            "skill": "MySQL"
        }
    ],
    "images": [
        {
            "original_url": "http://mad-distribution.film/img/lineup/movies/directors/Ahmad_Saleh.jpg",
            "local_path": null,
            "valid_since": "2021-10-10"
        },
        {
            "original_url": "https://en.islamway.net/uploads/authors/3737.jpg",
            "local_path": null,
            "valid_since": "2021-10-10"
        }
    ],
    "languages": [
        {
            "language": "en",
            "country": "US"
        },
        {
            "language": "ar",
            "country": "JO"
        }
    ],
    "jobs": [
        {
            "valid_since": "2021-10-10",
            "from": "2001-10-01",
            "to": "2005-02-05",
            "title": "Software Developer",
            "organization": "Jawabkom",
            "industry": "Information Technology"
        }
    ],
    "educations": [
        {
            "valid_since": "2021-10-10",
            "from": "2001-10-01",
            "to": "2005-02-05",
            "school": "Philadelphia University",
            "degree": "Bachelor Degree",
            "major": "Computer Science"
        }
    ],
    "social_profiles": [
        {
            "valid_since": "2021-10-10",
            "url": "https://www.facebook.com/ahmadfds/",
            "type": "facebook",
            "username": "ahmadfds",
            "account_id": "10161047747102818"
        }
    ],
    "criminal_records": [],
    "meta_data": [
        {
            "meta_key": "tracking_uuid",
            "meta_value": "any trackinguuid"
        },
        {
            "meta_key": "mapped_user_id",
            "meta_value": "5546544"
        },
        {
            "meta_key": "any_meta_key",
            "meta_value": "any any_meta_value"
        }
    ]
}
 

Request   

GET api/v1/profile/search/advance

Body Parameters

firstName  string. optional  

lastName  string. optional  

phone  string. optional  

email  string. optional  

username  string. optional  

middleName  string. optional  

countryCode  object  

countryCode.  Example: optional  

['jo']

state  string. optional  

city  string. optional  

alias  string[] optional  

should provider when you want search into our providers .

meta  string optional  

should be array have meta request data .

Search By Phone Number

requires authentication

This endpoint lets you search in data profiles into db with related entities API.

Example request:
curl --request GET \
    --get "https://peopleapi.hawiyyah.com/api/v2/profile/search/byPhone" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"number\": \"0788208255,\",
    \"possibleCountries\": [
        \"sit\"
    ],
    \"online_search_to_background\": 0,
    \"alias\": [
        \"qui\"
    ],
    \"meta\": \"[\'process_id\'=>\'5656464\']\"
}"
const url = new URL(
    "https://peopleapi.hawiyyah.com/api/v2/profile/search/byPhone"
);

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

let body = {
    "number": "0788208255,",
    "possibleCountries": [
        "sit"
    ],
    "online_search_to_background": 0,
    "alias": [
        "qui"
    ],
    "meta": "['process_id'=>'5656464']"
};

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

Example response (200):


{
    "profile_id": "8a04501b-53ee-481a-949a-0cc59d286ec8",
    "gender": "male",
    "date_of_birth": "1986-06-01",
    "place_of_birth": "JO",
    "data_source": "user_contacts",
    "names": [
        {
            "prefix": "Mr",
            "first": "Ahmad",
            "middle": "Ibrahim",
            "last": "Saleh",
            "display": "Mr Ahmad Ibrahim Saleh"
        },
        {
            "prefix": null,
            "first": "Feddes",
            "middle": null,
            "last": "Jawabkom",
            "display": "Feddes Jawabkom"
        }
    ],
    "phones": [
        {
            "type": "mobile",
            "do_not_call_flag": false,
            "country_code": "JO",
            "original_number": "0788208255",
            "formatted_number": "+962788208255",
            "valid_phone": true,
            "risky_phone": false,
            "disposable_phone": false,
            "carrier": "umniah",
            "purpose": "personal",
            "industry": "Anything",
            "valid_since": "2021-10-10"
        }
    ],
    "addresses": [
        {
            "valid_since": "2021-10-10",
            "country": "JO",
            "state": "Amman",
            "city": "AlJubiha",
            "zip": "11941",
            "street": "AlGardenz Street",
            "building_number": "22",
            "display": "Amman-Jordan, AlJubiha, Algardenz street building number 22, flat number 3."
        }
    ],
    "usernames": [
        {
            "valid_since": "2021-10-10",
            "username": "ahmadfds"
        },
        {
            "valid_since": "2021-10-10",
            "username": "ahmad_fds"
        }
    ],
    "emails": [
        {
            "valid_since": "2021-10-10",
            "email": "ahmad@mailinator.com",
            "esp_domain": "mailinator.com",
            "type": "work"
        },
        {
            "valid_since": "2021-10-10",
            "email": "ibrahim@example.com",
            "esp_domain": "mailinator.com",
            "type": "personal"
        }
    ],
    "relationships": [
        {
            "valid_since": "2021-10-10",
            "type": "brother",
            "first_name": "Ibrahim",
            "last_name": "Saleh",
            "person_id": null
        },
        {
            "valid_since": "2021-10-10",
            "type": "friend",
            "first_name": "Yousef",
            "last_name": "Nabulsi",
            "person_id": null
        }
    ],
    "skills": [
        {
            "valid_since": "2021-10-10",
            "level": "Advanced",
            "skill": "PHP"
        },
        {
            "valid_since": "2021-10-10",
            "level": "Advanced",
            "skill": "MySQL"
        }
    ],
    "images": [
        {
            "original_url": "http://mad-distribution.film/img/lineup/movies/directors/Ahmad_Saleh.jpg",
            "local_path": null,
            "valid_since": "2021-10-10"
        },
        {
            "original_url": "https://en.islamway.net/uploads/authors/3737.jpg",
            "local_path": null,
            "valid_since": "2021-10-10"
        }
    ],
    "languages": [
        {
            "language": "en",
            "country": "US"
        },
        {
            "language": "ar",
            "country": "JO"
        }
    ],
    "jobs": [
        {
            "valid_since": "2021-10-10",
            "from": "2001-10-01",
            "to": "2005-02-05",
            "title": "Software Developer",
            "organization": "Jawabkom",
            "industry": "Information Technology"
        }
    ],
    "educations": [
        {
            "valid_since": "2021-10-10",
            "from": "2001-10-01",
            "to": "2005-02-05",
            "school": "Philadelphia University",
            "degree": "Bachelor Degree",
            "major": "Computer Science"
        }
    ],
    "social_profiles": [
        {
            "valid_since": "2021-10-10",
            "url": "https://www.facebook.com/ahmadfds/",
            "type": "facebook",
            "username": "ahmadfds",
            "account_id": "10161047747102818"
        }
    ],
    "criminal_records": [],
    "meta_data": [
        {
            "meta_key": "tracking_uuid",
            "meta_value": "any trackinguuid"
        },
        {
            "meta_key": "mapped_user_id",
            "meta_value": "5546544"
        },
        {
            "meta_key": "any_meta_key",
            "meta_value": "any any_meta_value"
        }
    ]
}
 

Request   

GET api/v2/profile/search/byPhone

Body Parameters

number  string  

must be valid phone number can be original number or international number .

possibleCountries  string[] optional  

must have valid country code ISO2,it is required when provide original number (local) .

online_search_to_background  integer optional  

1/0 whether to make online search if offline data is not available and return the result or to return empty response and run the online search in the background and save the results.

alias  string[] optional  

should provider when you want search into our providers .

meta  string optional  

should be array have meta request data .

Spam Detection

APIs that can help in spam data aggregation and detection

Report abuse phone number

requires authentication

Example request:
curl --request POST \
    "https://peopleapi.hawiyyah.com/api/v1/spam/reportAbuse" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"reporter_id\": \"project_<user_id>\",
    \"abuse_type\": \"spam\",
    \"phone\": \"+962788888888\",
    \"phone_country_code\": \"JO\",
    \"tags\": [
        \"enim\"
    ]
}"
const url = new URL(
    "https://peopleapi.hawiyyah.com/api/v1/spam/reportAbuse"
);

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

let body = {
    "reporter_id": "project_<user_id>",
    "abuse_type": "spam",
    "phone": "+962788888888",
    "phone_country_code": "JO",
    "tags": [
        "enim"
    ]
};

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

Example response (200):


{
    "_id": "61fbeb71ba218c6c273ca919",
    "reporter_id": "123",
    "phone": "+9628859963",
    "phone_country_code": "JO",
    "created_at": "2022-02-03T14:49:21.000000Z",
    "abuse_type": "not_spam",
    "tags": [
        "business"
    ],
    "updated_at": "2022-02-03T15:01:11.000000Z"
}
 

Request   

POST api/v1/spam/reportAbuse

Body Parameters

reporter_id  string  

The identity for the reported abuse.

abuse_type  string  

could be one of the following values [spam, not_spam, fraud] .

phone  string  

Phone number.

phone_country_code  required optional  

string Phone country code.

tags  string[] optional  

A collection of related tags.

Add / Update a new phone score record

requires authentication

Example request:
curl --request POST \
    "https://peopleapi.hawiyyah.com/api/v1/spam/phoneScore" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"score\": \"26.5\",
    \"source\": \"user_reports\",
    \"phone\": \"+962788888888\",
    \"countryCode\": \"JO\",
    \"tags\": [
        \"aut\"
    ],
    \"meta\": []
}"
const url = new URL(
    "https://peopleapi.hawiyyah.com/api/v1/spam/phoneScore"
);

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

let body = {
    "score": "26.5",
    "source": "user_reports",
    "phone": "+962788888888",
    "countryCode": "JO",
    "tags": [
        "aut"
    ],
    "meta": []
};

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

Example response (200):


{
    "_id": "61fc05d2f5d517497a37a287",
    "phone": "+9628859963",
    "source": "user_reports",
    "country_code": "JO",
    "created_at": "2022-02-03T16:41:54.000000Z",
    "score": 20.5,
    "tags": [
        "business"
    ],
    "updated_at": "2022-02-07T10:03:23.000000Z"
}
 

Request   

POST api/v1/spam/phoneScore

Body Parameters

score  string  

The abuse score given to this phone number.

source  string  

The source of this score .

phone  string  

Phone number.

countryCode  required optional  

string Phone country code.

tags  string[] optional  

A collection or related tags.

meta  object optional  

meta fields.

Get phone score record

requires authentication

Example request:
curl --request GET \
    --get "https://peopleapi.hawiyyah.com/api/v1/spam/phoneScore" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"phone\": \"+962788888888\",
    \"country_code\": \"JO\",
    \"online_only\": 0
}"
const url = new URL(
    "https://peopleapi.hawiyyah.com/api/v1/spam/phoneScore"
);

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

let body = {
    "phone": "+962788888888",
    "country_code": "JO",
    "online_only": 0
};

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

Example response (200):


{
    "_id": "61fc05d2f5d517497a37a287",
    "phone": "+9628859963",
    "source": "user_reports",
    "country_code": "JO",
    "created_at": "2022-02-03T16:41:54.000000Z",
    "score": 20.5,
    "tags": [
        "business"
    ],
    "updated_at": "2022-02-07T10:03:23.000000Z"
}
 

Request   

GET api/v1/spam/phoneScore

Body Parameters

phone  string  

Phone number.

country_code  required optional  

string Phone country code.

online_only  integer optional  

Whether to hit the third parties apis or not, default is 1.