Get Campaign Report's ID through API

Hi. Does the API allow me to get Campaign Report’s ID? If not, what is the work around to get Report ID? Thanks.

1 Like

Hi @ihar512 -

You certainly can get Campaign Report IDs. These however are older non-public APIs.

The API to get the Campaign Reports is:

GET {api-url}/cms/campaigns/campaigns/{campaignId}/reports?campaignId={campaignId}&page=1&start=0&limit=25

(I am not sure why the above API has both the campaignId as a path parameter and a query parameter, but it does according to our product)

From here you’ll get back a response that looks something like this:

    "name":"Campaign Status Report",
    "name":"Certification Signoff Report",
    "name":"Campaign Composition Report",

If you want to get a report you should be able to call:

GET {api-url}/cc/api/report/get/{taskResultId}?format=csv&name={name}

Note: As a trick, you can see these APIs in action by going to your browser’s Developer Tools and watching the Network requests when interacting in the UI. You can see the calls and payloads there.

Hope this helps!

1 Like

Hi Neil, thank you for the quick follow up. So I tried the method you provided to get the Campaign Report IDs, I ended up getting ‘{“error”:“Unable to route request”}’ in response and 401 error code. I provided the same Bearer token I used to get the campaignID in the header, does a new Bearer token is needed? Seems like it’s saying lack of valid authentication credentials.

@ihar512 Were you ever able to figure out the [{“error”:“Unable to route request”}’ in response and 401 error code] issue?
I’m having a similar issue with a Bearer token being invalid.


Hey Chris,
Did you use client credentials from security settings or you used personal access token to generate bearer token?

Hey @chirag_patel,
I tried both. I’m using Postman and when I generate the token using either set of values, I get that error.
When I get the Bearer token from inspecting the Network tab in chrome for the Entitlements tab for the source and use that it works fine.

I’m returning the list of Entitlements using the API call: /ears/entitlements-v3/entitlements
Do I have to do something different for that API? I use the same OAUTH tokens for the V3 and Beta API calls without issues.


1 Like

Hey @chrisp, no I have not figured it out yet. Following this thread.


The most likely reason you are seeing a 401 with {“error”:“Unable to route request”} is because the endpoint you are trying to reach can only be called with a token that is generated by the UI. /cc, /v2, /beta, and /v3 APIs are on a different routing architecture than our internal APIs and can be called using the PAT or OAuth2 generated tokens.

I do see that there is a /beta endpoint for getting campaign reports. Does this work for your needs?

Hey @ihar512, was the above able to resolve your 404 issue? We would love to hear an update!

@jordan.violet @chrisp
Hey all. After digging through the browser developer tools I am now able to get the campaign report CSV file by using the taskResultId. Here are the steps

  1. GET {api-url}/cc/api/campaign/getReports?campaignId={campaignId}
  2. PAYLOAD = GET {api-url}/cc/api/report/get/{taskResultId}?format=csv&name={report_name}
  3. POST {api-url}/security/signUrl with PAYLOAD
  4. Use the response’s url from step 3 to download report CSV

But once again, the API to get the campaign reports still doesn’t work. I hope the official API will support this in the near future.

Thank you for sharing that update, @ihar512

Is there a way to get all Active Campaign IDs running with one API Command?

Welcome to the developer community @aricoux. This topic has been closed-solved. Can you please create a new topic with your question?

1 Like