Help
Collaboration API
The Collaboration API is composed of 1 endpoint:
🔗Delete Collaboration
This endpoint is accessible by the read-write Organization API key which you can find in your organization settings. It allows you to delete a collaborator from your organization by passing the e-mail address of the person to remove from the Organization.
Deleting a collaboration does the following:
- it removes the user from the organization,
- it removes any project memberships,
- it cancels any unaccepted invitations on your organization’s projects,
- it removes any team memberships,
- it cancels any unaccepted invitations on your organization’s teams.
The user will no longer be able to access the Organization’s projects and teams and won’t be able to accept pending invitations. Note that it doesn’t delete the User account, as a user account is personal and may be used on different organizations.
The call should be made using a DELETE
request.
/api/organizations/:organization_token/collaborations?email=name@email.com [DELETE]
An email
parameter must be passed containing the e-mail address of the collaborator to remove.
If everything goes well, the API should respond with a 200 OK
HTTP response code. If we encounter an error deleting the collaboration, the API should respond with a 404 Not Found
HTTP status and a JSON Hash containing the error message:
email parameter not found.
: an error message if theemail
parameter containing the collaborator’s email address wasn’t passed.Couldn't find this collaborator on that organization.
: an error message if we couldn’t encounter this user in your organization,Failed to delete enrollment.
: a generic error message if we encountered a problem deleting the collaborator.
🔗Implementation Example in Ruby:
require 'net/http'
uri = URI('https://webtranslateit.com/api/organizations/:readwrite_organization_token/collaborations?email=bob@doughnuts.com')
http = Net::HTTP.new(uri.host, uri.port)
req = Net::HTTP::Delete.new(uri.path)
res = http.request(req)