users_badges_seen
POST
/api/users/badges/seen
const url = 'https://example.com/api/users/badges/seen';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"badges":["example"]}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://example.com/api/users/badges/seen \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "badges": [ "example" ] }'Mark badges as announced, so they are announced only once.
Only badges the user obtained and was not told about yet are changed.
Authorizations
Section titled “Authorizations”Request Bodyrequired
Section titled “Request Bodyrequired”Badges the user has just been told about.
object
badges
required
Ids of the badges announced to the user.
Array<string>
Example generated
{ "badges": [ "example" ]}Badges the user has just been told about.
object
badges
required
Ids of the badges announced to the user.
Array<string>
Example generated
badges=exampleBadges the user has just been told about.
object
badges
required
Ids of the badges announced to the user.
Array<string>
Responses
Section titled “Responses”Media typeapplication/json
Array<object>
A badge of the journey, and whether the user obtained it.
object
id
required
Id of the badge.
string
family
required
Discovery badges introduce a madbot concept, practice badges a good data management practice.
discovery- discoverypractice- practice
string
obtained_time
required
When the user obtained the badge, null if not obtained yet.
string format: date-time
seen_time
required
When the user was told about the badge, null if not yet.
string format: date-time
Example
[ { "family": "discovery" }]Media typeapplication/json
object
code
required
string
message
required
string
details
required
Array<object>
object
parameter
string
code
string
message
string
Example
{ "code": "body_validation_error", "message": "The request body does not match the schema for the expected parameters. Check the `details` property for more details.", "details": [ { "parameter": "badges", "code": "invalid_choice", "message": "\"<badge>\" is not a valid choice." } ]}
