For Developers

Update Team Member

PATCH https://ed.link/api/v2/teams/:team_id/members/:membership_id

Updates the lifecycle state of a team membership for a caller who is already an active member of the team.

Pending invites: Invitees cannot call this endpoint. Pending invites are inactive memberships, and team-scoped Meta guards reject inactive members. To accept a pending invite, use PATCH /api/v2/memberships/:membership_id with { "state": "active" } (user session token; no :team_id in the path). To decline, use DELETE /api/v2/memberships/:membership_id.

Self-Service Only: Only the authenticated user associated with the membership (membership.user.id) can update their membership state on this path. Moving from active to inactive is rejected. To manage role assignments for a member, use the Create Member Assignment and Delete Member Assignment endpoints.

Permissions

No explicit role permission is required; callers must be authenticated active members of the team and the subject of the membership record.

Parameters

ParameterTypeRequiredDescription
:team_idUUIDYesThe ID of the team.
:membership_idUUIDYesThe ID of the membership record.

Request Body

PropertyTypeRequiredDescription
stateStringYesMembership state (active).

Sample Request

const response = await axios.patch(
    `https://ed.link/api/v2/teams/${team_id}/members/${membership_id}`,
    {
        state: 'active'
    },
    {
        headers: {
            authorization: `Bearer ${user_session_token}`,
            'content-type': 'application/json'
        }
    }
);

Sample Response

{
    "$data": {}
}