SendPulse Campaigns API

Endpoints related to Campaigns.

Operations 24

POST /campaigns Create a campaign #
GET /campaigns Get a list of campaigns #
GET /campaigns/{id} Get campaign information #
PATCH /campaigns/{id} Edit scheduled campaign #
DELETE /campaigns/{id} Cancel a campaign #
GET /campaigns/{id}/countries Get country statistics #
GET /campaigns/{id}/referrals Get referrals statistics #
GET /addressbooks/{id}/campaigns Get campaigns by mailing list #
POST /campaigns/send Send campaign #
POST /sms/campaigns Create a campaign for a mailing list #
DELETE /sms/campaigns Delete a campaign #
POST /sms/send Create a campaign for a list of phone numbers #
GET /sms/campaigns/list Get a list of campaigns by date #
GET /sms/campaigns/info/{id} Get campaign information #
PUT /sms/campaigns/cancel/{id} Cancel a campaign before sending has started #
GET /sms/campaigns/cost Calculate the cost of a campaign #
POST /viber Create a Viber campaign #
GET /viber/task Get a list of campaigns #
GET /viber/task/{id} Get statistics on a campaign #
GET /viber/task/{id}/recipients Get a list of Viber campaign recipients #
GET /push/tasks Get a list of sent web push campaigns #
POST /push/tasks Create a new web push campaign #
GET /push/tasks/{id} Get statistics on sent campaigns #
POST /campaigns/sendTemplate Send a campaign by template #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/sendpulse-campaigns-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no email required.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

sendpulse-campaigns-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Sendpulse Campaigns API
  x-refined-note:
  - x-ai-description differs across the merged source definitions and was not carried
  version: '1.0'
  description: 'Operations tagged Campaigns across 10 of this provider''s published API definitions: sendpulse-bulk-email-openapi.yml, sendpulse-facebook-openapi.yml, sendpulse-instagram-openapi.yml, sendpulse-sms-openapi.yml, sendpulse-telegram-openapi.yml, sendpulse-tiktok-openapi.yml, sendpulse-viber-chatbot-openapi.yml, sendpulse-viber-openapi.yml, sendpulse-web-push-openapi.yml, sendpulse-whatsapp-openapi.yml. Each path carries the servers of the definition it was published in.'
servers:
- url: https://api.sendpulse.com
  description: Production server
- description: ''
  url: https://api.sendpulse.com/messenger
- description: ''
  url: https://api.sendpulse.com/instagram
- description: ''
  url: https://api.sendpulse.com/telegram
- description: ''
  url: https://api.sendpulse.com/tiktok
- description: ''
  url: https://api.sendpulse.com/viber/chatbots
- description: ''
  url: https://api.sendpulse.com/whatsapp
security:
- apiKey: []
- oauth2: []
tags:
- name: Campaigns
  description: Endpoints related to Campaigns.
paths:
  /campaigns:
    post:
      tags:
      - Campaigns
      summary: Create a campaign
      operationId: createCampaign
      description: Create and send or schedule a campaign. One of 'body' or 'template_id' is required. One of 'list_id' or 'segment_id' is required.
      x-ai-role: marketing_automation_specialist
      x-ai-description: The primary engine for launching marketing broadcasts. This endpoint allows for direct HTML injection, template usage, and sophisticated segmentation. It supports both immediate sends and future scheduling with dynamic list updates.
      x-ai-reasoning-instructions:
      - Validate that either `body` or `template_id` is present.
      - Validate that either `list_id` or `segment_id` is present.
      - If `send_date` is provided, ensure it is in `Y-m-d H:i:s` format and in the future.
      - Check if `sender_email` is a pre-verified sender for the account.
      - For large lists, advise calculating cost using `/addressbooks/{id}/cost` first.
      - If `is_test` is true, remind the user that only one `list_id` can be used.
      x-ai-responding-instructions:
      - Provide the new Campaign ID and its initial task status.
      - Clearly state if the campaign is a draft (status 26) or entering the send queue (status 13).
      - If scheduled, confirm the exact time it will be sent.
      - Highlight the estimated recipient count if provided in the response.
      x-ai-suggestions:
      - Monitor campaign statistics using `/campaigns/{id}`.
      - Check referral statistics with `/campaigns/{id}/referrals`.
      - 'Send a test campaign first by setting `is_test: true`.'
      x-ai-capabilities:
        security_info:
          data_handling:
          - ResourceStateUpdate
          - SensitiveAction
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CampaignCreateRequest'
      responses:
        '200':
          description: Campaign created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CampaignCreateResponse'
        '401':
          description: Unauthorized
        '403':
          description: Forbidden
    get:
      tags:
      - Campaigns
      summary: Get a list of campaigns
      operationId: getCampaigns
      description: Retrieve history and status of all campaigns.
      x-ai-role: data_analyst
      x-ai-description: Retrieves the history and status of all email campaigns.
      x-ai-reasoning-instructions:
      - Use pagination for accounts with high volume.
      - Filter by status to find drafts or pending campaigns.
      - Sort by date descending to see recent activity.
      x-ai-responding-instructions:
      - Summarize recent campaigns and their statuses.
      - Highlight any blocked or failed campaigns.
      x-ai-suggestions:
      - View details for a specific campaign.
      x-ai-capabilities:
        security_info:
          data_handling:
          - InformationRetrieval
      parameters:
      - name: limit
        in: query
        schema:
          type: integer
      - name: offset
        in: query
        schema:
          type: integer
      - name: order
        in: query
        schema:
          type: string
          enum:
          - asc
          - desc
      - name: status
        in: query
        schema:
          type: array
          items:
            type: integer
      - name: planed
        in: query
        schema:
          type: boolean
      responses:
        '200':
          description: List of campaigns
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/CampaignSummary'
        '401':
          description: Unauthorized
        '403':
          description: Forbidden
    servers:
    - url: https://api.sendpulse.com
      description: Production server
  /campaigns/{id}:
    parameters:
    - name: id
      in: path
      required: true
      schema:
        type: integer
    get:
      tags:
      - Campaigns
      summary: Get campaign information
      operationId: getCampaignById
      description: Get detailed stats for a specific campaign.
      x-ai-role: data_analyst
      x-ai-description: Provides full performance metrics, including opens and clicks.
      x-ai-reasoning-instructions:
      - Check if the campaign status indicates it has finished sending.
      - Calculate open and click-through rates from the statistics block.
      - Identify high bounce or unsubscribe rates.
      x-ai-responding-instructions:
      - Provide a clear summary of delivery, opens, and clicks.
      - Diagnose any deliverability issues found in the error logs.
      x-ai-suggestions:
      - Check country statistics.
      - Check referral statistics.
      x-ai-capabilities:
        security_info:
          data_handling:
          - InformationRetrieval
      responses:
        '200':
          description: Detailed campaign stats
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CampaignDetails'
        '401':
          description: Unauthorized
        '403':
          description: Forbidden
    patch:
      tags:
      - Campaigns
      summary: Edit scheduled campaign
      operationId: updateCampaign
      description: Update a pending campaign.
      x-ai-role: marketing_automation_specialist
      x-ai-description: Allows corrections to pending campaigns.
      x-ai-reasoning-instructions:
      - Verify the campaign is still in a scheduled/draft state.
      - Ensure base64 encoding if the body is updated.
      - Confirm new send_date is in the future.
      x-ai-responding-instructions:
      - Confirm the updates were saved successfully.
      - State the new scheduled time if changed.
      x-ai-suggestions:
      - Review the campaign details again.
      x-ai-capabilities:
        security_info:
          data_handling:
          - ResourceStateUpdate
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CampaignUpdateRequest'
      responses:
        '200':
          description: Campaign updated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResultTrueWithId'
        '401':
          description: Unauthorized
        '403':
          description: Forbidden
    delete:
      tags:
      - Campaigns
      summary: Cancel a campaign
      operationId: cancelCampaign
      description: Stops a pending or processing campaign.
      x-ai-role: marketing_automation_specialist
      x-ai-description: Cancels campaigns before they are fully sent.
      x-ai-reasoning-instructions:
      - Check campaign status; already sent campaigns cannot be cancelled.
      - Act quickly if the status is 'processing'.
      - Verify the result is true.
      x-ai-responding-instructions:
      - Confirm the campaign has been stopped.
      - Explain that partially sent emails cannot be recalled.
      x-ai-suggestions:
      - Create a new corrected campaign.
      x-ai-capabilities:
        security_info:
          data_handling:
          - ResourceStateUpdate
      responses:
        '200':
          description: Campaign cancelled
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResultTrue'
        '401':
          description: Unauthorized
        '403':
          description: Forbidden
    servers:
    - url: https://api.sendpulse.com
      description: Production server
  /campaigns/{id}/countries:
    parameters:
    - name: id
      in: path
      required: true
      schema:
        type: integer
    get:
      tags:
      - Campaigns
      summary: Get country statistics
      operationId: getCampaignCountryStats
      description: Geographic breakdown of email opens.
      x-ai-role: data_analyst
      x-ai-description: Provides geographic breakdown of engagement.
      x-ai-reasoning-instructions:
      - Sort the data to find the top performing countries.
      - Correlate with sending times to optimize future schedules.
      - Handle empty responses for un-opened campaigns.
      x-ai-responding-instructions:
      - List the top 3-5 countries by open volume.
      - Suggest localization strategies if audience is diverse.
      x-ai-suggestions:
      - Segment future campaigns by top regions.
      x-ai-capabilities:
        security_info:
          data_handling:
          - InformationRetrieval
      parameters: []
      responses:
        '200':
          description: Country stats
          content:
            application/json:
              schema:
                type: object
                additionalProperties:
                  type: integer
        '401':
          description: Unauthorized
        '403':
          description: Forbidden
    servers:
    - url: https://api.sendpulse.com
      description: Production server
  /campaigns/{id}/referrals:
    parameters:
    - name: id
      in: path
      required: true
      schema:
        type: integer
    get:
      tags:
      - Campaigns
      summary: Get referrals statistics
      operationId: getCampaignReferralStats
      description: Breakdown of link clicks.
      x-ai-role: data_analyst
      x-ai-description: Analyzes which links performed best in a campaign.
      x-ai-reasoning-instructions:
      - Identify the most popular links.
      - Check for broken links (0 clicks could indicate issues).
      - Compare click distributions against CTAs.
      x-ai-responding-instructions:
      - Provide a sorted list of the most clicked URLs.
      - Highlight the primary CTA performance.
      x-ai-suggestions:
      - Use these insights to design better templates.
      x-ai-capabilities:
        security_info:
          data_handling:
          - InformationRetrieval
      parameters: []
      responses:
        '200':
          description: Referral stats
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/ReferralStat'
        '401':
          description: Unauthorized
        '403':
          description: Forbidden
    servers:
    - url: https://api.sendpulse.com
      description: Production server
  /addressbooks/{id}/campaigns:
    parameters:
    - name: id
      in: path
      required: true
      schema:
        type: integer
    get:
      tags:
      - Campaigns
      summary: Get campaigns by mailing list
      operationId: getCampaignsByList
      description: Lists all campaigns targeting a specific list.
      x-ai-role: data_analyst
      x-ai-description: Traces the communication history for a specific audience segment.
      x-ai-reasoning-instructions:
      - Use this to check contact fatigue (too many campaigns).
      - Evaluate the success trajectory of this specific list.
      - Apply pagination as lists age and accumulate campaigns.
      x-ai-responding-instructions:
      - Summarize the recent campaigns sent to this list.
      - Point out any trends in task statuses.
      x-ai-suggestions:
      - Check the detailed stats of the most recent campaign.
      x-ai-capabilities:
        security_info:
          data_handling:
          - InformationRetrieval
      parameters:
      - name: limit
        in: query
        schema:
          type: integer
      - name: offset
        in: query
        schema:
          type: integer
      responses:
        '200':
          description: List of campaigns
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/CampaignByListSummary'
        '401':
          description: Unauthorized
        '403':
          description: Forbidden
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              examples:
                book.not_found:
                  summary: book.not_found
                  value:
                    message: Book not found
                    error_code: 213
    servers:
    - url: https://api.sendpulse.com
      description: Production server
  /campaigns/send:
    post:
      summary: Send campaign
      description: Sends a text campaign to all subscribers of the specified bot
      security:
      - oAuth2ClientCredentials: []
      tags:
      - Campaigns
      requestBody:
        description: ''
        required: true
        content:
          application/json:
            schema:
              properties:
                title:
                  type: string
                  description: Campaign title
                bot_id:
                  type: string
                  description: Bot ID. Can be obtained with a method of getting a list of bots. You can also find it in your account in the address bar of a chat window with the desired contact.
                message_tag:
                  $ref: '#/components/schemas/Campaign/properties/message_tag'
                message_notification_type:
                  $ref: '#/components/schemas/Campaign/properties/message_notification_type'
                send_at:
                  type: string
                  description: Specify the date and time in the format Y-m-d H:i if you need to schedule the campaign, if you do not specify this parameter, the campaign will be sent immediately
                filter:
                  type: object
                  description: Filter for campaign sending
                  properties:
                    type:
                      type: string
                      description: Filter type (and/or)
                    expressions:
                      type: array
                      description: Filter expressions
                      items:
                        type: object
                        properties:
                          type:
                            type: string
                            description: Expression type (and/or)
                          expressions:
                            type: array
                            description: List of expressions
                            items:
                              type: object
                              properties:
                                operator:
                                  type: string
                                  description: Filter operator (e.g., eq, like, gt, lt, etc.)
                                field:
                                  type: string
                                  description: Field to filter by (e.g., tags)
                                value:
                                  type: string
                                  description: Value to filter by
                messages:
                  $ref: '#/components/schemas/Campaign/properties/messages'
              required:
              - title
              - bot_id
              - messages
            examples:
              Send a text message:
                value:
                  title: string
                  bot_id: string
                  message_tag: HUMAN_AGENT
                  message_notification_type: REGULAR
                  send_at: string
                  filter:
                    type: and
                    expressions:
                    - type: and
                      expressions:
                      - operator: eq
                        field: tags
                        value: SOME_TAG_HERE
                  messages:
                  - type: RESPONSE
                    tag: CUSTOMER_FEEDBACK
                    content_type: message
                    data:
                      text: Hello world!
              Send a message with an image:
                value:
                  title: string
                  bot_id: string
                  message_tag: HUMAN_AGENT
                  message_notification_type: REGULAR
                  send_at: string
                  messages:
                  - type: RESPONSE
                    tag: CUSTOMER_FEEDBACK
                    content_type: media_img
                    data:
                      attachment:
                        type: template
                        payload:
                          template_type: generic
                          elements:
                          - title: Example title
                            subtitle: Example subtitle
                            image_url: https://www.spcdn.org/images/promo-logo/correct/sendpulse-logo-13.png
              Send a message with a carousel:
                value:
                  title: string
                  bot_id: string
                  message_tag: HUMAN_AGENT
                  message_notification_type: REGULAR
                  send_at: string
                  messages:
                  - type: RESPONSE
                    tag: CUSTOMER_FEEDBACK
                    content_type: template
                    data:
                      attachment:
                        type: template
                        payload:
                          template_type: generic
                          elements:
                          - title: Example title
                            subtitle: Example subtitle
                            image_url: https://example.com/image.png
                            buttons:
                            - type: web_url
                              title: Example button
                              url: https://example.com/
      responses:
        '200':
          description: Operation successful
          content:
            application/json:
              schema:
                properties:
                  success:
                    type: boolean
                  data:
                    $ref: '#/components/schemas/Campaign'
                type: object
      operationId: sendCampaign
      x-ai-role: chatbot_campaign_manager
      x-ai-description: Initiates a broadcast message to all subscribers of a specific chatbot, either immediately or at a scheduled time. This is the primary activation endpoint for bot campaigns — it orchestrates message delivery across an entire subscriber base and supports segmentation via filters, making it suitable for targeted re-engagement, announcements, and transactional notifications. The `message_tag` and `message_notification_type` fields are critical for Facebook Messenger policy compliance and must be set correctly to avoid delivery failures.
      x-ai-reasoning-instructions:
      - Before sending, confirm the `bot_id` is valid and active — use the bot list endpoint if the user is unsure which bot to target.
      - 'Check whether `send_at` is required: if the user wants immediate delivery, omit it; if scheduling, validate that the datetime is in the future and formatted as Y-m-d H:i.'
      - Warn the user that `message_tag` is required for sending outside the standard 24-hour messaging window on Facebook Messenger — clarify the available tags and their policy implications.
      - 'If a `filter` is provided, validate the filter structure: `type` must be ''and'' or ''or'', and nested `expressions` must include valid `operator`, `field`, and `value` triples.'
      - Remind the user that `messages` must be a non-empty array and that each message's `content_type` determines the structure of `data` — text messages use `data.text`, images and carousels use `data.attachment`.
      - For carousel messages, ensure each element in `payload.elements` has at minimum a `title`; `buttons` are optional but require a valid `type` (e.g., `web_url`) and a `url`.
      - If no filter is specified, the campaign will be sent to all active subscribers of the bot — confirm this is intentional if the bot has a large audience.
      x-ai-responding-instructions:
      - Confirm whether the campaign was scheduled or sent immediately based on the presence of `send_at` in the request.
      - Reference the returned `Campaign` object ID so the user can track or manage the campaign later.
      - 'If the operation fails, explain the most likely causes: invalid `bot_id`, malformed message structure, or policy violation due to incorrect `message_tag`.'
      - Suggest using the campaign status endpoint to monitor delivery progress after a successful send.
      - If a filter was applied, summarize the targeting criteria used so the user can verify the intended audience.
      x-ai-suggestions:
      - Schedule the campaign with `send_at` during peak engagement hours for the target audience's timezone.
      - 'Use `message_tag: CONFIRMED_EVENT_UPDATE` for event reminders to stay within Messenger policy.'
      - Segment subscribers by tag using the `filter` object to avoid messaging disengaged users.
      x-ai-capabilities:
        confirmation:
          type: Recommended
          message: This action will broadcast a message to all matching subscribers of the selected bot. Confirm the target audience, message content, and send time before proceeding.
        security_info:
          data_handling:
          - MassMessageDelivery
          - ExternalPlatformInteraction
    servers:
    - description: ''
      url: https://api.sendpulse.com/messenger
  /sms/campaigns:
    post:
      summary: Create a campaign for a mailing list
      operationId: createSmsCampaign
      tags:
      - Campaigns
      x-ai-role: sms_marketing_specialist
      x-ai-description: 'Triggers a bulk SMS broadcast to an entire address book.  Supports dynamic content, link tracking, and scheduled delivery.

        '
      x-ai-reasoning-instructions:
      - 'Note: `sender` ID must be pre-registered (max 11 chars).'
      - 'Use `emulate: true` to test logic without burning credits.'
      - 'Consider `use_dynamic_list: true` for scheduled campaigns to include late subscribers.'
      x-ai-responding-instructions:
      - Report the unique `campaign_id` generated.
      - Remind the user that moderation may delay delivery by a few minutes.
      x-ai-suggestions:
      - Newsletter_Launch
      - Flash_Sale_Promo
      x-ai-capabilities:
        confirmation:
          type: Required
        security_info:
          data_handling:
          - ResourceStateUpdate
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
              - sender
              - addressBookId
              - body
              properties:
                sender:
                  type: string
                  maxLength: 11
                addressBookId:
                  type: integer
                body:
                  type: string
                route:
                  type: object
                  description: e.g. {'UA':'national'}
                date:
                  type: string
                  format: date-time
                emulate:
                  type: boolean
                  default: false
                use_dynamic_list:
                  type: boolean
                  default: false
                stat_link_tracking:
                  type: boolean
                  default: false
                stat_link_need_protocol:
                  type: boolean
                  default: false
      responses:
        '200':
          description: Campaign created
          content:
            application/json:
              schema:
                type: object
                properties:
                  result:
                    type: boolean
                  campaign_id:
                    type: integer
        '401':
          description: Unauthorized
        '403':
          description: Forbidden
    delete:
      summary: Delete a campaign
      operationId: deleteSmsCampaign
      tags:
      - Campaigns
      x-ai-role: sms_marketing_specialist
      x-ai-description: 'Permanently deletes a campaign record. Only available for campaigns that haven''t started.

        '
      x-ai-reasoning-instructions:
      - Check campaign status before attempting deletion.
      x-ai-responding-instructions:
      - Confirm deletion of the campaign.
      x-ai-capabilities:
        confirmation:
          type: Required
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
              - id
              properties:
                id:
                  type: integer
      responses:
        '200':
          description: Deleted successfully
          content:
            application/json:
              schema:
                type: object
                properties:
                  result:
                    type: boolean
        '401':
          description: Unauthorized
        '403':
          description: Forbidden
    servers:
    - url: https://api.sendpulse.com
  /sms/send:
    post:
      summary: Create a campaign for a list of phone numbers
      operationId: sendSmsToNumbers
      tags:
      - Campaigns
      x-ai-role: sms_marketing_specialist
      x-ai-description: 'Fast-track broadcast for ad-hoc lists not stored in an address book.  Perfect for one-off alerts or external CRM triggers.

        '
      x-ai-reasoning-instructions:
      - Validate all numbers in the `phones` array are valid.
      x-ai-responding-instructions:
      - Report how many messages were successfully queued.
      x-ai-suggestions:
      - Use for 2FA codes or urgent system alerts.
      x-ai-capabilities:
        confirmation:
          type: Required
        security_info:
          data_handling:
          - ResourceStateUpdate
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
              - sender
              - phones
              - body
              properties:
                sender:
                  type: string
                phones:
                  type: array
                  items:
                    type: string
                body:
                  type: string
                date:
                  type: string
                route:
                  type: object
                emulate:
                  type: boolean
                stat_link_tracking:
                  type: boolean
                stat_link_need_protocol:
                  type: boolean
      responses:
        '200':
          description: Send result
          content:
            application/json:
              schema:
                type: object
                properties:
                  result:
                    type: boolean
                  campaign_id:
                    type: integer
                  counters:
                    type: object
        '401':
          description: Unauthorized
        '403':
          description: Forbidden
    servers:
    - url: https://api.sendpulse.com
  /sms/campaigns/list:
    get:
      summary: Get a list of campaigns by date
      operationId: getSmsCampaigns
      tags:
      - Campaigns
      x-ai-role: marketing_automation_specialist
      x-ai-description: 'Retrieves campaign history within a specific time window.  Useful for building performance dashboards.

        '
      x-ai-reasoning-instructions:
      - Use `dateFrom` and `dateTo` to avoid over-fetching.
      x-ai-responding-instructions:
      - Summarize the campaigns found in the requested period.
      x-ai-suggestions:
      - Track `company_price` to monitor spend trends.
      x-ai-capabilities:
        confirmation:
          type: None
      parameters:
      - name: dateFrom
        in: query
        schema:
          type: string
      - name: dateTo
        in: query
        schema:
          type: string
      responses:
        '200':
          description: Campaign list
          content:
            application/json:
              schema:
                type: object
                properties:
                  result:
                    type: boolean
                  data:
                    type: array
                    items:
                      type: object
        '401':
          description: Unauthorized
        '403':
          description: Forbidden
    servers:
    - url: https://api.sendpulse.com
  /sms/campaigns/info/{id}:
    parameters:
    - name: id
      in: path
      required: true
      schema:
        type: integer
    get:
      summary: Get campaign information
      operationId: getSmsCampaignInfo
      tags:
      - Campaigns
      parameters: []
      x-ai-role: sms_marketing_specialist
      x-ai-description: 'Returns granular status for a campaign, including delivery breakdowns per phone.

        '
      x-ai-reasoning-instructions:
      - Examine `status` (2 for Delivered, 12 for Not Delivered).
      x-ai-responding-instructions:
      - Report delivery success rates and spend for this campaign.
      x-ai-suggestions:
      - Re-send to 'Not delivered' contacts if the failure was transient.
      x-ai-capabilities:
        confirmation:
          type: None
      responses:
        '200':
          description: Campaign stats
          content:
            application/json:
              schema:
                type: array
                items:
                  type: object
        '401':
          description: Unauthorized
        '403':
          description: Forbidden
    servers:
    - url: https://api.sendpulse.com
  /sms/campaigns/cancel/{id}:
    parameters:
    - name: id
      in: path
      required: true
      schema:
        type: integer
    put:
      summary: Cancel a campaign before sending has started
      operationId: cancelSmsCampaign
      tags:
      - Campaigns
      parameters: []
      x-ai-role: sms_marketing_specialist
      x-ai-description: 'Stops a scheduled campaign from being sent.  Emergency override for erroneous scheduling.

        '
      x-ai-reasoning-instructions:
      - Verify that sending has not already commenced.
      x-ai-responding-instructions:
      - Confirm the campaign has been successfully halted.
      x-ai-suggestions:
      - Check account balance to ensure credits are released.
      x-ai-capabilities:
        confirmation:
          type: Required
      responses:
        '200':
          description: Cancellation result
          content:
            application/json:
              schema:
                type: object
                properties:
                  result:
                    type: boolean
        '401':
          description: Unauthorized
        '403':
          description: Forbidden
    servers:
    - url: https://api.sendpulse.com
  /sms/campaigns/cost:
    get:
      summary: Calculate the cost of a campaign
      operationId: calculateSmsCost
      tags:
      - Campaigns
      x-ai-role: compliance_officer
      x-ai-description: 'Estimates the total credit expenditure for a proposed campaign.  Crucial for budget planning before actual broadcast.

        '
      x-

# --- truncated at 32 KB (69 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/sendpulse/refs/heads/main/openapi/sendpulse-campaigns-api-openapi.yml