Harthelm Docs
REST APIMembers

Add a user to a team

Team admins (`team.members`). Adds the user whose verified email is `email`; a user outside the team's organization joins it as `member` first (organization membership before team membership). Mails "you were added" when mail is on. 409 `user-unknown` (invite them instead), `already-member`, `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}/members

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 membership.

application/json
  1. response
user*

A user as member lists show them.

role?TeamRole

The explicit role; absent for an organization owner without a membership of their own.

Value in"admin""member"
inherited_role?TeamRole

The explicit role; absent for an organization owner without a membership of their own.

Value in"admin""member"
created_at*string
Formatdate-time
curl -X POST 'https://console.example.com/api/v1/teams/1/members' \  -H 'Content-Type: application/json' \  -d '{  "email": "[email protected]",  "role": "admin"}'
{  "user": {    "id": 1,    "name": "string",    "email": "string",    "picture_url": "string"  },  "role": "admin",  "inherited_role": "admin",  "created_at": "2019-08-24T14:15:22Z"}