Skip to main content

Dashboard

Audience

Get the organization’s audience list

GET https://a.loopmessage.com/api/v1/audience/list/?page=1&per_page=20&sort_by=desc

Headers

NameTypeDescription
Authorization*StringAPI Key. Required*.
Content-Type*Stringapplication/json

Query parameters

NameTypeDescription
pageIntegerThe current page of the paginated request. Default: 1.
per_pageIntegerThe number of items to be returned for a specific page. Default: 20. Max value: 1000.
sort_byStringPossible values: asc or desc. Default: desc.
from_dateStringYYYY-MM-DD format date. For example: 2010-12-31.
to_dateStringYYYY-MM-DD format date. For example: 2010-12-31.
searchStringPhone number or email

Response

{
  "page": 1,
  "num_pages": 5,
  "per_page": 20,
  "count": 100,
  "items": [
    "id": "string",
    "value": "string"  # Phone number or email
  ]
}

Check audience status

GET https://a.loopmessage.com/api/v1/audience/check-status/{contact}/

Headers

NameTypeDescription
Authorization*StringAPI Key. Required*.
Content-Type*Stringapplication/json

Path parameters

NameTypeDescription
contactStringRequired. Email address or phone number of the contact to delete. Phone number must be in the international format (include country code and start with +, for example: +13231112233)

Response

{
  "status": "string"  # Values: active, unsubscribed, unknown
}

Unsubscribe contact

DELETE https://a.loopmessage.com/api/v1/audience/delete/{contact}/

Headers

NameTypeDescription
Authorization*StringAPI Key. Required*.
Content-Type*Stringapplication/json

Path parameters

NameTypeDescription
contactStringRequired. Email address or phone number of the contact to delete. Phone number must be in the international format (include country code and start with +, for example: +13231112233)