Accept or decline a pending membership

PUT/auth/v1/memberships/{orgId}/membership/state

Accepts or declines the authenticated user's pending invitation to the organization. Used from inside the dashboard; the public token flow is /auth/v1/invitations/{token}/accept|decline.

Authorization<token>

In: header

Path Parameters

orgId*string

Organization ID

Request Body

required
application/json
{
  "$ref": "#/components/schemas/internal_auth.membershipStateBody",
  "$ref-value": {
    "properties": {
      "state": {
        "enum": [
          "accepted",
          "declined"
        ],
        "type": "string"
      }
    },
    "required": [
      "state"
    ],
    "type": "object"
  }
}

Response Body

200application/json

OK

type: unknown

{
  "$ref": "#/components/schemas/authv1.MembershipMutation",
  "$ref-value": {
    "properties": {
      "joined_at": {
        "type": "string"
      },
      "org_id": {
        "type": "string"
      },
      "org_name": {
        "type": "string"
      },
      "role": {
        "type": "string"
      },
      "state": {
        "type": "string"
      },
      "user_id": {
        "type": "string"
      }
    },
    "type": "object"
  }
}
curl -X PUT "https://api.rixl.com/auth/v1/memberships/string/membership/state" \
  -H "Content-Type: application/json" \
  -d '{
    "state": "accepted"
  }'

OK

application/json

{
  "$ref": "#/components/schemas/authv1.MembershipMutation",
  "$ref-value": {
    "properties": {
      "joined_at": {
        "type": "string"
      },
      "org_id": {
        "type": "string"
      },
      "org_name": {
        "type": "string"
      },
      "role": {
        "type": "string"
      },
      "state": {
        "type": "string"
      },
      "user_id": {
        "type": "string"
      }
    },
    "type": "object"
  }
}