Team Member API

The TeamMember API is composed of 4 endpoints:

List Team Members

This endpoint is accessible by the Public or Private Organization API key which you can find in your organization settings. It returns informations about your Team:

  • A list of Team members.

The call should be made using a GET request.

/api/organizations/:organization_token/teams/:team_id/members.format [GET]

Where :team_id is the ID of the Team that can be gotten on the Organization API. format is one of xml, json or yaml or csv. Note that you can get a JSONP response by adding a ?callback=yourFunctionName parameter to the json API call.

Parameters:

  • filter: can be one of membership, invitation or blank. Defaults to blank if left blank. Filters the list of team members by invitations or memberships.

Data structure in JSON:

Create Team Member

This endpoint is only accessible by the Private Organization API key which you can find in your organization settings and creates an invitation request to a user in the Team.

The call should be made using a POST request.

/api/organizations/:organization_token/teams/:team_id/members [POST]

Parameters:

  • email: the e-mail address of the person to invite on the project.
  • role: can be one of translator, manager, language_coordinator or observer. Defaults to translator if left blank.
  • proofreader: allows the user to proofread other people’s translations. Can be one of true or false. Defaults to true if left blank.
  • super_proofreader: allows the user to proofread her own translations. Can be one of true or false. Defaults to true if left blank. Can’t be true if proofreader option is set to false.
  • locale: code of the locale to assign the translator or language coordinator to (optional for managers and observers).
  • personal_message: Personal message that will be sent along with the invitation e-mail (optional).
  • name: The name of the person invited. Used in the invitation e-mail. (optional).

If everything goes well, the server should respond with 201 Created in the response headers. The response body should respond a JSON Hash containing the URL to the invitation. The invitation should be immediately available under the “Users” tab of your project.

Response example:

Implementation Example in Ruby:

Implementation Example in PHP:

Remove Team Member or Invitation

This endpoint is only accessible by the private Organization API key and cancels an invitation or removes a Team Member.

/api/organizations/:organization_api_key/teams/:team_id/members/:member_id [DELETE]

If everything goes well, the server should respond with 202 Accepted in the response headers, and nothing in the body.

Implementation Example in Ruby:

Update Team Member or Invitation

This endpoint is only accessible by the private Organization API key and updates a Team Member or a Team Invitation.

/api/projects/:organization_token/teams/:team_id/members/:team_member_id [PUT]

If everything goes well, the server should respond with 202 Accepted in the response headers. The body should contain a JSON representation of the team member. If the membership fails to be approved a JSON reprentation of the error will be returned in the body.

Optional parameters:

  • locale: code of the locale to assign the user to.
  • proofreader: sets or unsets proofreading rights to the member. If set to true the user will be able to proofread other people’s translations. Can be one of true or false. Defaults to whatever value was set by the membership if left blank.
  • super_proofreader: sets or unsets super proofreading rights to the member. If set to true the user will be able to proofread her own translations. Can be one of true or false. Defaults to whatever value was set by the membership if left blank.

Example response

Success:

Failure:

Implementation Example in Ruby: