Skip to content
Connect an agent

Members

Add a member

Lets a person, by email, sign in to Flung and connect apps to this workspace.

POST/v1/members

TL;DR

QuestionAnswer
What does it do?Add a member.
What does it need?An API key or an OAuth access token.
What does it take?A JSON body with the fields below.
What does it return?Status 200 with a body of type Member.
In the SDK?flung.members.add()
What can go wrong?401 Missing, unknown, revoked or expired API key; 403 Only an owner, or an API key, may change members; 422 The request failed validation; 429 Too many requests for this credential; wait for retry-after seconds. Every failure has the same error shape.

What it does

Lets a person, by email, sign in to Flung and connect apps to this workspace. Adding an existing member changes their role.

Example

bash
curl -X POST 'https://api.flung.dev/v1/members' \  --header "Authorization: Bearer $FLUNG_API_KEY" \  --header 'Content-Type: application/json' \  --header "Idempotency-Key: $(uuidgen)" \  --data '{  "email": "sam@example.com"}'

A successful answer looks like this:

json
{  "userId": "usr_aaaaaaaaaaaaaaaaaaaaaaaa",  "email": "string",  "role": "owner",  "createdAt": "2026-11-01T09:00:00.000Z"}

Request body

The body has the type an object, with the fields below.

FieldTypeRequiredDescription
emailstringyesThey sign in with this address; nothing is sent to it now. at most 254 characters.
role"owner" | "member"noowner may add and remove members; both may connect apps to the workspace. default "member".

Responses

StatusMeaningBody
200The member.Member
401Missing, unknown, revoked or expired API key.Error
403Only an owner, or an API key, may change members.Error
422The request failed validation.Error
429Too many requests for this credential; wait for retry-after seconds.Error

Response body

A 200 answer has the type Member.

FieldTypeRequiredDescription
userIdstringyes
emailstringyes
role"owner" | "member"yesowner may add and remove members; both may connect apps to the workspace.
createdAtstringyes

See also

DocWhy
API referenceEvery endpoint
SchemasEvery request and response type
ErrorsEvery error code and what to do about it