Sluby
REST APIMembers

Invite new people with a role.

By default the link lets one person join and works for 7 days. `max_uses` lets more people join with it (members only) and `expires_in_days` sets 1, 7 or 30 days. Sluby sends no email: pass the link on yourself.

POST
/api/v1/invites

By default the link lets one person join and works for 7 days. max_uses lets more people join with it (members only) and expires_in_days sets 1, 7 or 30 days. Sluby sends no email: pass the link on yourself.

Authorization

headerAuthorizationBearer <token>

A Sluby API key (sluby_...) sent as Authorization: Bearer <key>. Keys carry scopes: upload, read, manage.

Request Body

application/json
  1. body
role*string
Value in"admin""member"
max_uses?|

How many people may join with the link; null lets anyone join until it expires or is revoked. Anything but 1 needs role: member.

Range1 <= value <= 1000
Default1
expires_in_days?integer

How many days the link works.

Default7
Value in1730

Response Body

The invite, with its link shown only here.

application/json
  1. response
id*string
Formatuuid
url*string

<PUBLIC_URL>/studio/join/<token>. Only shown here, so pass it on now.

role*string
Value in"admin""member"
max_uses*|

How many people may join with it; null lets anyone join until it expires or is revoked.

Range1 <= value <= 1000
uses*integer

How many people joined with it.

Range0 <= value
expires_at*string
Formatdate-time
Example Request
curl -X POST 'https://sluby.example.com/api/v1/invites' \  -H 'Content-Type: application/json' \  -d '{  "role": "admin"}'
Example Response
{  "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",  "url": "string",  "role": "admin",  "max_uses": 1,  "uses": 0,  "expires_at": "2019-08-24T14:15:22Z"}