Getting started

The Lokalise API v2 is built around REST. The API has resource-oriented URLs, and uses HTTP response codes to indicate API errors.

JSON is returned by all API responses, including errors.

There is Lokalise CLI v2 acting as a wrapper for all endpoints. You can download a precompiled binary for different platforms.

Client libraries
Authentication

Authenticate your account by providing your API token as a request header X-Api-Token. The token can be generated under your Personal profile - API Tokens. A user must have an Admin role in the project in order to access the project with the supplied token.

All API requests must be made over HTTPS. Calls made over plain HTTP will fail. API requests without authentication will also fail.

  • Request 200

    • Headers

        X-Api-Token: f4d3f29bf893dc3583e9970735e08de094e82b0
Pagination

All top-level API resources have support for bulk fetches via List API methods. For instance, you can list languages, contributors or translations.

These list API methods share a common structure, taking at least these two parameters: limit and page.

The limit default is 100, max 5000 and page default is 1.

Each List method includes an X-Pagination-Total-Count header with a total number of available entries and X-Pagination-Page-Count header with a total number of pages available.

Rate limits

We do not rate-limit requests to our API, however retain a right to decline the service in case of excessive use. Only one concurrent request per token is allowed. To ensure data consistency, it is not recommended to access the same project simultaneously using multiple tokens.

Branching

If you are using project branching feature in Lokalise, simply add branch name separated by semicolon to the project ID in any endpoint to access the branch, i.e. 3002780358964f9bab5a92.87762498:feature/new-release.

Branches
The Branche object
Attributes
  • branch_id
    number
    A unique identifier of the branch.
  • name
    string
    Branch name.
  • created_at
    string
    Date of branch creation.
  • created_at_timestamp
    number
    Unix timestamp when branch was created.
  • created_by
    number
    An identifier of a user who has created the branch.
  • created_by_email
    string
    An e-mail of a user who has created the branch.
List all branches

Retrieves a list of branches.

Url Parameters
  • limit
    string
    Default: 100
    Number of items to include (max 5000).
  • page
    string
    Default: 1
    Return results starting from this page.
Definition
GET https://api.lokalise.com/api2/projects/{project_id}/branches
Example request
curl --request GET \
--url https://api.lokalise.com/api2/projects/{project_id}/branches \ --header 'x-api-token: f4d3f29bf893dc3583e9970735e08de094e82b0'
Example response
{
    "project_id": "20008339586cded200e0d8.29879849",
    "branches": [
        {
            "branch_id": 1234,
            "name": "feature/best-web",
            "created_at": "2019-10-01 14:16:00 (Etc/UTC)",
            "created_at_timestamp": 1567001760,
            "created_by": 1123,
            "created_by_email": "john@lokalise.com"
        },
        {
            "branch_id": 5678,
            "name": "hotfix/error1",
            "created_at": "2019-10-02 14:15:50 (Etc/UTC)",
            "created_at_timestamp": 1567001750,
            "created_by": 1123,
            "created_by_email": "john@lokalise.com"
        }
    ]
}
Retrieve a branch

Retrieves a Branch object.

Definition
GET https://api.lokalise.com/api2/projects/{project_id}/branches/{branch_id}
Example request
curl --request GET \
--url https://api.lokalise.com/api2/projects/{project_id}/branches/{branch_id} \ --header 'x-api-token: f4d3f29bf893dc3583e9970735e08de094e82b0'
Example response
{
    "project_id": "600904245c4ecf0ec4a9d4.28360690",
    "branch": {
        "branch_id": 5678,
        "name": "hotfix/error1",
        "created_at": "2019-10-02 14:15:50 (Etc/UTC)",
        "created_at_timestamp": 1567001750,
        "created_by": 1123,
        "created_by_email": "john@lokalise.com"
    }
}
Create a branch

Creates a branch in the project. Requires admin right.

Attributes
  • name
    string
    Branch name.
Definition
POST https://api.lokalise.com/api2/projects/{project_id}/branches
Example request body
{
    "name": "hotfix/really-important"
}
Example request
curl --request POST \
--url https://api.lokalise.com/api2/projects/{project_id}/branches \ --header 'content-type: application/json' \
--header 'x-api-token: f4d3f29bf893dc3583e9970735e08de094e82b0' \
--data '{"name":"hotfix/really-important"}'
Example response
{
    "project_id": "3002780358964f9bab5a92.87762498",
    "branch": {
        "branch_id": 995991,
        "name": "hotfix/really-important",
        "created_at": "2019-10-03 14:15:50 (Etc/UTC)",
        "created_at_timestamp": 1567001750,
        "created_by": 1123,
        "created_by_email": "john@lokalise.com"
    }
}
Update a branch

Updates a branch in the project. Requires admin right.

Attributes
  • name
    string
    Branch name.
Definition
PUT https://api.lokalise.com/api2/projects/{project_id}/branches/{branch_id}
Example request body
{
    "name": "hotfix/needed-yesterday"
}
Example request
curl --request PUT \
--url https://api.lokalise.com/api2/projects/{project_id}/branches/{branch_id} \ --header 'content-type: application/json' \
--header 'x-api-token: f4d3f29bf893dc3583e9970735e08de094e82b0' \
--data '{"name":"hotfix/needed-yesterday"}'
Example response
{
    "project_id": "3002780358964f9bab5a92.87762498",
    "branch": {
        "branch_id": 995991,
        "name": "hotfix/needed-yesterday",
        "created_at": "2019-10-03 14:15:50 (Etc/UTC)",
        "created_at_timestamp": 1567001750,
        "created_by": 1123,
        "created_by_email": "john@lokalise.com"
    }
}
Delete a branch

Deletes a configured branch in the project. Requires admin right.

Definition
DELETE https://api.lokalise.com/api2/projects/{project_id}/branches/{branch_id}
Example request
curl --request DELETE \
--url https://api.lokalise.com/api2/projects/{project_id}/branches/{branch_id}
Example response
{
    "project_id": "3002780358964f9bab5a92.87762498",
    "branch_deleted": true
}
Merge a branch

Merges a branch in the project. Requires admin right.

Attributes
  • force_conflict_resolve_using
    string
    In case of conflicts you must specify how to resolve then. Values master or branch.
Definition
POST https://api.lokalise.com/api2/projects/{project_id}/branches/{branch_id}/merge
Example request body
{
    "force_conflict_resolve_using": "master"
}
Example request
curl --request POST \
--url https://api.lokalise.com/api2/projects/{project_id}/branches/{branch_id}/merge \ --header 'content-type: application/json' \
--header 'x-api-token: f4d3f29bf893dc3583e9970735e08de094e82b0' \
--data '{"force_conflict_resolve_using":"master"}'
Example response
{
    "project_id": "3002780358964f9bab5a92.87762498",
    "branch_merged": true,
    "branch": {
        "branch_id": 995991,
        "name": "hotfix/needed-yesterday",
        "created_at": "2019-10-03 14:15:50 (Etc/UTC)",
        "created_at_timestamp": 1567001750,
        "created_by": 1123,
        "created_by_email": "john@lokalise.com"
    }
}
Comments

Comments can be used to give translators a context about the key, or as a discussion about certain aspects of translation for the key. There is a separate comments thread for each key. All comments are cross-posted into project chat.

The Comment object
Attributes
  • comment_id
    number
    A unique identifier of the comment.
  • key_id
    number
    Identifier of a key, the comment is attached to.
  • comment
    string
    The comment.
  • added_by
    number
    Identifier of a user, who has left the comment.
  • added_by_email
    string
    E-mail of a user, who has left the comment.
  • added_at
    string
    Date and time the comment was added.
  • added_at_timestamp
    number
    Unix timestamp the comment was added.
List project comments

Retrieves a list of all comments in the project.

Url Parameters
  • limit
    string
    Default: 100
    Number of items to include (max 5000).
  • page
    string
    Default: 1
    Return results starting from this page.
Definition
GET https://api.lokalise.com/api2/projects/{project_id:branch}/comments
Example request
curl --request GET \
--url 'https://api.lokalise.com/api2/projects/{project_id:branch}/comments?limit={limit}&page={page}' \
--header 'x-api-token: f4d3f29bf893dc3583e9970735e08de094e82b0'
Example response
{
    "project_id": "3002780358964f9bab5a92.87762498",
    "comments": [
        {
            "comment_id": 44444,
            "key_id": 12345,
            "comment": "Hello, world!",
            "added_by": 420,
            "added_by_email": "commenter@mycompany.com",
            "added_at": "2018-12-31 12:00:00 (Etc\/UTC)",
            "added_at_timestamp": 1546257600
        },
        {
            "comment_id": 44445,
            "key_id": 12346,
            "comment": "Bye, world!",
            "added_by": 420,
            "added_by_email": "commenter@mycompany.com",
            "added_at": "2018-12-31 12:00:00 (Etc\/UTC)",
            "added_at_timestamp": 1546257600
        }                    
    ]
}
List key comments

Retrieves a list of all comments for a key.

Url Parameters
  • limit
    string
    Default: 100
    Number of items to include (max 5000).
  • page
    string
    Default: 1
    Return results starting from this page.
Definition
GET https://api.lokalise.com/api2/projects/{project_id:branch}/keys/{key_id}/comments
Example request
curl --request GET \
--url 'https://api.lokalise.com/api2/projects/{project_id:branch}/keys/{key_id}/comments?limit={limit}&page={page}' \
--header 'x-api-token: f4d3f29bf893dc3583e9970735e08de094e82b0'
Example response
{
    "project_id": "3002780358964f9bab5a92.87762498",
    "comments": [
        {
            "comment_id": 44444,
            "key_id": 12345,
            "comment": "Hello, world!",
            "added_by": 420,
            "added_by_email": "commenter@mycompany.com",
            "added_at": "2018-12-31 12:00:00 (Etc\/UTC)",
            "added_at_timestamp": 1546257600
        },
        {
            "comment_id": 44445,
            "key_id": 12345,
            "comment": "Bye, world!",
            "added_by": 420,
            "added_by_email": "commenter@mycompany.com",
            "added_at": "2018-12-31 12:00:00 (Etc\/UTC)",
            "added_at_timestamp": 1546257600
        }                    
    ]
}
Create comments

Adds a set of comments to the key.

Attributes
  • comment
    stringRequired
    The comment to add.
Definition
POST https://api.lokalise.com/api2/projects/{project_id:branch}/keys/{key_id}/comments
Example request body
{
    "comments": [
        {
            "comment": "This is a test."
        },
        {
            "comment": "Adding multiple comments."
        }
    ]
}
Example request
curl --request POST \
--url https://api.lokalise.com/api2/projects/{project_id:branch}/keys/{key_id}/comments \ --header 'content-type: application/json' \
--header 'x-api-token: f4d3f29bf893dc3583e9970735e08de094e82b0' \
--data '{"comments":[{"comment":"This is a test."},{"comment":"Adding multiple comments."}]}'
Example response
{
    "project_id": "3002780358964f9bab5a92.87762498",
    "comments": [
        {
            "comment_id": 44444,
            "key_id": 12345,
            "comment": "This is a test.",
            "added_by": 420,
            "added_by_email": "commenter@mycompany.com",
            "added_at": "2018-12-31 12:00:00 (Etc\/UTC)",
            "added_at_timestamp": 1546257600
        },
        {
            "comment_id": 44445,
            "key_id": 12345,
            "comment": "Adding multiple comments.",
            "added_by": 420,
            "added_by_email": "commenter@mycompany.com",
            "added_at": "2018-12-31 12:00:00 (Etc\/UTC)",
            "added_at_timestamp": 1546257600
        }
    ]
}
Retrieve a comment

Retrieves a Comment object.

Definition
GET https://api.lokalise.com/api2/projects/{project_id:branch}/keys/{key_id}/comments/{comment_id}
Example request
curl --request GET \
--url https://api.lokalise.com/api2/projects/{project_id:branch}/keys/{key_id}/comments/{comment_id} \ --header 'x-api-token: f4d3f29bf893dc3583e9970735e08de094e82b0'
Example response
{
    "project_id": "3002780358964f9bab5a92.87762498",
    "comment": {
        "comment_id": 44444,
        "key_id": 12345,
        "comment": "This is a test.",
        "added_by": 420,
        "added_by_email": "commenter@mycompany.com",
        "added_at": "2018-12-31 12:00:00 (Etc\/UTC)",
        "added_at_timestamp": 1546257600
    }
}
Delete a comment

Deletes a comment from the project. Authenticated user can only delete own comments.

Definition
DELETE https://api.lokalise.com/api2/projects/{project_id:branch}/keys/{key_id}/comments/{comment_id}
Example request
curl --request DELETE \
--url https://api.lokalise.com/api2/projects/{project_id:branch}/keys/{key_id}/comments/{comment_id} \ --header 'x-api-token: f4d3f29bf893dc3583e9970735e08de094e82b0'
Example response
{
    "project_id": "3002780358964f9bab5a92.87762498",
    "comment_deleted": true,
}
Contributors

You may add unlimited number of contributors to your project. User roles include admin, translator and reviewer. Learn more.

The Contributor object
Attributes
  • user_id
    number
    A unique identifier of the user.
  • email
    string
    E-mail associated with this user.
  • fullname
    string
    Full name as set by the user.
  • created_at
    string
    Date/time at which the user was created.
  • created_at_timestamp
    number
    Unix timestamp when the user was created.
  • is_admin
    boolean
    Whether the user has Admin access to the project.
  • is_reviewer
    boolean
    Wheter the user has Reviewer access to the project.
  • languages
    object
    List of languages, accessible to the user.
    Expand attributesClose attributes
    • lang_id
      number
      Language ID.
    • lang_iso
      string
      Language code.
    • lang_name
      string
      Language name.
    • is_writable
      boolean
      Whether the user has write access to the language.
  • admin_rights
    array
    List of user permissions.
List all contributors

Lists contributors of the project, including access levels to the project languages. Admins always have read/write access to all languages.

Url Parameters
  • limit
    string
    Default: 100
    Number of items to include (max 5000).
  • page
    string
    Default: 1
    Return results starting from this page.
Definition
GET https://api.lokalise.com/api2/projects/{project_id:branch}/contributors
Example request
curl --request GET \
--url 'https://api.lokalise.com/api2/projects/{project_id:branch}/contributors?limit={limit}&page={page}' \
--header 'x-api-token: f4d3f29bf893dc3583e9970735e08de094e82b0'
Example response
{
    "project_id": "3002780358964f9bab5a92.87762498",
    "contributors": [
        {
            "user_id": 420,
            "email": "johndoe@mycompany.com",
            "fullname": "John Doe",
            "created_at": "2018-01-01 12:00:00 (Etc\/UTC)",
            "created_at_timestamp": 1546257600,
            "is_admin": true,
            "is_reviewer": true,
            "languages": [
                {
                    "lang_id": 640,
                    "lang_iso": "en",
                    "lang_name": "English",
                    "is_writable": 1
                },
                {
                    "lang_id": 597,
                    "lang_iso": "ru",
                    "lang_name": "Russian",
                    "is_writable": 1
                }
            ],
            "admin_rights": [
                "keys", "languages"
            ]
        }
    ]
}
Create contributors

Creates one or more contributors in the project. Requires Manage contributors admin right.

If is_admin flag is set to true, the user would automatically get access to all project languages, overriding supplied languages object. Attribute fullname will be ignored, if the user has already been registered in Lokalise.

Attributes
  • email
    stringRequired
    E-mail.
  • fullname
    string
    Full name (only valid for inviting users, who previously did not have an account in Lokalise).
  • is_admin
    boolean
    Whether the user has Admin access to the project.
  • is_reviewer
    boolean
    Whether the user has Reviewer access to the project.
  • languages
    objectRequired
    List of languages, accessible to the user. Required if is_admin is set to false.
    Expand attributesClose attributes
    • lang_iso
      stringRequired
      Language code.
    • is_writable
      boolean
      Whether the user has write access to the language.
  • admin_rights
    array
    Custom list of user permissions. Possible values are upload, activity, download, settings, statistics, keys, screenshots, contributors, languages. Omitted or empty parameter will set default admin rights for user role.
Definition
POST https://api.lokalise.com/api2/projects/{project_id:branch}/contributors
Example request body
{
    "contributors": [
        {
            "email": "translator@mycompany.com",
            "fullname": "Mr. Translator",
            "is_admin": false,
            "is_reviewer": true,
            "languages": [
                {
                    "lang_iso": "en",
                    "is_writable": false
                },
                {
                    "lang_iso": "ru",
                    "is_writable": true
                }
            ]
        }
    ]
}
Example request
curl --request POST \
--url https://api.lokalise.com/api2/projects/{project_id:branch}/contributors \ --header 'content-type: application/json' \
--header 'x-api-token: f4d3f29bf893dc3583e9970735e08de094e82b0' \
--data '{"contributors":[{"email":"translator@mycompany.com","fullname":"Mr. Translator","is_admin":false,"is_reviewer":true,"languages":[{"lang_iso":"en","is_writable":false},{"lang_iso":"ru","is_writable":true}]}]}'
Example response
{
    "project_id": "3002780358964f9bab5a92.87762498",
    "contributor": {
        "user_id": 421,
        "email": "translator@mycompany.com",
        "fullname": "Mr. Translator",
        "is_admin": false,
        "is_reviwer": true,
        "languages": [
            {
                "lang_iso": "en",
                "is_writable": false
            },
            {
                "lang_iso": "ru",
                "is_writable": true
            }
        ],
        "admin_rights": [
        ]
    }
}
Retrieve a contributor

Retrieves a Contributor object.

Definition
GET https://api.lokalise.com/api2/projects/{project_id:branch}/contributors/{contributor_id}
Example request
curl --request GET \
--url https://api.lokalise.com/api2/projects/{project_id:branch}/contributors/{contributor_id} \ --header 'x-api-token: f4d3f29bf893dc3583e9970735e08de094e82b0'
Example response
{
    "project_id": "3002780358964f9bab5a92.87762498",
    "contributor": {
        "user_id": 421,
        "email": "translator@mycompany.com",
        "fullname": "Mr. Translator",
        "is_admin": false,
        "is_reviwer": true,
        "languages": [
            {
                "lang_iso": "en",
                "is_writable": false
            },
            {
                "lang_iso": "ru",
                "is_writable": true
            }
        ],
        "admin_rights": [
            "keys", "languages"
        ]
    }
}
Update a contributor

Updates the properties of a contributor. Requires Manage contributors admin right.

If you want to give an existing contributor access to a new language, you must specify full languages array, including the previously added languages as well.

Attributes
  • is_admin
    boolean
    Whether the user has Admin access to the project.
  • is_reviewer
    boolean
    Whether the user has Reviewer access to the project.
  • languages
    object
     List of languages, accessible to the user.
    Expand attributesClose attributes
    • lang_iso
      string
      Language code.
    • is_writable
      boolean
      Whether the user has write access to the language.
  • admin_rights
    array
    Custom list of user permissions. Possible values are upload, activity, download, settings, statistics, keys, screenshots, contributors, languages. Empty parameter will set default admin rights for user role.
Definition
PUT https://api.lokalise.com/api2/projects/{project_id:branch}/contributors/{contributor_id}
Example request body
{
    "is_admin": true
}
Example request
curl --request PUT \
--url https://api.lokalise.com/api2/projects/{project_id:branch}/contributors/{contributor_id} \ --header 'content-type: application/json' \
--header 'x-api-token: f4d3f29bf893dc3583e9970735e08de094e82b0' \
--data '{"is_admin":true}'
Example response
{
    "project_id": "3002780358964f9bab5a92.87762498",
    "contributor": {
        "user_id": 421,
        "email": "translator@mycompany.com",
        "fullname": "Mr. Translator",
        "is_admin": true,
        "is_reviwer": true,
        "languages": [
            {
                "lang_iso": "en",
                "is_writable": true
            },
            {
                "lang_iso": "ru",
                "is_writable": true
            }
        ],
        "admin_rights": [
            "keys", "languages"
        ]
    }
}
Delete a contributor

Deletes a user from the project. Requires Manage contributors admin right.

Definition
DELETE https://api.lokalise.com/api2/projects/{project_id:branch}/contributors/{contributor_id}
Example request
curl --request DELETE \
--url https://api.lokalise.com/api2/projects/{project_id:branch}/contributors/{contributor_id} \ --header 'x-api-token: f4d3f29bf893dc3583e9970735e08de094e82b0'
Example response
{
    "project_id": "3002780358964f9bab5a92.87762498",
    "contributor_deleted": true
}
Files

Lokalise is project-oriented translation management system, which means we store all keys and translations in the database and can generate files in any format you require. Assigning a key to one or more platforms means including the key in the export routine for file formats, associated with this platform, e.g. if a key is assigned to iOS platform it would get included with strings and xliff format exports. In addition to assign keys to platforms you may assign keys to files and have different filename depending on the platform.

Most popular iOS, Android and Web language file formats are supported.

The File object
Attributes
  • filename
    string
    File name.
  • key_count
    number
    Total number of keys, associated with this file.
List all files

Lists project files and associated key count. If there are some keys in the project that do not have a file association, they will be returned with filename __unassigned__.

Url Parameters
  • filter_filename
    string
    Set filename filter for the list.
  • limit
    string
    Default: 100
    Number of items to include (max 5000).
  • page
    string
    Default: 1
    Return results starting from this page.
Definition
GET https://api.lokalise.com/api2/projects/{project_id:branch}/files
Example request
curl --request GET \
--url 'https://api.lokalise.com/api2/projects/{project_id:branch}/files?filter_filename={filter_filename}&limit={limit}&page={page}' \
--header 'x-api-token: f4d3f29bf893dc3583e9970735e08de094e82b0'
Example response
{
    "project_id": "3002780358964f9bab5a92.87762498",
    "files": [
        {
            "filename": "index.json",
            "key_count": 441
        },
        {
            "filename": "admin.json",
            "key_count": 32
        },
        {
            "filename": "__unassigned__",
            "key_count": 11
        }

    ]
}
Upload a file

Imports a localization file to the project. Learn more. Requires Upload files admin right. Supported file types.

Attributes
  • data
    stringRequired
    Base64 encoded file. Must be one of the supported file types.
  • filename
    stringRequired
    Set the filename. You may optionally use a relative path in the filename (e.g admin/main.json), however keep in mind that path would become a unique part of the file.
  • lang_iso
    stringRequired
    Language code of the translations in the file you are importing.
  • convert_placeholders
    boolean
    Default: true
    Enable to automatically convert placeholders to the Lokalise universal placeholders.
  • detect_icu_plurals
    boolean
    Enable to automatically detect and parse ICU formatted plurals in your translations.
  • tags
    array
    Tag keys with the specified tags. By default tags are applied to created and updated keys.
  • tag_inserted_keys
    boolean
    Default: true
    Add specified tags to inserted keys.
  • tag_updated_keys
    boolean
    Default: true
    Add specified tags to updated keys.
  • tag_skipped_keys
    boolean
    Add specified tags to skipped keys.
  • replace_modified
    boolean
    Enable to replace translations, that have been modified (in the file being uploaded).
  • slashn_to_linebreak
    boolean
    Enable to replace \n with a line break.
  • keys_to_values
    boolean
    Enable to automatically replace values with key names.
  • distinguish_by_file
    boolean
    Enable to allow keys with similar names to coexist, in case they are assigned to differrent filenames.
  • apply_tm
    boolean
    Enable to automatically apply 100% translation memory matches.
  • hidden_from_contributors
    boolean
    Enable to automatically set newly created keys as "Hidden from contributors".
  • cleanup_mode
    boolean
    Enable to delete all keys with all language translations that are not present in the uploaded file. You may want to make a snapshot of the project before importing new file, just in case.
Definition
POST https://api.lokalise.com/api2/projects/{project_id:branch}/files/upload
Example request body
{
    "filename": "index.json",
    "data": "D94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGL.....",
    "lang_iso": "en",
    "tags": [
        "index", "admin", "v2.0"
    ],
    "convert_placeholders": true
}
Example request
curl --request POST \
--url https://api.lokalise.com/api2/projects/{project_id:branch}/files/upload \ --header 'content-type: application/json' \
--header 'x-api-token: f4d3f29bf893dc3583e9970735e08de094e82b0' \
--data '{"filename":"index.json","data":"D94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGL.....","lang_iso":"en","tags":["index","admin","v2.0"],"convert_placeholders":true}'
Example response
{
    "project_id": "3002780358964f9bab5a92.87762498",
    "file": "index.json",
    "result": {
      "skipped": 12,
      "inserted": 140,
      "updated": 93
    }
}
Download files

Exports project files as a .zip bundle. Generated bundle will be uploaded to an Amazon S3 bucket, which will be stored there for 12 months available to download. As the bundle is generated and uploaded you would get a response with the URL to the file. Requires Download files admin right.

There are two ways to group keys by filenames when you are exporting - either all keys to a single file per language or use the previously assigned filenames. Learn more.

Attributes
  • format
    stringRequired
     File format (e.g. json, strings, xml). Must be file extension of any of the file formats we support. May also be ios_sdk or android_sdk for respective OTA SDK bundles.
  • original_filenames
    boolean
    Enable to use original filenames/formats. If set to false all keys will be export to a single file per language.
  • bundle_structure
    string
    Bundle structure, used when original_filenames set to false. Allowed placeholders are %LANG_ISO%, %LANG_NAME%, %FORMAT% and %PROJECT_NAME%).
  • directory_prefix
    string
    Directory prefix in the bundle, used when original_filenames set to true). Allowed placeholder is %LANG_ISO%.
  • all_platforms
    boolean
    Enable to include all platform keys. If disabled, only the keys, associated with the platform of the format will be exported.
  • filter_langs
    array
    List of languages to export. Omit this parameter for all languages.
  • filter_data
    array
    Narrow export data range. Allowed values are translated or untranslated, reviewed (or reviewed_only), last_reviewed_only, nonfuzzy and nonhidden. (Note: Fuzzy is called Unverified in the editor now).
  • filter_filenames
    array
    Only keys attributed to selected files will be included. Leave empty for all.
  • add_newline_eof
    boolean
    Enable to add new line at end of file (if supported by format).
  • custom_translation_status_ids
    array
    Only translations attributed to selected custom statuses will be included. Leave empty for all.
  • include_tags
    array
    Narrow export range to tags specified.
  • exclude_tags
    array
    Specify to exclude keys with these tags.
  • export_sort
    string
    Export key sort mode. Allowed value are first_added, last_added, last_updated, a_z, z_a.
  • export_empty_as
    string
    Default: empty
    Select how you would like empty translations to be exported. Allowed values are empty to keep empty, base to replace with the base language value, or skip to omit.
  • include_comments
    boolean
    Enable to include key comments and description in exported file (if supported by the format).
  • include_description
    boolean
    Enable to include key description in exported file (if supported by the format).
  • include_pids
    array
    Other projects ID's, which keys should be included with this export.
  • triggers
    array
     Trigger integration exports (must be enabled in project settings). Allowed values are amazons3, gcs, github, gitlab, bitbucket.
  • filter_repositories
    array
    Pull requests will be created only for listed repositories (organization/repository format). Leave empty array to process all configured integrations by platform only.
  • replace_breaks
    boolean
    Default: true
    Enable to replace line breaks in exported translations with \n.
  • disable_references
    boolean
    Enable to skip automatic replace of key reference placeholders (e.g. [%key:hello_world%]) with their corresponding translations.
  • plural_format
    string
    Override the default plural format for the file type. Allowed values are json_string, icu, array, generic, symfony. See Plurals and placeholders for more information.
  • placeholder_format
    string
    Override the default placeholder format for the file type. Allowed values are printf, ios, icu, net, symfony). See Plurals and placeholders for more information.
  • webhook_url
    string
    Once the export is complete, sends a HTTP POST with the generated bundle URL to the specified URL.
  • language_mapping
    object
    List of languages to override default iso codes for this export.
    Expand attributesClose attributes
    • original_language_iso
      string
      Original language code as defined in language settings.
    • custom_language_iso
      string
      Language code to replace the original one with.
  • icu_numeric
    boolean
    If enabled, plural forms zero, one and two will be replaced with =0, =1 and =2 respectively. Only works for ICU plural format.
  • escape_percent
    boolean
    Only works for printf placeholder format. When enabled, all universal percent placeholders "[%]" will be always exported as "%%".
  • indentation
    string
    Default: default
    Provide to override default indentation in supported files. Allowed values are default, 1sp, 2sp, 3sp, 4sp, 5sp, 6sp, 7sp, 8sp and tab.
  • yaml_include_root
    boolean
     (YAML export only). Enable to include language ISO code as root key.
  • json_unescaped_slashes
    boolean
    (JSON export only). Enable to leave forward slashes unescaped.
  • java_properties_encoding
    string
    Default: latin-1
    (Java Properties export only). Encoding for .properties files. Allowed values are utf-8 and latin-1.
  • java_properties_separator
    string
    Default: :
    (Java Properties export only). Separator for keys/values in .properties files. Allowed values are = and :.
  • bundle_description
    string
    Description of the created bundle. Applies to ios_sdk or android_sdk OTA SDK bundles.
Definition
POST https://api.lokalise.com/api2/projects/{project_id:branch}/files/download
Example request body
{
    "format": "json",
    "original_filenames": true
}
Example request
curl --request POST \
--url https://api.lokalise.com/api2/projects/{project_id:branch}/files/download \ --header 'content-type: application/json' \
--header 'x-api-token: f4d3f29bf893dc3583e9970735e08de094e82b0' \
--data '{"format":"json","original_filenames":true}'
Example response
{
    "project_id": "3002780358964f9bab5a92.87762498",
    "bundle_url": "https:\/\/s3-eu-west-1.amazonaws.com\/lokalise-assets\/export\/MyApp-locale.zip"
}
Keys

Keys are core item elements of the project.

Each phrase that is used in your app or website must be identified by a key and have values that represent translations to various languages. For example key index.welcome would have values of Welcome in English and Benvenuto in Italian. Keys can be assigned to one or multiple platforms. Once a key is assigned to a platform, it would be included in the export for file formats related to this platform.

One of the unique features of Lokalise is the ability to use similar keys across different platforms, thus reducing the translation work amount to be done by translators. Once you import or add keys, they need to be assigned to one or several platforms (e.g. iOS, Android). Learn more.

The Key object
Attributes
  • key_id
    number
    A unique identifier of the key.
  • created_at
    string
    Creation date of the key.
  • created_at_timestamp
    number
    Unix timestamp when the key was created.
  • key_name
    object
    An object containing key names for all platforms. You may need to enable "Per-platform key names" in project settings in order to alter key names for each platform individually. Note, when creating/updating keys, depending on your project settings (Per-platform key names) you may be required to pass either a string (if the setting is disabled) or an object (if the setting is enabled).
    Expand attributesClose attributes
    • ios
      string
      "iOS" platform key name.
    • android
      string
      "Android" platform key name.
    • web
      string
      "Web" platform key name.
    • other
      string
      "Other" platform key name.
  • filenames
    object
    An object containing key filename attribute for each platform.
    Expand attributesClose attributes
    • ios
      string
      "iOS" platform filename.
    • android
      string
      "Android" platform filename.
    • web
      string
      "Web" platform filename.
    • other
      string
      "Other" platform filename.
  • description
    string
    Description of the key.
  • platforms
    array
    List of platforms, enabled for this key.
  • tags
    array
    List of tags for this key.
  • comments
    object
    Comments for this key.
    Expand attributesClose attributes
    • comment_id
      number
      Unique identifier of the comment.
    • comment
      string
      The comment.
    • added_by
      number
      Unique identifier of a user, who has left the comment.
    • added_by_email
      string
      E-mail of a user, who has left the comment.
    • added_at
      string
      Date the comment has been added.
    • added_at_timestamp
      number
      Unix timestamp when the comment has been added.
  • screenshots
    object
    Screenshots, attached to this key.
    Expand attributesClose attributes
    • screenshot_id
      number
      A unique identifier of the screenshot.
    • key_ids
      array
      List of key identifiers, the screenshot is attached to.
    • url
      string
      Link to the screenshot.
    • title
      string
      Screenshot title.
    • description
      string
      Description of the screenshot.
    • screenshot_tags
      array
      List of screenshot tags.
    • width
      number
      Width of the screenshot, in pixels.
    • height
      number
      Height of the screenshot, in pixels.
    • created_at
      string
      Creation date of the screenshot.
    • created_at_timestamp
      number
      Unix timestamp when the screenshot was created.
  • translations
    object
    Translations for all languages. Enable translations parameter to include.
    Expand attributesClose attributes
    • translation_id
      number
      Unique identifier of translation entry.
    • key_id
      number
      A unique identifier of the key.
    • language_iso
      string
      Unique code of the language of the translation.
    • translation
      string
      The actual translation. Pass as an object, in case it includes plural forms and is_plural is true.
    • modified_by
      number
      Identifier of a user, who has updated the translation.
    • modified_by_email
      string
      E-mail of a user, who has updated the translation.
    • modified_at
      string
      Date of last modification of the translation.
    • modified_at_timestamp
      number
      Unix timestamp of last modification of the translation.
    • is_reviewed
      boolean
      Whether the translation is marked as Reviewed.
    • is_fuzzy
      boolean
      Whether the translation is marked as Fuzzy. (Note: Fuzzy is called Unverified in the editor now).
    • reviewed_by
      number
      Identifier of the user, who has reviewed the translation (if reviewed).
    • words
      number
      Number of words in the translation.
  • is_plural
    boolean
    Whether this key is plural.
  • plural_name
    string
    Optional custom plural name (used in some formats).
  • is_hidden
    boolean
    Whether this key is hidden from non-admins (translators).
  • is_archived
    boolean
    Whether this key is archived.
  • context
    string
    Optional context of the key (used with some file formats).
  • base_words
    number
    Number of words in base language.
  • char_limit
    number
    Maximum allowed number of characters in translations for this key.
  • custom_attributes
    array
    JSON containing custom attributes (if any).
List all keys

Lists all keys in the project. IMPORTANT: We do not provide a content delivery network for your language files. Do not engage a request to this endpoint with every your website/app visitor. Instead, fetch this endpoint from time to time, store the result locally and serve your visitors with static files/your database content. Alternatively, you may use our Amazon S3/Google CouldStorage integrations in automatically upload your language files to a bucket of your choice.

Url Parameters
  • disable_references
    string
    Default: 0
    Whether to disable key references. Possible values are 1 and 0.
  • include_comments
    string
    Default: 0
    Whether to include comments. Possible values are 1 and 0.
  • include_screenshots
    string
    Default: 0
    Whether to include URL to screenshots. Possible values are 1 and 0.
  • include_translations
    string
    Default: 0
    Whether to include translations. Possible values are 1 and 0.
  • filter_translation_lang_ids
    string
    One or more language ID to filter by (comma separated). Will include translations only for listed IDs.
  • filter_tags
    string
    One or more tags to filter by (comma separated).
  • filter_filenames
    string
    One or more filenames to filter by (comma separated).
  • filter_keys
    string
    One or more key name to filter by (comma separated). In case "Per-platform keys" is enabled in project settings, the filter will be applied to all platform names.
  • filter_key_ids
    string
    One or more key identifiers to filter by (comma separated).
  • filter_platforms
    string
    One or more platforms to filter by (comma separated). Possible values are ios, android, web and other.
  • filter_untranslated
    string
    Default: 0
    Filter by untranslated keys. Possible values are 1 and 0.
  • filter_qa_issues
    string
    One or more QA issues to filter by (comma separated). Possible values are spelling_and_grammar, placeholders, html, url_count, url, email_count, email, brackets, numbers, leading_whitespace, trailing_whitespace, double_space and special_placeholder.
  • limit
    string
    Default: 100
    Number of items to include (max 5000).
  • page
    string
    Default: 1
    Return results starting from this page.
Definition
GET https://api.lokalise.com/api2/projects/{project_id:branch}/keys
Example request
curl --request GET \
--url 'https://api.lokalise.com/api2/projects/{project_id:branch}/keys?include_translations={include_translations}&include_comments={include_comments}&include_screenshots={include_screenshots}&limit={limit}&page={page}' \
--header 'x-api-token: f4d3f29bf893dc3583e9970735e08de094e82b0'
Example response
{
    "project_id": "3002780358964f9bab5a92.87762498",
    "keys": [
        {
            "key_id": 222222,
            "created_at": "2018-12-31 12:00:00 (Etc\/UTC)",
            "created_at_timestamp": 1546257600,
            "key_name": {
                "ios": "index_welcome",
                "android": "indexWelcome",
                "web": "index.welcome",
                "other": "welcome-index"
            },
            "filenames": {
                "ios": "",
                "android": "",
                "web": "",
                "other": ""
            },
            "description": "Index page welcome",
            "platforms": [
                "ios", "android", "web", "other"
            ],
            "tags": [
                "main", "index"
            ],
            "comments": [
                {
                    "comment_id": 233112,
                    "comment": "Is there an exclamation sign?",
                    "added_by": 420,
                    "added_by_email": "user@mycompany.com",
                    "added_at": "2018-12-31 12:00:00 (Etc\/UTC)",
                    "added_at_timestamp": 1546257600
                }
            ],
            "screenshots": [
                {
                    "screenshot_id": 11233,
                    "title": "Welcome page",
                    "description": "",
                    "screenshot_tags": [
                        "index"
                    ],
                    "url": "https://s3-eu-west-1.amazonaws.com/files/screenshots/welcome.jpg",
                    "created_at": "2019-02-01 12:00:00 (Etc\/UTC)",
                    "created_at_timestamp": 1546257600
                }
            ],
            "translations": [
                {
                    "translation_id": 444212,
                    "key_id": 222222,
                    "language_iso": "en",
                    "translation": "Welcome to MyApp!",
                    "modified_by": 420,
                    "modified_by_email": "user@mycompany.com",
                    "modified_at": "2018-12-31 12:00:00 (Etc\/UTC)",
                    "modified_at_timestamp": 1546257600,
                    "is_reviewed": true,
                    "reviewed_by": 1357,
                    "words": 3
                },
                {
                    "translation_id": 444147,
                    "key_id": 222222,
                    "language_iso": "ru",
                    "translation": "Добро пожаловать!",
                    "modified_by": 422,
                    "modified_by_email": "translator@mycompany.com",
                    "modified_at": "2018-12-31 12:00:00 (Etc\/UTC)",
                    "modified_at_timestamp": 1546257600,
                    "is_reviewed": false,
                    "reviewed_by": 0,
                    "words": 2
                }

            ]
        },

        ....
    ]
}
Create keys

Creates one or more keys in the project. Requires Manage keys admin right. We recommend sending payload in chunks of up to 500 keys per request.

Attributes
  • key_name
    stringRequired
    Key identifier. For projects with enabled Per-platform key names, pass JSON encoded string with included ios, android, web and other string attributes.
  • description
    string
    Description of the key.
  • platforms
    arrayRequired
    List of platforms, enabled for this key. Possible values are ios, android, web and other.
  • filenames
    object
    An object containing key filename attribute for each platform.
    Expand attributesClose attributes
    • ios
      string
      "iOS" platform filename.
    • android
      string
      "Android" platform filename.
    • web
      string
      "Web" platform filename.
    • other
      string
      "Other" platform filename.
  • tags
    array
    List of tags for this keys.
  • comments
    object
    List of comments for this key.
    Expand attributesClose attributes
    • comment
      string
      The comment.
  • screenshots
    object
    List of screenshots, attached to this key.
    Expand attributesClose attributes
    • title
      string
      Title of the screenshot.
    • description
      string
      Description of the screenshot.
    • screenshot_tags
      array
      List of screenshot tags.
    • data
      string
      Base64 encoded screenshot (with leading image type 'data:image/jpeg;base64,').
  • translations
    object
    Translations for all languages. Enable translations parameter to include.
    Expand attributesClose attributes
    • language_iso
      string
      Unique code of the language of the translation.
    • translation
      string
      The actual translation. Pass as an object, in case it includes plural forms and is_plural is true.
    • is_reviewed
      boolean
      Whether the translation is marked as Reviewed.
    • is_fuzzy
      boolean
      Whether the translation is marked as Fuzzy. (Note: Fuzzy is called Unverified in the editor now).
  • is_plural
    boolean
    Whether this key is plural.
  • plural_name
    string
    Optional custom plural name (used in some formats).
  • is_hidden
    boolean
    Whether this key is hidden from non-admins (translators).
  • is_archived
    boolean
    Whether this key is archived.
  • context
    string
    Optional context of the key (used with some file formats).
  • char_limit
    number
    Maximum allowed number of characters in translations for this key.
  • custom_attributes
    string
    JSON encoded string containing custom attributes (if any).
Definition
POST https://api.lokalise.com/api2/projects/{project_id:branch}/keys
Example request body
{
    "keys": [
        {
            "key_name": "index.welcome",
            "description": "Index app welcome",
            "platforms": [
                "web"
            ],
            "translations": [
                {
                    "language_iso": "en",
                    "translation": "Welcome"
                }
            ]
        },
        {
            "key_name": "index.apple",
            "description": "Welcome apple",
            "platforms": [
                "web"
            ],
            "is_plural": true,
            "translations": [
                {
                    "language_iso": "en",
                    "translation": {
                        "one": "I have one apple",
                        "other": "I have a lot of apples"
                    }
                }
            ]
        },
        {
            "key_name": "index.hello",
            "platforms": [
                "web"
            ]
        }
    ]
}
Example request
curl --request POST \
--url https://api.lokalise.com/api2/projects/{project_id:branch}/keys \ --header 'content-type: application/json' \
--header 'x-api-token: f4d3f29bf893dc3583e9970735e08de094e82b0' \
--data '{"keys":[{"key_name":"index.welcome","description":"Index app welcome","platforms":["web"],"translations":[{"language_iso":"en","translation":"Welcome"}]},{"key_name":"index.apple","description":"Welcome apple","platforms":["web"],"is_plural":true,"translations":[{"language_iso":"en","translation":{"one":"I have one apple","other":"I have a lot of apples"}}]},{"key_name":"index.hello","platforms":["web"]}]}'
Example response
{
    "project_id": "3002780358964f9bab5a92.87762498",
    "keys": [
        {
            "key_id": 331223,
            "created_at": "2018-12-31 12:00:00 (Etc\/UTC)",
            "created_at_timestamp": 1546257600,
            "key_name": {
                "ios": "index.welcome",
                "android": "index.welcome",
                "web": "index.welcome",
                "other": "index.welcome"
            },
            "filenames": {
                "ios": "",
                "android": "",
                "web": "",
                "other": ""
            },
            "description": "Index app welcome",
            "platforms": [
                "web"
            ],
            "tags": [],
            "comments": [],
            "screenshots": [],
            "translations": [
                {
                    "translation_id": 444921,
                    "key_id": 331223,
                    "language_iso": "en",
                    "translation": "Welcome",
                    "modified_by": 420,
                    "modified_by_email": "user@mycompany.com",
                    "modified_at": "2018-12-31 12:00:00 (Etc\/UTC)",
                    "modified_at_timestamp": 1546257600,
                    "is_reviewed": false,
                    "reviewed_by": 0,
                    "words": 0
                },
                {
                    "translation_id": 444929,
                    "key_id": 331223,
                    "language_iso": "ru",
                    "translation": "",
                    "modified_by": 420,
                    "modified_by_email": "user@mycompany.com",
                    "modified_at": "2018-12-31 12:00:00 (Etc\/UTC)",
                    "modified_at_timestamp": 1546257600,
                    "is_reviewed": false,
                    "reviewed_by": 0,
                    "words": 0
                }
            ]
        },
        {
            "key_id": 331224,
            "created_at": "2018-12-31 12:00:00 (Etc\/UTC)",
            "created_at_timestamp": 1546257600,
            "key_name": {
                "ios": "index.apple",
                "android": "index.apple",
                "web": "index.apple",
                "other": "index.apple"
            },
            "filenames": {
                "ios": "",
                "android": "",
                "web": "",
                "other": ""
            },
            "description": "Welcome apple",
            "platforms": [
                "web"
            ],
            "is_plural": true,
            "tags": [],
            "comments": [],
            "screenshots": [],
            "translations": [
                {
                    "translation_id": 444941,
                    "key_id": 331224,
                    "language_iso": "en",
                    "translation": "{\"one\":\"I have one apple\",\"other\":\"I have a lot of apples\"}",
                    "modified_by": 420,
                    "modified_by_email": "user@mycompany.com",
                    "modified_at": "2018-12-31 12:00:00 (Etc\/UTC)",
                    "modified_at_timestamp": 1546257600,
                    "is_reviewed": false,
                    "reviewed_by": 0,
                    "words": 0
                },
                {
                    "translation_id": 444949,
                    "key_id": 331224,
                    "language_iso": "ru",
                    "translation": "{\"one\":\"\",\"few\":\"\",\"many\":\"\",\"other\":\"\"}",
                    "modified_by": 420,
                    "modified_by_email": "user@mycompany.com",
                    "modified_at": "2018-12-31 12:00:00 (Etc\/UTC)",
                    "modified_at_timestamp": 1546257600,
                    "is_reviewed": false,
                    "reviewed_by": 0,
                    "words": 0
                }
            ]
        }
    ],
    "errors": [
        {
            "message": "This key name is already taken",
            "code": 400,
            "key": {
                "key_name": "index.hello"
            }
        }
    ]
}
Retrieve a key

Retrieves a Key object.

Url Parameters
  • disable_references
    string
    Default: 0
    Whether to disable key references. Possible values are 1 and 0.
Definition
GET https://api.lokalise.com/api2/projects/{project_id:branch}/keys/{key_id}
Example request
curl --request GET \
--url https://api.lokalise.com/api2/projects/{project_id:branch}/keys/{key_id} \ --header 'x-api-token: f4d3f29bf893dc3583e9970735e08de094e82b0'
Example response
{
    "project_id": "3002780358964f9bab5a92.87762498",
    "key": {
        "key_id": 222222,
        "created_at": "2018-12-31 12:00:00 (Etc\/UTC)",
        "created_at_timestamp": 1546257600,
        "key_name": {
            "ios": "index_welcome",
            "android": "indexWelcome",
            "web": "index.welcome",
            "other": "welcome-index"
        },
        "filenames": {
            "ios": "",
            "android": "",
            "web": "",
            "other": ""
        },
        "description": "Index page welcome",
        "platforms": [
            "web", "other"
        ],
        "tags": [
            "main", "index"
        ],
        "comments": [
            {
                "comment_id": 233112,
                "comment": "Is there an exclamation sign?",
                "added_by": 420,
                "added_by_email": "user@mycompany.com",
                "added_at": "2018-12-31 12:00:00 (Etc\/UTC)",
                "added_at_timestamp": 1546257600
            }
        ],
        "screenshots": [
            {
                "screenshot_id": 11233,
                "title": "Welcome page",
                "description": "",
                "screenshot_tags": [
                    "index"
                ],
                "url": "https://s3-eu-west-1.amazonaws.com/files/screenshots/welcome.jpg",
                "created_at": "2019-02-01 12:00:00 (Etc\/UTC)",
                "created_at_timestamp": 1546257600
            }
        ],
        "translations": [
            {
                "translation_id": 444212,
                "key_id": 222222,
                "language_iso": "en",
                "translation": "Welcome to MyApp!",
                "modified_by": 420,
                "modified_by_email": "user@mycompany.com",
                "modified_at": "2018-12-31 12:00:00 (Etc\/UTC)",
                "modified_at_timestamp": 1546257600,
                "is_reviewed": true,
                "reviewed_by": 1357,
                "words": 3
            },
            {
                "translation_id": 444147,
                "key_id": 222222,
                "language_iso": "ru",
                "translation": "Добро пожаловать!",
                "modified_by": 422,
                "modified_by_email": "translator@mycompany.com",
                "modified_at": "2018-12-31 12:00:00 (Etc\/UTC)",
                "modified_at_timestamp": 1546257600,
                "is_reviewed": false,
                "reviewed_by": 0,
                "words": 2
            }
        ]
    }
}
Update a key

Updates the properties of a key and it’s associated objects. Requires Manage keys admin right.

Attributes
  • key_name
    string
    Key identifier. For projects with enabled Per-platform key names, pass JSON encoded string with included ios, android, web and other string attributes.
  • description
    string
    Description of the key.
  • platforms
    array
    List of platforms, enabled for this key. Possible values are ios, android, web and other.
  • filenames
    object
    An object containing key filename attribute for each platform.
    Expand attributesClose attributes
    • ios
      string
      "iOS" platform filename.
    • android
      string
      "Android" platform filename.
    • web
      string
      "Web" platform filename.
    • other
      string
      "Other" platform filename.
  • tags
    array
    List of tags for this keys.
  • merge_tags
    boolean
    Enable to merge specified tags with the current tags attached to the key.
  • is_plural
    boolean
    Whether this key is plural.
  • plural_name
    string
    Optional custom plural name (used in some formats).
  • is_hidden
    boolean
    Whether this key is hidden from non-admins (translators).
  • is_archived
    boolean
    Whether this key is archived.
  • context
    string
    Optional context of the key (used with some file formats).
  • char_limit
    number
    Maximum allowed number of characters in translations for this key.
  • custom_attributes
    string
    JSON encoded string containing custom attributes (if any).
Definition
PUT https://api.lokalise.com/api2/projects/{project_id:branch}/keys/{key_id}
Example request body
{
    "platforms": [
        "web","other"
    ],
    "description": "Index app welcome"
}
Example request
curl --request PUT \
--url https://api.lokalise.com/api2/projects/{project_id:branch}/keys/{key_id} \ --header 'content-type: application/json' \
--header 'x-api-token: f4d3f29bf893dc3583e9970735e08de094e82b0' \
--data '{"platforms":["web","other"],"description":"Index app welcome"}'
Example response
{
    "project_id": "3002780358964f9bab5a92.87762498",
    "key": {
        "key_id": 331223,
        "created_at": "2018-12-31 12:00:00 (Etc\/UTC)",
        "created_at_timestamp": 1546257600,
        "key_name": {
            "ios": "new.index.welcome",
            "android": "index.welcome",
            "web": "index.welcome",
            "other": "index.welcome"
        },
        "filenames": {
            "ios": "",
            "android": "",
            "web": "",
            "other": ""
        },
        "description": "Index app welcome",
        "platforms": [
            "web", "other"
        ],
        "tags": [],
        "comments": [],
        "screenshots": [],
        "translations": [
            {
                "translation_id": 444921,
                "key_id": 331223,
                "language_iso": "en",
                "translation": "",
                "modified_by": 420,
                "modified_by_email": "user@mycompany.com",
                "modified_at": "2018-12-31 12:00:00 (Etc\/UTC)",
                "modified_at_timestamp": 1546257600,
                "is_reviewed": false,
                "reviewed_by": 0,
                "words": 0
            },
            {
                "translation_id": 444929,
                "key_id": 331223,
                "language_iso": "ru",
                "translation": "",
                "modified_by": 420,
                "modified_by_email": "user@mycompany.com",
                "modified_at": "2018-12-31 12:00:00 (Etc\/UTC)",
                "modified_at_timestamp": 1546257600,
                "is_reviewed": false,
                "reviewed_by": 0,
                "words": 0
            }
        ]
    }
}
Bulk update

Updates one or more keys in the project. Requires Manage keys admin right.

Attributes
  • key_id
    numberRequired
    A unique identifier of the key.
  • key_name
    string
    Key identifier. For projects with enabled Per-platform key names, pass JSON encoded string with included ios, android, web and other string attributes.
  • description
    string
    Description of the key.
  • platforms
    array
    List of platforms, enabled for this key. Possible values are ios, android, web and other.
  • filenames
    object
    An object containing key filename attribute for each platform.
    Expand attributesClose attributes
    • ios
      string
      "iOS" platform filename.
    • android
      string
      "Android" platform filename.
    • web
      string
      "Web" platform filename.
    • other
      string
      "Other" platform filename.
  • tags
    array
    List of tags for this keys.
  • merge_tags
    boolean
    Enable to merge specified tags with the current tags attached to the key.
  • comments
    object
    List of comments for this key.
    Expand attributesClose attributes
    • comment
      string
      The comment.
  • screenshots
    object
    List of screenshots, attached to this key.
    Expand attributesClose attributes
    • title
      string
      Title of the screenshot.
    • description
      string
      Description of the screenshot.
    • screenshot_tags
      array
      List of screenshot tags.
    • data
      string
      Base64 encoded screenshot (with leading image type 'data:image/jpeg;base64,').
  • translations
    object
    Translations for all languages. Enable translations parameter to include.
    Expand attributesClose attributes
    • language_iso
      string
      Unique code of the language of the translation.
    • translation
      string
      The actual translation. Pass as an object, in case it includes plural forms and is_plural is true.
    • is_reviewed
      boolean
      Whether the translation is marked as Reviewed.
    • is_fuzzy
      boolean
      Whether the translation is marked as Fuzzy. (Note: Fuzzy is called Unverified in the editor now).
  • is_plural
    boolean
    Whether this key is plural.
  • plural_name
    string
    Optional custom plural name (used in some formats).
  • is_hidden
    boolean
    Whether this key is hidden from non-admins (translators).
  • is_archived
    boolean
    Whether this key is archived.
  • context
    string
    Optional context of the key (used with some file formats).
  • char_limit
    number
    Maximum allowed number of characters in translations for this key.
  • custom_attributes
    string
    JSON encoded string containing custom attributes (if any).
Definition
PUT https://api.lokalise.com/api2/projects/{project_id:branch}/keys
Example request body
{
    "keys": [
        {
            "key_id": 331223,
            "key_name": "index.welcome",
            "description": "Index app welcome",
            "platforms": [
                "web"
           ]
        },
        {
            "key_id": 331224,
            "key_name": "index.hello",
            "description": "Index greetings",
            "platforms": [
                "web"
           ]
        }
    ]
}
Example request
curl --request PUT \
--url https://api.lokalise.com/api2/projects/{project_id:branch}/keys \ --header 'content-type: application/json' \
--header 'x-api-token: f4d3f29bf893dc3583e9970735e08de094e82b0' \
--data '{"keys":[{"key_id":331223,"key_name":"index.welcome","description":"Index app welcome","platforms":["web"]},{"key_id":331224,"key_name":"index.hello","description":"Index greetings","platforms":["web"]}]}'
Example response
{
    "project_id": "3002780358964f9bab5a92.87762498",
    "keys": [
        {
            "key_id": 331223,
            "created_at": "2018-12-31 12:00:00 (Etc\/UTC)",
            "created_at_timestamp": 1546257600,
            "key_name": {
                "ios": "index.welcome",
                "android": "index.welcome",
                "web": "index.welcome",
                "other": "index.welcome"
            },
            "filenames": {
                "ios": "",
                "android": "",
                "web": "",
                "other": ""
            },
            "description": "Index app welcome",
            "platforms": [
                "web"
            ],
            "tags": [],
            "comments": [],
            "screenshots": [],
            "translations": [
                {
                    "translation_id": 444921,
                    "key_id": 331223,
                    "language_iso": "en",
                    "translation": "",
                    "modified_by": 420,
                    "modified_by_email": "user@mycompany.com",
                    "modified_at": "2018-12-31 12:00:00 (Etc\/UTC)",
                    "modified_at_timestamp": 1546257600,
                    "is_reviewed": false,
                    "reviewed_by": 0,
                    "words": 0
                },
                {
                    "translation_id": 444929,
                    "key_id": 331223,
                    "language_iso": "ru",
                    "translation": "",
                    "modified_by": 420,
                    "modified_by_email": "user@mycompany.com",
                    "modified_at": "2018-12-31 12:00:00 (Etc\/UTC)",
                    "modified_at_timestamp": 1546257600,
                    "is_reviewed": false,
                    "reviewed_by": 0,
                    "words": 0
                }
            ]
        },
        {
            "key_id": 331224,
            "created_at": "2018-12-31 12:00:00 (Etc\/UTC)",
            "created_at_timestamp": 1546257600,
            "key_name": {
                "ios": "index.welcome",
                "android": "index.welcome",
                "web": "index.welcome",
                "other": "index.welcome"
            },
            "filenames": {
                "ios": "",
                "android": "",
                "web": "",
                "other": ""
            },
            "description": "Index app welcome",
            "platforms": [
                "web"
            ],
            "tags": [],
            "comments": [],
            "screenshots": [],
            "translations": [
                {
                    "translation_id": 444921,
                    "key_id": 331223,
                    "language_iso": "en",
                    "translation": "",
                    "modified_by": 420,
                    "modified_by_email": "user@mycompany.com",
                    "modified_at": "2018-12-31 12:00:00 (Etc\/UTC)",
                    "modified_at_timestamp": 1546257600,
                    "is_reviewed": false,
                    "reviewed_by": 0,
                    "words": 0
                },
                {
                    "translation_id": 444929,
                    "key_id": 331223,
                    "language_iso": "ru",
                    "translation": "",
                    "modified_by": 420,
                    "modified_by_email": "user@mycompany.com",
                    "modified_at": "2018-12-31 12:00:00 (Etc\/UTC)",
                    "modified_at_timestamp": 1546257600,
                    "is_reviewed": false,
                    "reviewed_by": 0,
                    "words": 0
                }
            ]
        }
    ],
    "errors": [
    ]
}
Delete multiple keys

Deletes multiple keys from the project. Requires Manage keys admin right.

Attributes
  • keys
    arrayRequired
    List of key ids.
Definition
DELETE https://api.lokalise.com/api2/projects/{project_id:branch}/keys
Example request body
{
    "keys": [
        12345, 12346
    ]
}
Example request
curl --request DELETE \
--url https://api.lokalise.com/api2/projects/{project_id:branch}/keys \ --header 'x-api-token: f4d3f29bf893dc3583e9970735e08de094e82b0' \
--data '{"keys":[12345,12346]}'
Example response
{
    "project_id": "3002780358964f9bab5a92.87762498",
    "keys_removed": true,
    "keys_locked": 0
}
Delete a key

Deletes a key from the project. Requires Manage keys admin right.

Definition
DELETE https://api.lokalise.com/api2/projects/{project_id:branch}/keys/{key_id}
Example request
curl --request DELETE \
--url https://api.lokalise.com/api2/projects/{project_id:branch}/keys/{key_id} \ --header 'x-api-token: f4d3f29bf893dc3583e9970735e08de094e82b0'
Example response
{
    "project_id": "3002780358964f9bab5a92.87762498",
    "key_removed": false,
    "keys_locked": 1
}
Languages

There are over 500 predefined language/dialect combinations available in Lokalise. In case you require a custom language/dialect combination use custom_X languages (where X is a number from 1 to 100). You may override language code and name when adding a language, or update an existing language properties later.

There are situations when it is necessary to export different language codes to different platforms (e.g. zh-Hans to iOS and zh_Hans to Web). In such cases you need to set any preferred version and ise export parameter to set language mapping depending on the file format.

The Language object
Attributes
  • lang_id
    number
    A unique language identifier in the system.
  • lang_iso
    string
    Language/locale code.
  • lang_name
    string
    Language name.
  • is_rtl
    boolean
    Whether the language is Right-To-Left.
  • plural_forms
    array
    List of supported plural forms.
List system languages

Retrieves a list of system languages.

Url Parameters
  • limit
    string
    Default: 100
    Number of items to include (max 5000).
  • page
    string
    Default: 1
    Return results starting from this page.
Definition
GET https://api.lokalise.com/api2/system/languages
Example request
curl --request GET \
--url https://api.lokalise.com/api2/system/languages \ --header 'x-api-token: f4d3f29bf893dc3583e9970735e08de094e82b0'
Example response
{
    "languages": [
        {
            "lang_id": 640,
            "lang_iso": "en",
            "lang_name": "English",
            "is_rtl": false,
            "plural_forms": [
                "one", "other"
            ]
        },

        ....

        {
            "lang_id": 597,
            "lang_iso": "ru",
            "lang_name": "Russian",
            "is_rtl": false,
            "plural_forms": [
                "one", "few", "many", "other"
            ]
        },
    ]
}
List project languages

Retrieves a list of project languages.

Url Parameters
  • limit
    string
    Default: 100
    Number of items to include (max 5000).
  • page
    string
    Default: 1
    Return results starting from this page.
Definition
GET https://api.lokalise.com/api2/projects/{project_id:branch}/languages
Example request
curl --request GET \
--url https://api.lokalise.com/api2/projects/{project_id:branch}/languages \ --header 'x-api-token: f4d3f29bf893dc3583e9970735e08de094e82b0'
Create languages

Creates one or more languages in the project. Requires Manage languages admin right.

The language_iso is the identifer of one of the system languages. You are only required to include the language_iso attribute, however you may override the default language code, language name and plural forms as well.

Attributes
  • lang_iso
    stringRequired
    A unique language code in the system.
  • custom_iso
    string
    Override language/locale code.
  • custom_name
    string
    Override language name.
  • custom_plural_forms
    array
    Override list of supported plural forms for this language.
Definition
POST https://api.lokalise.com/api2/projects/{project_id:branch}/languages
Example request body
{
    "languages": [
        {
            "lang_iso": "en"
        },
        {
            "lang_iso": "ru"                        
        }
    ]
}
Example request
curl --request POST \
--url https://api.lokalise.com/api2/projects/{project_id:branch}/languages \ --header 'content-type: application/json' \
--header 'x-api-token: f4d3f29bf893dc3583e9970735e08de094e82b0' \
--data '{"languages":[{"lang_iso":"en"},{"lang_iso":"ru"}]}'
Example response
{
    "project_id": "3002780358964f9bab5a92.87762498",
    "languages": [
        {
            "lang_id": 640,
            "lang_iso": "en",
            "lang_name": "English",
            "is_rtl": false,
            "plural_forms": [
                "one", "other"
            ]
        },
        {
            "lang_id": 597,
            "lang_iso": "ru",
            "lang_name": "Russian",
            "is_rtl": false,
            "plural_forms": [
                "one", "few", "many", "other"
            ]
        }
    ]
}
Retrieve a language

Retrieves a Language object.

Definition
GET https://api.lokalise.com/api2/projects/{project_id:branch}/languages/{lang_id}
Example request
curl --request GET \
--url https://api.lokalise.com/api2/projects/{project_id:branch}/languages/{lang_id} \ --header 'x-api-token: f4d3f29bf893dc3583e9970735e08de094e82b0'
Example response
{
    "project_id": "3002780358964f9bab5a92.87762498",
    "language": {
        "lang_id": 640,
        "lang_iso": "en",
        "lang_name": "English",
        "is_rtl": false,
        "plural_forms": [
            "one", "other"
        ]
    }   
}
Update a language

Updates the properties of a language. Requires Manage languages admin right.

Attributes
  • lang_iso
    string
    Language/locale code.
  • lang_name
    string
    Language name.
  • plural_forms
    array
    List of supported plural forms.
Definition
PUT https://api.lokalise.com/api2/projects/{project_id:branch}/languages/{lang_id}
Example request body
{
    "lang_iso": "en-US",
    "plural_forms": [
        "one", "zero", "few", "other"
    ]
}
Example request
curl --request PUT \
--url https://api.lokalise.com/api2/projects/{project_id:branch}/languages/{lang_id} \ --header 'content-type: application/json' \
--header 'x-api-token: f4d3f29bf893dc3583e9970735e08de094e82b0' \
--data '{"lang_iso":"en-US","plural_forms":["one","zero","few","other"]}'
Example response
{
    "project_id": "3002780358964f9bab5a92.87762498",
    "language": {
        "lang_id": 640,
        "lang_iso": "en-US",
        "lang_name": "English",
        "is_rtl": false,
        "plural_forms": [
            "one", "zero", "few", "other"
        ]            
    }  
}
Delete a language

Deletes a language from the project. Requires Manage languages admin right.

Definition
DELETE https://api.lokalise.com/api2/projects/{project_id:branch}/languages/{lang_id}
Example request
curl --request DELETE \
--url https://api.lokalise.com/api2/projects/{project_id:branch}/languages/{lang_id} \ --header 'x-api-token: f4d3f29bf893dc3583e9970735e08de094e82b0'
Example response
{
    "project_id": "3002780358964f9bab5a92.87762498",
    "language_deleted": true,
}
Orders

Lokalise offers several human-powered translation providers, that can help translating your app or website to the most popular languages. You need to list translation providers to find out their slug, tiers and possible language pairs. You need to create a payment card in order to pay for translation orders.

The Order object
Attributes
  • order_id
    string
    A unique order identifier.
  • project_id
    string
    Project identifier.
  • branch
    string
    Branch name.
  • card_id
    number
    Identifier of the card used for payment.
  • status
    string
    Status of the order. Possible values are in progress, completed. draft in case if dry_run = true.
  • created_at
    string
    Date and time of the order creation.
  • created_at_timestamp
    number
    Unix timestamp when the order was created.
  • created_by
    number
    Identifier of a user, who has created the order.
  • created_by_email
    string
    E-mail of a user, who has created the order.
  • source_language_iso
    string
    Source language code of the order.
  • target_language_isos
    array
    List of target languages.
  • keys
    array
    List of keys identifiers, included in the order.
  • source_words
    object
    Object, where object key is target language iso code and value is the translatable word count.
    Expand attributesClose attributes
    • {key}
      string
      Language iso code.
    • {value}
      number
      Translatable word count.
  • provider_slug
    string
    Translation provider slug.
  • translation_style
    string
    Style of the translation, applies to gengo provider only.
  • translation_tier
    number
    Tier of the translation. Tiers depend on provider.
  • translation_tier_name
    string
    Tier name.
  • briefing
    string
    Order briefing.
  • total
    number
    Total cost of the order in USD
List all orders

Lists all translation orders in the team.

Url Parameters
  • limit
    string
    Default: 100
    Number of items to include (max 5000).
  • page
    string
    Default: 1
    Return results starting from this page.
Definition
GET https://api.lokalise.com/api2/teams/{team_id}/orders
Example request
curl --request GET \
--url https://api.lokalise.com/api2/teams/{team_id}/orders \ --header 'x-api-token: f4d3f29bf893dc3583e9970735e08de094e82b0'
Example response
{
    "orders": [
        {
            "order_id": "20181231AAAA",
            "project_id": "20008339586cded200e0d8.29879849",
            "card_id": 12345,
            "status": "completed",
            "created_at": "2018-12-31 12:00:00 (Etc\/UTC)",
            "created_at_timestamp": 1546257600,
            "created_by": 420,
            "created_by_email": "jonn@company.com",
            "source_language_iso": "en_US",
            "target_language_isos": [
                "ru",
                "fr",
                "it"
            ],
            "keys": [
                12213,
                12214,
                12215,
                21216
            ],
            "source_words": {
                "ru": 256,
                "fr": 222,
                "it": 256
            },
            "provider_slug": "gengo",
            "translation_style": "friendly",
            "translation_tier": 1,
            "translation_tier_name": "Native speakers",
            "briefing": "Please translate our app strings",
            "total": 177.90
        }
    ]
}
Create an order

Creates a translation order. You must have admin privileges in the project you are placing an order in.

Attributes
  • project_id
    stringRequired
    Project identifier.
  • card_id
    numberRequired
    Card identifier that should be used for payment.
  • briefing
    stringRequired
    Order briefing.
  • source_language_iso
    stringRequired
    Source language code of the order.
  • target_language_isos
    arrayRequired
    List of target languages.
  • keys
    arrayRequired
    List of keys identifiers, included in the order.
  • provider_slug
    stringRequired
    Translation provider slug.
  • translation_tier
    numberRequired
    Tier of the translation. Tiers depend on provider.
  • dry_run
    boolean
    Return the response without actually placing an order. Useful for price estimation. The card will not be charged. Defaults to false (live mode).
  • translation_style
    string
    Only for gengo provider. Available values are formal, informal, business, friendly. Defaults to friendly.
Definition
POST https://api.lokalise.com/api2/teams/{team_id}/orders
Example request body
{
    "project_id": "20008339586cded200e0d8.29879849",
    "card_id": 12345,
    "briefing": "Terms of use of our app.",
    "source_language_iso": "en_US",
    "target_language_isos": [
        "ru",
        "fr",
        "it"
    ],
    "keys": [
        12213,
        12214,
        12215,
        21216
    ],
    "provider_slug": "gengo",
    "translation_tier": 1
}
Example request
curl --request POST \
--url https://api.lokalise.com/api2/teams/{team_id}/orders \ --header 'content-type: application/json' \
--header 'x-api-token: f4d3f29bf893dc3583e9970735e08de094e82b0' \
--data '{"project_id":"20008339586cded200e0d8.29879849","card_id":12345,"briefing":"Terms of use of our app.","source_language_iso":"en_US","target_language_isos":["ru","fr","it"],"keys":[12213,12214,12215,21216],"provider_slug":"gengo","translation_tier":1}'
Example response
{
    "order_id": "20181231AAAA",
    "project_id": "20008339586cded200e0d8.29879849",
    "card_id": 12345,
    "status": "in progress",
    "created_at": "2018-12-31 12:00:00 (Etc\/UTC)",
    "created_at_timestamp": 1546257600,
    "created_by": 420,
    "created_by_email": "jonn@company.com",
    "source_language_iso": "en_US",
    "target_language_isos": [
        "ru",
        "fr",
        "it"
    ],
    "keys": [
        12213,
        12214,
        12215,
        21216
    ],
    "source_words": {
        "ru": 256,
        "fr": 222,
        "it": 256
    },
    "provider_slug": "gengo",
    "translation_style": "friendly",
    "translation_tier": 1,
    "translation_tier_name": "Native speakers",
    "briefing": "Terms of use of our app.",
    "total": 177.90,
    "dry_run": false
}
Retrieve an order

Retrieves an Order object.

Definition
GET https://api.lokalise.com/api2/teams/{team_id}/orders/{order_id}
Example request
curl --request GET \
--url https://api.lokalise.com/api2/teams/{team_id}/orders/{order_id} \ --header 'x-api-token: f4d3f29bf893dc3583e9970735e08de094e82b0'
Example response
{
    "order_id": "20181231AAAA",
    "project_id": "20008339586cded200e0d8.29879849",
    "card_id": 12345,
    "status": "in progress",
    "created_at": "2018-12-31 12:00:00 (Etc\/UTC)",
    "created_at_timestamp": 1546257600,
    "created_by": 420,
    "created_by_email": "jonn@company.com",
    "source_language_iso": "en_US",
    "target_language_isos": [
        "ru",
        "fr",
        "it"
    ],
    "keys": [
        12213,
        12214,
        12215,
        21216
    ],
    "source_words": {
        "ru": 256,
        "fr": 222,
        "it": 256
    },
    "provider_slug": "gengo",
    "translation_style": "friendly",
    "translation_tier": 1,
    "translation_tier_name": "Native speakers",
    "briefing": "Terms of use of our app.",
    "total": 177.90
}
Payment cards

Credit cards are used to pay for translation orders. Each user has their own cards, that are not shared with other users. We do not store credit card details. Once the card is added, we send the details to Stripe and receive the card token, which can only be used for order purchases at Lokalise.

The Payment card object
Attributes
  • card_id
    number
    A unique identifier of the card.
  • last4
    string
    Last 4 digits of the card.
  • brand
    string
    Card brand.
  • created_at
    string
    Date/time at which the card was created.
  • created_at_timestamp
    number
    Unix timestamp when the card was created.
Create a card

Adds new payment card to user cards.

Attributes
  • number
    numberRequired
    Card number.
  • cvc
    numberRequired
    3-digit card CVC code.
  • exp_month
    numberRequired
    Card expiration month (1-12).
  • exp_year
    numberRequired
    Card expiration year.
Definition
POST https://api.lokalise.com/api2/payment_cards
Example request body
{
    "number": "4242424242424242",
    "cvc": "123",
    "exp_month": 5,
    "exp_year": 2021
}
Example request
curl --request POST \
--url https://api.lokalise.com/api2/payment_cards \ --header 'content-type: application/json' \
--header 'x-api-token: f4d3f29bf893dc3583e9970735e08de094e82b0' \
--data '{"number":"4242424242424242","cvc":"123","exp_month":5,"exp_year":2021}'
Example response
{
    "card_id": 1234,
    "last4": 4242,
    "brand": "Visa",
    "created_at": "2018-12-31 12:00:00 (Etc\/UTC)",
    "created_at_timestamp": 1546257600
}
List all cards

Lists all user payment cards.

Url Parameters
  • limit
    string
    Default: 100
    Number of items to include (max 5000).
  • page
    string
    Default: 1
    Return results starting from this page.
Definition
GET https://api.lokalise.com/api2/payment_cards
Example request
curl --request GET \
--url https://api.lokalise.com/api2/payment_cards \ --header 'x-api-token: f4d3f29bf893dc3583e9970735e08de094e82b0'
Example response
{
    "user_id": 420,
    "payment_cards": [
        {
            "card_id": 22192,
            "last4": "5678",
            "brand": "MasterCard",
            "created_at": "2018-12-31 12:00:00 (Etc\/UTC)",
            "created_at_timestamp": 1546257600
        },
        {
            "card_id": 22193,
            "last4": "1234",
            "brand": "Visa",
            "created_at": "2018-12-31 12:00:00 (Etc\/UTC)",
            "created_at_timestamp": 1546257600
        },
    ]
}
Retrieve a card

Retrieves a Payment card object.

Definition
GET https://api.lokalise.com/api2/payment_cards/{card_id}
Example request
curl --request GET \
--url https://api.lokalise.com/api2/payment_cards/{card_id} \ --header 'x-api-token: f4d3f29bf893dc3583e9970735e08de094e82b0'
Example response
{
    "user_id": 420,
    "payment_card": {
        "card_id": 22193,
        "last4": "1234",
        "brand": "Visa",
        "created_at": "2018-12-31 12:00:00 (Etc\/UTC)",
        "created_at_timestamp": 1546257600
    }
}
Delete a card

Deletes a payment card from user cards.

Definition
DELETE https://api.lokalise.com/api2/payment_cards/{card_id}
Example request
curl --request DELETE \
--url https://api.lokalise.com/api2/payment_cards/{card_id} \ --header 'x-api-token: f4d3f29bf893dc3583e9970735e08de094e82b0'
Example response
{
    "card_id": 22193,
    "card_deleted": true
}
Projects

Lokalise is a project-based translation management system. We recommend to keep all platform keys in the same project. Upload iOS, Android, frontend, backend and API language files - everything that relates to a certain app or website - to the same project. We provide you with key merging or referencing options, that let you avoid recurring work for translators.

The Project object
Attributes
  • project_id
    string
    A unique project identifier.
  • name
    string
    Project name.
  • description
    string
    Description of the project.
  • created_at
    string
    Date of project creation.
  • created_at_timestamp
    number
    Unix timestamp when project was created.
  • created_by
    number
    An identifier of a user who has created the project.
  • created_by_email
    string
    An e-mail of a user who has created the project.
  • team_id
    number
    A unique identifier of the team, the project belongs to.
  • base_language_id
    number
    A unique identifier of the project default language.
  • base_language_iso
    string
    A language/locale code of the project default language.
  • settings
    object
    An object containing project settings.
    Expand attributesClose attributes
    • per_platform_key_names
      boolean
      If enabled project has different key names for different platforms.
    • reviewing
      boolean
      If enabled contributors has reviewer access for project.
    • upvoting
      boolean
      If enabled users are able to vote for different variations of the translations.
    • auto_toggle_unverified
      boolean
      If enabled Lokalise will automatically mark translations Unverified in case translation of base language was changed.
    • offline_translation
      boolean
      If enabled translators are able to download and upload translations as XLIFF files from the Editor.
    • key_editing
      boolean
      If enabled keys are allowed to be modified.
    • inline_machine_translations
      boolean
      If enabled inline machine translations are enabled to all project users.
    • branching
      boolean
      If enabled then branching will be available.
  • statistics
    object
    An object containing project statistics, QA issues and project languages progress.
    Expand attributesClose attributes
    • progress_total
      number
      Overall percent of project progress.
    • keys_total
      number
      Count of keys in the project.
    • team
      number
      Team members count in the project.
    • base_words
      number
      Count of words in a base language of the project.
    • qa_issues_total
      number
      Overall count of QA issues in the project.
    • qa_issues
      object
      An object containing count for each QA issue type.
      Expand attributesClose attributes
      • not_reviewed
        number
        Count of not reviewed translations.
      • unverified
        number
        Count of unverified (fuzzy) translations.
      • spelling_grammar
        number
        Count of translations with spelling and/or grammar errors.
      • inconsistent_placeholders
        number
        Count of translations with inconsistent placeholders (source vs target).
      • inconsistent_html
        number
        Count of translations with inconsistent HTML tags (source vs target).
      • different_number_of_urls
        number
        Count of translations with different number of URLs (source vs target).
      • different_urls
        number
        Count of translations with different URLs (source vs target).
      • leading_whitespace
        number
        Count of translations with leading whitespace.
      • trailing_whitespace
        number
        Count of translations with trailing whitespace.
      • different_number_of_email_address
        number
        Count of translations with different number of email address (source vs target).
      • different_email_address
        number
        Count of translations with different email address (source vs target).
      • different_brackets
        number
        Count of translations with different brackets (source vs target).
      • different_numbers
        number
        Count of translations with different numbers (source vs target).
      • double_space
        number
        Count of translations with double spaces (target).
      • special_placeholder
        number
        Count of Invalid use of [VOID], [TRUE], [FALSE] placeholders (target).
    • languages
      object
      An array of project languages with progress percent.
      Expand attributesClose attributes
      • language_id
        number
        A unique language identifier in the system.
      • language_iso
        string
        Language/locale code.
      • progress
        number
        Translated keys percent.
      • words_to_do
        number
        Count of words remaining to translate from projects base language.
List all projects

Retrieves a list of projects available to the user, authorized with a token.

Url Parameters
  • filter_team_id
    string
    Limit results to team ID.
  • filter_names
    string
    One or more project names to filter by (comma separated).
  • include_statistics
    string
    Default: 1
    Whether to include project statistics. Possible values are 1 and 0.
  • include_settings
    string
    Default: 1
    Whether to include project settings. Possible values are 1 and 0.
  • limit
    string
    Default: 100
    Number of items to include (max 5000).
  • page
    string
    Default: 1
    Return results starting from this page.
Definition
GET https://api.lokalise.com/api2/projects
Example request
curl --request GET \
--url 'https://api.lokalise.com/api2/projects?filter_team_id={filter_team_id}' \
--header 'x-api-token: f4d3f29bf893dc3583e9970735e08de094e82b0'
Example response
{
    "projects": [
        {
            "project_id": "20008339586cded200e0d8.29879849",
            "project_type": "localization_files",
            "name": "SuperApp (iOS + Android)",
            "description": "",
            "created_at": "2018-12-31 12:00:00 (Etc\/UTC)",
            "created_at_timestamp": 1546257600,
            "created_by": 420,
            "created_by_email": "user@mycompany.com",
            "team_id": 12345,
            "base_language_id": 640,
            "base_language_iso": "en",
            "settings": {
                "per_platform_key_names": false,
                "reviewing": false,
                "upvoting": false,
                "auto_toggle_unverified": true,
                "offline_translation": false,
                "key_editing": true,
                "inline_machine_translations": true
            },
            "statistics": {
                "progress_total": 87,
                "keys_total": 13,
                "team": 2,
                "base_words": 22,
                "qa_issues_total": 65,
                "qa_issues": {
                    "not_reviewed": 39,
                    "unverified": 7,
                    "spelling_grammar": 4,
                    "inconsistent_placeholders": 5,
                    "inconsistent_html": 1,
                    "different_number_of_urls": 0,
                    "different_urls": 1,
                    "leading_whitespace": 1,
                    "trailing_whitespace": 0,
                    "different_number_of_email_address": 0,
                    "different_email_address": 0,
                    "different_brackets": 6,
                    "different_numbers": 1,
                    "double_space": 0,
                    "special_placeholder": 0
                },
                "languages": [
                    {
                        "language_id": 640,
                        "language_iso": "en",
                        "progress": 100,
                        "words_to_do": 0
                    },
                    {
                        "language_id": 800,
                        "language_iso": "lv_LV",
                        "progress": 100,
                        "words_to_do": 0
                    },
                    {
                        "language_id": 673,
                        "language_iso": "fr",
                        "progress": 63,
                        "words_to_do": 8
                    }
                ]
            }
        },
        {
            "project_id": "100137835922d7d69a98e6.35789135",
            "project_type": "localization_files",
            "name": "Marketing emails",
            "description": "",
            "created_at": "2018-12-31 12:00:00 (Etc\/UTC)",
            "created_at_timestamp": 1546257600,
            "created_by": 420,
            "created_by_email": "user@mycompany.com",
            "team_id": 12345,
            "base_language_id": 640,
            "base_language_iso": "en",
            "settings": {
                "per_platform_key_names": false,
                "reviewing": false,
                "upvoting": false,
                "auto_toggle_unverified": true,
                "offline_translation": false,
                "key_editing": true,
                "inline_machine_translations": true
            },
            "statistics": {
                "progress_total": 87,
                "keys_total": 13,
                "team": 2,
                "base_words": 22,
                "qa_issues_total": 65,
                "qa_issues": {
                    "not_reviewed": 39,
                    "unverified": 7,
                    "spelling_grammar": 4,
                    "inconsistent_placeholders": 5,
                    "inconsistent_html": 1,
                    "different_number_of_urls": 0,
                    "different_urls": 1,
                    "leading_whitespace": 1,
                    "trailing_whitespace": 0,
                    "different_number_of_email_address": 0,
                    "different_email_address": 0,
                    "different_brackets": 6,
                    "different_numbers": 1,
                    "double_space": 1,
                    "special_placeholder": 0
                },
                "languages": [
                    {
                        "language_id": 640,
                        "language_iso": "en",
                        "progress": 100,
                        "words_to_do": 0
                    },
                    {
                        "language_id": 800,
                        "language_iso": "lv_LV",
                        "progress": 100,
                        "words_to_do": 0
                    },
                    {
                        "language_id": 673,
                        "language_iso": "fr",
                        "progress": 63,
                        "words_to_do": 8
                    }
                ]
            }
        },
    ]
}
Create a project

Creates a new project in the specified team. Requires Admin role in the team.

Attributes
  • name
    stringRequired
    Name of the project.
  • team_id
    number
    ID of the team to create a project in. If this parameter is omitted, the project will be created in current team of the user, whose API token is specified.
  • description
    string
    Description of the project.
  • languages
    object
    List of languages to add.
    Expand attributesClose attributes
    • lang_iso
      stringRequired
      A unique language code in the system.
    • custom_iso
      string
      Override language/locale code.
  • base_lang_iso
    string
    Default: en
    Language/locale code of the project base language. Should be in a scope of languages list. Use custom_iso code in case it was defined.
  • project_type
    string
    Default: localization_files
    Project type. Allowed values are localization_files, paged_documents
Definition
POST https://api.lokalise.com/api2/projects
Example request body
{
    "name": "TheApp Project",
    "description": "iOS + Android strings of TheApp. https://theapp.com",
    "languages": [
        {
            "lang_iso": "en",
            "custom_iso": "en-us"
        },
        {
            "lang_iso": "en_GB",
            "custom_iso": "en-gb"
        }
    ],
    "base_lang_iso": "en-us"
}
Example request
curl --request POST \
--url https://api.lokalise.com/api2/projects \ --header 'content-type: application/json' \
--header 'x-api-token: f4d3f29bf893dc3583e9970735e08de094e82b0' \
--data '{"name":"TheApp Project","description":"iOS + Android strings of TheApp. https://theapp.com","languages":[{"lang_iso":"en","custom_iso":"en-us"},{"lang_iso":"en_GB","custom_iso":"en-gb"}],"base_lang_iso":"en-us"}'
Example response
{
    "project_id": "3002780358964f9bab5a92.87762498",
    "project_type": "localization_files",
    "name": "TheApp Project",
    "description": "iOS + Android strings of TheApp. https://theapp.com",
    "created_at": "2018-12-31 12:00:00 (Etc\/UTC)",
    "created_at_timestamp": 1546257600,
    "created_by": 420,
    "created_by_email": "user@mycompany.com",
    "team_id": 12345,
    "base_language_id": 640,
    "base_language_iso": "en-us",
    "settings": {
        "per_platform_key_names": false,
        "reviewing": false,
        "upvoting": false,
        "auto_toggle_unverified": true,
        "offline_translation": false,
        "key_editing": true,
        "inline_machine_translations": true
    },
    "statistics": {
        "progress_total": 0,
        "keys_total": 0,
        "team": 1,
        "base_words": 0,
        "qa_issues_total": 0,
        "qa_issues": {
            "not_reviewed": 0,
            "unverified": 0,
            "spelling_grammar": 0,
            "inconsistent_placeholders": 0,
            "inconsistent_html": 0,
            "different_number_of_urls": 0,
            "different_urls": 0,
            "leading_whitespace": 0,
            "trailing_whitespace": 0,
            "different_number_of_email_address": 0,
            "different_email_address": 0,
            "different_brackets": 0,
            "different_numbers": 0,
            "double_space": 1,
            "special_placeholder": 0
        },
        "languages": [
            {
                "language_id": 640,
                "language_iso": "en-us",
                "progress": 0,
                "words_to_do": 0
            },
            {
                "language_id": 610,
                "language_iso": "en-gb",
                "progress": 0,
                "words_to_do": 0
            }
        ]
    }
}
Retrieve a project

Retrieves a Project object.

Definition
GET https://api.lokalise.com/api2/projects/{project_id}
Example request
curl --request GET \
--url https://api.lokalise.com/api2/projects/{project_id} \ --header 'x-api-token: f4d3f29bf893dc3583e9970735e08de094e82b0'
Example response
{
    "project_id": "3002780358964f9bab5a92.87762498",
    "project_type": "localization_files",
    "name": "TheApp Project",
    "description": "iOS + Android strings of TheApp. https://theapp.com",
    "created_at": "2018-12-31 12:00:00 (Etc\/UTC)",
    "created_at_timestamp": 1546257600,
    "created_by": 420,
    "created_by_email": "user@mycompany.com",
    "team_id": 12345,
    "base_language_id": 640,
    "base_language_iso": "en",
    "settings": {
        "per_platform_key_names": false,
        "reviewing": false,
        "upvoting": false,
        "auto_toggle_unverified": true,
        "offline_translation": false,
        "key_editing": true,
        "inline_machine_translations": true
    },
    "statistics": {
        "progress_total": 87,
        "keys_total": 13,
        "team": 2,
        "base_words": 22,
        "qa_issues_total": 65,
        "qa_issues": {
            "not_reviewed": 39,
            "unverified": 7,
            "spelling_grammar": 4,
            "inconsistent_placeholders": 5,
            "inconsistent_html": 1,
            "different_number_of_urls": 0,
            "different_urls": 1,
            "leading_whitespace": 1,
            "trailing_whitespace": 0,
            "different_number_of_email_address": 0,
            "different_email_address": 0,
            "different_brackets": 6,
            "different_numbers": 1,
            "double_space": 1,
            "special_placeholder": 0
        },
        "languages": [
            {
                "language_id": 640,
                "language_iso": "en",
                "progress": 100,
                "words_to_do": 0
            },
            {
                "language_id": 800,
                "language_iso": "lv_LV",
                "progress": 100,
                "words_to_do": 0
            },
            {
                "language_id": 673,
                "language_iso": "fr",
                "progress": 63,
                "words_to_do": 8
            }
        ]
    }
}
Update a project

Updates the details of a project. Requires Manage settings admin right.

Attributes
  • name
    stringRequired
    Name of the project.
  • description
    string
    Description of the project.
Definition
PUT https://api.lokalise.com/api2/projects/{project_id}
Example request body
{
    "name": "TheZapp Project",
    "description": "iOS + Android strings of TheZapp. https://thezapp.com"
}
Example request
curl --request PUT \
--url https://api.lokalise.com/api2/projects/{project_id} \ --header 'content-type: application/json' \
--header 'x-api-token: f4d3f29bf893dc3583e9970735e08de094e82b0' \
--data '{"name":"TheZapp Project","description":"iOS + Android strings of TheZapp. https://thezapp.com"}'
Example response
{
    "project_id": "3002780358964f9bab5a92.87762498",
    "project_type": "localization_files",
    "name": "TheApp Project",
    "description": "iOS + Android strings of TheApp. https://theapp.com",
    "created_at": "2018-12-31 12:00:00 (Etc\/UTC)",
    "created_at_timestamp": 1546257600,
    "created_by": 420,
    "created_by_email": "user@mycompany.com",
    "team_id": 12345,
    "base_language_id": 640,
    "base_language_iso": "en",
    "settings": {
        "per_platform_key_names": false,
        "reviewing": false,
        "upvoting": false,
        "auto_toggle_unverified": true,
        "offline_translation": false,
        "key_editing": true,
        "inline_machine_translations": true
    },
    "statistics": {
        "progress_total": 87,
        "keys_total": 13,
        "team": 2,
        "base_words": 22,
        "qa_issues_total": 65,
        "qa_issues": {
            "not_reviewed": 39,
            "unverified": 7,
            "spelling_grammar": 4,
            "inconsistent_placeholders": 5,
            "inconsistent_html": 1,
            "different_number_of_urls": 0,
            "different_urls": 1,
            "leading_whitespace": 1,
            "trailing_whitespace": 0,
            "different_number_of_email_address": 0,
            "different_email_address": 0,
            "different_brackets": 6,
            "different_numbers": 1,
            "double_space": 1,
            "special_placeholder": 0
        },
        "languages": [
            {
                "language_id": 640,
                "language_iso": "en",
                "progress": 100,
                "words_to_do": 0
            },
            {
                "language_id": 800,
                "language_iso": "lv_LV",
                "progress": 100,
                "words_to_do": 0
            },
            {
                "language_id": 673,
                "language_iso": "fr",
                "progress": 63,
                "words_to_do": 8
            }
        ]
    }
}
Empty a project

Deletes all keys and translations from the project. Requires Manage settings admin right.

Definition
PUT https://api.lokalise.com/api2/projects/{project_id:branch}/empty
Example request
curl --request PUT \
--url https://api.lokalise.com/api2/projects/{project_id:branch}/empty \ --header 'content-type: application/json' \
--header 'x-api-token: f4d3f29bf893dc3583e9970735e08de094e82b0'
Example response
{
    "project_id": "3002780358964f9bab5a92.87762498",
    "keys_deleted": true
}
Delete a project

Deletes a project.

Definition
DELETE https://api.lokalise.com/api2/projects/{project_id}
Example request
curl --request DELETE \
--url https://api.lokalise.com/api2/projects/{project_id} \ --header 'x-api-token: f4d3f29bf893dc3583e9970735e08de094e82b0'
Example response
{
    "project_id": "3002780358964f9bab5a92.87762498",
    "project_deleted": true,
}
Screenshots
The Screenshot object
Attributes
  • screenshot_id
    number
    A unique identifier of the screenshot.
  • key_ids
    array
    List of key identifiers, the screenshot is attached to.
  • url
    string
    Link to the screenshot.
  • title
    string
    Screenshot title.
  • description
    string
    Description of the screenshot.
  • screenshot_tags
    array
    List of screenshot tags.
  • width
    number
    Width of the screenshot, in pixels.
  • height
    number
    Height of the screenshot, in pixels.
  • created_at
    string
    Creation date of the screenshot.
  • created_at_timestamp
    number
    Unix timestamp when the screenshot was created.
List all screenshots

Retrieves a list of screenshots from the project.

Url Parameters
  • limit
    string
    Default: 100
    Number of items to include (max 5000).
  • page
    string
    Default: 1
    Return results starting from this page.
Definition
GET https://api.lokalise.com/api2/projects/{project_id}/screenshots
Example request
curl --request GET \
--url https://api.lokalise.com/api2/projects/{project_id}/screenshots \ --header 'x-api-token: f4d3f29bf893dc3583e9970735e08de094e82b0'
Example response
{
    "project_id": "20008339586cded200e0d8.29879849",
    "screenshots": [
        {
            "screenshot_id": 403021,
            "data": "",
            "title": "Welcome screen",
            "description" : "",
            "key_ids": [
                1132290, 1132292, 1132293
            ],
            "tags": [
                "onboarding",
                "main"
            ],
            "width": 1024,
            "height": 768,
            "created_at": "2019-02-01 12:00:00 (Etc\/UTC)",
            "created_at_timestamp": 1546257600
        },
        {
            "screenshot_id": 403022,
            "title": "Login screen",
            "description" : "",
            "key_ids": [
                1132290, 1132292, 1132293
            ],
            "tags": [
                "onboarding",
                "main"
            ],
            "width": 1024,
            "height": 768,
            "created_at": "2019-02-01 12:00:00 (Etc\/UTC)",
            "created_at_timestamp": 1546257600
        }
    ]
}
Create screenshots

Creates one or more screenshots in the project. Requires Manage screenshots admin right.

Attributes
  • data
    stringRequired
    The screenshot, base64 encoded (with leading image type data:image/jpeg;base64,). Supported file formats are JPG and PNG.
  • title
    string
    Set screenshot title (optional).
  • description
    string
    Set screenshot description.
  • ocr
    boolean
    Default: true
    Try to recognize translations on the image and attach screenshot to all possible keys.
  • key_ids
    array
     Attach the screenshot to key IDs specified.
  • tags
    array
    List of tags to add to the uploaded screenshot.
Definition
POST https://api.lokalise.com/api2/projects/{project_id}/screenshots
Example request body
{
    "screenshots": [
        {
            "data": "data:image/jpeg;base64,D94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGL.....",
            "ocr": false,
            "key_ids": [
                1132290, 1132292, 1132293
            ],
            "tags": [
                "onboarding"
            ]
        }
    ]
}
Example request
curl --request POST \
--url https://api.lokalise.com/api2/projects/{project_id}/screenshots \ --header 'content-type: application/json' \
--header 'x-api-token: f4d3f29bf893dc3583e9970735e08de094e82b0' \
--data '{"screenshots":[{"data":"data:image/jpeg;base64,D94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGL.....","ocr":false,"key_ids":[1132290,1132292,1132293],"tags":["onboarding"]}]}'
Example response
{
    "project_id": "20008339586cded200e0d8.29879849",
    "screenshots": [
        {
            "screenshot_id": 403021,
            "url": "https://s3-eu-west-1.amazonaws.com/files/screenshots/welcome.jpg",
            "key_ids": [
                1132290, 1132292, 1132293
            ],
            "title": "Welcome screen",
            "description" : "",
            "tags": [
                "onboarding"
            ],
            "width": 1024,
            "height": 768,
            "created_at": "2019-02-01 12:00:00 (Etc\/UTC)",
            "created_at_timestamp": 1546257600
        }
    ]
}
Retrieve a screenshot

Retrieves a Screenshot object.

Definition
GET https://api.lokalise.com/api2/projects/{project_id}/screenshots/{screenshot_id}
Example request
curl --request GET \
--url https://api.lokalise.com/api2/projects/{project_id}/screenshots/{screenshot_id} \ --header 'x-api-token: f4d3f29bf893dc3583e9970735e08de094e82b0'
Example response
{
    "project_id": "20008339586cded200e0d8.29879849",
    "screenshot": {
        "screenshot_id": 403021,
        "url": "https://s3-eu-west-1.amazonaws.com/files/screenshots/welcome.jpg",
        "key_ids": [
            1132290, 1132292, 1132293
        ],
        "title": "Welcome screen",
        "description" : "",
        "tags": [
            "onboarding"
        ],
        "width": 1024,
        "height": 768,
        "created_at": "2019-02-01 12:00:00 (Etc\/UTC)",
        "created_at_timestamp": 1546257600
    }
}
Update a screenshot

Updates the properties of a screenshot. Requires Manage screenshots admin right.

Attributes
  • title
    string
    Set screenshot title (optional).
  • description
    string
    Set screenshot description.
  • key_ids
    array
     Attach the screenshot to key IDs specified.
  • tags
    array
    List of tags to add to the uploaded screenshot.
Definition
PUT https://api.lokalise.com/api2/projects/{project_id:branch}/screenshots/{screenshot_id}
Example request body
{
    "key_ids": [
        1132290, 1132292
    ],
    "tags": [
        "main"
    ]
}
Example request
curl --request PUT \
--url https://api.lokalise.com/api2/projects/{project_id:branch}/screenshots/{screenshot_id} \ --header 'content-type: application/json' \
--header 'x-api-token: f4d3f29bf893dc3583e9970735e08de094e82b0' \
--data '{"key_ids":[1132290,1132292],"tags":["main"]}'
Example response
{
    "project_id": "20008339586cded200e0d8.29879849",
    "screenshot": {
        "screenshot_id": 403021,
        "url": "https://s3-eu-west-1.amazonaws.com/files/screenshots/welcome.jpg",
        "key_ids": [
            1132290, 1132292
        ],
        "title": "Welcome screen",
        "description" : "",
        "tags": [
            "main"
        ],
        "width": 1024,
        "height": 768,
        "created_at": "2019-02-01 12:00:00 (Etc\/UTC)",
        "created_at_timestamp": 1546257600
    }
}
Delete a screenshot

Deletes a screenshot from the project. Requires Manage screenshots admin right.

Definition
DELETE https://api.lokalise.com/api2/projects/{project_id}/screenshots/{screenshot_id}
Example request
curl --request DELETE \
--url https://api.lokalise.com/api2/projects/{project_id}/screenshots/{screenshot_id}
Example response
{
    "project_id": "3002780358964f9bab5a92.87762498",
    "screenshot_deleted": true
}
Snapshots
The Snapshot object
Attributes
  • snapshot_id
    number
    A unique identifier of the snapshot.
  • title
    string
    Snapshot title.
  • created_at
    string
    Date and time of the snapshot creation.
  • created_at_timestamp
    string
    Unix timestamp when the snapshot was created.
  • created_by
    number
    Identifier of a user, who has created the snapshot.
  • created_by_email
    string
    E-mail of a user, who has created the snapshot.
List all snapshots

Retrieves a list of project snapshots. Requires Manage settings admin right.

Url Parameters
  • limit
    string
    Default: 100
    Number of items to include (max 5000).
  • page
    string
    Default: 1
    Return results starting from this page.
Definition
GET https://api.lokalise.com/api2/projects/{project_id}/snapshots
Example request
curl --request GET \
--url https://api.lokalise.com/api2/projects/{project_id}/snapshots \ --header 'x-api-token: f4d3f29bf893dc3583e9970735e08de094e82b0'
Example response
{
    "project_id": "20008339586cded200e0d8.29879849",
    "snapshots": [
        {
            "snapshot_id": 1523966589,
            "title": "API snapshot",
            "created_at": "2018-12-31 12:00:00 (Etc\/UTC)",
            "created_at_timestamp": 1546257600,
            "created_by": 420,
            "created_by_email": "user@mycompany.com"
        },
        {
            "snapshot_id": 1523966599,
            "title": "API snapshot",
            "created_at": "2018-12-31 12:00:00 (Etc\/UTC)",
            "created_at_timestamp": 1546257600,
            "created_by": 420,
            "created_by_email": "user@mycompany.com"
        }
    ]
}
Create a snapshot

Creates snapshot of the project. Requires Manage settings admin right.

Attributes
  • title
    string
    Set snapshot title.
Definition
POST https://api.lokalise.com/api2/projects/{project_id}/snapshots
Example request body
{
    "title": "API snapshot"
}
Example request
curl --request POST \
--url https://api.lokalise.com/api2/projects/{project_id}/snapshots \ --header 'content-type: application/json' \
--header 'x-api-token: f4d3f29bf893dc3583e9970735e08de094e82b0' \
--data '{"title":"API snapshot"}'
Example response
{
    "project_id": "20008339586cded200e0d8.29879849",
    "snapshot": {
        "snapshot_id": 1523966599,
        "title": "API snapshot",
        "created_at": "2018-12-31 12:00:00 (Etc\/UTC)",
        "created_at_timestamp": 1546257600,
        "created_by": 420,
        "created_by_email": "user@mycompany.com"
    }
}
Restore a snapshot

Restores project snapshot to a project copy. Requires Manage settings admin right and Admin role in the team.

Definition
POST https://api.lokalise.com/api2/projects/{project_id}/snapshots/{snapshot_id}
Example request
curl --request POST \
--url https://api.lokalise.com/api2/projects/{project_id}/snapshots/{snapshot_id} \ --header 'content-type: application/json' \
--header 'x-api-token: f4d3f29bf893dc3583e9970735e08de094e82b0'
Example response
{
    "project_id": "3002780358964f9bab5a92.87762498",
    "project_type": "localization_files",
    "name": "TheApp Project Copy",
    "description": "iOS + Android strings of TheApp. https://theapp.com",
    "created_at": "2018-12-13 12:00:00 (Etc\/UTC)",
    "created_at_timestamp": 1546257600,
    "created_by": 420,
    "created_by_email": "user@mycompany.com",
    "team_id": 12345,
    "base_language_id": 640,
    "base_language_iso": "en",
    "settings": {
        "per_platform_key_names": false,
        "reviewing": false,
        "upvoting": false,
        "auto_toggle_unverified": true,
        "offline_translation": false,
        "key_editing": true,
        "inline_machine_translations": true
    },
    "statistics": {
        "progress_total": 87,
        "keys_total": 13,
        "team": 2,
        "base_words": 22,
        "qa_issues_total": 65,
        "qa_issues": {
            "not_reviewed": 39,
            "unverified": 7,
            "spelling_grammar": 4,
            "inconsistent_placeholders": 5,
            "inconsistent_html": 1,
            "different_number_of_urls": 0,
            "different_urls": 1,
            "leading_whitespace": 1,
            "trailing_whitespace": 0,
            "different_number_of_email_address": 0,
            "different_email_address": 0,
            "different_brackets": 6,
            "different_numbers": 1,
            "double_space": 1,
            "special_placeholder": 0
        },
        "languages": [
            {
                "language_id": 640,
                "language_iso": "en",
                "progress": 100,
                "words_to_do": 0
            },
            {
                "language_id": 800,
                "language_iso": "lv_LV",
                "progress": 100,
                "words_to_do": 0
            },
            {
                "language_id": 673,
                "language_iso": "fr",
                "progress": 63,
                "words_to_do": 8
            }
        ]
    }
}
Delete a snapshot

Deletes project snapshot. Requires Manage settings admin right.

Definition
DELETE https://api.lokalise.com/api2/projects/{project_id}/snapshots/{snapshot_id}
Example request
curl --request DELETE \
--url https://api.lokalise.com/api2/projects/{project_id}/snapshots/{snapshot_id}
Example response
{
    "project_id": "3002780358964f9bab5a92.87762498",
    "snapshot_deleted": true
}
Tasks
The Task object
Attributes
  • task_id
    number
    A unique task identifier.
  • title
    string
    Task title.
  • description
    string
    Short description of the task.
  • status
    string
    Status of the task. Allowed values are completed, in progress, created, queued.
  • progress
    number
    Task progress in percents (0% - 100%).
  • due_date
    string
    Due date.
  • due_date_timestamp
    number
    Unix timestamp of the Due date.
  • keys_count
    number
    Total number of keys in the task.
  • words_count
    number
    Total number of source words in the task.
  • created_at
    string
    Date and time of the task creation.
  • created_at_timestamp
    number
    Unix timestamp when the task was created.
  • created_by
    number
    Identifier of a user, who has created the task.
  • created_by_email
    string
    E-mail of a user, who has created the task.
  • can_be_parent
    boolean
    Can task be assigned as a parent task.
  • task_type
    string
    translation or review.
  • parent_task_id
    number
    ID of the parent task.
  • closing_tags
    array
    Tags that will be added to affected keys when task is closed.
  • do_lock_translations
    boolean
    If set to true, will lock translations for non-assigned project members.
  • languages
    object
    List of languages in the task.
    Expand attributesClose attributes
    • language_iso
      string
      Language code.
    • users
      object
      List of users, assigned to work on the language.
      Expand attributesClose attributes
      • user_id
        number
        A unique identifier of the user.
      • email
        string
        E-mail of the user.
      • fullname
        string
        Full name of the user.
    • groups
      object
      List of groups, assigned to work on the language.
      Expand attributesClose attributes
      • id
        number
        A unique identifier of the user group.
      • name
        string
        Name of the group.
    • keys
      array
      List of keys identifiers, included in task for this language.
    • status
      string
      Status of the language in the task. Allowed values are completed, in progress, created.
    • progress
      number
      Language progress in percents (0% - 100%).
    • initial_tm_leverage
      object
      Translation memory leverage.
      Expand attributesClose attributes
      • 0%+
        number
        Number of keys with TM match from 0% to 60%.
      • 60%+
        number
        Number of keys with TM match from 60% to 75%.
      • 75%+
        number
        Number of keys with TM match from 75% to 95%.
      • 95%+
        number
        Number of keys with TM match from 95% to 100%.
      • 100%
        number
        Number of keys with TM 100% match.
    • keys_count
      number
      Number of keys for the language.
    • words_count
      number
      Number of source words for the language.
    • completed_at
      string
      Date and time of the language completion.
    • completed_at_timestamp
      number
      Unix timestamp when the language was completed.
    • completed_by
      number
      Identifier of a user, who has completed the language.
    • completed_by_email
      string
      E-mail of a user, who has completed the language.
  • auto_close_languages
    boolean
    Whether languages should be closed automatically upon completion of the last item.
  • auto_close_task
    boolean
    Whether the task should be automatically closed upon all language completion.
  • completed_at
    string
    Date and time of the task completion.
  • completed_at_timestamp
    number
    Unix timestamp when the task was completed.
  • completed_by
    number
    Identifier of a user, who has completed the task.
  • completed_by_email
    string
    E-mail of a user, who has completed the task.
  • custom_translation_status_ids
    array
    IDs of custom translation statuses that will be applied to task items after item is completed.
List all tasks

Lists all tasks in the project.

Url Parameters
  • filter_title
    string
    Set title filter for the list.
  • filter_statuses
    string
    One or more task statuses to filter by (comma separated). Possible values are created, queued, in_progress and completed.
  • limit
    string
    Default: 100
    Number of items to include (max 5000).
  • page
    string
    Default: 1
    Return results starting from this page.
Definition
GET https://api.lokalise.com/api2/projects/{project_id:branch}/tasks
Example request
curl --request GET \
--url https://api.lokalise.com/api2/projects/{project_id:branch}/tasks \ --header 'x-api-token: f4d3f29bf893dc3583e9970735e08de094e82b0'
Example response
{
    "project_id": "20008339586cded200e0d8.29879849",
    "tasks": [
        {
            "task_id": 55392,
            "title": "Voicemail messages",
            "can_be_parent": false,
            "task_type": "translation",
            "parent_task_id": 12345,
            "closing_tags": ["tag_one", "tag_two"],
            "do_lock_translations": false,
            "description": "Need your help with some voicemail message translation. Thanks!",
            "status": "in progress",
            "progress": 25,
            "due_date": "2018-12-31 12:00:00 (Etc\/UTC)",
            "due_date_timestamp": 1546257600,
            "keys_count": 3,
            "words_count": 91,
            "created_at": "2018-12-31 12:00:00 (Etc\/UTC)",
            "created_at_timestamp": 1546257600,
            "created_by": 420,
            "created_by_email": "manager@yourcompany.com",
            "languages": [
                {
                    "language_iso": "fi",
                    "users": [
                        {
                            "user_id": 421,
                            "email": "jdoe@mycompany.com",
                            "fullname": "John Doe"
                        }
                    ],
                    "groups": [
                        {
                            "id": 191,
                            "name": "Voicemail translators"
                        }
                    ],
                    "keys": [
                        11212, 11241, 11245
                    ],
                    "status": "created",
                    "progress": 0,
                    "initial_tm_leverage": {
                        "0%+": 3,
                        "60%+": 0,
                        "75%+": 0,
                        "95%+": 0,
                        "100%": 0
                    },
                    "keys_count": 3,
                    "words_count": 91,
                    "completed_at": null,
                    "completed_at_timestamp": null,
                    "completed_by": null,
                    "completed_by_email": null
                },
                {
                    "language_iso": "ru",
                    "users": [
                        {
                            "user_id": 422,
                            "email": "jfox@mycompany.com",
                            "fullname": "James Fox"
                        }
                    ],
                    "groups": [],
                    "keys": [
                        11212, 11241, 11245
                    ],
                    "status": "in progress",
                    "progress": 80,
                    "initial_tm_leverage": {
                        "0%+": 3,
                        "60%+": 0,
                        "75%+": 0,
                        "95%+": 0,
                        "100%": 0
                    },
                    "keys": 3,
                    "words": 91,
                    "completed_at": null,
                    "completed_at_timestamp": null,
                    "completed_by": null,
                    "completed_by_email": null
                }                        
            ],
            "auto_close_languages": true,
            "auto_close_task": true,
            "completed_at": null,
            "completed_at_timestamp": null,
            "completed_by": null,
            "completed_by_email": null,
            "custom_translation_status_ids": [77, 85, 86]
        }
    ]
}
Create a task

Creates a task in the project. Requires Manage tasks admin right.

Attributes
  • title
    stringRequired
    Task title.
  • description
    string
    Short description of the task.
  • due_date
    string
    Due date in Y-m-d H:i:s format. Example: "2018-12-24 23:59:59"
  • keys
    array
    List of keys identifiers, included in task. Required if parent_task_id is not specified
  • languages
    objectRequired
    List of languages in the task. One of `users` or `groups` must be provided.
    Expand attributesClose attributes
    • language_iso
      stringRequired
      Language code.
    • users
      array
      List of users identifiers, assigned to work on the language.
    • groups
      array
      List of user group identifiers, assigned to work on the language.
  • auto_close_languages
    boolean
    Default: true
    Whether languages should be closed automatically upon completion of the last item.
  • auto_close_task
    boolean
    Default: true
    Whether the task should be automatically closed upon all language completion.
  • initial_tm_leverage
    boolean
    Enable to calculate and save initial TM leverage with this task.
  • task_type
    string
    Specify if task type is translation (default) or review.
  • parent_task_id
    number
    If task_type is review, it can have a parent task. Current task will be opened when parent task is closed.
  • closing_tags
    array
    Tags that will be added to affected keys when task is closed.
  • do_lock_translations
    boolean
    If set to true, will lock translations for non-assigned project members.
  • custom_translation_status_ids
    array
    IDs of custom translation statuses that will be applied to task items after item is completed.
Definition
POST https://api.lokalise.com/api2/projects/{project_id:branch}/tasks
Example request body
{
    "title": "Voicemail messages",
    "description": "Need your help with some voicemail message translation. Thanks!",
    "due_date": "2018-12-31 12:00:00",
    "keys": [
        11212, 11241, 11245
    ],
    "languages": [
        {
            "language_iso": "fi",
            "users": [
                421
            ]
        },
        {
            "language_iso": "ru",
            "groups": [
                191
            ]
        }
    ],
    "auto_close_languages": true,
    "auto_close_task": true,
    "task_type": "translation",
    "parent_task_id": 12345,
    "closing_tags": ["tag_one", "tag_two"],
    "do_lock_translations": true,
    "custom_translation_status_ids": [77, 85, 86]
}
Example request
curl --request POST \
--url https://api.lokalise.com/api2/projects/{project_id:branch}/tasks \ --header 'content-type: application/json' \
--header 'x-api-token: f4d3f29bf893dc3583e9970735e08de094e82b0' \
--data '{"title":"Voicemail messages","description":"Need your help with some voicemail message translation. Thanks!","due_date":"2018-12-31 12:00:00","keys":[11212,11241,11245],"languages":[{"language_iso":"fi","users":[421]},{"language_iso":"ru","groups":[191]}],"auto_close_languages":true,"auto_close_task":true,"task_type":"translation","parent_task_id":12345,"closing_tags":["tag_one","tag_two"],"do_lock_translations":true,"custom_translation_status_ids":[77,85,86]}'
Example response
{
    "project_id": "20008339586cded200e0d8.29879849",
    "task": {
        "task_id": 55392,
        "title": "Voicemail messages",
        "description": "Need your help with some voicemail message translation. Thanks!",
        "status": "in progress",
        "progress": 0,
        "can_be_parent": true,
        "task_type": "review",
        "parent_task_id": 12345,
        "closing_tags": ["tag_one", "tag_two"],
        "do_lock_translations": true,
        "due_date": "2018-12-31 12:00:00 (Etc\/UTC)",
        "due_date_timestamp": 1546257600,
        "keys_count": 3,
        "words_count": 91,
        "created_at": "2018-12-31 12:00:00 (Etc\/UTC)",
        "created_at_timestamp": 1546257600,
        "created_by": 420,
        "created_by_email": "manager@yourcompany.com",
        "languages": [
            {
                "language_iso": "fi",
                "users": [
                    {
                        "user_id": 421,
                        "email": "jdoe@mycompany.com",
                        "fullname": "John Doe"
                    }
                ],
                "groups": [],
                "keys": [
                    11212, 11241, 11245
                ],
                "status": "created",
                "progress": 0,
                "initial_tm_leverage": [],
                "keys_count": 3,
                "words_count": 91,
                "completed_at": null,
                "completed_at_timestamp": null,
                "completed_by": null,
                "completed_by_email": null
            },
            {
                "language_iso": "ru",
                "users": [],
                "groups": [
                    {
                        "id": 191,
                        "name": "Voicemail translators"
                    }
                ],
                "keys": [
                    11212, 11241, 11245
                ],
                "status": "in progress",
                "progress": 0,
                "initial_tm_leverage": [],
                "keys": 3,
                "words": 91,
                "completed_at": null,
                "completed_at_timestamp": null,
                "completed_by": null,
                "completed_by_email": null
            }                        
        ],
        "auto_close_languages": true,
        "auto_close_task": true,
        "completed_at": null,
        "completed_at_timestamp": null,
        "completed_by": null,
        "completed_by_email": null,
        "custom_translation_status_ids": [77, 85, 86]
    }
}
Retrieve a task

Retrieves a Task object.

Definition
GET https://api.lokalise.com/api2/projects/{project_id:branch}/tasks/{task_id}
Example request
curl --request GET \
--url https://api.lokalise.com/api2/projects/{project_id:branch}/tasks/{task_id} \ --header 'x-api-token: f4d3f29bf893dc3583e9970735e08de094e82b0'
Example response
{
    "project_id": "20008339586cded200e0d8.29879849",
    "task": {
        "task_id": 55392,
        "title": "Voicemail messages",
        "description": "Need your help with some voicemail message translation. Thanks!",
        "status": "in progress",
        "progress": 80,
        "can_be_parent": true,
        "task_type": "review",
        "parent_task_id": 12345,
        "closing_tags": ["tag_one", "tag_two"],
        "do_lock_translations": false,
        "due_date": "2018-12-31 12:00:00 (Etc\/UTC)",
        "due_date_timestamp": 1546257600,
        "keys_count": 3,
        "words_count": 91,
        "created_at": "2018-12-31 12:00:00 (Etc\/UTC)",
        "created_at_timestamp": 1546257600,
        "created_by": 420,
        "created_by_email": "manager@yourcompany.com",
        "languages": [
            {
                "language_iso": "fi",
                "users": [
                    {
                        "user_id": 421,
                        "email": "jdoe@mycompany.com",
                        "fullname": "John Doe"
                    }
                ],
                "groups": [
                    {
                        "id": 191,
                        "name": "Voicemail translators"
                    }
                ],
                "keys": [
                    11212, 11241, 11245
                ],
                "status": "created",
                "progress": 0,
                "initial_tm_leverage": {
                    "0%+": 3,
                    "60%+": 0,
                    "75%+": 0,
                    "95%+": 0,
                    "100%": 0
                },
                "keys_count": 3,
                "words_count": 91,
                "completed_at": null,
                "completed_at_timestamp": null,
                "completed_by": null,
                "completed_by_email": null
            },
            {
                "language_iso": "ru",
                "users": [
                    {
                        "user_id": 422,
                        "email": "jfox@mycompany.com",
                        "fullname": "James Fox"
                    }
                ],
                "groups": [
                    {
                        "id": 191,
                        "name": "Voicemail translators"
                    }
                ],
                "keys": [
                    11212, 11241, 11245
                ],
                "status": "in progress",
                "progress": 90,
                "initial_tm_leverage": {
                    "0%+": 2,
                    "60%+": 0,
                    "75%+": 1,
                    "95%+": 0,
                    "100%": 0
                },
                "keys": 3,
                "words": 91,
                "completed_at": null,
                "completed_at_timestamp": null,
                "completed_by": null,
                "completed_by_email": null
            }                        
        ],
        "auto_close_languages": true,
        "auto_close_task": true,
        "completed_at": null,
        "completed_at_timestamp": null,
        "completed_by": null,
        "completed_by_email": null,
        "custom_translation_status_ids": [77, 85, 86]
    }
}
Update a task

Updates the properties of a task. Requires Manage tasks admin right.

Attributes
  • title
    string
    Task title.
  • description
    string
    Short description of the task.
  • due_date
    string
    Due date in Y-m-d H:i:s format. Example: "2018-12-24 23:59:59"
  • languages
    object
    List of languages in the task.
    Expand attributesClose attributes
    • language_iso
      string
      Language code.
    • users
      array
      List of user identifiers, assigned to work on the language.
    • groups
      array
      List of group identifiers, assigned to work on the language.
    • close_language
      boolean
      Whether the language should be closed and notifications sent. Action cannot be undone.
  • auto_close_languages
    boolean
    Whether languages should be closed automatically upon completion of the last item.
  • auto_close_task
    boolean
    Whether the task should be automatically closed upon all language completion.
  • close_task
    boolean
    Whether the task should be closed and notifications sent. The task cannot be reopened again.
  • closing_tags
    array
    Tags that will be added to affected keys when task is closed.
  • do_lock_translations
    boolean
    If set to true, will lock translations for non-assigned project members.
Definition
PUT https://api.lokalise.com/api2/projects/{project_id:branch}/tasks/{task_id}
Example request body
{
    "due_date": "2019-12-31 12:00:00",
    "auto_close_languages": false,
    "auto_close_task": false
}
Example request
curl --request PUT \
--url https://api.lokalise.com/api2/projects/{project_id:branch}/tasks/{task_id} \ --header 'content-type: application/json' \
--header 'x-api-token: f4d3f29bf893dc3583e9970735e08de094e82b0' \
--data '{"due_date":"2019-12-31 12:00:00","auto_close_languages":false,"auto_close_task":false}'
Example response
{
    "project_id": "20008339586cded200e0d8.29879849",
    "task": {
        "task_id": 55392,
        "title": "Voicemail messages",
        "description": "Need your help with some voicemail message translation. Thanks!",
        "status": "in progress",
        "progress": 40,
        "can_be_parent": true,
        "task_type": "translation",
        "parent_task_id": 12345,
        "closing_tags": ["tag_one", "tag_two"],
        "do_lock_translations": false,
        "due_date": "2019-12-31 12:00:00 (Etc\/UTC)",
        "due_date_timestamp": 1546257600,
        "keys_count": 3,
        "words_count": 91,
        "created_at": "2018-12-31 12:00:00 (Etc\/UTC)",
        "created_at_timestamp": 1546257600,
        "created_by": 420,
        "created_by_email": "manager@yourcompany.com",
        "languages": [
            {
                "language_iso": "fi",
                "users": [
                    {
                        "user_id": 421,
                        "email": "jdoe@mycompany.com",
                        "fullname": "John Doe"
                    }
                ],
                "groups": [
                    {
                        "id": 191,
                        "name": "Voicemail translators"
                    }
                ],
                "keys": [
                    11212, 11241, 11245
                ],
                "status": "created",
                "progress": 0,
                "initial_tm_leverage": {
                    "0%+": 0,
                    "60%+": 1,
                    "75%+": 2,
                    "95%+": 0,
                    "100%": 0
                },
                "keys_count": 3,
                "words_count": 91,
                "completed_at": null,
                "completed_at_timestamp": null,
                "completed_by": null,
                "completed_by_email": null
            },
            {
                "language_iso": "ru",
                "users": [
                    {
                        "user_id": 422,
                        "email": "jfox@mycompany.com",
                        "fullname": "James Fox"
                    }
                ],
                "groups": [],
                "keys": [
                    11212, 11241, 11245
                ],
                "status": "in progress",
                "progress": 90,
                "initial_tm_leverage": {
                    "0%+": 3,
                    "60%+": 0,
                    "75%+": 0,
                    "95%+": 0,
                    "100%": 0
                },
                "keys": 3,
                "words": 91,
                "completed_at": null,
                "completed_at_timestamp": null,
                "completed_by": null,
                "completed_by_email": null
            }                        
        ],
        "auto_close_languages": false,
        "auto_close_task": false,
        "completed_at": null,
        "completed_at_timestamp": null,
        "completed_by": null,
        "completed_by_email": null
    }
}
Delete a task

Deletes a task from the project. Requires Manage tasks admin right.

Definition
DELETE https://api.lokalise.com/api2/projects/{project_id:branch}/tasks/{task_id}
Example request
curl --request DELETE \
--url https://api.lokalise.com/api2/projects/{project_id:branch}/tasks/{task_id} \ --header 'x-api-token: f4d3f29bf893dc3583e9970735e08de094e82b0'
Example response
{
    "project_id": "3002780358964f9bab5a92.87762498",
    "task_deleted": true
}
Teams
The Team object
Attributes
  • team_id
    number
    A unique team identifier.
  • name
    string
    Team name.
  • created_at
    string
    Date and time when team was created.
  • created_at_timestamp
    number
    Unix timestamp when the team was created.
  • plan
    string
    Current subscription plan of the team.
  • quota_usage
    object
    Current plan quota usage.
    Expand attributesClose attributes
    • users
      number
      Total number of users allowed in the team.
    • keys
      number
      Total number of keys across all team projects.
    • projects
      number
      Total number of projects in the team.
    • mau
      number
      Total number of monthly active users (for Lokalise SDK).
  • quota_allowed
    object
    Current plan allowances.
    Expand attributesClose attributes
    • users
      number
      Total number of users allowed in the team.
    • keys
      number
      Total number of keys across all team projects.
    • projects
      number
      Total number of projects in the team.
    • mau
      number
      Total number of monthly active users (for Lokalise SDK).
List all teams

Lists all teams available to the user.

Url Parameters
  • limit
    string
    Default: 100
    Number of items to include (max 5000).
  • page
    string
    Default: 1
    Return results starting from this page.
Definition
GET https://api.lokalise.com/api2/teams
Example request
curl --request GET \
--url https://api.lokalise.com/api2/teams \ --header 'x-api-token: f4d3f29bf893dc3583e9970735e08de094e82b0'
Example response
{
    "teams": [
        {
            "team_id": 18821,
            "name": "MyCompany, Ltd.",
            "created_at": "2018-12-31 12:00:00 (Etc\/UTC)",
            "created_at_timestamp": 1546257600,
            "plan": "Essential",
            "quota_usage": {
                "users": 14,
                "keys": 8125,
                "projects": 4,
                "mau": 119337
            },
            "quota_allowed": {
                "users": 40,
                "keys": 10000,
                "projects": 99999999,
                "mau": 200000
            }
        }
    ]
}
Team users
The Team user object
Attributes
  • user_id
    number
    A unique identifier of the user.
  • email
    string
    E-mail of the user.
  • fullname
    string
    User name and last name.
  • created_at
    string
    Date/time at which the user was created.
  • created_at_timestamp
    number
    Unix timestamp when the user was created.
  • role
    string
    Role of the user. Available roles are owner, admin, member.
List all team users

Lists all team users. Requires Admin role in the team.

Url Parameters
  • limit
    string
    Default: 100
    Number of items to include (max 5000).
  • page
    string
    Default: 1
    Return results starting from this page.
Definition
GET https://api.lokalise.com/api2/teams/{team_id}/users
Example request
curl --request GET \
--url https://api.lokalise.com/api2/teams/{team_id}/users \ --header 'x-api-token: f4d3f29bf893dc3583e9970735e08de094e82b0'
Example response
{
    "team_id": 18821,
    "team_users": [
        {
            "user_id": 420,
            "email": "jdoe@mycompany.com",
            "fullname": "John Doe",
            "created_at": "2018-12-31 12:00:00 (Etc\/UTC)",
            "created_at_timestamp": 1546257600,
            "role": "owner"
        },
        {
            "user_id": 421,
            "email": "axel@mycompany.com",
            "fullname": "Axel Foley",
            "created_at": "2018-12-31 12:00:00 (Etc\/UTC)",
            "created_at_timestamp": 1546257600,
            "role": "member"
        }
    ]
}
Retrieve a team user

Retrieves a Team user object. Requires Admin role in the team.

Definition
GET https://api.lokalise.com/api2/teams/{team_id}/users/{user_id}
Example request
curl --request GET \
--url https://api.lokalise.com/api2/teams/{team_id}/users/{user_id} \ --header 'x-api-token: f4d3f29bf893dc3583e9970735e08de094e82b0'
Example response
{
    "team_id": 18821,
    "team_user": {
        "user_id": 420,
        "email": "jdoe@mycompany.com",
        "fullname": "John Doe",
        "created_at": "2018-12-31 12:00:00 (Etc\/UTC)",
        "created_at_timestamp": 1546257600,
        "role": "owner"
    }
}
Update a team user

Updates the role of a team user. Requires Admin role in the team.

Attributes
  • role
    string
    Role of the user. Available roles are owner, admin, member.
Definition
PUT https://api.lokalise.com/api2/teams/{team_id}/users/{user_id}
Example request body
{
    "role": "admin"
}
Example request
curl --request PUT \
--url https://api.lokalise.com/api2/teams/{team_id}/users/{user_id} \ --header 'content-type: application/json' \
--header 'x-api-token: f4d3f29bf893dc3583e9970735e08de094e82b0' \
--data '{"role":"admin"}'
Example response
{
    "team_id": 18821,
    "team_user": {
        "user_id": 421,
        "email": "axel@mycompany.com",
        "fullname": "Axel Foley",
        "created_at": "2018-12-31 12:00:00 (Etc\/UTC)",
        "created_at_timestamp": 1546257600,
        "role": "admin"
    }
}
Delete a team user

Deletes a user from the team. Requires Admin role in the team.

Definition
DELETE https://api.lokalise.com/api2/teams/{team_id}/users/{user_id}
Example request
curl --request DELETE \
--url https://api.lokalise.com/api2/teams/{team_id}/users/{user_id} \ --header 'x-api-token: f4d3f29bf893dc3583e9970735e08de094e82b0'
Example response
{
    "team_id": 18821,
    "team_user_deleted": true
}
Team user groups
The Team user group object
Attributes
  • group_id
    number
    A unique identifier of the group.
  • name
    string
    Name of the group.
  • permissions
    object
    List of group permissions.
    Expand attributesClose attributes
    • is_admin
      boolean
      Whether the user has Admin access to the project.
    • is_reviewer
      boolean
      Whether the user has Reviewer access to the project.
    • admin_rights
      array
      List of group administrative permissions.
    • languages
      object
      List of languages, accessible to the user.
      Expand attributesClose attributes
      • lang_id
        number
        Language ID.
      • lang_iso
        string
        Language code.
      • lang_name
        string
        Language name.
      • is_writable
        boolean
        Whether the user has write access to the language.
  • created_at
    string
    Date/time at which the group was created.
  • created_at_timestamp
    number
    Unix timestamp when the group was created.
  • team_id
    number
    Team identifier.
  • projects
    array
    List of projects, group is added to.
  • members
    array
    List of group members (user IDs).
List all groups

Lists all user groups in the team.

Url Parameters
  • limit
    string
    Default: 100
    Number of items to include (max 5000).
  • page
    string
    Default: 1
    Return results starting from this page.
Definition
GET https://api.lokalise.com/api2/teams/{team_id}/groups
Example request
curl --request GET \
--url 'https://api.lokalise.com/api2/teams/{team_id}/groups?limit={limit}&page={page}' \
--header 'x-api-token: f4d3f29bf893dc3583e9970735e08de094e82b0'
Example response
{
    "team_id": 444,
    "user_groups": [
        {
            "group_id": 50031,
            "name": "Proofreaders",
            "permissions": [
                "is_admin": false,
                "is_reviewer": true,
                "languages": [
                    {
                        "lang_id": 640,
                        "lang_iso": "en",
                        "lang_name": "English",
                        "is_writable": 1
                    },
                    {
                        "lang_id": 597,
                        "lang_iso": "ru",
                        "lang_name": "Russian",
                        "is_writable": 1
                    }
                ],
                "admin_rights": []
            ],
            "created_at": "2019-01-08 09:10:46 (Etc/UTC)",
            "created_at_timestamp": 1546257600,
            "team_id": 444,
            "projects": [
                "598901215bexxx43dcba74.xxx"
            ],
            "members": [
                22212
            ]
        }
    ]
}
Create a group

Creates a group in the team. Requires Admin right in the team.

If is_admin flag is set to true, the group would automatically get access to all project languages, overriding supplied languages object.

Attributes
  • name
    stringRequired
    Name of the group.
  • is_reviewer
    booleanRequired
    Whether the group has reviewer access to the project.
  • is_admin
    booleanRequired
    Whether the group has Admin access to the project.
  • admin_rights
    array
    List of group administrative permissions. Required if group has admin rights. Possible values are upload, activity, download, settings, statistics, keys, screenshots, contributors, languages.
  • languages
    object
    Required if group doesn't have admin rights.
    Expand attributesClose attributes
    • reference
      array
      List of reference language IDs for the group
    • contributable
      array
      List of contributable language IDs for the group
Definition
POST https://api.lokalise.com/api2/teams/{team_id}/groups
Example request body
{
    "name": "Proofreaders",
    "is_reviewer": true,
    "is_admin": false,
    "admin_rights": [],
    "languages": {
        "reference": [],
        "contributable": [640]
    }
}
Example request
curl --request POST \
--url https://api.lokalise.com/api2/teams/{team_id}/groups \ --header 'content-type: application/json' \
--header 'x-api-token: f4d3f29bf893dc3583e9970735e08de094e82b0' \
--data '{"name":"Proofreaders","is_reviewer":true,"is_admin":false,"admin_rights":[],"languages":{"reference":[],"contributable":[640]}}'
Example response
{
    "team_id": 444,
    "group": {
        "group_id": 50031,
        "name": "Proofreaders",
        "permissions": {
            "is_admin": false,
            "is_reviewer": false,
            "admin_rights": [],
            "languages": [
                {
                    "lang_id": 640,
                    "lang_iso": "en",
                    "lang_name": "English",
                    "is_writable": true
                }
            ]
        },
        "created_at": "2019-01-08 09:10:46 (Etc/UTC)",
        "created_at_timestamp": 1546257600,
        "team_id": 444,
        "projects": [],
        "members": []
    }
}
Retrieve a group

Retrieves a User group object.

Definition
GET https://api.lokalise.com/api2/teams/{team_id}/groups/{group_id}
Example request
curl --request GET \
--url https://api.lokalise.com/api2/teams/{team_id}/groups/{group_id} \ --header 'x-api-token: f4d3f29bf893dc3583e9970735e08de094e82b0'
Example response
{
    "group_id": 50031,
    "name": "Proofreaders",
    "permissions": {
        "is_admin": false,
        "is_reviewer": true,
        "admin_rights": [],
        "languages": [
            {
                "lang_id": 640,
                "lang_iso": "en",
                "lang_name": "English",
                "is_writable": true
            }
        ]
    },
    "created_at": "2019-01-08 09:15:28 (Etc/UTC)",
    "created_at_timestamp": 1546257600,
    "team_id": 444,
    "projects": [],
    "members": []
}
Update a group

Updates the properties of a group. Requires Admin right in the team.

Attributes
  • name
    stringRequired
    Name of the group.
  • is_reviewer
    booleanRequired
    Wheter the group has Reviewer access to the project.
  • is_admin
    booleanRequired
    Whether the group has Admin access to the project.
  • admin_rights
    array
    List of group administrative permissions. Required if group has admin rights. Possible values are upload, activity, download, settings, statistics, keys, screenshots, contributors, languages.
  • languages
    object
    Required if group doesn't have admin rights.
    Expand attributesClose attributes
    • reference
      array
      List of reference language IDs for the group
    • contributable
      array
      List of contributable language IDs for the group
Definition
PUT https://api.lokalise.com/api2/teams/{team_id}/groups/{group_id}
Example request body
{
    "name": "Proofreading admins",
    "is_reviewer": true,
    "is_admin": true,
    "admin_rights": [
        "upload",
        "download",
        "tasks",
        "contributors",
        "screenshots",
        "keys",
        "languages",
        "settings",
        "activity",
        "statistics"
    ],
    "languages": {
        "reference": [],
        "contributable": []
    }
}
Example request
curl --request PUT \
--url https://api.lokalise.com/api2/teams/{team_id}/groups/{group_id} \ --header 'content-type: application/json' \
--header 'x-api-token: f4d3f29bf893dc3583e9970735e08de094e82b0' \
--data '{"name":"Proofreading admins","is_reviewer":true,"is_admin":true,"admin_rights":["upload","download","tasks","contributors","screenshots","keys","languages","settings","activity","statistics"],"languages":{"reference":[],"contributable":[]}}'
Example response
{
    "team_id": 444,
    "group": {
        "group_id": 50031,
        "name": "Proofreading admins",
        "permissions": {
            "is_admin": true,
            "is_reviewer": true,
            "admin_rights": [
                "upload",
                "download",
                "tasks",
                "contributors",
                "screenshots",
                "keys",
                "languages",
                "settings",
                "activity",
                "statistics"
            ],
            "languages": []
        },
        "created_at": "2019-01-08 09:15:28 (Etc/UTC)",
        "created_at_timestamp": 1546257600,
        "team_id": 444,
        "projects": [],
        "members": []
    }
}
Add projects to group

Requires Admin right in the team.

Attributes
  • projects
    arrayRequired
    List of project IDs to add to group.
Definition
PUT https://api.lokalise.com/api2/teams/{team_id}/groups/{group_id}/projects/add
Example request body
{
    "projects": [
        "598901215bexxx43dcba74.xxx"
    ]
}
Example request
curl --request PUT \
--url https://api.lokalise.com/api2/teams/{team_id}/groups/{group_id}/projects/add \ --header 'x-api-token: f4d3f29bf893dc3583e9970735e08de094e82b0' \
--data '{"projects":["598901215bexxx43dcba74.xxx"]}'
Example response
{
    "team_id": 444,
    "group": {
        "group_id": 50031,
        "name": "Proofreading admins",
        "permissions": {
            "is_admin": true,
            "is_reviewer": true,
            "admin_rights": [
                "upload",
                "download",
                "tasks",
                "contributors",
                "screenshots",
                "keys",
                "languages",
                "settings",
                "activity",
                "statistics"
            ],
            "languages": []
        },
        "created_at": "2019-01-07 14:21:44 (Etc/UTC)",
        "created_at_timestamp": 1546257600,
        "team_id": 444,
        "projects": [
            "598901215bexxx43dcba74.xxx"
        ],
        "members": []
    }
}
Remove projects from group

Requires Admin right in the team.

Attributes
  • projects
    arrayRequired
    List of project IDs to remove from group.
Definition
PUT https://api.lokalise.com/api2/teams/{team_id}/groups/{group_id}/projects/remove
Example request body
{
    "projects": [
        "598901215bexxx43dcba74.xxx"
    ]
}
Example request
curl --request PUT \
--url https://api.lokalise.com/api2/teams/{team_id}/groups/{group_id}/projects/remove \ --header 'x-api-token: f4d3f29bf893dc3583e9970735e08de094e82b0' \
--data '{"projects":["598901215bexxx43dcba74.xxx"]}'
Example response
{
    "team_id": 444,
    "group": {
        "group_id": 50031,
        "name": "Proofreading admins",
        "permissions": {
            "is_admin": true,
            "is_reviewer": true,
            "admin_rights": [
                "upload",
                "download",
                "tasks",
                "contributors",
                "screenshots",
                "keys",
                "languages",
                "settings",
                "activity",
                "statistics"
            ],
            "languages": []
        },
        "created_at": "2019-01-07 14:21:44 (Etc/UTC)",
        "created_at_timestamp": 1546257600,
        "team_id": 444,
        "projects": [],
        "members": []
    }
}
Add members to group

Requires Admin right in the team.

Attributes
  • users
    arrayRequired
    List of user IDs to add to group.
Definition
PUT https://api.lokalise.com/api2/teams/{team_id}/groups/{group_id}/members/add
Example request body
{
    "users": [
        22212
    ]
}
Example request
curl --request PUT \
--url https://api.lokalise.com/api2/teams/{team_id}/groups/{group_id}/members/add \ --header 'x-api-token: f4d3f29bf893dc3583e9970735e08de094e82b0' \
--data '{"users":[22212]}'
Example response
{
    "team_id": 444,
    "group": {
        "group_id": 50031,
        "name": "Proofreading admins",
        "permissions": {
            "is_admin": true,
            "is_reviewer": true,
            "admin_rights": [
                "upload",
                "download",
                "tasks",
                "contributors",
                "screenshots",
                "keys",
                "languages",
                "settings",
                "activity",
                "statistics"
            ],
            "languages": []
        },
        "created_at": "2019-01-07 14:21:44 (Etc/UTC)",
        "created_at_timestamp": 1546257600,
        "team_id": 444,
        "projects": [],
        "members": [
            22212
        ]
    }
}
Remove members from group

Requires Admin right in the team.

Attributes
  • users
    arrayRequired
    List of user IDs to remove from group.
Definition
PUT https://api.lokalise.com/api2/teams/{team_id}/groups/{group_id}/members/remove
Example request body
{
    "users": [
        22212
    ]
}
Example request
curl --request PUT \
--url https://api.lokalise.com/api2/teams/{team_id}/groups/{group_id}/members/remove \ --header 'x-api-token: f4d3f29bf893dc3583e9970735e08de094e82b0' \
--data '{"users":[22212]}'
Example response
{
    "team_id": 444,
    "group": {
        "group_id": 50031,
        "name": "Proofreading admins",
        "permissions": {
            "is_admin": true,
            "is_reviewer": true,
            "admin_rights": [
                "upload",
                "download",
                "tasks",
                "contributors",
                "screenshots",
                "keys",
                "languages",
                "settings",
                "activity",
                "statistics"
            ],
            "languages": []
        },
        "created_at": "2019-01-07 14:21:44 (Etc/UTC)",
        "created_at_timestamp": 1546257600,
        "team_id": 444,
        "projects": [],
        "members": []
    }
}
Delete a group

Deletes a group from the team. Requires Admin right in the team.

Definition
DELETE https://api.lokalise.com/api2/teams/{team_id}/groups/{group_id}
Example request
curl --request DELETE \
--url https://api.lokalise.com/api2/teams/{team_id}/groups/{group_id} \ --header 'x-api-token: f4d3f29bf893dc3583e9970735e08de094e82b0'
Example response
{
    "team_id": 444,
    "group_deleted": true
}
Translations
The Translation object
Attributes
  • translation_id
    number
    Unique translation identifier.
  • key_id
    number
    Identifier of the key of the translation.
  • language_iso
    string
    Language code.
  • modified_at
    string
    Date and time of last translation modification.
  • modified_at_timestamp
    number
    Unix timestamp of last translation modification.
  • modified_by
    number
    Identifier of the user, who made last modification.
  • modified_by_email
    string
    E-mail of the user, who made last modification.
  • translation
    string
    The actual translation content. Pass as an object, in case it includes plural forms and is_plural is true.
  • is_fuzzy
    boolean
    Whether the Fuzzy flag is enabled. (Note: Fuzzy is called Unverified in the editor now).
  • is_reviewed
    boolean
    Whether the Reviewed flag is enabled.
  • reviewed_by
    number
    Identifier of the user, who has reviewed the translation (if reviewed).
  • words
    number
    Number of words in the translation.
  • custom_translation_statuses
    array
    Array consisting of [Custom Translation Status](#object-custom-translation-status) objects
List all translations

Retrieves a list of project translation items, ungrouped.

You may want to request Keys resource in order to get the structured key/translation pairs for all languages.

Url Parameters
  • disable_references
    string
    Default: 0
    Whether to disable key references. Possible values are 1 and 0.
  • filter_lang_id
    string
    Return translations only for presented language ID.
  • filter_is_reviewed
    string
    Default: 0
    Filter translations which are reviewed. Possible values are 1 and 0.
  • filter_fuzzy
    string
    Default: 0
    Filter translations which are unverified (fuzzy). Possible values are 1 and 0.
  • filter_untranslated
    string
    Default: 0
    Filter by untranslated keys. Possible values are 1 and 0.
  • filter_qa_issues
    string
    One or more QA issues to filter by (comma separated). Possible values are spelling_and_grammar, placeholders, html, url_count, url, email_count, email, brackets, numbers, leading_whitespace, trailing_whitespace, double_space and special_placeholder.
  • limit
    string
    Default: 100
    Number of items to include (max 5000).
  • page
    string
    Default: 1
    Return results starting from this page.
Definition
GET https://api.lokalise.com/api2/projects/{project_id:branch}/translations
Example request
curl --request GET \
--url https://api.lokalise.com/api2/projects/{project_id:branch}/translations \ --header 'x-api-token: f4d3f29bf893dc3583e9970735e08de094e82b0'
Example response
{
    "project_id": "20008339586cded200e0d8.29879849",
    "translations": [
        {
            "translation_id": 344412,
            "key_id": 553662,
            "language_iso": "en_US",
            "modified_at": "2018-12-31 12:00:00 (Etc\/UTC)",
            "modified_at_timestamp": 1546257600,
            "modified_by": 420,
            "modified_by_email": "user@mycompany.com",
            "translation": "Hello, world!",
            "is_fuzzy": true,
            "is_reviewed": false,
            "reviewed_by": 0,
            "words": 2,
            "custom_translation_statuses": [
                {
                    "id": 124,
                    "title": "Default status",
                    "color": "#ffffff"
                }
            ]
        },

        ...

        {
            "translation_id": 344417,
            "key_id": 553662,
            "language_iso": "ru",
            "modified_at": "2018-12-31 12:00:00 (Etc\/UTC)",
            "modified_at_timestamp": 1546257600,
            "modified_by": 420,
            "modified_by_email": "user@mycompany.com",
            "translation": "Привет, мир!",
            "is_fuzzy": false,
            "is_reviewed": false,
            "reviewed_by": 0,
            "words": 2,
            "custom_translation_statuses": []
        }                    
    ]
}
Retrieve a translation

Retrieves a Translation object.

Url Parameters
  • disable_references
    string
    Default: 0
    Whether to disable key references. Possible values are 1 and 0.
Definition
GET https://api.lokalise.com/api2/projects/{project_id:branch}/translations/{translation_id}
Example request
curl --request GET \
--url https://api.lokalise.com/api2/projects/{project_id:branch}/translations/{translation_id} \ --header 'x-api-token: f4d3f29bf893dc3583e9970735e08de094e82b0'
Example response
{
    "project_id": "3002780358964f9bab5a92.87762498",
    "translation": {
        "translation_id": 344412,
        "key_id": 553662,
        "language_iso": "en_US",
        "modified_at": "2018-12-31 12:00:00 (Etc\/UTC)",
        "modified_at_timestamp": 1546257600,
        "modified_by": 420,
        "modified_by_email": "user@mycompany.com",
        "translation": "Hello, world!",
        "is_fuzzy": true,
        "is_reviewed": false,
        "reviewed_by": 0,
        "words": 2,
        "custom_translation_statuses": []
    }
}
Update a translation

Updates a translation. Alternatively, use Bulk key update endpoint to update translations.

Attributes
  • translation
    stringRequired
    The actual translation content. Use an JSON object for plural keys.
  • is_fuzzy
    boolean
    Whether the Fuzzy flag is enabled. (Note: Fuzzy is called Unverified in the editor now).
  • is_reviewed
    boolean
    Whether the Reviewed flag is enabled.
  • custom_translation_status_ids
    array
    Custom translation status IDs to assign to translation (existing statuses will be replaced).
Definition
PUT https://api.lokalise.com/api2/projects/{project_id:branch}/translations/{translation_id}
Example request body
{
    "translation": "Quick brown fox jumps over the lazy dog.",
    "is_fuzzy": false,
    "is_reviewed": true
}
Example request
curl --request PUT \
--url https://api.lokalise.com/api2/projects/{project_id:branch}/translations/{translation_id} \ --header 'content-type: application/json' \
--header 'x-api-token: f4d3f29bf893dc3583e9970735e08de094e82b0' \
--data '{"translation":"Quick brown fox jumps over the lazy dog.","is_fuzzy":false,"is_reviewed":true}'
Example response
{
    "project_id": "3002780358964f9bab5a92.87762498",
    "translation": {
        "translation_id": 344412,
        "key_id": 553662,
        "language_iso": "en_US",
        "modified_at": "2018-12-31 12:00:00 (Etc\/UTC)",
        "modified_at_timestamp": 1546257600,
        "modified_by": 420,
        "modified_by_email": "user@mycompany.com",
        "translation": "Quick brown fox jumps over the lazy dog.",
        "is_fuzzy": false,
        "is_reviewed": true,
        "reviewed_by": 1357,
        "words": 8,
        "custom_translation_statuses": []
    }
}
Translation providers

Translation providers are used for orders.

The Translation provider object
Attributes
  • provider_id
    number
    A unique identifier of the provider.
  • name
    number
    Name of the provider.
  • slug
    string
    Slug of the provider.
  • price_pair_min
    number
    Minimum total price per language pair. It's 0.00 if there is no minimum requirement.
  • website_url
    string
    Provider website.
  • description
    string
    Provider description.
  • tiers
    object
    Available translation tiers.
    Expand attributesClose attributes
    • tier_id
      number
      An identifier of the tier.
    • name
      string
      Name of the tier.
  • pairs
    object
    List of language pairs and prices.
    Expand attributesClose attributes
    • tier_id
      number
      Translation tier.
    • from_lang_iso
      string
      Source language identifier.
    • from_lang_name
      string
      Source language name.
    • to_lang_iso
      string
      Target language identifier.
    • to_lang_name
      string
      Target language name.
    • price_per_word
      number
      Price per word in USD.
List all providers

Lists all translation providers.

Url Parameters
  • limit
    string
    Default: 100
    Number of items to include (max 5000).
  • page
    string
    Default: 1
    Return results starting from this page.
Definition
GET https://api.lokalise.com/api2/teams/{team_id}/translation_providers
Example request
curl --request GET \
--url https://api.lokalise.com/api2/teams/{team_id}/translation_providers \ --header 'x-api-token: f4d3f29bf893dc3583e9970735e08de094e82b0'
Example response
{
    "translation_providers": [
        {
            "provider_id": 1,
            "name": "Gengo",
            "slug": "gengo",
            "price_pair_min": "0.00",
            "website_url": "https://gengo.com",
            "description": "At Gengo, our mission is to provide language services to everyone and connect a global community. Our network of over 18,000 translators are tested and qualified to meet stringent project standards. Translators are based around the world and in every timezone, which enables us to support over 35 languages and work towards the Gengo mission.",
        },
        ...
    ]
}
Retrieve a provider

Retrieves a Translation provider object with tiers and available language pairs.

Definition
GET https://api.lokalise.com/api2/teams/{team_id}/translation_providers/{provider_id}
Example request
curl --request GET \
--url https://api.lokalise.com/api2/teams/{team_id}/translation_providers/{provider_id} \ --header 'x-api-token: f4d3f29bf893dc3583e9970735e08de094e82b0'
Example response
{
    "provider_id": 1,
    "name": "Gengo",
    "slug": "gengo",
    "price_pair_min": "0.00",
    "website_url": "https://gengo.com",
    "description": "At Gengo, our mission is to provide language services to everyone and connect a global community. Our network of over 18,000 translators are tested and qualified to meet stringent project standards. Translators are based around the world and in every timezone, which enables us to support over 35 languages and work towards the Gengo mission.",
    "tiers": [
        {
            "tier_id": 1,
            "title": "Native speaker"
        },
        {
            "tier_id": 2,
            "title": "Professional translator"
        }
    ],
    "pairs": [
        {
            "tier_id": 1,
            "from_lang_iso": "en_US",
            "from_lang_name": "English (United States)",
            "to_lang_iso": "ru",
            "to_lang_name": "Russian",
            "price_per_word": "0.07"
        },
        ...
    ]
}
Translation statuses

Custom translation statuses are used to provide a more efficient translation workflow. Learn more.

The Translation statuse object
Attributes
  • status_id
    number
    A unique custom translation status identifier.
  • title
    string
    Status title.
  • color
    string
    Hex color of the status.
List all statuses

Lists all custom translation statuses in the project.

Url Parameters
  • limit
    string
    Default: 100
    Number of items to include (max 5000).
  • page
    string
    Default: 1
    Return results starting from this page.
Definition
GET https://api.lokalise.com/api2/projects/{project_id:branch}/custom_translation_statuses
Example request
curl --request GET \
--url https://api.lokalise.com/api2/projects/{project_id:branch}/custom_translation_statuses \ --header 'x-api-token: f4d3f29bf893dc3583e9970735e08de094e82b0'
Example response
{
    "project_id": "20008339586cded200e0d8.29879849",
    "custom_translation_statuses": [
        {
            "status_id": 123,
            "title": "Default status",
            "color": "#ffffff"
        }
    ]
}
Create a status

Creates a custom translation status in the project.

Attributes
  • title
    stringRequired
    Status title.
  • color
    stringRequired
    Hex color of the status.
Definition
POST https://api.lokalise.com/api2/projects/{project_id:branch}/custom_translation_statuses
Example request body
{
    "title": "Reviewed by doctors",
    "color": "#ff9f1a"
}
Example request
curl --request POST \
--url https://api.lokalise.com/api2/projects/{project_id:branch}/custom_translation_statuses \ --header 'content-type: application/json' \
--header 'x-api-token: f4d3f29bf893dc3583e9970735e08de094e82b0' \
--data '{"title":"Reviewed by doctors","color":"#ff9f1a"}'
Example response
{
    "project_id": "20008339586cded200e0d8.29879849",
    "custom_translation_status": {
        "status_id": 124,
        "title": "Reviewed by doctors",
        "color": "#ff9f1a"
     }
}
Retrieve a status

Retrieves a Custom Translation Status object.

Definition
GET https://api.lokalise.com/api2/projects/{project_id:branch}/custom_translation_statuses/{status_id}
Example request
curl --request GET \
--url https://api.lokalise.com/api2/projects/{project_id:branch}/custom_translation_statuses/{status_id} \ --header 'x-api-token: f4d3f29bf893dc3583e9970735e08de094e82b0'
Example response
{
    "project_id": "20008339586cded200e0d8.29879849",
    "custom_translation_status": {
        "status_id": 124,
        "title": "Reviewed by doctors",
        "color": "#ff9f1a"
    }
}
Update a status

Updates the custom translation status.

Attributes
  • title
    string
    Status title.
  • color
    string
    Hex color of the status.
Definition
PUT https://api.lokalise.com/api2/projects/{project_id:branch}/custom_translation_statuses/{status_id}
Example request body
{
    "title": "Reviewed by staff"
}
Example request
curl --request PUT \
--url https://api.lokalise.com/api2/projects/{project_id:branch}/custom_translation_statuses/{status_id} \ --header 'content-type: application/json' \
--header 'x-api-token: f4d3f29bf893dc3583e9970735e08de094e82b0' \
--data '{"title":"Reviewed by staff"}'
Example response
{
    "project_id": "20008339586cded200e0d8.29879849",
    "custom_translation_status": {
        "status_id": 124,
        "title": "Reviewed by staff",
        "color": "#ff9f1a"
    }
}
Delete a status

Deletes aa custom translation status.

Definition
DELETE https://api.lokalise.com/api2/projects/{project_id:branch}/custom_translation_statuses/{status_id}
Example request
curl --request DELETE \
--url https://api.lokalise.com/api2/projects/{project_id:branch}/custom_translation_statuses/{status_id} \ --header 'x-api-token: f4d3f29bf893dc3583e9970735e08de094e82b0'
Example response
{
    "project_id": "3002780358964f9bab5a92.87762498",
    "deleted": true
}
Retrieve available colors

Retrieves an array of available colors that can be assigned to custom translation statuses.

Definition
GET https://api.lokalise.com/api2/projects/{project_id:branch}/custom_translation_statuses/colors
Example request
curl --request GET \
--url https://api.lokalise.com/api2/projects/{project_id:branch}/custom_translation_statuses/colors \ --header 'x-api-token: f4d3f29bf893dc3583e9970735e08de094e82b0'
Example response
{
    "colors": [
        "#61bd4f",
        "#f2d600",
        "#ff9f1a",
        "#eb5a46",
        "#c377e0",
        "#0079bf",
        "#00c2e0",
        "#344563",
        "#ff78cb"
    ]
}
Webhooks
The Webhook object
Attributes
  • webhook_id
    number
    A unique identifier of the webhook.
  • url
    string
    Specified URL.
  • secret
    string
    X-Secret header sent with webhook requests.
  • events
    array
    List of events, webhook is subscribed to.
  • event_lang_map
    object
    List of maps with languages assigned to the events.
    Expand attributesClose attributes
    • event
      string
      Event name.
    • lang_iso_codes
      array
      List of languages iso codes.
List all webhooks

Retrieves a list of configured webhooks. Requires Manage settings admin right.

Url Parameters
  • limit
    string
    Default: 100
    Number of items to include (max 5000).
  • page
    string
    Default: 1
    Return results starting from this page.
Definition
GET https://api.lokalise.com/api2/projects/{project_id:branch}/webhooks
Example request
curl --request GET \
--url https://api.lokalise.com/api2/projects/{project_id:branch}/webhooks \ --header 'x-api-token: f4d3f29bf893dc3583e9970735e08de094e82b0'
Example response
{
    "project_id": "20008339586cded200e0d8.29879849",
    "webhooks": [
        {
            "webhook_id": "cb755f36c1a5ec7063cf6dedf056eb5a730e033d",
            "url": "https:\/\/my.domain.com\/webhook",
            "secret": "ccbe0d72a8377b2c91db25d6281192eade03158c",
            "events": [
                "project.imported",
                "project.languages.added",
                "project.language.removed",
                "project.key.added",
                "project.keys.deleted",
                "project.key.modified",
                "project.translation.updated"
            ],
            "event_lang_map": [
                {
                    "event": "project.translation.updated",
                    "lang_iso_codes": [
                        "en_GB"
                    ]
                }
            ]
        },
        {
            "webhook_id": "b9069a53700dd7d1fdbaa7dd96c4d6ad25a0e465",
            "url": "https:\/\/my.domain.com\/webhook",
            "secret": "ccbe0d72a8377b2c91db25d6281192eade03158c",
            "events": [
                "project.translation.proofread"
            ],
            "event_lang_map": [
                {
                    "event": "project.translation.proofread",
                    "lang_iso_codes": [
                        "en",
                        "en_GB"
                    ]
                }
            ]
        }
    ]
}
Retrieve a webhook

Retrieves a Webhook object. Requires Manage settings admin right.

Definition
GET https://api.lokalise.com/api2/projects/{project_id:branch}/webhooks/{webhook_id}
Example request
curl --request GET \
--url https://api.lokalise.com/api2/projects/{project_id:branch}/webhooks/{webhook_id} \ --header 'x-api-token: f4d3f29bf893dc3583e9970735e08de094e82b0'
Example response
{
    "project_id": "600904245c4ecf0ec4a9d4.28360690",
    "webhook": {
        "webhook_id": "cb755f36c1a5ec7063cf6dedf056eb5a730e033d",
        "url": "https:\/\/my.domain.com\/webhook",
        "secret": "ccbe0d72a8377b2c91db25d6281192eade03158c",
        "events": [
            "project.imported",
            "project.languages.added",
            "project.language.removed",
            "project.key.added",
            "project.keys.deleted",
            "project.key.modified",
            "project.translation.updated"
        ],
        "event_lang_map": [
            {
                "event": "project.translation.updated",
                "lang_iso_codes": [
                    "en_GB"
                ]
            }
        ]
    }
}
Create a webhook

Creates a webhook in the project. Requires Manage settings admin right. See our documentation for available events and payload examples.

Attributes
  • url
    stringRequired
    Specify the URL to your endpoint.
  • events
    arrayRequired
    List of events to subscribe to. Possible values are project.imported, project.exported, project.snapshot, project.languages.added, project.language.removed , project.language.settings_changed, project.key.added, project.key.modified, project.keys.deleted, project.key.comment.added, project.translation.updated, project.translation.proofread, project.contributor.added, project.contributor.deleted, project.task.created, project.task.closed, project.task.deleted, project.task.language.closed.
  • event_lang_map
    object
    Map the event with an array of languages iso codes. Omit this parameter for all languages in the project. Currently only project.translation.updated and project.translation.proofread events can be mapped with languages.
    Expand attributesClose attributes
    • event
      string
      Event name.
    • lang_iso_codes
      array
      List of languages iso codes.
Definition
POST https://api.lokalise.com/api2/projects/{project_id:branch}/webhooks
Example request body
{
    "url": "https://my.domain.com/webhook",
    "events": [
        "project.translation.proofread",
        "project.translation.updated"
    ],
    "event_lang_map": [
        {
            "event": "project.translation.updated",
            "lang_iso_codes": [
                "en_GB"
            ]
        }
    ]
}
Example request
curl --request POST \
--url https://api.lokalise.com/api2/projects/{project_id:branch}/webhooks \ --header 'content-type: application/json' \
--header 'x-api-token: f4d3f29bf893dc3583e9970735e08de094e82b0' \
--data '{"url":"https://my.domain.com/webhook","events":["project.translation.proofread","project.translation.updated"],"event_lang_map":[{"event":"project.translation.updated","lang_iso_codes":["en_GB"]}]}'
Example response
{
    "project_id": "3002780358964f9bab5a92.87762498",
    "webhook": {
        "webhook_id": "138c1ffa0ad94848f01f980e7f2f2af19d1bd553",
        "url": "https:\/\/my.domain.com\/webhook",
        "secret": "ccbe0d72a8377b2c91db25d6281192eade03158c",
        "events": [
            "project.translation.proofread",
            "project.translation.updated"
        ],
        "event_lang_map": [
            {
                "event": "project.translation.proofread",
                "lang_iso_codes": [
                    "en",
                    "en_GB",
                    "rus"
                ]
            },
            {
                "event": "project.translation.updated",
                "lang_iso_codes": [
                    "en_GB"
                ]
            }
        ]
    }
}
Update a webhook

Updates a configured webhook in the project. Requires Manage settings admin right.

Attributes
  • url
    string
    Update the URL to your endpoint.
  • events
    array
    Replace list of events. See our documentation for available events and payload examples.
  • event_lang_map
    object
    Map the event with an array of languages iso codes. Omit this parameter for all languages in the project. Currently only project.translation.updated and project.translation.proofread events can be mapped with languages.
    Expand attributesClose attributes
    • event
      string
      Event name.
    • lang_iso_codes
      array
      List of languages iso codes.
Definition
PUT https://api.lokalise.com/api2/projects/{project_id:branch}/webhooks/{webhook_id}
Example request body
{
    "events": [
        "project.translation.proofread",
        "project.translation.updated",
        "project.imported"
    ],
    "event_lang_map": [
        {
            "event": "project.translation.proofread",
            "lang_iso_codes": [
                "en_GB"
            ]
        },
        {
            "event": "project.translation.updated",
            "lang_iso_codes": [
                "en_GB"
            ]
        }
    ]
}
Example request
curl --request PUT \
--url https://api.lokalise.com/api2/projects/{project_id:branch}/webhooks/{webhook_id} \ --header 'content-type: application/json' \
--header 'x-api-token: f4d3f29bf893dc3583e9970735e08de094e82b0' \
--data '{"events":["project.translation.proofread","project.translation.updated","project.imported"],"event_lang_map":[{"event":"project.translation.proofread","lang_iso_codes":["en_GB"]},{"event":"project.translation.updated","lang_iso_codes":["en_GB"]}]}'
Example response
{
    "project_id": "3002780358964f9bab5a92.87762498",
    "webhook": {
        "webhook_id": "138c1ffa0ad94848f01f980e7f2f2af19d1bd553",
        "url": "https:\/\/my.domain.com\/webhook",
        "secret": "ccbe0d72a8377b2c91db25d6281192eade03158c",
        "events": [
            "project.translation.proofread",
            "project.translation.updated",
            "project.imported"
        ],
        "event_lang_map": [
            {
                "event": "project.translation.proofread",
                "lang_iso_codes": [
                    "en_GB"
                ]
            },
            {
                "event": "project.translation.updated",
                "lang_iso_codes": [
                    "en_GB"
                ]
            }
        ]
    }
}
Delete a webhook

Deletes a configured webhook in the project. Requires Manage settings admin right.

Definition
DELETE https://api.lokalise.com/api2/projects/{project_id:branch}/webhooks/{webhook_id}
Example request
curl --request DELETE \
--url https://api.lokalise.com/api2/projects/{project_id:branch}/webhooks/{webhook_id}
Example response
{
    "project_id": "3002780358964f9bab5a92.87762498",
    "webhook_deleted": true
}
Plurals and placeholders

In most cases we will properly export plurals and placeholders to the file format of your choice, however it is possible to override the default universal placeholder conversion behaviour and plural format export options. Use the table below to specify with the export parameters.

File format  Compatible plural formats Compatible placeholder formats
android_sdk generic printf
ios_sdk generic ios
xml generic printf
strings generic ios
csv json_string, icu printf, ios, icu, net, i18n, raw
xlsx json_string, icu printf, ios, icu, net, i18n, raw
po generic printf, icu, raw
properties json_string, icu printf, icu
json json_string, icu, symfony, array, i18next printf, ios, icu, net, symfony, i18n, raw
xliff generic, json_string, icu printf, ios, icu, raw
plist json_string, icu printf, ios, icu
resx json_string, icu net
js json_string, icu, symfony, array, i18next printf, icu, symfony, i18n, raw
react_native json_string, icu, array printf, ios, icu, i18n, raw
symfony_xliff json_string, icu, symfony printf, icu, symfony, raw
xlf json_string, icu printf, icu, raw
php json_string, icu, symfony, array printf, icu, symfony, i18n, raw
ini json_string, icu printf, icu
ruby_yaml json_string, icu, array printf, icu
yaml json_string, icu, symfony, array printf, icu, symfony, i18n, raw
stf json_string, icu printf, icu
ts generic printf, icu

Plural format descriptions

generic Generic plural implementation of the selected file format
json_string {"one":"One user online","other":"%s users online"}
icu {index.hero.title, plural, one {One user online} other {%s users online}}
array Returns an array (if applicable in the format)
i18next {"key": "One apple", "key_plural": "Many apples"}
symfony One apple|Many apples

Placeholder format descriptions

Example string: My name is [%s:name]. I have [%.2f] dollars.

printf Printf-style placeholders - "My name is %s. I have %.2f dollars.".
ios iOS-style placeholders - "My name is %@. I have %.2f dollars."
icu ICU Message Format placeholders - "My name is {name}. I have {0} dollars."
net .NET placeholder format - "My name is {0}. I have {0:0.00} dollars."
symfony Symfony placeholder format - "My name is %name%. I have %placeholder_1% dollars."
i18n i18n placeholder format - "My name is {name}}. I have {{0}}."
raw No processing will be applied.

Errors

Lokalise uses conventional HTTP response codes to indicate the success or failure of an API request. In general: Codes in the 2xx range indicate success. Codes in the 3xx indicate redirects. Codes in the 4xx range indicate an error that failed given the information provided (e.g., a required parameter was omitted, a charge failed, etc.). Codes in the 5xx range indicate an error with Lokalise servers (these are rare).

Code Reason
200 - OK Everything worked as expected.
208 - Already Reported The posted resource was already added.
400 - Bad Request The request was unacceptable, often due to missing a required parameter.
401 - Unauthorized No valid API key provided.
403 - Forbidden Authenticated user is not granted to perform requested action.
404 - Not Found The requested resource does not exist.
406 - Not Acceptable The posted resource is malformed or broken.
409 - Conflict The request conflicts with another request (perhaps due to using the same idempotent key).
423 - Locked Provided token is currently used to process another request. We do not support concurrent requests.
429 - Too Many Requests Too many requests hit the API too quickly. We recommend an exponential backoff of your requests.
500, 502, 503, 504 - Server Errors Something went wrong on Lokalise end. (These are rare.)
The Error object
Attributes
  • code
    number
    Error code.
  • message
    string
    Custom error message providing additional information.
Changes

2019-11-04

2019-10-15

2019-10-11

  • Branches: Added Branches resource and endpoints.

  • Global: Updated endpoints to support branching.

2019-07-08

2019-06-03

  • Files: Added custom_translation_status_ids parameter to Download files endpoint.

2019-05-10

  • Custom Translation Statuses: Added Custom Translation Statuses resource and endpoints.

  • Translations: Added custom_translation_statuses attribute.

  • Tasks: Added custom_translation_status_ids attribute.

2019-04-14

  • Global: Added unix timestamps attributes (created_at_timestamp, modified_at_timestamp etc).

  • The project object: Added base_language_id (number) attribute.

  • The project object: Added base_language_iso (string) attribute.

  • Translations: Added filter_fuzzy (string) parameter to List all translations endpoint. Filter translations which are unverified (fuzzy). Possible values are 1 and 0.

2019-04-04

  • Files: added bundle_description (string) parameter to Download a file endpoint.

2019-03-07

  • Projects: added languages (array) parameter to Create a project endpoint. One or more project languages to add.

  • Projects: added base_lang_iso (string) parameter to Create a project endpoint. Language/locale code of the default (base) project language.

  • Projects: added project_type (string) parameter to Create a project endpoint. Choose project type.

  • Keys: added filter_untranslated (number) parameter to List all keys endpoint. Filter by untranslated keys. Possible values are 1 and 0.

  • Keys: added filter_translation_lang_ids (string) parameter to List all keys endpoint. One or more language ID to filter by (comma separated). Will include translations only for listed IDs.

  • Files: added tag_inserted_keys (bool) parameter to Upload a file endpoint. Add specified tags to inserted keys.

  • Files: added tag_updated_keys (bool) parameter to Upload a file endpoint. Add specified tags to updated keys.

  • Files: added tag_skipped_keys (bool) parameter to Upload a file endpoint. Add specified tags to skipped keys.

2019-03-01

  • Projects: added filter_names (string) parameter to List all projects endpoint. One or more project names to filter by (comma separated).

  • Projects: added include_statistics (number) parameter to List all projects endpoint. Whether to include project statistics. Possible values are 1 and 0.

  • Projects: added include_settings (number) parameter to List all projects endpoint. Whether to include project settings. Possible values are 1 and 0.

2019-02-28

  • Orders: Added Orders resource and endpoints.

2019-02-26

2019-02-21

2019-02-14

  • The project object: Added settings (object) attribute.

  • The project object: Added statistics (object) attribute.

2019-02-07

  • The screenshot object: Added created_at (string) attribute. Creation date of the screenshot.

2019-01-10

  • Tasks: Added closing_tags (array) parameter to Update a task endpoint.

2019-01-09

2019-01-04

2019-01-02

  • Keys: Added filter_qa_issues (string) parameter to List all keys endpoint. Filter keys which has at least one of QA issues (comma separated). Possible values are spelling_and_grammar, placeholders, html, url_count, url, email_count, email, brackets, numbers, leading_whitespace and trailing_whitespace.

  • Translations: Added filter_qa_issues (string) parameter to List all translations endpoint. Filter translations which has at least one of QA issues (comma separated). Possible values are spelling_and_grammar, placeholders, html, url_count, url, email_count, email, brackets, numbers, leading_whitespace and trailing_whitespace.

2018-12-14

  • Keys: Added keys_locked (int) return parameter to Delete multiple keys and Delete a key endpoints. Endpoints will return keys_removed = false if all keys have locked translations.

  • Translations: Added filter_lang_id (string) parameter to List all translations endpoint. Return translations only for presented language ID.

  • Translations: Added filter_is_reviewed (string) parameter to List all translations endpoint. Filter translations which are reviewed. Possible values are 1 and 0.

2018-12-11

  • Tasks: Added do_lock_translations (boolean) parameter to Update a task endpoint.

2018-12-10

  • Tasks: Added do_lock_translations (boolean) parameter to Create a task endpoint.

  • Tasks: Added do_lock_translations (boolean) parameter to List all tasks endpoint.

  • Tasks: Added do_lock_translations (boolean) parameter to Retrieve a task endpoint.

2018-11-29

  • Tasks: Added closing_tags (array) parameter to Create a task endpoint.

  • Tasks: Added closing_tags (array) parameter to List all tasks endpoint.

  • Tasks: Added closing_tags (array) parameter to Retrieve a task endpoint.

2018-11-22

  • Tasks: added task_type (string) parameter to Create a task endpoint. Possible values are translation or review.

  • Tasks: added parent_task_id (string) parameter to Create a task endpoint. Tasks that have parent_task_id parameter set will be queued until the parent task is completed. It is only possible to assign a single child task to a parent task. You can only define assigness for child task and scope will be inherited from the parent task.

  • Tasks: added can_be_parent (boolean) parameter to List all tasks endpoint. Only tasks with this flag can be used with parent_task_id parameter.

  • Tasks: added task_type (string) parameter to List all tasks endpoint. Possible values are translation or review.

  • Tasks: added parent_task_id (number) parameter to List all tasks endpoint.

  • Tasks: added can_be_parent (boolean) parameter to Retrieve a task endpoint.

  • Tasks: added task_type (string) parameter to Retrieve a task endpoint. Possible values are translation or review.

  • Tasks: added parent_task_id (number) parameter to Retrieve a task endpoint.

  • Tasks: modified keys (array) parameter to not required if parent_task_id parameter is specified in Create a task request.

  • Tasks: added additional status (string) parameter value queued. This will be the default status if parent_task_id is specified when creating a task.