Contacts API

Retrieve All Contacts
GET https://marketing.qreq.com/api/contacts
curl --request GET \
--url 'https://marketing.qreq.com/api/contacts' \
--header 'Authorization: Bearer {api_key}'
Retrieve Single Contact
GET https://marketing.qreq.com/api/contacts/{id}
curl --request GET \
--url 'https://marketing.qreq.com/api/contacts/{id}' \
--header 'Authorization: Bearer {api_key}'
Create Contact
POST https://marketing.qreq.com/api/contacts
  • name (string, required)
  • group_id (integer, optional)
  • sms_contact (string, optional)
  • whatsapp_contact (string, optional)
  • email_contact (string, optional)
  • status (boolean, optional)
curl --request POST \
--url 'https://marketing.qreq.com/api/contacts' \
--header 'Authorization: Bearer {api_key}' \
--header 'Content-Type: application/json' \
--data '{
    "name":"John Doe",
    "group_id":1,
    "sms_contact":"+923001234567",
    "whatsapp_contact":"+923001234567",
    "email_contact":"[email protected]",
    "status":true
}'
Update Contact
PUT https://marketing.qreq.com/api/contacts/{id}
  • Optional: name (string)
  • Optional: group_id (integer)
  • Optional: sms_contact (string)
  • Optional: whatsapp_contact (string)
  • Optional: email_contact (string)
  • Optional: status (boolean)
curl --request PUT \
--url 'https://marketing.qreq.com/api/contacts/{id}' \
--header 'Authorization: Bearer {api_key}' \
--header 'Content-Type: application/json' \
--data '{"name":"Updated John","status":false}'
Delete Contact
DELETE https://marketing.qreq.com/api/contacts/{id}
curl --request DELETE \
--url 'https://marketing.qreq.com/api/contacts/{id}' \
--header 'Authorization: Bearer {api_key}'
Retrieve All Groups
GET https://marketing.qreq.com/api/contact-groups
curl --request GET \
--url 'https://marketing.qreq.com/api/contact-groups' \
--header 'Authorization: Bearer {api_key}'
Retrieve Single Group
GET https://marketing.qreq.com/api/contact-groups/{id}
curl --request GET \
--url 'https://marketing.qreq.com/api/contact-groups/{id}' \
--header 'Authorization: Bearer {api_key}'
Create Group
POST https://marketing.qreq.com/api/contact-groups
  • name (string, required)
  • description (string, optional)
curl --request POST \
--url 'https://marketing.qreq.com/api/contact-groups' \
--header 'Authorization: Bearer {api_key}' \
--header 'Content-Type: application/json' \
--data '{"name":"Clients","description":"All client contacts"}'
Update Group
PUT https://marketing.qreq.com/api/contact-groups/{id}
  • Optional: name (string)
  • Optional: description (string)
curl --request PUT \
--url 'https://marketing.qreq.com/api/contact-groups/{id}' \
--header 'Authorization: Bearer {api_key}' \
--header 'Content-Type: application/json' \
--data '{"name":"VIP Clients","description":"Updated description"}'
Delete Group
DELETE https://marketing.qreq.com/api/contact-groups/{id}
curl --request DELETE \
--url 'https://marketing.qreq.com/api/contact-groups/{id}' \
--header 'Authorization: Bearer {api_key}'
Retrieve Contact List
GET https://marketing.qreq.com/api/contacts-list
curl --request GET \
--url 'https://marketing.qreq.com/api/contacts-list' \
--header 'Authorization: Bearer {api_key}'

Example Response:

[
    {
        "sl_no": 1,
        "name": "John Doe",
        "group": "Clients",
        "sms": "+923001234567",
        "whatsapp": "+923001234567",
        "email": "[email protected]",
        "status": true
    },
    {
        "sl_no": 2,
        "name": "Ali Raza",
        "group": "VIP Clients",
        "sms": null,
        "whatsapp": "+923009998877",
        "email": "[email protected]",
        "status": false
    }
]