API: POST Campaign

Overview

A campaign is the total marketing budget for a given card-linked offer. It can be 1:1 with an offer in the Banyan platform, or it can be 1:many, campaigns to offers. For example, if you wanted to test two different regions with different offers using the same marketing budget, you would set up a single campaign within the Banyan network and two different offers.

Banyan has an internal ID created by POST-ing to the /campaign endpoint with your Banyan ID. You will then include the byn_campaign_id returned in the response when setting up your offers.

Developers, please see the API reference for an interactive experience.

📘

Note: CLOs with Banyan are typically priced per campaign, not offer.

URL

api.banyan.com/rest/v1/campaign

Body

NameDescriptionTypeNotes
byn_publisher_idThe ID given to your organization from BanyanStringReach out to your Customer Support representative if you are unsure what your byn_publisher_id is
nameThe name of the campaignStringThis is an optional field which will make it easier to use the GUI for finding the campaign you wish to create an offer with

Example:

POST http://api.banyan.com/rest/v1/campaign
Bearer: {token_id}
Content-Type: application/json
Accept: application/json

{
    "byn_publisher_id": 106,
    "name": "Sample Campaign"
}

Response

Example:

POST http://api.banyan.com/rest/v1/campaign
Bearer: {token_id}
Content-Type: application/json
Accept: application/json

{
    "data": [
        {
            "id": "cf8f9c27-f1da-580f-9316-3350333d234c",
            "byn_publisher_id": 106,
            "created_ts": "2022-12-06T21:41:36.422056Z"
        }
    ],
    "errors": []
}

Response Codes and Notes

CodeDescriptionNotes
201Campaign successfully createdResponse will contain the Banyan ID of the campaign created
409Status ConflictRecord did not save
400General purpose state for client side issuesRefer to the response for details specific to the issue
500General purpose state for server side issuesRefer to the response for details specific to the issue