레퍼런스HTTP APIMembers
Invite a person to the workspace
POST
The token is returned once and expires in seven days; only its sha256 is stored. Inviting an address that already has a live invite revokes that invite. An address that is already a live member answers 400. Every invite writes an invite_member receipt.
Auth: cookie session only; no scope. Idempotency-Key: ignored.
cookieSessioncookie
__Host-werft_session<token>For the web console: the browser session cookie set by POST /v1/auth/login. It holds the scopes of the user's workspace role (owner: all; admin and member: all but sessions:recover). Requests other than GET must also send X-Requested-With: werft-web.
X-Requested-With?"werft-web"Required with a cookie session: the literal werft-web.
Value in
"werft-web"application/json- body
email*stringMatch
^(?:[A-Za-z0-9_'+\-]+\.)*[A-Za-z0-9_'+\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$Format
emailLength
length <= 254role*stringValue in
"owner""admin""member"Success
application/json- response
invite_id*stringMatch
^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$Format
uuidinvite_token*stringLength
32 <= length <= 256expires_at*stringMatch
^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z))$Format
date-timecurl -X POST 'https://example.com/v1/invites' \ -H 'Content-Type: application/json' \ -d '{ "email": "user@example.com", "role": "owner"}'Example Response
{ "invite_id": "7218104b-c64c-4f30-a184-1a1802b5c56b", "invite_token": "stringstringstringstringstringst", "expires_at": "2019-08-24T14:15:22Z"}