Returns list of campaigns

GET/campaigns

Returns list of campaigns.

Documentation: For detailed filtering options, see our URL Filtering Guidelines

Privileges: campaign-detector.view

Sort available fields:

  • id
  • msgHash
  • msgType
  • msgSender
  • msgText
  • msgDt
  • msgCoding
  • smsTotalParts
  • smsPart
  • totalHits
  • flags
  • name
  • insertDt
  • updateDt
  • status
  • statusDt
  • action
  • priority
  • lang
  • language
  • groupId
  • groupName
  • activeDuration
  • activeUntilDt

Filterable attributes include:

  • id
  • msgHash
  • msgType
  • msgSender
  • msgText
  • msgDt
  • msgCoding
  • smsTotalParts
  • smsPart
  • totalHits
  • flags
  • name
  • insertDt
  • updateDt
  • status
  • statusDt
  • action
  • priority
  • lang
  • groupId
  • groupName
  • activeDuration
  • activeUntilDt
  • accountId
  • gateId
  • tagId

Searchable attributes:

  • msgHash
  • msgType
  • msgSender
  • msgText
  • msgCoding
  • flags
  • name
  • status
  • action
  • priority
  • lang
  • language
  • langName
  • groupName
  • activeDuration

Auditlog Event: campaign.detector.campaign.list

Base URL
https://api-cpaas.sms.es/bulk/campaign-detector/v1
Authentication

OAuth2 — send Authorization: Bearer <access_token>. Token URL: https://accounts-cpaas.sms.es/oauth2/access-token

Request

Query parameters

allstring

Return all records for given criteria (disables pagination)

Possible values: yes, no
page_sizeinteger

Page size

Default: 10
page_numberinteger

Page number

Default: 1
pagingstring

Paging options in form of &paging=page_num,page_size e.g. paging=1,10

sortstring

Sort options in form of sort=-attribute1,attribute2,-attribute3 (prefix - for descending)

qstring

Full-text search criteria

operator(fieldName)string

Search criteria can be specified using the following operators and attributes:

Available Operators:

  • isnull, isnotnull
  • isempty, isnotempty
  • eq, neq
  • startswith, endswith, contains, doesnotcontain
  • lt, lte, gt, gte
  • in, notin
  • between, notbetween

Special Cases:

  1. For operators [isnull, isnotnull, isempty, isnotempty]: field value can be omitted.
  2. For operators [in, notin]: field value must be a comma-separated list. Example: in(status)=active,inactive
  3. For operators [between, notbetween]: field value must be two comma-separated values. Example: between(insertDt)=2024-01-01,2024-12-31

Default Behavior:

  • If operator is omitted, 'eq' is assumed
  • Example: fieldName=fieldValue is equivalent to eq(fieldName)=fieldValue

Example Usage:

  • startswith(name)=EUR # Find records where name starts with "EUR"
  • in(status)=active,inactive # Find records with active or inactive status
  • gt(maxAllowedPrice)=0.05 # Find records where max allowed price is greater than 0.05

Request example

cURL · cURL
curl -L -X GET "https://api-cpaas.sms.es/bulk/campaign-detector/v1/campaigns" \
  -H "Accept: application/json" \
  -H "Authorization: Bearer <access_token>"

Responses

List of campaigns

application/json
dataobject[]
Show child attributes
actionstring
Possible values: none, silently-drop, reject-standard, reject-custom
actionMethodobject
Show child attributes
methodstring
objectstring
parametersobject
Show child attributes
chargestring
dlrErrorstring
dlrStatusstring
activeDurationstring
Possible values: unknown, unlimited, limited
activeUntilDtstring (date-time)
confobject
flagsstring
groupIdinteger
groupNamestring
idinteger
insertDtstring (date-time)
instanceIdinteger
langstring
langNamestring
languagestring
msgCodingstring
Possible values: gsm, unicode, binary, unknown
msgDtstring (date-time)
msgHashstring
msgSenderstring
msgTextstring
msgTypestring
Possible values: mt, mo
namestring
prioritystring
Possible values: low, normal, high, critical
smsPartinteger

it makes sense only if smsTotalParts > 0, i.e. 0 <= smsPart <= smsTotalParts

smsTotalPartsinteger

indicates does template represents concatenated message or not, when value is > 0 then this is concatenated message

statusstring
Possible values: new, active, ignored, inactive, archived
statusDtstring (date-time)
tagsobject[]
Show child attributes
idinteger
namestring
typestring
Possible values: system, custom
totalHitsinteger
updateDtstring (date-time)
metaobject
Show child attributes
paginationobjectrequired
Show child attributes
countintegerrequired

Number of records returned in the current page

Example: 10
currentPageintegerrequired

Current page number

Example: 1
perPageintegerrequired

Number of records per page

Example: 10
totalintegerrequired

Total number of records matching the filter criteria

Example: 42
totalPagesintegerrequired

Total number of pages

Example: 5
Example response
{
  "data": [
    {
      "action": "none",
      "actionMethod": {
        "method": "string",
        "object": "string",
        "parameters": {
          "charge": "string",
          "dlrError": "string",
          "dlrStatus": "string"
        }
      },
      "activeDuration": "unknown",
      "activeUntilDt": "2026-01-01T12:00:00Z",
      "conf": {},
      "flags": "string",
      "groupId": 0,
      "groupName": "string",
      "id": 0,
      "insertDt": "2026-01-01T12:00:00Z",
      "instanceId": 0,
      "lang": "string",
      "langName": "string",
      "language": "string",
      "msgCoding": "gsm",
      "msgDt": "2026-01-01T12:00:00Z",
      "msgHash": "string",
      "msgSender": "string",
      "msgText": "string",
      "msgType": "mt",
      "name": "string",
      "priority": "low",
      "smsPart": 0,
      "smsTotalParts": 0,
      "status": "new",
      "statusDt": "2026-01-01T12:00:00Z",
      "tags": [
        {
          "id": 0,
          "name": "string",
          "type": "system"
        }
      ],
      "totalHits": 0,
      "updateDt": "2026-01-01T12:00:00Z"
    }
  ],
  "meta": {
    "pagination": {
      "count": 10,
      "currentPage": 1,
      "perPage": 10,
      "total": 42,
      "totalPages": 5
    }
  }
}