Skip to main content
bjoern_schulze
Helper ⭐️⭐️⭐️
Nov 20, 2026 11:29 AM UTC
Question

Can an existing badge be assigned to a user through the API?

Hi community,

I’m trying to automate awarding an existing badge to a community member. But I can’t get it to work.

The Gainsight documentation I found lists /api1/user/{userId}/badge/{badgeId}, but I couldn’t confirm the supported write method. I set up a manual GitHub Actions workflow in the production environment; OAuth using the client credentials flow and scope=write succeeds.

A PUT to that route on the EU API returned HTTP 404 on two attempts, and no badge was awarded.

I also checked the published @insided/sdk packages; their public types expose widget and connector functionality, but no badge-specific method.

Is assigning a badge supported through the API? If so, what method, endpoint, payload, and permissions should I use? Alternatively, is there a supported SDK or admin connector?

3 replies

jvdc
Expert ⭐️
Nov 20, 2026 11:40 AM UTC

Hey ​@bjoern_schulze 

I have a couple of automations assigning manual badges to my users. It works well.

 

PUT is the right method.

 

What do you put for authorization?

I have: Bearer [access_token]

 

Translate
bjoern_schulze
Helper ⭐️⭐️⭐️
Nov 20, 2026 11:49 AM UTC

I believe I found the error.

I used /api1/user/{userId}/badge/{badgeId} which seems to be from an outdated source. The Developer Portal says the correct path is:

/user/{userId}/badge/{badgeId}

 

Translate
bjoern_schulze
Helper ⭐️⭐️⭐️
Nov 20, 2026 1:16 PM UTC

No, that wasn’t it. Still not working.

I followed the endpoint and method in the Gainsight Award a badge documentation:

PUT https://api2-eu-west-1.insided.com/api1/user/{userId}/badge/44

I obtained a Bearer token using our OAuth client credentials with the write scope. Before the PUT, authenticated read requests confirmed that the user I want to give a test badge exists, the test badge itself exists, and the user does not already have the test badge. The badge metadata showed manualOnly=true and enableBadgeRules=false.

The request returned a 404. The documentation does not explain why it would apply when both the user and badge were found by the preceding read requests. I repeated the request - same result.

I have no idea where to go from here. I have some questions though:

  • Can badges marked manualOnly or with enableBadgeRules=false be awarded through this endpoint?
  • Are there additional permissions, eligibility rules, or ID requirements that are not documented? If not, does anyone have an idea about why I’m getting this 404?
Translate