Create member

Add a member to a team.

Endpoint

POST /api/v1/teams/{team_slug}/members

Request

JSON body: username, role (owner or member).

Usage

curl \
  --request POST \
  --header "Authorization: Bearer $PEARING_API_TOKEN" \
  --header "Content-Type: application/json" \
  --data '{"username": "alice", "role": "member"}' \
  "$PEARING_API_URL/v1/teams/platform/members"

Success

201 Created with team member detail. The user_email field is only present on these gated member/staff surfaces.

{
  "user_username": "alice",
  "user_email": "<private>",
  "role": "member"
}

Errors

  • 404 Not Found when team or user does not exist.
  • 409 Conflict when user is already a member.

Common auth errors are documented on the API overview page.