Please see this article for information on API authorization, testing endpoints, and how obtain your API key.
If you would like to programmatically update the properties for a specific client campaign in your agency or white label account, you can leverage this API endpoint to achieve this.
The call to this endpoint must be an HTTP PATCH to: https://api.leadpost.com/api/v1.0/agency/clients/{accountId}/campaigns/{campaignId}
If you need to retrieve a list of client accounts via API to determine a client's accountId, please see our Agency - List Clients API.
If you need to retrieve a list of a client account's campaigns, please see our Agency - List Client Campaigns API.
The supported properties which may be updated by this PATCH request can be viewed by clicking the "Schema" button in the Request Body parameters area of the Swagger documentation, as shown below.
Note that for the PATCH request, only the properties passed in the JSON body will be updated and all other properties not included in the request will be preserved.
A sample PATCH request to update a campaign is as follows:
{
"maxSendQuantity":5000,
"resetSendQuantityDay":28,
"campaignStatusId": 1
}
This request will update the "Lead Cap (maxSendQuantity)" for the campaign to 5,000, the Day of the Month to reset/restart the lead campaign once this cap is hit, to the 28th of the month(resetSendQuantityDay), and set the campaigns status as "Active" (campaignStatusId).
Upon a successful PATCH request, a 200 Response will be returned, along with all non-null properties of the updated Campaign object as shown below:
{
"campaignId": 6214,
"campaignStatus": "Active",
"campaignStatusId": 1,
"name": "Default Campaign",
"dataDeliveryPriorityId": 3,
"maxSendQuantity": 5000,
"maxDailySendQuantity": 100,
"resetSendQuantityDay": 28
}