Members API

Remove a member from your group through the Heylo API, using the ID the member has in your own system.

The API is included on the Business plan. See plans.

Member removal through the Heylo API takes a person out of your group when they leave your own system, so the two member lists stay in step. Removal finds the person by the ID they have in your system, not by their Heylo user ID.

Operations

  • Remove a member: POST https://api.heylo.com/apiv1-remove with type set to "member"

Remove a member

Removes a member from a group and cancels any pending invite for the same person. Member removal does not need write access on the key.

Removal only finds members whose ID from your system was attached when the Heylo team imported them. Members who joined any other way cannot be removed through the API.

POST https://api.heylo.com/apiv1-remove

Parameters

  • communityId (string, required): the group ID.
  • type (string, required): "member".
  • userId (string, required): the member's ID in your system.

Returns

The text ok, not a JSON body. The response is the same when no member or invite matched the ID, so a repeated removal is safe.

bash
curl -X POST https://api.heylo.com/apiv1-remove \
  -H "Authorization: Bearer HEYLO_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "communityId": "HEYLO_GROUP_ID",
    "type": "member",
    "userId": "YOUR_MEMBER_ID"
  }'
code
ok

Errors for member removal

Member removal returns its 400 and 403 errors as plain text, not as a JSON body.

  • 400: communityId or userId is missing. The body is the text missing communityId or userId.
  • 403: the key does not cover this group. The body is the text permission denied.

To remove a member who was not imported with an ID from your system, an admin can remove the member in Heylo.

Related articles

Still need help?

Contact us and we typically reply within one business day. Or message us in Heylo Support chat.