Groupboss Public Api

Welcome Developers to the API Documentation for Groupboss. We are looking forward to assisting you to use the REST API to import data from Groupboss.

Authentication:

For authentication you must take your Api Key from settings and use it in every header as per example. Also, you should not share your Api Key with anyone else as they will be able to extract your data using our public API.

Example:

“Authorization” : String <<Your API KEY HERE>>

You can get the api key at the following urls:

https://groupboss.io/api/publicapi/v1/apikey/

User information:

Request → Get 

URL → https://groupboss.io/api/publicapi/v1/users/

Headers →  “Authorization” : String <<Your API KEY HERE>>

Result: 

Response: Http 200 

Data Type JSON,

**Example: **

{
    "count": 1,
    "next": null,
    "previous": null,
    "results": [
        {
            "id": "5dbc6fcc-e391-49b8-8c2b-459c00dde8bc",
            "email": "anemail@somedomain.com",
            "first_name": "",
            "last_name": "",
            "username": ""
        }
    ]
}

If api key does not match:

Response: Http 403

Data Type JSON,

**Example: **

{
    "detail": "Authorization Failed. No such user"
}

URL → https://groupboss.io/api/publicapi/v1/users/5dbc5fcc-e391-49b8-8c2b-459c00dde8bc/

https://groupboss.io/api/publicapi/v1/users/<user_uuid>/

Response: Http 200 Ok

{
    "id": "5dbc5fcc-e391-49b8-8c2b-459c00dde8bc",
    "email": "anemail@somedomain.com",
    "first_name": "",
    "last_name": "",
    "username": ""
}

Group information


Request: GET 

URL → https://groupboss.io/api/publicapi/v1/users/5dbc5fcc-e391-49b8-8c2b-459c00dde8bc/groups/

https://groupboss.io/api/publicapi/v1/users/<user_uuid>/groups/

Headers →  “Authorization” : String <<Your API KEY HERE>>

Result: 

Response: Http 200 

Data Type JSON,

**Example:
**

{
    "count": 5,
    "next": null,
    "previous": null,
    "results": [
        {
            "id": "b7232b27-cad7-4821-b90f-4933265d6ce4",
            "name": "cool group",
            "created_at": "2020-05-04T04:00:56.644059Z",
            "group_id": "5454",
            "created_by": null,
            "is_active": true
        },
        {
            "id": "cf965c09-e4ca-4a64-a413-82d64e636df5",
            "name": "Funny group",
            "created_at": "2020-05-04T02:45:02.546929Z",
            "group_id": "1234",
            "created_by": null,
            "is_active": true
        }
    ]
}

**Also allowed query parameters:
**

created_on_month, created_on_year, created_on_date, created_after, created_before, name, group_id, name_contains

Request: GET 

URL → https://groupboss.io/api/publicapi/v1/users/<user_uuid>/groups/<group_uuid>

Headers →  “Authorization” : String <<Your API KEY HERE>>

Result: 

Response: Http 200 

Data Type JSON,

Example:


{
    "id": "b7232b27-cad7-4821-b90f-4933265d6ce4",
    "name": "cool group",
    "created_at": "2020-05-04T04:00:56.644059Z",
    "group_id": "5454",
    "created_by": null,
    "is_active": true
}

Email Information

Request: GET 

URL → https://groupboss.io/api/publicapi/v1/users/<user_uuid>/groups/group_uuid/emails/

Headers →  “Authorization” : String <<Your API KEY HERE>>

Result: 

Response: Http 200

Data Type JSON

**Example: **

{
    "count": 4,
    "next": null,
    "previous": null,
    "results": [
        {
            "id": "2a71e2fa-fa6c-408d-afa3-64f0bbce0957",
            "email": "robin_williams@somedomain.com",
            "created_at": "2020-05-04T04:02:01.868084Z",
            "first_name": "Robin",
            "last_name": "Williams"
        },
        {
            "id": "36a99280-9379-466e-8fab-ce818d220ac4",
            "email": "alex_hunter@somedomain.com",
            "created_at": "2020-05-04T04:02:01.867978Z",
            "first_name": "Alex",
            "last_name": "Hunter"
        },
        {
            "id": "5007a6ff-0f6c-43ad-8170-10df176adb6d",
            "email": "rahat15@gmail.com",
            "created_at": "2020-05-04T04:00:56.656420Z",
            "first_name": "Abir",
            "last_name": "Junior"
        },
        {
            "id": "894039db-3d80-4858-b093-1fdf35772a74",
            "email": "abir14@gmail.com",
            "created_at": "2020-05-04T04:00:56.656320Z",
            "first_name": "Abir",
            "last_name": "Hungerman"
        }
    ]
}

Also allowed query parameters:

created_on_month, created_on_year, created_on_date, created_after, created_before, name, group_id,  group_name, member_name, email_exact, email_contains

OnBoardQuestion Information

Request: GET 

URL → https://groupboss.io/api/publicapi/v1/users/<user_uuid>/groups/group_uuid/onboardquestions/

Headers →  “Authorization” : String <<Your API KEY HERE>>

Result: 

Response: Http 200 

Data Type JSON

Example:

{
    "count": 4,
    "next": null,
    "previous": null,
    "results": [
        {
            "question1": "How are you",
            "answer1": "I am okay",
            "question2": "Will you spam",
            "answer2": "No",
            "question3": "What is your email",
            "answer3": "robin_williams@somedomain.com",
            "member_name": "Robin Williams",
            "profile_url": "https://facebook.com",
            "member_since": "1998-12-12T12:50:00Z",
            "created_at": "2020-05-04T04:02:01.869411Z"
        },
        {
            "question1": "How are you",
            "answer1": "I am okay",
            "question2": "Will you spam",
            "answer2": "No",
            "question3": "What is your email",
            "answer3": "alex_hunter@somedomain.com",
            "member_name": "Alex Hunter",
            "profile_url": "https://facebook.com",
            "member_since": "1998-12-12T12:50:00Z",
            "created_at": "2020-05-04T04:02:01.869273Z"
        },
        {
            "question1": "How are you",
            "answer1": "I am okay",
            "question2": "Will you spam",
            "answer2": "No",
            "question3": "What is your email",
            "answer3": "rahat15@gmail.com",
            "member_name": "Abir Junior",
            "profile_url": "https://facebook.com",
            "member_since": "1998-12-12T12:50:00Z",
            "created_at": "2020-05-04T04:00:56.658156Z"
        },
        {
            "question1": "How are you",
            "answer1": "I am okay",
            "question2": "Will you spam",
            "answer2": "No",
            "question3": "What is your email",
            "answer3": "abir14@gmail.com",
            "member_name": "Abir Hungerman",
            "profile_url": "https://facebook.com",
            "member_since": "1998-12-12T12:50:00Z",
            "created_at": "2020-05-04T04:00:56.658037Z"
        }
    ]
}

Query parameters allowed: 

Also allowed query parameters: 
created_on_month, created_on_year, created_on_date, created_after,created_before, member_name_contains, member_name_exact, group_id,  group_name

Webhooks

As a user you can subscribe to two real time events from Groupboss to alert yourself when the app has been used to create a new group or a new member is added to your group. After a webhook is fired in your target URL, we expect the RESPONSE should be HTTP 200 OK response, or we would consider that our task has failed. And everytime the response is failed we keep a count on it. If the failed Response is more than 20, then we deactivate that webhook.

This is an example of the POST Request body:


{'information': {'id': '7a7edf94-cb5e-48e4-8c4b-19be81b31caa', 'name': 'Group name'}, 'webhook': {'id': 'fcdab9cc-257e-4069-ab97-abdf9be28abb', 'event': 'Group.updated', 'target': 'https://b3e203775d05.ngrok.io/api/webhooks/alerts/', 'is_active': True}}

{'information': {'id': '7a7edf94-cb5e-48e4-8c4b-19be81b31caa', 'name': 'Group name'}, 'webhook': {'id': 'fcdab9cc-257e-4069-ab97-abdf9be28abb', 'event': 'Group.created', 'target': 'https://b3e203775d05.ngrok.io/api/webhooks/alerts/', 'is_active': True}}

Available events:

Events Describtion
Group.created Fired when a new facebook group is created
Group.updated Fired when new users are added to the group. When a new user is added, his answer to the questions are saved along with his email and name. Which can be called again using the GET request from OnBoardQuestion or Emails.

To create the subscription:

Request: POST

URL → https://groupboss.io/api/publicapi/v1/webhooks/publicwebhooks/

Headers →“Authorization” : String <<Your API KEY HERE>>

Body Parameters:
Data Type JSON

url* string
Your URL where callbacks are sent
event* string
Subscribed event

Example:


{
   "target":
       "https://bcb2ea2dc805.ngrok.io/api/webhooks/alert1234s/"
   ,
   "event":"Group.updated"
  
}

Response: HTTP 200 OK 





To see all the webooks that you have created
Request: GET 

URL → https://groupboss.io/api/publicapi/v1/webhooks/publicwebhooks/

Headers →  “Authorization” : String <<Your API KEY HERE>>

Result: 

Response: Http 200 

Data Type JSON

**Example: **

{
   "count": 2,
   "next": null,
   "previous": null,
   "results": [
       {
           "id": "39decec7-8096-40d7-946f-67eeee697f1e",
           "created_at": "2020-06-10T11:44:01.249378Z",
           "user": {
               "id": "be7a479d-0685-42fb-b32b-efdeaa3620d5",
               "email": "anemail@somedomain.com",
               "first_name": "",
               "last_name": "",
               "username": ""
           },
           "target": "https://bcb2ea2dc805.ngrok.io/api/webhooks/alert123s/",
           "event": "Group.updated",
           "is_active": true,
           "failed_attempts": 2
       },
       {
           "id": "3bb544bb-e2a4-4030-9c1b-25f83903349c",
           "created_at": "2020-06-10T11:43:13.639239Z",
           "user": {
               "id": "be7a479d-0685-42fb-b32b-efdeaa3620d5",
               "email": "anemail@somedomain.com",
               "first_name": "",
               "last_name": "",
               "username": ""
           },
           "target": "https://bcb2ea2dc805.ngrok.io/api/webhooks/alert12s/",
           "event": "Group.updated",
           "is_active": true,
           "failed_attempts": 2
       }
   ]
}

To see a specific webook that you have created


Request: GET 

URL → https://groupboss.io/api/publicapi/v1/webhooks/publicwebhooks/<webhook_uuid>

Headers →  “Authorization” : String <<Your API KEY HERE>>

Result: 

Response: Http 200 

Data Type JSON

Example:


{
   "id": "39decec7-8096-40d7-946f-67eeee697f1e",
   "created_at": "2020-06-10T11:44:01.249378Z",
   "user": {
       "id": "be7a479d-0685-42fb-b32b-efdeaa3620d5",
       "email": "anemail@adomain.com",
       "first_name": "",
       "last_name": "",
       "username": ""
   },
   "target": "https://bcb2ea2dc805.ngrok.io/api/webhooks/alert123s/",
   "event": "Group.updated",
   "is_active": true,
   "failed_attempts": 2
}

**To update a specific webook that you have created **

Request: PUT 

URL → https://groupboss.io/api/publicapi/v1/webhooks/publicwebhooks/<webhook_uuid>

Headers →“Authorization” : String <<Your API KEY HERE>>

Body Parameters:
Data Type JSON

url* string
Your URL where callbacks are sent
event* string
Subscribed event

Example:


{
   "target":
       "https://bcb2ea2dc805.ngrok.io/api/webhooks/alert1234s/"
   ,
   "event":"Group.updated"
  
}

Response: HTTP 200 OK

Response Example:


{
   "id": "fcdab9cc-257e-4069-ab97-abdf9be28abb",
   "created_at": "2020-06-10T08:12:02.093239Z",
   "user": {
       "id": "be7a479d-0685-42fb-b32b-efdeaa3620d5",
       "email": "someuser@somedomain.com",
       "first_name": "",
       "last_name": "",
       "username": ""
   },
   "target": "https://bcb2ea2dc805.ngrok.io/api/webhooks/alert12534s/",
   "event": "Group.updated",
   "is_active": true,
   "failed_attempts": 2
}

To delete a specific webook that you have created

Request: DELETE 

URL → https://groupboss.io/api/publicapi/v1/webhooks/publicwebhooks/<webhook_uuid>

Headers →  “Authorization” : String <<Your API KEY HERE>>

Result: 

Response: Http 204 No Content