curl https://api.usertour.io/v1/users/usr_123456789?expand=memberships \ -H 'Authorization: Bearer ak_123456789' \ -H 'Content-Type: application/json'
{ "id": "usr_123456789", "object": "user", "attributes": { "name": "John Doe", "email": "john@example.com" }, "memberships": [ { "id": "mem_123456789", "object": "membership", "company_id": "comp_123456789", "role": "admin", "created_at": "2024-03-20T08:30:00.000Z" } ] }
Retrieve company memberships by expanding the memberships field of a user or company object. Direct listing of memberships is not supported.
?expand=memberships
curl https://api.usertour.io/v1/companies/comp_123456789?expand=memberships \ -H 'Authorization: Bearer ak_123456789' \ -H 'Content-Type: application/json'