Skip to main content
POST/companies-by-id/:custom_id/remove_member/

Company remove member by id

You can remove an employee (a user) added to the company using a custom_id of the company.

Attributes

Optional unless marked required

custom_idstringrequired
The unique identifier for the company which is provided by the client.
user_idintegerone of
A unique identifier for the user which is given by User automatically. Send this or user_custom_id.
user_custom_idstringone of
A unique identifier for the user which is provided by the client. Send this or user_id.

Send one of user_id and user_custom_id to point at the contact.

Request​

curl -X POST "https://<your_app_subdomain>.user.com/api/public/companies-by-id/:custom_id/remove_member/" \
-H "Authorization: Token <your_64_char_api_key>" \
-H "Accept: */*; version=2" \
-H "Content-Type: application/json" \
-d '{
"user_custom_id": "jane-doe"
}'

Response examples​

No response body.

When the contact can't be removed, the response is 400 with "success": false and one of these messages:

MessageWhen
User with id 123 is not a member of the companyThe contact isn't a member of this company, or no contact has that user_id.
User with id None is not a member of the companyThe body has neither user_id nor user_custom_id, or no contact has that user_custom_id.
note

Errors that can come from any endpoint (401, 429, 500, 502, 504) are described in HTTP response codes.