Harthelm Docs
REST APIInvites

Invite someone to a team

Team admins (`team.members`); role `admin` or `member`. Accepting it makes the invitee a member of the organization first. The answer carries the link once (`url`, to copy when mail is off). 409 `already-member`, `already-invited`, `team-deleting`; 429 when the caller is over the per-sender mail limit.

Generated from openapi/harthelm.yaml at v1.5.0
POST
/teams/{team}/invites

Authorization

cookie__Host-harthelm_session<token>

Browser session of the UI (12 h idle, 7 days absolute). State-changing requests also need the header Harthelm-CSRF: 1 and a matching Origin.

Path Parameters

team*integer

Numeric resource id.

Formatint64
Range1 <= value

Header Parameters

Idempotency-Key?string

Client-chosen key (at most 255 characters); a repeated key returns the first result for 24 h.

Length1 <= length <= 255

Request Body

application/json
  1. body
email*Email
Formatemail
Lengthlength <= 254
role*TeamRole
Value in"admin""member"

Response Body

The invitation with its link.

application/json
  1. response
id*string
Formatuuid
email*string
org_id*string
Formatuuid
org_name?string
team_id?ID

Absent for an organization invitation.

Formatint64
Range1 <= value
team_name?string
role*string

owner or member for an organization invitation, admin or member for a team invitation.

Value in"owner""admin""member"
invited_by?

A user as member lists show them.

state*InviteState
Value in"pending""accepted""revoked""expired"
mail*InviteMailState

off: mail is not configured, copy the link instead.

Value in"off""queued""sent""failed"
created_at*string
Formatdate-time
expires_at*string
Formatdate-time
accepted_at?string
Formatdate-time
url*string

The invitation link (<console>/invite/<token>), returned only here.

curl -X POST 'https://console.example.com/api/v1/teams/1/invites' \  -H 'Content-Type: application/json' \  -d '{  "email": "[email protected]",  "role": "admin"}'
{  "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",  "email": "string",  "org_id": "a40f5d1f-d889-42e9-94ea-b9b33585fc6b",  "org_name": "string",  "team_id": 1,  "team_name": "string",  "role": "owner",  "invited_by": {    "id": 1,    "name": "string",    "email": "string",    "picture_url": "string"  },  "state": "pending",  "mail": "off",  "created_at": "2019-08-24T14:15:22Z",  "expires_at": "2019-08-24T14:15:22Z",  "accepted_at": "2019-08-24T14:15:22Z",  "url": "string"}