Endpoint: badges

/badges/list

GET /api/v1/badges/list.ext HTTP/1.1
Host: https://yoursite.vanillaforums.com

Retrieve a list of available badges.

Authentication: required

Parameters

None

/badges/get

GET /api/v1/badges/get.ext HTTP/1.1
Host: https://yoursite.vanillaforums.com

Retrieve a badge by ID.

Authentication: No

Parameters

Parameter Type Description
Badge smart id Required. Badge to retrieve

/badges/user

GET /api/v1/badges/user HTTP/1.1
Host: https://yoursite.vanillaforums.com

Retrieve a user’s current badge list.

Authentication: required

Parameters

Parameter Type Description
User smart id Required. User whose badges should be listed

/badges/add

POST /api/v1/badges/add.ext HTTP/1.1
Host: https://yoursite.vanillaforums.com

Creates a new badge.

Authentication: required

Parameters

Parameter Type Description
Name string Badge name
Slug string URL slug for badge. No spaces
Description string Badge description
Points integer Badge point value
Photo file Badge image

/badges/edit

POST /api/v1/badges/edit.ext HTTP/1.1
Host: https://yoursite.vanillaforums.com

Edit a badge.

Authentication: required

Usage

All fields are optional except Badge. Updates are sparse, so supply only the fields you want to change.

Parameters

Parameter Type Description
Badge smart id Required. The badge we’re modifying
Name string Badge name
Slug string URL slug for badge. No spaces
Description string Badge description
Points integer Badge point value
Photo file Badge image. If supplied, the Content-Type of the request should be forced to multipart/form-data

/badges/give

POST /api/v1/badge/giveuser.ext HTTP/1.1
HOST: https://yoursite.vanillaforums.com

Gives an existing user a badge.

Authentication: required

Parameters

Parameter Type Description
UserID smart id Required. The user who should get the badge
BadgeID integer Required. The ID of the badge to give
Reason string Optional friendly message to provide with the badge

Cloud Hosting

We believe that online communities should be intuitive, engaging and true to your brand. Vanilla allows you to create a customized community that rewards positive participation, automatically curates content and lets members drive moderation.

Learn More …