Campaign Category ID

Hello — I'm using the create campaign API. Per the documentation, it looks like I can pass a campaign_category_id as an integer to set that value…But where do I find that?

The campaign categories API returns an array of the names (strings) of campaign category options, but no ID.

I thought maybe the results were just sequential, but that results in an "Invalid campaign category id supplied" error.

Also, Blackbaud support told me campaign_category_id is not exposed in the RE web or database view. Thoughts?

Best Answers

  • Erik Leaver
    Erik Leaver Blackbaud Employee
    Tenth Anniversary Kudos 5 First Reply Name Dropper
    Answer ✓

    Hey @Zachary Nichols Can you try Get Campaign List to get the full list before you use create campaign? The output should include campaign_category_id and the description. I'd have to test create campaign but I think you could pick a number not in use for the new one you are creating. Give that a try.

  • Alex Wong
    Alex Wong Community All-Star
    Tenth Anniversary Facilitator 5 Kudos 5 bbcon 2025 Attendee Badge
    Answer ✓

    strange, I thought I had answer this question recently… Can't find the post now.

    Short/Quick Answer, Campaign Category Code Table ID is 5039. You can use this API endpoint to get full list of table entries defined.

Answers

  • Thanks @Erik Leaver, that worked, mostly — I'm trying to pull some campaign category ID for campaign categories that don't yet have any campaigns assigned to them. I guess I can temporarily assign a campaign to that campaign category.

    Would be great if there was an way to list them all so I don't have to hunt them down this way.

  • Just for clarity — are you looking to pull a list of all the campaign categories, regardless of whether a category has been assigned to any campaigns? If I'm understanding correctly, you could use a Code Table Report. This used to be available in database view but no longer, and it hasn't come to web view — but someone in the community built a version of this through Power Automate here. You can have a code table report sent to you on a schedule to your email.

    I don't know if a campaign category has a specific ID (like an ImportID), just that the category itself has an ID. That would explain why you're not seeing the category in a List action — if it's not assigned to a category there's nothing to pull.

  • Alex Wong
    Alex Wong Community All-Star
    Tenth Anniversary Facilitator 5 Kudos 5 bbcon 2025 Attendee Badge

    Strangely, I found my reply in another post, putting the full answer here:

    since Campaign Category is a table, you will need to get table entries for the table by using this API endpoint and give it the code table id.

    As for getting the code table id, you can go to the Settings > Table in RE NXT and search for Campaign Category and click into it, in the URL, you will find the code table id.

    For default code table that comes with RE NXT (i.e. Campaign Category), the Code Table ID is the same for all client's RE NXT instance, so you for Campaign Category, the code table id is also 5039 for you too.

    image.png

Categories