Postman collection

Postman is a popular tool that lets you build and test API requests.

To use our XML API collection, you need a Postman account.

  1. Sign up for free at postman.com if you don't have one.
  1. Go to the Acoustic Campaign API collection.

  2. Click Run in Postman button and sign in with your Postman credentials when prompted.

  3. Sign in with your Postman credentials when prompted.

  4. Once the collection is imported, go to Acoustic Campaign XML API > Authentication (OAuth 2) and open the Generate an Access Token request.

  5. Update it with your Acoustic Campaign credentials to generate access tokens for API access to your organization. You can find these credentials in the Org Admin section of Acoustic Campaign — see Getting started with OAuth for setup instructions.

  6. Click Send. A successful response returns your access_token, which is valid for 4 hours.

    You can then begin using and modifying the example payloads to suit your needs. You can also save specific payloads to your application and easily submit them whenever needed.

    📘

    Note:

    Remember to use your specific pod number and data center before submitting a request. For example, if your organization is on Pod 5 in the United States (us), your URL is api-campaign-us-5.goacoustic.com.

Optional: Use a Postman environment variable for your access token

The XML API collection includes a Postman variable in the Authorization header in the form of {{access_token}}. You can either paste your access token directly each time, or store it as an environment variable so Postman sets it automatically.

To store your token automatically, you first need to create and activate a Postman environment:

  1. In Postman, click Environments in the left sidebar, then click + to create a new environment.
  2. Give it a name (for example, Acoustic Campaign) and click Save.
  3. In the top-right corner of Postman, open the environment dropdown and select your new environment.

Once your environment is active, add the script to capture the token:

  1. In your Postman collection, open the Generate an Access Token request.
  2. Select the Scripts tab, then select Post-res and paste in the following snippet:
let jsonData = pm.response.json();
pm.environment.set(“access_token”, jsonData.access_token);

Postman will then use your access token for every subsequent request in the collection, for as long as the token remains active.

For more information, see: