Skip to main content

user/promote method

Facts​


  • Description: Promote a multi-channel guest to a full member
  • Method Access: POST https://charon.hackclub.com/user/promote
  • Authentication: Bearer Token in Authorization header
  • Content-Type: application/json

Arguments​

Required arguments​


ArgumentTypeDescription
idStringThe Slack ID of the user to promote

Optional arguments​


ArgumentTypeDescription
channelsArrayAn array of channel IDs to invite the user to. This will override the channels specified in Charon's settings.

Usage info​

This endpoint is used to promote a mulit-channel guest to a full member. They'll also be added to the channels specified in the channels argument or in Charon's settings (default).

Response​

A successful response will return a JSON object with the following structure:

{
"ok": true,
"message": "promotion_success",
"signup": {
"id": "U12345678",
"email": "charon@hackclub.com",
"status": "invited",
"program_id": 1
}
}

An error response will return a JSON object with the following structure:

{
"ok": false,
"message": "email_not_found"
}

Success Messages​

MessageDescription
promotion_successThe user has been successfully promoted.
already_in_teamThe user is already in Slack, Charon has added them to the channels.

Error Messages​

Error CodeDescription
email_not_foundCould not find the user's email
adultThe user is an adult and cannot be promoted.
verificaiton_failedThe user hasn't got an eligible verification.
signup_not_foundUser not found in Charon's database.
promotion_failSomething went wrong somewhere :0
unknown_errorAn unknown error occurred.