Skip to main content
POST
Create new badge

Authorizations

X-API-KEY
string
header
required

Body

application/json

Body

Schema for creating a new badge.

organizationId
string<uuid>
required

UUID of the organization (optional, converted to lowercase)

Example:

"123e4567-e89b-12d3-a456-426614174222"

websiteId
string<uuid>
required

UUID of the website (optional, converted to lowercase)

Example:

"123e4567-e89b-12d3-a456-426614174111"

name
string
required

The name of the badge

Example:

"Example Badge"

imageUrl
string<uri>
required

The URL of the badge image

Example:

"https://example.com/image.png"

conditions
Conditions · object[]
required

Array of conditions for the badge

Example:
hideInUi
boolean
default:false

Whether to hide this badge in the user interface

Example:

false

description
string

The description of the badge

Example:

"Example description"

rewards
Rewards · object[]

Array of rewards granted when the badge is achieved

csvFiles
object[]

Response

200

Response returned upon successful creation of the badge.

id
string<uuid>
required

UUID of the badge (converted to lowercase)

Example:

"123e4567-e89b-12d3-a456-426614174333"

name
string
required

The name of the badge

Example:

"Example Badge"

description
string | null
required

The description of the badge

Example:

"Example description"

imageUrl
string<uri> | null
required

The URL of the badge image

Example:

"https://example.com/image.png"

loyaltyConditions
Loyalty Condition Schema · object[]
required

Array of conditions of the badge

createdAt
string<date-time>
required

The date and time the badge was created

Example:

"2021-01-01T00:00:00.000Z"

updatedAt
string<date-time>
required

The date and time the badge was updated

Example:

"2021-01-01T00:00:00.000Z"

hideInUi
boolean
default:false

Whether to hide this badge in the user interface

Example:

false

rewards
Rewards · object[]

Array of rewards granted when the badge is achieved

loyaltyBadgeUsers
User Badges · object[]

Array of user badges

loyaltyRules
Loyalty Rules · object[]

Array of loyalty rules associated with the badge

dataJobs
Data Jobs · object[]

Array of data jobs associated with the badge