Skip to content

Invite a person

POST
/api/settings/invitations
curl --request POST \
--url https://forge.example.com/api/settings/invitations \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "email": "example", "role": "example" }'

Answers the invitation link, once: only its token’s sha256 is kept. The link works once, for seven days unless the instance is set otherwise. For administrators.

Media typeapplication/json
object
email
required
string
role
required
string

Example generated

{
"email": "example",
"role": "example"
}

OK

Media typeapplication/json
object
invitation
required
object
id
required
string format: uuid
email
required
string
role
required
string
status
required
string
createdAt
required
string format: date-time
expiresAt
required
string format: date-time
link
required
string
emailed
boolean

Example

{
"emailed": false
}

A refusal or an error, as a problem document. A model or draft you may not see answers 404, as one that does not exist.

Media typeapplication/problem+json
object
type
string
title
string
status
integer
detail
string
instance
string

Example generated

{
"type": "example",
"title": "example",
"status": 1,
"detail": "example",
"instance": "example"
}