spoonity logo
    • API
    • Documentation
    • Support
    • Getting Started

      • Introduction
      • Authentication
      • Handling Errors
      • Webhooks
    • Workflows

      • Placing an order
      • Retrieving a list of checked-in users
      • Registering an account
      • Working with user profiles
      • Reloading an account
    • Resources

      • Billing Profile
      • Card
      • Content
      • Country & Region
      • EGift
      • OnScreen
      • Order
      • User
      • Balances & Rewards
      • Transaction History
      • Inbox
      • Spending Rules
    • Sign in

    Campaign

    Campaigns are multi-step broadcasts dispatched to a particular customer segment. Campaigns can be sent manually or scheduled for a future date.

    The campaign model

    The campaign model contains identifying information about the campaign itself, as well as configuration data used to manage its delivery.

    Properties

    • Name
      id
      Type
      string
      Description

      Unique identifier for the campaign.

    • Name
      name
      Type
      string
      Description

      A unique name for the campaign.

    • Name
      flow
      Type
      object
      Description

      An object representing the underlying workflow for the campaign.

    • Name
      data
      Type
      object
      Description

      An object containing the configuration data for each step in the campaign.

    • Name
      date_created
      Type
      string
      Description

      Timestamp of when the campaign was first created.

    • Name
      date_updated
      Type
      string
      Description

      Timestamp of when the campaign was last updated.

    • Name
      date_sent
      Type
      string
      Description

      Timestamp of when the campaign was sent.

    • Name
      status
      Type
      string
      Description

      A string enum for indicating the current status of the campaign.


    GET/campaigns

    Retrieve a list of campaigns

    This endpoint allows you to retrieve a paginated list of your campaigns. By default, this will include the 25 most recent objects, starting with the most recent.

    Query parameters

    • Name
      limit
      Type
      integer
      Description

      The maximum number of entries to include in the response.

    • Name
      page
      Type
      integer
      Description

      An offset to determine which groups of results to return.

    • Name
      query
      Type
      string
      Description

      A search string which can be used to filter results by various criteria (see below).

    Filter parameters

    These attributes can be used to filter the result set returned by the API. They are included as a space-delimited string of key:value pairs.

    • Name
      n
      Type
      string
      Description

      Name of the campaign.

    • Name
      s
      Type
      string
      Description

      Status of the campaign.

    Request

    GET
    /campaigns
    curl -G https://api.spoonity.com/campaigns \
      -H "Authorization: Bearer {token}"
    

    Response

    {
      "items": [
        {
          "id": "camp_a1e9b522f8b1a96e",
          "name": "Lapsed Reactivation",
          "flow": {},
          "data": {},
          "date_created": "2026-02-02T13:48:05.683Z",
          "date_updated": "2026-02-02T13:48:05.683Z",
          "date_sent": null,
          "status": "ACTIVE"
        }
      ],
      "next": "https://api.spoonity.com/campaigns?limit=25&page=2",
      "prev": null
    }
    

    GET/campaigns/:id

    Retrieve a particular campaign

    This endpoint allows you to retrieve a specific campaign by ID.

    Path parameters

    • Name
      id
      Type
      string
      Description

      The campaign ID.

    Request

    GET
    /campaigns/:id
    curl -G https://api.spoonity.com/campaigns/:id \
    -H "Authorization: Bearer {token}"
    

    Response

    {
        "id": "camp_a1e9b522f8b1a96e",
        "name": "Lapsed Reactivation",
        "flow": {},
        "data": {},
        "date_created": "2026-02-02T13:48:05.683Z",
        "date_updated": "2026-02-02T13:48:05.683Z",
        "date_sent": null,
        "status": "ACTIVE"
    }
    

    POST/campaigns

    Create a campaign

    This endpoint allows you to create a new campaign. Campaigns are created in a draft state by default.

    Required attributes

    • Name
      name
      Type
      string
      Description

      The name of the campaign.

    • Name
      flow
      Type
      object
      Description

      An object representing the underlying workflow for the campaign.

    • Name
      data
      Type
      object
      Description

      An object containing the configuration data for each step in the campaign.

    Request

    POST
    /campaigns
    curl -G https://api.spoonity.com/campaigns \
    -H "Authorization: Bearer {token}" \
    -d name="Lapsed Reactivation" \
    -d flow="{}" \
    -d data="{}"
    

    Response

    {
        "id": "camp_a1e9b522f8b1a96e",
        "name": "Lapsed Reactivation",
        "flow": {},
        "data": {},
        "date_created": "2026-02-02T13:48:05.683Z",
        "date_updated": "2026-02-02T13:48:05.683Z",
        "date_sent": null,
        "status": "INACTIVE"
    }
    

    PUT/campaigns/:id

    Update a campaign

    This endpoint allows you to update a campaign. A campaign's name, flow, data and status can be updated.

    Path parameters

    • Name
      id
      Type
      string
      Description

      The campaign ID.

    Optional attributes

    • Name
      name
      Type
      string
      Description

      The name of the campaign.

    • Name
      flow
      Type
      object
      Description

      An object representing the underlying workflow for the campaign.

    • Name
      data
      Type
      object
      Description

      An object containing the configuration data for each step in the campaign.

    • Name
      status
      Type
      string
      Description

      A status enum. Campaigns can exist in either an ACTIVE or INACTIVE state.

    Request

    PUT
    /campaigns/:id
    curl -G https://api.spoonity.com/campaigns/:id \
    --request PUT \
    -H "Authorization: Bearer {token}" \
    -d status="ACTIVE"
    

    Response

    {
        "id": "camp_a1e9b522f8b1a96e",
        "name": "Lapsed Reactivation",
        "flow": {},
        "data": {},
        "date_created": "2026-02-02T13:48:05.683Z",
        "date_updated": "2026-02-02T13:48:05.683Z",
        "date_sent": null,
        "status": "ACTIVE"
    }
    

    DELETE/campaigns/:id

    Delete a campaign

    This endpoint allows you to delete a campaign. Only draft campaigns can be deleted.

    Path parameters

    • Name
      id
      Type
      string
      Description

      The campaign ID.

    Request

    DELETE
    /campaigns/:id
    curl -G https://api.spoonity.com/campaigns/:id \
    --request DELETE \
    -H "Authorization: Bearer {token}"
    

    Response

    {}
    

    Was this page helpful?

    PreviousAudit Log
    NextCard

    © Copyright 2026 Spoonity, Inc. All rights reserved.