Campaigns

GetCampaigns

get

This endpoint makes an HTTP GET request to retrieve groups from the WPBox API. It requires a token parameter in the query string. The parameter showContacts can also be included in the query string with a value of "no". The request does not contain a request body.

TYPE: bot,api,regular

Response

The response to the request has a status code of 200 and returns a JSON object. The object includes a status field and an array of groups, where each group has an id, name, company_id, deleted_at, created_at, and updated_at fields.

Query parameters
tokenstringOptional
typestringOptionalExample: api
Responses
200Success
get
GET /api/wpbox/getCampaigns HTTP/1.1
Host: www.app.samwad.tech
Accept: */*
200Success

No content

SendCampaigns

post

SendCampaigns

Body
campaing_idnumberOptionalExample: 1
phonestringOptional
tokenstringOptional
Responses
200Success
post
POST /api/wpbox/sendcampaigns HTTP/1.1
Host: www.app.samwad.tech
Content-Type: application/json
Accept: */*
Content-Length: 163

{
  "campaing_id": 1,
  "data": {
    "reservations": {
      "id": 1232,
      "price": "45$",
      "status": "confirmed"
    },
    "user": {
      "id": 12,
      "name": "{{name}}"
    }
  },
  "phone": "{{phone}}",
  "token": "{{token}}"
}
200Success

No content