Skip to main content

Agency & White Label - Client Quick Start API

Our Client Quick Start API allows agency and white label clients to add and launch new client accounts in a single API call.

Updated over 3 weeks ago

If you would like to programmatically create and launch new client accounts for your agency or white label account, you can leverage our "agency/clientQuickStart" API endpoint to achieve this.

Swagger API documentation for all available API endpoints can be found at https://api.leadpost.com. The endpoint to create and launch new client accounts can be found under "/api/v1.0/agency/clientquickstart" as shown below.

The call to this endpoint must be an HTTP POST with JSON data (Content-Type: application/json). The input parameters and output of this call are self documented in the Swagger documentation as shown:

Input Parameters

Sample Input JSON Payload

{
"clientName": "Sample Client Account Name",
"clientEmail": "[email protected]",
"accountType": "B2C",
"addToBillingPlan": true,
"markCampaignActive": true,
"campaignMonthlyLeadCap": 200,
"campaignLeadCapResetDayOfMonth": 12,
"dataDeliveryPriorityId": 1,
"campaignAutomationDefinition": null,
"ZipFilters": [],
"StateFilters": [],
"EnabledServiceIds": []
}


Success Result


Sample Success Result JSON Payload

{
"password": "h&cqXRt5",
"accountId": 34134,
"audienceId": 28256,
"campaignId": 9398,
"pixelCode": "<img src='https://rdcdn.com/rt?aid=28256&e=1&img=1' height='1' width='1' referrerpolicy='no-referrer-when-downgrade' />",
"javaScriptCode": "<script type='text/javascript'>\r\n (function (w, d, s, u, dbg) {\r\n var js, fjs = d.getElementsByTagName(s)[0];\r\n window.rdcndbg = dbg;\r\n js = d.createElement(s);\r\n js.async = true;\r\n js.src = u;\r\n fjs.parentNode.insertBefore(js, fjs);\r\n })(window, document, 'script', 'https://rdcdn.com/rtjs?aid=28256', false);\r\n</script>"
}

Production Endpoint

https://api.leadpost.com/api/v1.0/agency/clientquickstart (https only). Clients created using this endpoint will be reflected in your production agency/white label login at https://client.leadpost.com or your white label login domain, if you are a white label client.

Staging Endpoint (For Testing) http://staging.api.leadpost.com/api/v1.0/agency/clientquickstart (http only, https not supported). You can Log in to our staging environment at https://staging.leadpost.com/ using your production account login and password to review client accounts created in staging or to generate API credentials. Note that newly created accounts may not have a login for staging and if you are having issues logging in to our staging environment, please create a support ticket and we can create a staging account and login for you.

Authorization
All API calls are authenticated using your API key. Your API key must be added as a request header in the API call as shown:

api_key: your_leadpost_api_key_here

To obtain your API key, you may log into your agency or white label account and navigate to Account >> Credentials and then click the Generate button if you have not already created an API key the past.

API Keys for Production and Staging may not be the same, so please make sure you are using the correct API key for the environment endpoint you are using.

Sample Postman Collection
You can find a sample Postman collection for calling this API in our staging environment below. Note that you will need to obtain your API key from staging by logging into https://staging.leadpost.com and following the Authorization instructions above. If you don't have Postman, you can download it for free at https://www.postman.com/downloads/. Once installed, you can import this collection, plug in your API key as shown below, and then run a test call.

Did this answer your question?