Выпустить ссылку-приглашение
Returns the one-time token and its url. That secret is the product
of this call and is shown ONCE — a host who cannot read it back cannot
distribute the invitation. A link admits anyone who has it; it works
from the moment it is created and may end at expires_at or after
max_redemptions people. Refusals: 422 invite_link_name_required,
invite_link_audience_unsupported (send e-mail invitations from the
Access tab), invite_link_start_unsupported.
Personal tokens only for now: access is managed by a person, so a
competition automation token is refused (401 token_type_not_allowed).
Авторизация
apiToken StackMoreLayers API token. Send as
Authorization: Bearer sml_pat_live_<prefix>.<secret>.
In: header
Параметры пути
Numeric competition identifier.
1 <= valueЗаголовки
Opaque client-generated key. A retry with the same key and body returns the original result instead of repeating the effect.
^[!-~]+$8 <= length <= 128Тело запроса
application/json
Типы TypeScript
Use the request body type in TypeScript.
A name (or cohort_name) is required.
Ответ
application/json
application/json
application/json
application/json
curl -X POST "https://example.com/competitions/1/invite-links/" \ -H "Content-Type: application/json" \ -d '{}'{ "invite_link": { "id": 0, "public_id": "string", "name": "string", "cohort_name": "string", "cohort_group_ref": "string", "status": "active", "role": "viewer", "kind": "link", "audience": { "mode": "anyone", "domains": [ "string" ], "emails": [ "string" ] }, "max_redemptions": 1, "redemptions_count": 0, "is_full": true, "starts_at": "2019-08-24T14:15:22Z", "expires_at": "2019-08-24T14:15:22Z", "created_at": "2019-08-24T14:15:22Z", "revoked_at": "2019-08-24T14:15:22Z", "last_redeemed_at": "2019-08-24T14:15:22Z", "signin_route": "string", "converted_participants": 0 }, "token": "string", "url": "string"}