StackMoreLayersДокументация
APIReference

Одобрить или отклонить участника

PATCH
/competitions/{competition_id}/participants/{participant_id}/

Decides the person's join request on Account Security. A person with no request has nothing to decide (409 participant_request_not_found): grant or remove access on the Access tab instead. The reason is not stored.

Personal tokens only for now: access is managed by a person, so a competition automation token is refused (401 token_type_not_allowed).

АвторизацияBearer <token>

StackMoreLayers API token. Send as Authorization: Bearer sml_pat_live_<prefix>.<secret>.

In: header

Параметры пути

competition_id*integer

Numeric competition identifier.

Range1 <= value
participant_id*integer

The participant's numeric user id, as in Participant.user_id (and Participant.id).

Range1 <= value

Заголовки

Idempotency-Key?string

Opaque client-generated key. A retry with the same key and body returns the original result instead of repeating the effect.

Match^[!-~]+$
Length8 <= length <= 128

Тело запроса

application/json

Типы TypeScript

Use the request body type in TypeScript.

Ответ

application/json

application/json

application/json

application/json

application/json

application/json

curl -X PATCH "https://example.com/competitions/1/participants/1/" \  -H "Content-Type: application/json" \  -d '{    "status": "approved"  }'
{  "id": 0,  "user_id": 0,  "username": "string",  "email": "user@example.com",  "status": "approved",  "reason": "string",  "invite_link_public_id": "string",  "invite_link_name": "string",  "invite_cohort_name": "string"}