Transifex API (3.0)

Download OpenAPI specification:Download

Transifex Support: support@transifex.com


Introduction

This API is based on {json:api}.

{json:api} is a specification that follows shared conventions and standards. This specification enables API discoverability and partial self-descriptiveness through conventions. The Json Api specification exposes resources and their relationships representations with unique uris and all CRUD operations are performed on those endpoints. With it's simplified approach it assists the API uniformity.

Read more: https://jsonapi.org/

Additionally, this API is defined using OpenAPI (ex Swagger). This means that you can easily:



Pagination

All list endpoints include pagination to guarantee performant responses. Those endpoints will return next and previous links in the response payload (links section). The client does not have to construct any pagination specific URLs or headers, just follow those links.

Page size is fixed to 150 items per page.



Content Negotiation

The basic media type for the API is application/vnd.api+json. If you want to execute a request that includes data (POST, PATCH, DELETE) you should include this media type in the Content-Type header. The only case where a different Content-Type header will be accepted is for endpoints that can accept file like objects where the media type used should be multipart/form-data.

The base media type this API responds is application/vnd.api+json. To retrieve the data in this media type you should include it in the Accept header. The only case where the server will return another media type is for endpoint that return file like objects. In this case the media type used should be */* and the server will prioritize the negotiation to the media type dictated from the file. Note that application/vnd.api+json will be also available for accept header in these cases and will return a JSON serialized representation of the file.

Read more here: https://jsonapi.org/format/#content-negotiation

File Uploads

There are three different methods for uploading file content to Transifex:

  • Using Content-Type application/vnd.api+json the content must be JSON serializable.
    • For content that is directly JSON serializable you can dump the content of the file directly and set the content_encoding attribute to text.
    • For any content, even if it's not JSON serializable (eg .xlsx, .idml or .docx file extensions), you can encode the file using the base64 encoding and set the content_encoding attribute to base64.
  • Using Content-Type multipart/form-data the content can be any raw file, and can be send without further processing.

Authentication

bearerAuth

To use the API you need to authenticate your requests using Token Authentication. Specifically, you need to

  • Acquire an authentication token from the Transifex (under user settings)
  • Uses the Bearer keyword and prepend the token whan passing the header.

For example, if the authentication token is 1/0b4e75552e481aeae813aebad53f3de3fcc67ccd, then the HTTP header should look like this:

Authorization: Bearer 1/0b4e75552e481aeae813aebad53f3de3fcc67ccd

To create an API token:

  1. Head to your User Settings by going to the main navigation, and clicking on your profile image in the top right corner.

  2. In the left menu, click on API token.

  3. Click Generate a token.

Once you've generated a token, you can edit its name so it's easier to remember where you use the token.

To keep your API token secure, we'll only show it once, so please be sure to save it somewhere secure. In case you lose your API token, you can regenerate a new one at any time. However, when you regenerate a new token, you'll need to update your applications and replace the old token with the new one.

Security Scheme Type HTTP
HTTP Authorization Scheme bearer

Users

Represents Transifex's users.

Get user details

Get the details of the user specified by the required path parameter user_id.

Authorizations:
path Parameters
user_id
required
string^u:[\w-]+$
Example: u:user_1

Format of the user id should be u:username.

Responses

Response samples

Content type
application/vnd.api+json
{
  • "data": {
    }
}

Organizations

Represents Transifex's organizations. Every user can be a member of one or multiple organizations. Only the organizations the authenticated user belongs to will appear here.

List organizations

Get a list of all the Organizations the user belongs to.

Authorizations:
query Parameters
page[cursor]
<