POST
/
v1
/
company-memberships
{
  "name": "John Doe",
  "email": "john@example.com",
  "memberships": [
    {
      "company_id": "comp_123456789",
      "role": "admin"
    }
  ]
}

Company memberships are managed indirectly through user operations. To create or update a membership:

  1. Use the create or update a user endpoints
  2. Include the membership details in the memberships field of the user object
  3. The system will automatically handle the membership creation/update

This approach ensures data consistency and maintains proper relationships between users and companies.

{
  "name": "John Doe",
  "email": "john@example.com",
  "memberships": [
    {
      "company_id": "comp_123456789",
      "role": "admin"
    }
  ]
}