Skip to content

Make an invite code (admin)

POST
/api/v1/invites
curl --request POST \
--url https://example.com/api/v1/invites \
--header 'Content-Type: application/json' \
--data '{ "label": "", "max_uses": 1, "role": "viewer", "ttl_hours": 1 }'

The code is returned once and is not stored in a form that can be shown again.

Media typeapplication/json
InviteCreate

A new invite code.

object
label
Label
string
"" <= 80 characters
max_uses
Any of:
integer
>= 1 <= 10000
role
Role

Authorization level of the caller, ordered viewer < reviewer < admin.

string
default: reviewer
Allowed values: viewer reviewer admin
ttl_hours
Any of:
integer
>= 1 <= 8760

Successful Response

Media typeapplication/json
InviteCreated

The new invite and its code, which is not stored and cannot be shown again.

object
code
required
Code
string
invite
required
InviteOut

An invite code as listed. The code itself is shown once, when it is made.

object
created_at
required
Created At
string format: date-time
created_by
Any of:
string
expires_at
Any of:
string format: date-time
id
required
Id
string format: uuid
label
required
Label
string
max_uses
Any of:
integer
revoked_at
Any of:
string format: date-time
role
required
Role

Authorization level of the caller, ordered viewer < reviewer < admin.

string
Allowed values: viewer reviewer admin
status
required
Status
string
Allowed values: active expired revoked spent
use_count
required
Use Count
integer

Example

{
"invite": {
"role": "viewer",
"status": "active"
}
}

Unauthorized

Problem

Application/problem+json body. Extension members (for example job_id) are allowed.

object
detail
Any of:
string
errors
Any of:
Array<object>
FieldError

One validation failure: where, what, and a stable machine code (never the input value).

object
loc
required
Loc
Array
msg
required
Msg
string
type
required
Type
string
instance
Any of:
string
request_id
required
Request Id
string
status
required
Status
integer
title
required
Title
string
type
Type
string
default: about:blank
key
additional properties
any

Example

{
"type": "about:blank"
}

Forbidden

Problem

Application/problem+json body. Extension members (for example job_id) are allowed.

object
detail
Any of:
string
errors
Any of:
Array<object>
FieldError

One validation failure: where, what, and a stable machine code (never the input value).

object
loc
required
Loc
Array
msg
required
Msg
string
type
required
Type
string
instance
Any of:
string
request_id
required
Request Id
string
status
required
Status
integer
title
required
Title
string
type
Type
string
default: about:blank
key
additional properties
any

Example

{
"type": "about:blank"
}

Unprocessable Content

Problem

Application/problem+json body. Extension members (for example job_id) are allowed.

object
detail
Any of:
string
errors
Any of:
Array<object>
FieldError

One validation failure: where, what, and a stable machine code (never the input value).

object
loc
required
Loc
Array
msg
required
Msg
string
type
required
Type
string
instance
Any of:
string
request_id
required
Request Id
string
status
required
Status
integer
title
required
Title
string
type
Type
string
default: about:blank
key
additional properties
any

Example

{
"type": "about:blank"
}

Map data © OpenStreetMap contributors, under the Open Database Licence. Code under the Apache-2.0 licence. Made by Yogesh.

Changeset Second Opinion is an independent open source tool for OpenStreetMap reviewers. It is not endorsed by, sponsored by or affiliated with the OpenStreetMap Foundation. OpenStreetMap is a trademark of the OpenStreetMap Foundation, used under itstrademark policy.