Harthelm Docs
REST APIMembers

Add a user to an organization

Organization owners (`org.members`). Adds the user whose verified email is `email` and mails them "you were added" when mail is on. 409 `user-unknown` when nobody with that verified email has signed in yet (invite them instead), `already-member`. 429 when the caller is over the per-sender mail limit.

Generated from openapi/harthelm.yaml at v1.5.0
POST
/orgs/{org}/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

org*string
Formatuuid

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*OrgRole
Value in"owner""member"

Response Body

The membership.

application/json
  1. response
user*

A user as member lists show them.

role*OrgRole
Value in"owner""member"
created_at*string
Formatdate-time
curl -X POST 'https://console.example.com/api/v1/orgs/497f6eca-6276-4993-bfeb-53cbbbba6f08/members' \  -H 'Content-Type: application/json' \  -d '{  "email": "[email protected]",  "role": "owner"}'
{  "user": {    "id": 1,    "name": "string",    "email": "string",    "picture_url": "string"  },  "role": "owner",  "created_at": "2019-08-24T14:15:22Z"}