Skip to main content
POST
/
api
/
admin
/
users
/
toggle-admin
Toggle admin role
curl --request POST \
  --url https://app.d-sports.org/api/admin/users/toggle-admin \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "targetUserId": "<string>",
  "makeAdmin": true
}
'

Authorizations

Authorization
string
header
required

Clerk session token. Use Authorization: Bearer .

Body

application/json
targetUserId
string
required
makeAdmin
boolean
required

Response

{ success, data: { success, message } }