DELETE
/
v1
/
company-memberships
curl https://api.usertour.io/v1/company-memberships?userId=user-1746490725519&companyId=group-555555 \
-X DELETE \
-H 'Authorization: Bearer ak_123456789' \
-H 'Content-Type: application/json'
{
  "id": membership_123456789",
  "object": "companyMembership",
  "deleted": true
}

Query parameters

userId
string
required

Unique identifier for the user. Should match the ID the user has in your database.

companyId
string
required

Unique identifier for the group. Should match the ID the group has in your database.

Response

Returns an object with a deleted key on success (or if the user already wasn’t a member of the group - this call is idempotent).

id
string

The unique identifier of the membership.

object
string

String representing the object’s type. Always set to "companyMembership".

deleted
boolean

Indicates the success of the deletion operation. Always true when the request succeeds.

curl https://api.usertour.io/v1/company-memberships?userId=user-1746490725519&companyId=group-555555 \
-X DELETE \
-H 'Authorization: Bearer ak_123456789' \
-H 'Content-Type: application/json'
{
  "id": membership_123456789",
  "object": "companyMembership",
  "deleted": true
}