Skip to content

Create workspace invitation

POST
/rest/workspaces/invitations/create
curl --request POST \
--url https://api.shypr.app/rest/workspaces/invitations/create \
--header 'Content-Type: application/json' \
--header 'X-API-KEY: <X-API-KEY>' \
--data '{ "email": "hello@example.com" }'

Creates a WorkspaceInvitation resource.

The new WorkspaceInvitation resource

An invitation to the team of a workspace. An admin sends it to an email address. The person accepts it on the auth host: with a new account, or with the account that already has the address. The invitation goes away when it is accepted or revoked.

Only the hash of the token is in the database, as with the reset token of UserAccount.

object
email
required

More information

string format: email
<= 255 characters

Example generated

{
"email": "hello@example.com"
}

WorkspaceInvitation resource created

An invitation to the team of a workspace. An admin sends it to an email address. The person accepts it on the auth host: with a new account, or with the account that already has the address. The invitation goes away when it is accepted or revoked.

Only the hash of the token is in the database, as with the reset token of UserAccount.

object
email

In lower case, see UserAccount::normalizeEmail().

string
expiresAt
string format: date-time
creator
string format: iri-reference
createdAt
string format: date-time
updatedAt
string | null format: date-time
id

More information

string format: uuid
uid
string
expired
boolean
valid

Nobody joins a deactivated workspace.

boolean

Example

{
"creator": "https://example.com/"
}

Invalid input

A representation of common errors.

object
title

A short, human-readable summary of the problem.

string | null
detail

A human-readable explanation specific to this occurrence of the problem.

string | null
status
integer | null
default: 400
instance

A URI reference that identifies the specific occurrence of the problem. It may or may not yield further information if dereferenced.

string | null
type

A URI reference that identifies the problem type

string

Example

{
"status": 400
}

Forbidden

A representation of common errors.

object
title

A short, human-readable summary of the problem.

string | null
detail

A human-readable explanation specific to this occurrence of the problem.

string | null
status
integer | null
default: 400
instance

A URI reference that identifies the specific occurrence of the problem. It may or may not yield further information if dereferenced.

string | null
type

A URI reference that identifies the problem type

string

Example

{
"status": 400
}

An error occurred

Unprocessable entity

object
status
integer
default: 422
violations
Array<object>
object
propertyPath
required

The property path of the violation

string
message
required

The message associated with the violation

string
code

The code of the violation

string
hint

An extra hint to understand the violation

string
payload

The serialized payload of the violation

object
key
additional properties
any
detail
string
type
string
title
string | null
instance
string | null

Example

{
"status": 422
}