Skip to main content
PATCH
/
streaks
/
configs
/
{id}
Update a streak config by id
curl --request PATCH \
  --url https://{subdomain}.nudj.cx/api/v2/admin/streaks/configs/{id} \
  --header 'Content-Type: application/json' \
  --header 'x-api-token: <api-key>' \
  --data '{
  "isEnabled": true,
  "triggerEvents": {
    "platform": [
      "achievement-completion"
    ],
    "custom": [
      "<string>"
    ]
  }
}'
{
  "id": "<string>",
  "organisationId": "<string>",
  "communityId": "<string>",
  "isEnabled": true,
  "triggerEvents": {
    "platform": [
      "achievement-completion"
    ],
    "custom": [
      "<string>"
    ]
  },
  "createdBy": "<string>",
  "updatedBy": "<string>"
}

Authorizations

x-api-token
string
header
required

Path Parameters

id
string
required

The id of the streak config to update

Body

application/json

The input required to update a streak config

isEnabled
boolean

Whether the streak is enabled and users can start and extend streaks.

triggerEvents
object

Response

Successful response

A streak config

id
string
required

The id of the streak config

organisationId
string
required

The id of the organisation this streak config belongs to

isEnabled
boolean
required

Whether the streak is enabled and users can start and extend streaks.

triggerEvents
object
required
createdBy
string
required

The admin user who created this streak config

updatedBy
string
required

The admin user who last updated this streak config

communityId
string | null

The id of the community this streak config belongs to. No community means this is an organisation level streak config.

I