curlNodePythonJavaRubyphpGo
Getting started

The Lokalise API 2.0 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 tool acting as a wrapper for import and export functions. You can download a precompiled binary for different platforms.

Client libraries


Official Lokalise PHP client.


Official Lokalise Ruby interface.

We are working on adding libraries for other programming languages.

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.

Changes

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.

2018-11-29

  • Tasks: Added closing_tags (array) parameter to Create a task endpoint. Tags cannot contain “,” in them and will be stripped out.

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

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

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.
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.co/api2/projects/{project_id}/comments
Example request
curl --request GET \
--url 'https://api.lokalise.co/api2/projects/{project_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)"
        },
        {
            "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)"
        }                    
    ]
}
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.co/api2/projects/{project_id}/keys/{key_id}/comments
Example request
curl --request GET \
--url 'https://api.lokalise.co/api2/projects/{project_id}/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)"
        },
        {
            "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)"
        }                    
    ]
}
Create comments

Adds a set of comments to the key.

Attributes
  • comment
    stringRequired
    The comment to add.
Definition
POST https://api.lokalise.co/api2/projects/{project_id}/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.co/api2/projects/{project_id}/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)"
        },
        {
            "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)"
        }
    ]
}
Retrieve a comment

Retrieves a Comment object.

Definition
GET https://api.lokalise.co/api2/projects/{project_id}/keys/{key_id}/comments/{comment_id}
Example request
curl --request GET \
--url https://api.lokalise.co/api2/projects/{project_id}/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)"
    }
}
Delete a comment

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

Definition
DELETE https://api.lokalise.co/api2/projects/{project_id}/keys/{key_id}/comments/{comment_id}
Example request
curl --request DELETE \
--url https://api.lokalise.co/api2/projects/{project_id}/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.
  • 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.co/api2/projects/{project_id}/contributors
Example request
curl --request GET \
--url 'https://api.lokalise.co/api2/projects/{project_id}/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)",
            "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.co/api2/projects/{project_id}/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
                }
            ],
            "admin_rights": [
                "keys", "languages"
            ]
        }
    ]
}
Example request
curl --request POST \
--url https://api.lokalise.co/api2/projects/{project_id}/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}],"admin_rights":["keys","languages"]}]}'
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"
        ]
    }
}
Retrieve a contributor

Retrieves a Contributor object.

Definition
GET https://api.lokalise.co/api2/projects/{project_id}/contributors/{contributor_id}
Example request
curl --request GET \
--url https://api.lokalise.co/api2/projects/{project_id}/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.co/api2/projects/{project_id}/contributors/{contributor_id}
Example request body
{
    "is_admin": true
}
Example request
curl --request PUT \
--url https://api.lokalise.co/api2/projects/{project_id}/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.co/api2/projects/{project_id}/contributors/{contributor_id}
Example request
curl --request DELETE \
--url https://api.lokalise.co/api2/projects/{project_id}/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.co/api2/projects/{project_id}/files
Example request
curl --request GET \
--url 'https://api.lokalise.co/api2/projects/{project_id}/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 newly created keys with the specified tags.
  • 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.co/api2/projects/{project_id}/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.co/api2/projects/{project_id}/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, nonfuzzy and nonhidden. (Note: Fuzzy is called Unverified in the editor now).
  • 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 \n.
  • 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 "%%". \n.
  • 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 (string) - (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 :.
Definition
POST https://api.lokalise.co/api2/projects/{project_id}/files/download
Example request body
{
    "format": "json",
    "original_filenames": true
}
Example request
curl --request POST \
--url https://api.lokalise.co/api2/projects/{project_id}/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.
  • 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 keys.
  • 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.
  • 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.
  • 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.
    • 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
  • include_translations
    string
    Default: 0
    Whether to include translations. Possible values are 1 and 0.
  • 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.
  • filter_tags
    string
    One or more tags 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 filer by (comma separated).
  • filter_platforms
    string
    One or more platforms to filter by (comma separated). Possible values are ios, android, web and other.
  • filter_placeholder_mismatch
    string
    Default: 0
    Filter keys which has placeholder mismatch. 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.co/api2/projects/{project_id}/keys
Example request
curl --request GET \
--url 'https://api.lokalise.co/api2/projects/{project_id}/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)",
            "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)"
                }
            ],
            "screenshots": [
                {
                    "screenshot_id": 11233,
                    "title": "Welcome page",
                    "description": "",
                    "screenshot_tags": [
                        "index"
                    ],
                    "url": "https://s3-eu-west-1.amazonaws.com/files/screenshots/welcome.jpg"
                }
            ],
            "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)",
                    "is_reviewed": true,
                    "reviewed_by": "reviewer@mycompany.com",
                    "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)",
                    "is_reviewed": false,
                    "reviewed_by": "",
                    "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 `object` 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
    array
    JSON containing custom attributes (if any).
Definition
POST https://api.lokalise.co/api2/projects/{project_id}/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.co/api2/projects/{project_id}/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)",
                "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)",
                        "is_reviewed": false,
                        "reviewed_by": "",
                        "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)",
                        "is_reviewed": false,
                        "reviewed_by": "",
                        "words": 0
                    }
                ]
            },
            {
                "key_id": 331224,
                "created_at": "2018-12-31 12:00:00 (Etc\/UTC)",
                "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)",
                        "is_reviewed": false,
                        "reviewed_by": "",
                        "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)",
                        "is_reviewed": false,
                        "reviewed_by": "",
                        "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.co/api2/projects/{project_id}/keys/{key_id}
Example request
curl --request GET \
--url https://api.lokalise.co/api2/projects/{project_id}/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)",
        "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)"
            }
        ],
        "screenshots": [
            {
                "screenshot_id": 11233,
                "title": "Welcome page",
                "description": "",
                "screenshot_tags": [
                    "index"
                ],
                "url": "https://s3-eu-west-1.amazonaws.com/files/screenshots/welcome.jpg"
            }
        ],
        "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)",
                "is_reviewed": true,
                "reviewed_by": "reviewer@mycompany.com",
                "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)",
                "is_reviewed": false,
                "reviewed_by": "",
                "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 `object` 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
    array
    JSON containing custom attributes (if any).
Definition
PUT https://api.lokalise.co/api2/projects/{project_id}/keys/{key_id}
Example request body
{
    "platforms": [
        "web","other"
    ],
    "description": "Index app welcome"
}
Example request
curl --request PUT \
--url https://api.lokalise.co/api2/projects/{project_id}/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)",
            "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)",
                    "is_reviewed": false,
                    "reviewed_by": "",
                    "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)",
                    "is_reviewed": false,
                    "reviewed_by": "",
                    "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 `object` 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
    array
    JSON containing custom attributes (if any).
Definition
PUT https://api.lokalise.co/api2/projects/{project_id}/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.co/api2/projects/{project_id}/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)",
                "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)",
                        "is_reviewed": false,
                        "reviewed_by": "",
                        "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)",
                        "is_reviewed": false,
                        "reviewed_by": "",
                        "words": 0
                    }
                ]
            },
            {
                "key_id": 331224,
                "created_at": "2018-12-31 12:00:00 (Etc\/UTC)",
                "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)",
                        "is_reviewed": false,
                        "reviewed_by": "",
                        "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)",
                        "is_reviewed": false,
                        "reviewed_by": "",
                        "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.co/api2/projects/{project_id}/keys
Example request body
    {
        "keys": [
            12345, 12346
        ]
    }
Example request
curl --request DELETE \
--url https://api.lokalise.co/api2/projects/{project_id}/keys \ --header 'x-api-token: f4d3f29bf893dc3583e9970735e08de094e82b0' \
--data '{"keys":[12345,12346]}'
Example response
[
    "project_id": "3002780358964f9bab5a92.87762498",
    "keys_removed": true,
]
Delete a key

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

Definition
DELETE https://api.lokalise.co/api2/projects/{project_id}/keys/{key_id}
Example request
curl --request DELETE \
--url https://api.lokalise.co/api2/projects/{project_id}/keys/{key_id} \ --header 'x-api-token: f4d3f29bf893dc3583e9970735e08de094e82b0'
Example response
[
    "project_id": "3002780358964f9bab5a92.87762498",
    "key_removed": true,
]
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.co/api2/system/languages
Example request
curl --request GET \
--url https://api.lokalise.co/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.co/api2/projects/{project_id}/languages
Example request
curl --request GET \
--url https://api.lokalise.co/api2/projects/{project_id}/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.co/api2/projects/{project_id}/languages
Example request body
{
    "languages": [
        {
            "lang_iso": "en"
        },
        {
            "lang_iso": "ru"                        
        }
    ]
}
Example request
curl --request POST \
--url https://api.lokalise.co/api2/projects/{project_id}/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.co/api2/projects/{project_id}/languages/{lang_id}
Example request
curl --request GET \
--url https://api.lokalise.co/api2/projects/{project_id}/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.co/api2/projects/{project_id}/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.co/api2/projects/{project_id}/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.co/api2/projects/{project_id}/languages/{lang_id}
Example request
curl --request DELETE \
--url https://api.lokalise.co/api2/projects/{project_id}/languages/{lang_id} \ --header 'x-api-token: f4d3f29bf893dc3583e9970735e08de094e82b0'
Example response
[
    "project_id": "3002780358964f9bab5a92.87762498",
    "language_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_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.
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.
  • 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.co/api2/projects
Example request
curl --request GET \
--url 'https://api.lokalise.co/api2/projects?filter_team_id={filter_team_id}' \
--header 'x-api-token: f4d3f29bf893dc3583e9970735e08de094e82b0'
Example response
{
    "projects": [
        {
            "project_id": "20008339586cded200e0d8.29879849",
            "name": "SuperApp (iOS + Android)",
            "description": "",
            "created_at": "2018-12-31 12:00:00 (Etc\/UTC)",
            "created_by": 420,
            "created_by_email": "user@mycompany.com",
            "team_id": 12345
        },
        {
            "project_id": "100137835922d7d69a98e6.35789135",
            "name": "Marketing emails",
            "description": "",
            "created_at": "2018-12-31 12:00:00 (Etc\/UTC)",
            "created_by": 420,
            "created_by_email": "user@mycompany.com",
            "team_id": 12345
        },
    ]
}
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.
Definition
POST https://api.lokalise.co/api2/projects
Example request body
{
    "name": "TheApp Project",
    "description": "iOS + Android strings of TheApp. https://theapp.com"
}
Example request
curl --request POST \
--url https://api.lokalise.co/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"}'
Example response
{
    "project_id": "3002780358964f9bab5a92.87762498",
    "name": "TheApp Project",
    "description": "iOS + Android strings of TheApp. https://theapp.com",
    "created_at": "2018-12-31 12:00:00 (Etc\/UTC)",
    "created_by": 420,
    "created_by_email": "user@mycompany.com",
    "team_id": 12345
}
Retrieve a project

Retrieves a Project object.

Definition
GET https://api.lokalise.co/api2/projects/{project_id}
Example request
curl --request GET \
--url https://api.lokalise.co/api2/projects/{project_id} \ --header 'x-api-token: f4d3f29bf893dc3583e9970735e08de094e82b0'
Example response
{
    "project_id": "3002780358964f9bab5a92.87762498",
    "name": "TheApp Project",
    "description": "iOS + Android strings of TheApp. https://theapp.com",
    "created_at": "2018-12-31 12:00:00 (Etc\/UTC)",
    "created_by": 420,
    "created_by_email": "user@mycompany.com",
    "team_id": 12345
}
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.co/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.co/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",
    "name": "TheApp Project",
    "description": "iOS + Android strings of TheApp. https://theapp.com",
    "created_at": "2018-12-31 12:00:00 (Etc\/UTC)",
    "created_by": 420,
    "created_by_email": "user@mycompany.com",
    "team_id": 12345
}
Empty a project

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

Definition
PUT https://api.lokalise.co/api2/projects/{project_id}/empty
Example request
curl --request PUT \
--url https://api.lokalise.co/api2/projects/{project_id}/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.co/api2/projects/{project_id}
Example request
curl --request DELETE \
--url https://api.lokalise.co/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.
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.co/api2/projects/{project_id}/screenshots
Example request
curl --request GET \
--url 'https://api.lokalise.co/api2/projects/{project_id}/screenshots?include_tags={include_tags}&list_only={list_only}' \
--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

        },
        {
            "screenshot_id": 403022,
            "title": "Login screen",
            "description" : "",
            "key_ids": [
                1132290, 1132292, 1132293
            ],
            "tags": [
                "onboarding",
                "main"
            ],
            "width": 1024,
            "height": 768
        }
    ]
}
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.co/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.co/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
            }
        ]
    }
Retrieve a screenshot

Retrieves a Screenshot object.

Definition
GET https://api.lokalise.co/api2/projects/{project_id}/screenshots/{screenshot_id}
Example request
curl --request GET \
--url https://api.lokalise.co/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
    }
}
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.co/api2/projects/{project_id}/screenshots/{screenshot_id}
Example request body
{
    "key_ids": [
        1132290, 1132292
    ],
    "tags": [
        "main"
    ]
}
Example request
curl --request PUT \
--url https://api.lokalise.co/api2/projects/{project_id}/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
    }
}
Delete a screenshot

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

Definition
DELETE https://api.lokalise.co/api2/projects/{project_id}/screenshots/{screenshot_id}
Example request
curl --request DELETE \
--url https://api.lokalise.co/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_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.co/api2/projects/{project_id}/snapshots
Example request
curl --request GET \
--url https://api.lokalise.co/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_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_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.co/api2/projects/{project_id}/snapshots
Example request body
    {
        "title": "API snapshot"
    }
Example request
curl --request POST \
--url https://api.lokalise.co/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_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.co/api2/projects/{project_id}/snapshots/{snapshot_id}
Example request
curl --request POST \
--url https://api.lokalise.co/api2/projects/{project_id}/snapshots/{snapshot_id} \ --header 'content-type: application/json' \
--header 'x-api-token: f4d3f29bf893dc3583e9970735e08de094e82b0'
Example response
{
    "project_id": "3002780358964f9bab5a92.87762498",
    "name": "TheApp Project Copy",
    "description": "iOS + Android strings of TheApp. https://theapp.com",
    "created_at": "2018-12-13 12:00:00 (Etc\/UTC)",
    "created_by": 420,
    "created_by_email": "user@mycompany.com",
    "team_id": 12345
}
Delete a snapshot

Deletes project snapshot. Requires Manage settings admin right.

Definition
DELETE https://api.lokalise.co/api2/projects/{project_id}/snapshots/{snapshot_id}
Example request
curl --request DELETE \
--url https://api.lokalise.co/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.
  • 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_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.
  • 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.
    • 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_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_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.
List all tasks

Lists all tasks in the project.

Url Parameters
  • filter_title
    string
    Set title 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.co/api2/projects/{project_id}/tasks
Example request
curl --request GET \
--url https://api.lokalise.co/api2/projects/{project_id}/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"],
            "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)",
            "keys_count": 3,
            "words_count": 91,
            "created_at": "2018-12-31 12:00:00 (Etc\/UTC)",
            "created_by": 420,
            "created_by_email": "manager@yourcompany.com",
            "languages": [
                {
                    "language_iso": "fi",
                    "users": [
                        {
                            "user_id": 421,
                            "email": "jdoe@mycompany.com",
                            "fullname": "John Doe"
                        }
                    ],
                    "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_by": null,
                    "completed_by_email": null
                },
                {
                    "language_iso": "ru",
                    "users": [
                        {
                            "user_id": 422,
                            "email": "jfox@mycompany.com",
                            "fullname": "James Fox"
                        }
                    ],
                    "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_by": null,
                    "completed_by_email": null
                }                        
            ],
            "auto_close_languages": true,
            "auto_close_task": true,
            "completed_at": null,
            "completed_by": null,
            "completed_by_email": null
        }
    ]
}
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.
    Expand attributesClose attributes
    • language_iso
      stringRequired
      Language code.
    • users
      arrayRequired
      List of users 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.
Definition
POST https://api.lokalise.co/api2/projects/{project_id}/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 (Etc\/UTC)",
    "keys": [
        11212, 11241, 11245
    ],
    "languages": [
        {
            "language_iso": "fi",
            "users": [
                421
            ]
        },
        {
            "language_iso": "ru",
            "users": [
                422
            ]
        }
    ],
    "auto_close_languages": true,
    "auto_close_task": true,
    "task_type": "translation",
    "parent_task_id": 12345,
    "closing_tags": ["tag_one", "tag_two"]
}
Example request
curl --request POST \
--url https://api.lokalise.co/api2/projects/{project_id}/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 (Etc/UTC)","keys":[11212,11241,11245],"languages":[{"language_iso":"fi","users":[421]},{"language_iso":"ru","users":[422]}],"auto_close_languages":true,"auto_close_task":true,"task_type":"translation","parent_task_id":12345,"closing_tags":["tag_one","tag_two"]}'
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"],
        "due_date": "2018-12-31 12:00:00 (Etc\/UTC)",
        "keys_count": 3,
        "words_count": 91,
        "created_at": "2018-12-31 12:00:00 (Etc\/UTC)",
        "created_by": 420,
        "created_by_email": "manager@yourcompany.com",
        "languages": [
            {
                "language_iso": "fi",
                "users": [
                    {
                        "user_id": 421,
                        "email": "jdoe@mycompany.com",
                        "fullname": "John Doe"
                    }
                ],
                "keys": [
                    11212, 11241, 11245
                ],
                "status": "created",
                "progress": 0,
                "initial_tm_leverage": [],
                "keys_count": 3,
                "words_count": 91,
                "completed_at": null,
                "completed_by": null,
                "completed_by_email": null
            },
            {
                "language_iso": "ru",
                "users": [
                    {
                        "user_id": 422,
                        "email": "jfox@mycompany.com",
                        "fullname": "James Fox"
                    }
                ],
                "keys": [
                    11212, 11241, 11245
                ],
                "status": "in progress",
                "progress": 0,
                "initial_tm_leverage": [],
                "keys": 3,
                "words": 91,
                "completed_at": null,
                "completed_by": null,
                "completed_by_email": null
            }                        
        ],
        "auto_close_languages": true,
        "auto_close_task": true,
        "completed_at": null,
        "completed_by": null,
        "completed_by_email": null
    }
}
Retrieve a task

Retrieves a Task object.

Definition
GET https://api.lokalise.co/api2/projects/{project_id}/tasks/{task_id}
Example request
curl --request GET \
--url https://api.lokalise.co/api2/projects/{project_id}/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"],
        "due_date": "2018-12-31 12:00:00 (Etc\/UTC)",
        "keys_count": 3,
        "words_count": 91,
        "created_at": "2018-12-31 12:00:00 (Etc\/UTC)",
        "created_by": 420,
        "created_by_email": "manager@yourcompany.com",
        "languages": [
            {
                "language_iso": "fi",
                "users": [
                    {
                        "user_id": 421,
                        "email": "jdoe@mycompany.com",
                        "fullname": "John Doe"
                    }
                ],
                "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_by": null,
                "completed_by_email": null
            },
            {
                "language_iso": "ru",
                "users": [
                    {
                        "user_id": 422,
                        "email": "jfox@mycompany.com",
                        "fullname": "James Fox"
                    }
                ],
                "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_by": null,
                "completed_by_email": null
            }                        
        ],
        "auto_close_languages": true,
        "auto_close_task": true,
        "completed_at": null,
        "completed_by": null,
        "completed_by_email": null
    }
}
Update a task

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

Attributes
  • title
    string
    Task title.
  • description
    number
    Short description of the task.
  • due_date
    string
    Due date.
  • languages
    object
    List of languages in the task.
    Expand attributesClose attributes
    • language_iso
      string
      Language code.
    • users
      array
      List of users 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.
Definition
PUT https://api.lokalise.co/api2/projects/{project_id}/tasks/{task_id}
Example request body
{
    "due_date": "2019-12-31 12:00:00 (Etc\/UTC)",
    "auto_close_languages": false,
    "auto_close_task": false
}
Example request
curl --request PUT \
--url https://api.lokalise.co/api2/projects/{project_id}/tasks/{task_id} \ --header 'content-type: application/json' \
--header 'x-api-token: f4d3f29bf893dc3583e9970735e08de094e82b0' \
--data '{"due_date":"2019-12-31 12:00:00 (Etc/UTC)","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"],
        "due_date": "2019-12-31 12:00:00 (Etc\/UTC)",
        "keys_count": 3,
        "words_count": 91,
        "created_at": "2018-12-31 12:00:00 (Etc\/UTC)",
        "created_by": 420,
        "created_by_email": "manager@yourcompany.com",
        "languages": [
            {
                "language_iso": "fi",
                "users": [
                    {
                        "user_id": 421,
                        "email": "jdoe@mycompany.com",
                        "fullname": "John Doe"
                    }
                ],
                "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_by": null,
                "completed_by_email": null
            },
            {
                "language_iso": "ru",
                "users": [
                    {
                        "user_id": 422,
                        "email": "jfox@mycompany.com",
                        "fullname": "James Fox"
                    }
                ],
                "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_by": null,
                "completed_by_email": null
            }                        
        ],
        "auto_close_languages": false,
        "auto_close_task": false,
        "completed_at": 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.co/api2/projects/{project_id}/tasks/{task_id}
Example request
curl --request DELETE \
--url https://api.lokalise.co/api2/projects/{project_id}/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.
  • 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.co/api2/teams
Example request
curl --request GET \
--url https://api.lokalise.co/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)",
            "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.
  • 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.co/api2/teams/{team_id}/users
Example request
curl --request GET \
--url https://api.lokalise.co/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)",
            "role": "owner"
        },
        {
            "user_id": 421,
            "email": "axel@mycompany.com",
            "fullname": "Axel Foley",
            "created_at": "2018-12-31 12:00:00 (Etc\/UTC)",
            "role": "member"
        }
    ]
}
Retrieve a team user

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

Definition
GET https://api.lokalise.co/api2/teams/{team_id}/users/{user_id}
Example request
curl --request GET \
--url https://api.lokalise.co/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)",
        "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.co/api2/teams/{team_id}/users/{user_id}
Example request body
{
    "role": "admin"
}
Example request
curl --request PUT \
--url https://api.lokalise.co/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)",
        "role": "admin"
    }
}
Delete a team user

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

Definition
DELETE https://api.lokalise.co/api2/teams/{team_id}/users/{user_id}
Example request
curl --request DELETE \
--url https://api.lokalise.co/api2/teams/{team_id}/users/{user_id} \ --header 'x-api-token: f4d3f29bf893dc3583e9970735e08de094e82b0'
Example response
{
    "team_id": 18821,
    "team_user_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_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.
  • words
    number
    Number of words in the translation.
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.
  • 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.co/api2/projects/{project_id}/translations
Example request
curl --request GET \
--url https://api.lokalise.co/api2/projects/{project_id}/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_by": 420,
            "modified_by_email": "user@mycompany.com",
            "translation": "Hello, world!",
            "is_fuzzy": true,
            "is_reviewed": false,
            "words": 2
        },

        ...

        {
            "translation_id": 344417,
            "key_id": 553662,
            "language_iso": "ru",
            "modified_at": "2018-12-31 12:00:00 (Etc\/UTC)",
            "modified_by": 420,
            "modified_by_email": "user@mycompany.com",
            "translation": "Привет, мир!",
            "is_fuzzy": false,
            "is_reviewed": false,
            "words": 2
        }                    
    ]
}
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.co/api2/projects/{project_id}/translations/{translation_id}
Example request
curl --request GET \
--url https://api.lokalise.co/api2/projects/{project_id}/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_by": 420,
        "modified_by_email": "user@mycompany.com",
        "translation": "Hello, world!",
        "is_fuzzy": true,
        "is_reviewed": false,
        "words": 2
    }
}
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.
Definition
PUT https://api.lokalise.co/api2/projects/{project_id}/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.co/api2/projects/{project_id}/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_by": 420,
        "modified_by_email": "user@mycompany.com",
        "translation": "Quick brown fox jumps over the lazy dog.",
        "is_fuzzy": false,
        "is_reviewed": true,
        "words": 8
    }
}
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.