API: PATCH Campaign

Overview

Your campaign name and budget can be updated at any point. The ID behind it will be stable and can be referenced to join data after these attributes have changed, need be.

Developers, please see our API Reference for an interactive example.

URL

api.banyan.com/v1/campaign/{id} where id is the campaign you wish to update.

Body


NameDescriptionTypeRequiredNotes
budgetWhat the new budget should be for the offerIntegerNo
nameWhat the new name for the campaign should beStringNo

Example:

{
    "name": "new_name",
    "budget": 10500
}

Response

The response is the campaign detail.

Example:

{
    "data": [
        {
            "id": "1b0b4b5d-b900-502d-b308-fd16e1d2b45e",
            "name": "new_name",
            "budget":10500, 
            "created_ts": "2022-12-09T02:41:23.996205Z",
            "updated_ts": "2022-12-09T02:42:19.037003Z"
        }
    ],
    "errors": []
}

Errors

Error CodeDescriptionExamples
400Bad Request
403Forbidden
404Not Found