Get started
endpoint api
https://chat.44mppe.com/api
The Chat44mp API is organized around REST. Our API has predictable resource-oriented URLs, accepts form-encoded request bodies, returns JSON-encoded responses, common HTTP verbs and uses API key based authentication.
To use this API, you need an API key. To get your own API key, please click on the profile picture on the top-right-side on your dashboard and then click on the API Key menu.
Note: Endpoints that have marked (Admin) have to be admin user to make a call to them.
ottieni utente
curl -X GET 'https://chat.44mppe.com/api/get_user_info/?api_key=api_key&user_id=user_id'
per ottenere le informazioni sull`utente è necessario effettuare una chiamata get al seguente endpoint:
/get_user_info
Success Result Example:
{
"status": "success",
"user_info": {
"id": "39",
"name": "test_username",
"email": "test_user@test.com",
"mobile": "01234567891",
"address": "Heaven 21",
"user_type": "Member",
"status": "1",
"add_date": "2020-09-27 08:13:01",
"last_login_at": "0000-00-00 00:00:00",
"expired_date": "2020-10-27 00:00:00",
"package_id": "16",
"last_login_ip": "127.0.0.1"
}
}
Error Result Example:
{
"status": "error",
"message": "No Matching User Found"
}
PARAMETERS
Field | Type | Description |
---|---|---|
api_key | String | Your API key |
user_id | Integer | The ID of the user |
String | The email address of the user |
Use either user_id or email address to make a successful get-user-info API call
creare un utente
curl -X POST \
'https://chat.44mppe.com/api/create_system_user' \
-d 'api_key=your_api_key' \
-d 'name=name' \
-d 'email=email' \
-d 'password=password' \
-d 'package_id=package_id' \
-d 'expired_date=expired_date'
per creare un nuovo utente è necessario effettuare una chiamata successiva al seguente endpoint:
/create_system_user
Success Result example :
{
"status": "success",
"id": 29
}
Error Result Example:
{
"status": "error",
"message": "Email already exists"
}
PARAMETERS
Field | Type | Description |
---|---|---|
api_key | String | Your API key. |
name | String | Name of the user |
String | Email of the user | |
password | String | Password of the user. We recommend use a combination of alpha-numeric characters including special characters. |
package_id | Integer | Package ID of the system |
expired_date | String | Expire Date in YYYY-MM-DD Format |
mobile | Numeric | (optional) Mobile number of the user |
address | String | (optional) Address of the user |
aggiornare l`utente
curl -X POST \
'https://chat.44mppe.com/api/update_user/{userId}' \
-d 'api_key=api_key' \
-d 'name=name' \
-d 'mobile=mobile' \
-d 'address=address' \
-d 'package_id=package_id' \
-d 'expired_date=expired_date'
per aggiornare un utente è necessario effettuare una chiamata successiva al seguente endpoint:
/create_system_user/{userId}
Success Result Example:
{
"status": "success"
}
Error Result Example:
{
"status": "error",
"message": "User not found with the ID: 12"
}
PARAMETERS
Field | Type | Description |
---|---|---|
api_key | String | Your API key |
name | String | (optional) The user's name to be updated |
mobile | Numeric | (optional) The user's mobile number to be updated |
address | String | (optional) The user's address number to be updated |
package_id | Integer | (optional) The package_id to be updated |
expired_date | Date | (optional) The expired_date of the user's validity to be updated: Date Format: 'YYYY-MM-DD' |
You need to provide at least one more parameter with the api_key to make a successful update-user API call
ottenere pacchetti
curl -X GET 'https://chat.44mppe.com/api/get_all_packages/?api_key=api_key'
per ottenere informazioni su tutti i pacakge, è necessario effettuare una chiamata get al seguente endpoint:
/get_all_packages
Success Result Example:
{
"status": "success",
"packages": [
{
"id": "1",
"package_name": "Trial",
"module_ids": "251,80,79,263,65, ...",
"price": "0",
"validity": "0",
"deleted": "0",
"visible": "0",
"highlight": "0"
},
{
"id": "16",
"package_name": "everything",
"module_ids": "251,80,202,201,88,206, ...",
"price": "112.35",
"validity": "700",
"deleted": "0",
"visible": "1",
"highlight": "0"
}
// more
]
}
Error Result Example:
{
"status": "error",
"message": "Either API Key Invalid or Member Validity Expired"
}
PARAMETERS
Field | Type | Description |
---|---|---|
api_key | String | Your API key |
ottenere un abbonato
curl -X GET 'https://chat.44mppe.com/api/subscriber_information/?api_key=api_key&subscriber_id=subscriber_id'
per ottenere informazioni sull`abbonato, è necessario effettuare una chiamata get al seguente endpoint:
/subscriber_information
Success Result Example:
{
"status": "success",
"subscriber_info": {
"subscriber_id": "134242424",
"labels": "",
"first_name": "test_first_name",
"last_name": "test_last_name",
"full_name": "test_full_name",
"gender": "",
"locale": "",
"timezone": "",
"page_name": "XeroDevs",
"page_id": "1123123123123",
"unavailable": "0",
"last_error_message": "",
"refferer_source": "",
"subscribed_at": "0000-00-00 00:00:00",
"email": "test@test.com",
"phone_number": "01234567891",
"birthdate": "0000-00-00",
"last_subscriber_interaction_time": "0000-00-00 00:00:00"
}
}
Error Result Example:
{
"status": "error",
"message":" No Matching Subscriber Found"
}
PARAMETERS
Field | Type | Description |
---|---|---|
api_key | String | Your API key |
subscriber_id | Integer | Subscriber PSID |
ottenere etichette
curl -X GET 'https://chat.44mppe.com/api/get_all_labels/?api_key=api_key&page_id=page_id'
per ottenere tutte le etichette, è necessario effettuare una chiamata get al seguente endpoint:
/get_all_labels
Success Result Example:
{
"status": "success",
"label_info":[
{
"label_id": "2472856209402188",
"label_name": "Important"
},
{
"label_id": "2328660457215897",
"label_name": "Product"
}
]
}
Error Result Example:
{
"status": "error",
"message": "No Matching Label Found"
}
PARAMETERS
Field | Type | Description |
---|---|---|
api_key | String | Your API key |
page_id | Integer | Page ID [must be bot enabled in the system] |
creare un`etichetta
curl -X POST \
'https://chat.44mppe.com/api/create_label' \
-d 'api_key=api_key' \
-d 'label_name=label_name' \
-d 'page_id=page_id'
per creare un`etichetta, è necessario effettuare una chiamata successiva al seguente endpoint:
/create_label
Success Result Example:
{
"status": "success",
"label_id": "012345678790"
}
Error Result Example:
{
"status": "error",
"message": "No Enabled Bot Found"
}
PARAMETERS
Field | Type | Description |
---|---|---|
api_key | String | Your API key |
label_name | String | Label name to be created |
page_id | Integer | Page ID [must be bot enabled in the system] |
assegnare etichetta
curl -X POST \
'https://chat.44mppe.com/api/assign_label' \
-d 'api_key=api_key' \
-d 'label_ids=6243946525492645,9452768492754035' \
-d 'page_id=page_id' \
-d 'subscriber_id=subscriber_id'
Per assegnare un`etichetta, è necessario effettuare una chiamata successiva al seguente endpoint:
/assign_label
Success Result Example:
{
"success": true,
"status": "success"
}
Error Result Example:
{
"status": "error",
"message": "(#100) The user ID is not valid."
}
{
"status": "error",
"message": "No Enabled Bot Found"
}
PARAMETERS
Field | Type | Description |
---|---|---|
api_key | String | Your API key |
label_ids | String | Label ID to be assigned. You can provide multiple label IDs separated by comma |
page_id | Integer | Page ID [must be bot enabled in the system] |
subscriber_id | Integer | Subscriber PSID |
ottenere il gruppo di contatti
curl -X GET 'https://chat.44mppe.com/api/get_contact_group/?api_key=api_key&contact_type_id=contact_type_id'
Per ottenere il gruppo di contatti, è necessario effettuare una chiamata get al seguente endpoint:
/get_contact_group
Success Result Example:
{
"id": "4567",
"user_id": "345",
"type": "Group 12",
"created_at": "2020-10-28 13:40:46",
"deleted": "0"
}
Error Result Example:
{
"status": "error",
"message": "The contact type ID is required"
}
PARAMETERS
Field | Type | Description |
---|---|---|
api_key | String | Your API key |
contact_type_id | Integer | The contact type ID to be fetched |
creare un gruppo di contatti
curl -X POST \
'https://chat.44mppe.com/api/create_contact_group' \
-d 'api_key=api_key' \
-d 'name=name'
Per creare un gruppo di contatti, è necessario effettuare una chiamata successiva al seguente endpoint:
/create_contact_group
Success Result Example:
{
"status": "success",
"contact_type_id": 276
}
Error Result Example:
{
"status": "error",
"message": "The contact type name is required"
}
PARAMETERS
Field | Type | Description |
---|---|---|
api_key | String | Your API key |
name | String | The name of contact group to be created |
aggiorna il gruppo di contatti
curl -X POST \
'https://chat.44mppe.com/api/update_contact_group/{contact_type_id}' \
-d 'api_key=api_key' \
-d 'name=name'
Per aggiornare il gruppo di contatti, è necessario effettuare una chiamata successiva al seguente endpoint:
/update_contact_group/{contact_type_id}
Success Result Example:
{
"status": "success"
}
Error Result Example:
{
"status": "error",
"message": "The contact type name is required"
}
PARAMETERS
Field | Type | Description |
---|---|---|
api_key | String | Your API key |
name | String | The name of the contact group to be updated |
eliminare il contattoGroup
curl -X POST \
'https://chat.44mppe.com/api/delete_contact_group' \
-d 'api_key=api_key' \
-d 'contact_type_id=contact_type_id'
Per eliminare il gruppo di contatti, è necessario effettuare una chiamata successiva al seguente endpoint:
/delete_contact_group
Success Result Example:
{
"status": "success",
"message": "The contact type ID (2) has been deleted"
}
Error Result Example:
{
"status": "error",
"message": "The contact_type_id field is required"
}
PARAMETERS
Field | Type | Description |
---|---|---|
api_key | String | Your API key |
contact_type_id | Integer | The contact type ID to be deleted |
contattaci
curl -X GET 'https://chat.44mppe.com/api/get_contact/?api_key=api_key&contact_id=contact_id'
Per ottenere il contatto, è necessario effettuare una chiamata get al seguente endpoint:
/get_contact
Success Result Example:
{
"id": "233",
"user_id": "87",
"contact_type_id": "67",
"first_name": "test_first_name",
"last_name": "test_last_name",
"phone_number": "01234567891",
"email": "test@test.com",
"notes": "",
"unsubscribed": "0",
"deleted": "0"
}
Error Result Example:
{
"status": "error",
"message": "The contact ID does not exist"
}
PARAMETERS
Field | Type | Description |
---|---|---|
api_key | String | Your API key |
contact_id | Integer | The contact ID to be fetched |
creare contatto
curl -X POST \
'https://chat.44mppe.com/api/create_contact' \
-d 'api_key=api_key' \
-d 'contact_type_id=contact_type_id' \
-d 'email=email' \
-d 'phone_number=phone_number' \
-d 'first_name=first_name' \
-d 'last_name=last_name'
Per creare un contatto, è necessario effettuare una chiamata successiva al seguente endpoint:
/create_contact
Success Result Example:
{
"status": "success",
"new_contact_id": 45
}
Error Result Example:
{
"status": "error",
"message": "The email or phone_number is required"
}
{
"status": "error",
"message": "The contact ID does not exist"
}
PARAMETERS
Field | Type | Description |
---|---|---|
api_key | String | Your API key |
contact_type_id | Integer | The contact type ID to be attached to |
String | The email address of the user | |
phone_number | String | The phone number of the user |
first_name | String | (optional) The first name of the user |
last_name | String | (optional) The last name of the user |
Note: Either email or phone_number is required
aggiorna contatto
curl -X POST \
'https://chat.44mppe.com/api/update_contact/{contact_id}' \
-d 'api_key=api_key' \
-d 'email=email' \
-d 'phone_number=phone_number' \
-d 'first_name=first_name' \
-d 'last_name=last_name'
Per aggiornare il contatto, è necessario effettuare una chiamata successiva al seguente endpoint :
/update_contact/{contact_id}
Success Result Example:
{
"status": "success"
}
Error Result Example:
{
"status": "error",
"message": "You should at least provide value for first name or last name or email or phone number"
}
{
"status": "error",
"message": "The contact ID does not exist"
}
PARAMETERS
Field | Type | Description |
---|---|---|
api_key | String | Your API key |
contact_id | Integer | The contact ID to be updated for |
String | (optional) The email address of the user | |
phone_number | String | (optional) The phone number of the user |
first_name | String | (optional) The first name of the user |
last_name | String | (optional) The last name of the user |
Note: You can update first_name or last_name. You can update email or phone_number if they have not been added previously.
eliminare il contatto
curl -X POST \
'https://chat.44mppe.com/api/delete_contact' \
-d 'api_key=api_key' \
-d 'contact_id=contact_id'
Per eliminare il contatto, è necessario effettuare una chiamata successiva al seguente endpoint:
/delete_contact
Success Result Example:
{
"status": "success",
"message": "The contact ID (3) has been deleted"
}
Error Result Example:
{
"status": "error",
"message": "The contact ID does not exist"
}
PARAMETERS
Field | Type | Description |
---|---|---|
api_key | String | Your API key |
contact_id | Integer | The contact ID to be deleted |
ottenere l`elenco delle campagne di flusso
curl -X GET 'https://chat.44mppe.com/api/get_flow_campaigns/?api_key=api_key
per ottenere l`elenco delle campagne di flusso, è necessario effettuare una chiamata get al seguente endpoint :
/get_flow_campaigns
Success Result Example:
[
{
"id": "1",
"flow_name": "Flow Campaign 1"
},
{
"id": "2",
"flow_name": "Flow Campaign 2"
},
{
"id": "3",
"flow_name": "Flow Campaign 3"
},
{
"id": "6",
"flow_name": "Flow Campaign 4"
}
]
PARAMETERS
Field | Type | Description |
---|---|---|
api_key | String | Your API key |
ottenere informazioni sulla campagna di flusso
curl -X POST 'https://chat.44mppe.com/api/get_flow_campaign_info/?api_key=api_key&flow_campaign_id=flow_campaign_id'
per ottenere informazioni sulla campagna di flusso, è necessario effettuare una chiamata get al seguente endpoint:
/get_flow_campaign_info
Success Result Example:
{
"id": "1",
"flow_name": "serial check",
"questions": [
"What do you like to do?",
"What is your favorite pet?",
"What is your favorite color?",
"Who is your favorite author?",
"Which country do you love to live in?"
]
}
Error Result Example:
{
"status": "error",
"message": "The flow_campaign_id field is required"
}
PARAMETERS
Field | Type | Description |
---|---|---|
api_key | String | Your API key |
flow_campaign_id | Integer | The ID of the flow campaign |
ottenere informazioni sul flusso di un singolo abbonato
curl -X GET 'https://chat.44mppe.com/api/get_single_subscriber_flow_info/?api_key=api_key&flow_campaign_id=flow_campaign_id&subscriber_id=subscriber_id'
per ottenere informazioni sul flusso di un singolo abbonato, è necessario effettuare una chiamata get al seguente endpoint:
/get_single_subscriber_flow_info
Success Result Example:
{
"id": "1",
"flow_name": "Flow Campaign 1",
"data": [
{
"question_id": "45",
"question": "What do you like to do?",
"answer": "Reading, Traveling, Watching Movies"
},
{
"question_id": "46",
"question": "What is your favorite pet?",
"answer": "Dog"
},
{
"question_id": "47",
"question": "What is your favorite color?",
"answer": "Black"
},
{
"question_id": "48",
"question": "Who is your favorite author?",
"answer": "Sigmund Freud"
},
{
"question_id": "49",
"question": "Which country do you love to live in?",
"answer": "France"
}
]
}
Error Result Example:
{
"status": "error",
"message": "The flow campaign ID does not exist"
}
PARAMETERS
Field | Type | Description |
---|---|---|
api_key | String | Your API key |
flow_campaign_id | Integer | The ID of the flow campaign |
subscriber_id | Integer | The ID of the flow campaign subscriber |
ottenere tutte le informazioni sul flusso degli iscritti
curl -X GET 'https://chat.44mppe.com/api/get_all_subscriber_flow_info/?api_key=api_key&flow_campaign_id=flow_campaign_id'
per ottenere tutte le informazioni sul flusso degli iscritti, è necessario effettuare una chiamata get al seguente endpoint:
/get_all_subscriber_flow_info
Success Result Example:
{
"id": "1",
"flow_name": "serial check",
"data": {
"2499454673490220": [
{
"question_id": "45",
"question": "What do you like to do?",
"answer": "Reading, Traveling, Watching Movies"
},
{
"question_id": "46",
"question": "What is your favorite pet?",
"answer": "Dog"
},
{
"question_id": "47",
"question": "What is your favorite color?",
"answer": "Black"
},
{
"question_id": "48",
"question": "Who is your favorite author?",
"answer": "Sigmund Freud"
},
{
"question_id": "49",
"question": "Which country do you love to live in?",
"answer": "France"
}
],
"3001440154747507": [
{
"question_id": "45",
"question": "What do you like to do?",
"answer": "Traveling, Watching Movies"
},
{
"question_id": "46",
"question": "What is your favorite pet?",
"answer": "Cat"
},
{
"question_id": "47",
"question": "What is your favorite color?",
"answer": "Blue"
},
{
"question_id": "48",
"question": "Who is your favorite author?",
"answer": "William Shakespeare"
},
{
"question_id": "49",
"question": "Which country do you love to live in?",
"answer": "Germany"
}
]
}
}
PARAMETERS
Field | Type | Description |
---|---|---|
api_key | String | Your API key |
flow_campaign_id | Integer | The ID of the flow campaign |