API v2 Documentation

Connect your software to the POEditor localization platform using this simple REST API

Overview

To perform an action using the POEditor API, send a request to the API endpoint and a response will then be sent back to you.

The POEditor API consists of a set of callable methods.

The request should be POST.
The API supports two content types for encoding form data:
- application/x-www-form-urlencoded
- multipart/form-data (required for projects/upload method)

Some endpoints will require you to send the parameter values as JSON.
An example of a properly formatted JSON, for a request to export to Android Strings with unquoted strings using the «options» parameter:

[{"unquoted": 1}]

An example of a request containing this JSON:

curl -X POST https://api.poeditor.com/v2/projects/export \
     -d api_token="a9824103d8729b923fbe1d268ec69ef9" \
     -d id="7717" \
     -d language="fr" \
     -d type="android_strings" \
     -d options="[{\"unquoted\":1}]"

The response you'll get will be a JSON encoded object.
If the response is not successful, the JSON object will contain an error code and a message. You can find the full list of POEditor API errors here.

Authentication

All requests to the POEditor API must contain the parameter api_token. You can get your POEditor API key from your POEditor account. You'll find it in Account > API Access.

Please take care of your token.

If you think the key has been compromised, you can reset it from Settings > API Access by clicking the Regenerate API Token button, or you can delete the API Access using the Remove API Token button.

OpenAPI

POEditor's API has an OpenAPI specification. You can find the document on SwaggerHub or download POEditor's Swagger file, which can "translate" our API for your specific needs. Request examples included for the following: C sharp, Go, Java, jaxrs-cxf-client, kotlin-client, PHP, Python, Scala, Swift3, Swift4, Swift5, typescript-angular, typescript-fetch.

METHODS

Projects

List Projects

https://api.poeditor.com/v2/projects/list

Returns the list of localization projects owned by the user.

Argument Value  
api_token required Get token readonly accepted
curl -X POST https://api.poeditor.com/v2/projects/list \
     -d api_token="a9824103d8729b923fbe1d268ec69ef9"
{
    "response": {
        "status": "success",
        "code": "200",
        "message": "OK"
    },
    "result": {
        "projects": [
            {
                "id": 4886,
                "name": "Twentytwelve",
                "public": 0,
                "open": 0,
                "created": "2013-04-12T09:24:42+0000"
            },
            {
                "id": 4537,
                "name": "contact form",
                "public": 0,
                "open": 0,
                "created": "2013-04-02T23:00:06+0000"
            },
            {
                "id": 6639,
                "name": "POEditor WP plugin",
                "public": 0,
                "open": 0,
                "created": "2013-06-05T17:41:25+0000"
            },
            {
                "id": 6268,
                "name": "Test Project",
                "public": 0,
                "open": 0,
                "created": "2013-05-23T14:26:34+0000"
            }
        ]
    }
}

View Project Details

https://api.poeditor.com/v2/projects/view

Returns the localization project's details.

Argument Value  
api_token required Get token readonly accepted
id required <integer> The id of project
curl -X POST https://api.poeditor.com/v2/projects/view \
     -d api_token="a9824103d8729b923fbe1d268ec69ef9" \
     -d id="7717"
{
    "response": {
        "status": "success",
        "code": "200",
        "message": "OK"
    },
    "result": {
        "project": {
            "id": 7717,
            "name": "Automobile",
            "description": "Automobile",
            "public": 0,
            "open": 0,
            "reference_language": "fr",
            "fallback_language": "",
            "terms": 783,
            "created": "2013-07-04T17:44:37+0000"
        }
    }
}

Add Project

https://api.poeditor.com/v2/projects/add

Creates a new localization project.
Returns the project details (if successful).

Argument Value  
api_token required Get token
name required <string> The name of the project
description optional <string> The description of the project
curl -X POST https://api.poeditor.com/v2/projects/add \
     -d api_token="a9824103d8729b923fbe1d268ec69ef9" \
     -d name="Automobile"
{
    "response": {
        "status": "success",
        "code": "200",
        "message": "Project created."
    },
    "result": {
        "project": {
            "id": 7717,
            "name": "Automobile",
            "description": "",
            "public": 0,
            "open": 0,
            "reference_language": "",
            "fallback_language": "",
            "terms": 0,
            "created": "2014-08-13T09:39:32+0000"
        }
    }
}

Update Project Settings

https://api.poeditor.com/v2/projects/update

Updates the project settings (name, description, reference language, fallback language).
If optional parameters are not sent, their respective fields will not be updated.

Argument Value  
api_token required Get token
id required <integer> The id of project
name optional <string> The name of the project
description optional <string> The description of the project
reference_language optional <string> The language code
fallback_language optional <string> The code of the language from which you want to export empty translations.
curl -X POST https://api.poeditor.com/v2/projects/update \
     -d api_token="a9824103d8729b923fbe1d268ec69ef9" \
     -d id="7717" \
     -d name="Automobile" \
     -d reference_language="fr" \
     -d fallback_language="en"
{
    "response": {
        "status": "success",
        "code": "200",
        "message": "OK"
    },
    "result": {
        "project": {
            "id": 7717,
            "name": "Automobile",
            "description": "",
            "public": 1,
            "open": 0,
            "reference_language": "en",
            "fallback_language": "fr",
            "terms": 184,
            "created": "2014-08-13T09:39:32+0000"
        }
    }
}

Delete Project

https://api.poeditor.com/v2/projects/delete

Deletes the localization project from the account.
You must be the owner of the project.

Argument Value  
api_token required Get token
id required <integer> The id of project
curl -X POST https://api.poeditor.com/v2/projects/delete \
     -d api_token="a9824103d8729b923fbe1d268ec69ef9" \
     -d id="7717"
{
    "response": {
        "status": "success",
        "code": "200",
        "message": "Project was deleted: Automobile [7717]"
    }
}

Upload

https://api.poeditor.com/v2/projects/upload

Uploads terms and/or translations. No more than one request every 20 seconds.

Argument Value  
api_token required Get token
id required <integer> The id of project
updating required terms | terms_translations | translations
file required <file> The uploaded file (.po, .xls or any of the supported file formats)
language optional <string> The language code (required only if updating is terms_translations or translations)
overwrite optional 0 | 1 Set it to 1 if you want to overwrite translations
sync_terms optional 0 | 1 Set it to 1 if you want to sync your terms (terms that are not found in the uploaded file will be deleted from the project and the new ones will be added). Ignored if updating = translations.
tags optional <string> Adds tags to the project terms; available when updating terms or terms_translations; you can use the following filters: "all" - for the all the imported terms, "new" - for the terms which aren't already in the project, "obsolete" - for the terms which are in the project but not in the imported file and "overwritten_translations" - for the terms for which translations change (example)
read_from_source optional 0 | 1 For .xliff format only - set it to 1 if you want to import translations from the source tag
fuzzy_trigger optional 0 | 1 Set it to 1 to mark corresponding translations from the other languages as fuzzy for the updated values
curl -X POST https://api.poeditor.com/v2/projects/upload \
     -F api_token="a9824103d8729b923fbe1d268ec69ef9" \
     -F id="7717" \
     -F updating="terms" \
     -F file=@"pathtofile/filename.po" \
     -F tags="{\"obsolete\":\"removed-strings\"}"
{
    "response": {
        "status": "success",
        "code": "200",
        "message": "OK"
    },
    "result": {
        "terms": {
            "parsed": 1017,
            "added": 1017,
            "deleted": 0
        },
        "translations": {
            "parsed": 0,
            "added": 0,
            "updated": 0
        }
    }
}
# If not specified, the tags are set by default to all terms.
tags=["name-of-tag", "name-of-another-tag"]
tags={"all":"name-of-tag"}
tags={"all":"name-of-tag","new":["name-of-tag"],"obsolete":["name-of-tag", "name-of-another-tag"]}

Sync Terms

https://api.poeditor.com/v2/projects/sync

Syncs your localization project with the array you send (terms that are not found in the JSON object will be deleted from the project and the new ones will be added).
Please use with caution. If wrong data is sent, existing terms and their translations might be irreversibly lost.

Argument Value  
api_token required Get token
id required <integer> The project id
data required <string> JSON format (example)
curl -X POST https://api.poeditor.com/v2/projects/sync \
     -d api_token="a9824103d8729b923fbe1d268ec69ef9" \
     -d id="7717" \
     -d data="[{\"term\":\"Add new list\"}, {\"term\":\"Add new item\"}]"
{
    "response": {
        "status": "success",
        "code": "200",
        "message": "OK"
    },
    "result": {
        "terms": {
            "parsed": 2,
            "added": 2,
            "updated": 0,
            "deleted": 2446
        }
    }
}
[
    {
        "term": "Add new list",
        "context": "",
        "reference": "\/projects",
        "plural": "",
        "comment": ""
    },
    {
        "term": "one project found",
        "context": "",
        "reference": "\/projects",
        "plural": "%d projects found",
        "comment": "Make sure you translate the plural forms",
        "tags": [
            "first_tag",
            "second_tag"
        ]
    },
    {
        "term": "Show all projects",
        "context": "",
        "reference": "\/projects",
        "plural": "",
        "tags": "just_a_tag"
    }
]

Export

https://api.poeditor.com/v2/projects/export

Returns the link of the file (expires after 10 minutes).
The settings inherited from the project will be the ones at the time of the download.

Argument Value  
api_token required Get token readonly accepted
id required <integer> The project id
language required <string> The language code
type required <string> The file format
arb [Flutter ARB], csv [CSV], ini [INI], key_value_json [Key-Value JSON], i18next [i18next JSON], json [JSON], po [Gettext PO], pot [Gettext POT], mo [Gettext MO], properties [Java Properties], resw [.NET RESW], resx [.NET RESX], ts [Qt TS], apple_strings [iOS Strings], xliff [iOS XLIFF], xlf [Angular XLIFF], xmb [Angular XMB], xtb [Angular XTB], xliff_1_2 [XLIFF 1.2], rise_360_xliff [Rise 360 XLIFF], xls [Microsoft Excel], xlsx [Microsoft Excel], android_strings [Android String Resources], yml [YAML]
filters optional <string> Filter results by 'translated', 'untranslated', 'fuzzy', 'not_fuzzy', 'automatic', 'not_automatic', 'proofread', 'not_proofread' (only available when proofreading is enabled for the project in its settings); you can use either a string for a single filter or a JSON array for one or multiple filter (example)
order optional <string> Set it to terms to order results by 'terms' alphabetically.
tags optional <string> Filter results by tags; you can use either a string for a single tag or a JSON array for one or multiple tags (example)
options optional <string> Set specific advanced options for particular formats (where these exist). The value must be a JSON array of objects.
Can be used to export in Android XML format without wrapping the strings in quotes. (example)
curl -X POST https://api.poeditor.com/v2/projects/export \
     -d api_token="a9824103d8729b923fbe1d268ec69ef9" \
     -d id="7717" \
     -d language="fr" \
     -d type="po"
{
    "response": {
        "status": "success",
        "code": "200",
        "message": "OK"
    },
    "result": {
        "url": "https:\/\/api.poeditor.com\/v2\/download\/file\/b577a66ac39d82995debfabc016f855d"
    }
}
filters=translated
filters=["translated"]
filters=["translated", "not_fuzzy"]
tags=name-of-tag
tags=["name-of-tag"]
tags=["name-of-tag", "name-of-another-tag"]
// Android Strings exported without wrapping the strings in quotes
options=[{"unquoted": 1}]
// RESX and RESW files exported without encoding single and double quotes.
options=[{"unencoded": 1}]
METHODS

Languages

Available Languages

https://api.poeditor.com/v2/languages/available

Returns a comprehensive list of all the languages supported by POEditor. You can find the language list here, too.

Argument Value  
api_token required Get token readonly accepted
curl -X POST https://api.poeditor.com/v2/languages/available \
     -d api_token="a9824103d8729b923fbe1d268ec69ef9"
{
    "response": {
        "status": "success",
        "code": "200",
        "message": "OK"
    },
    "result": {
        "languages": [
            {
                "name": "Abkhazian",
                "code": "ab"
            },
            {
                "name": "Afar",
                "code": "aa"
            },
            {
                "name": "Afrikaans",
                "code": "af"
            },
            {
                "name": "Akan",
                "code": "ak"
            },
            {
                "name": "Albanian",
                "code": "sq"
            },
            {
                "name": "Amharic",
                "code": "am"
            },
            {
                "name": "Arabic",
                "code": "ar"
            },
            {
                "name": "Aragonese",
                "code": "an"
            },
            {
                "name": "Armenian",
                "code": "hy"
            },
            {
                "name": "Assamese",
                "code": "as"
            },
            {
                "name": "Yiddish",
                "code": "yi"
            },
            {
                "name": "Yoruba",
                "code": "yo"
            },
            {
                "name": "Zhuang; Chuang",
                "code": "za"
            },
            {
                "name": "Zulu",
                "code": "zu"
            }
        ]
    }
}

List Languages

https://api.poeditor.com/v2/languages/list

Returns the project languages, percentage of translation for each and the datetime (UTC - ISO 8601) when the last edit was made.

Argument Value  
api_token required Get token readonly accepted
id required <integer> The project id
curl -X POST https://api.poeditor.com/v2/languages/list \
     -d api_token="a9824103d8729b923fbe1d268ec69ef9" \
     -d id="7717"
{
    "response": {
        "status": "success",
        "code": "200",
        "message": "OK"
    },
    "result": {
        "languages": [
            {
                "name": "English",
                "code": "en",
                "translations": 13,
                "percentage": 12.5,
                "updated": "2015-05-04T14:21:41+0000"
            },
            {
                "name": "French",
                "code": "fr",
                "translations": 70,
                "percentage": 68.75,
                "updated": "2015-04-30T08:59:34+0000"
            }
        ]
    }
}

Add Language to Project

https://api.poeditor.com/v2/languages/add

Adds a new language to the localization project.

Argument Value  
api_token required Get token
id required <integer> The project id
language required <string> The language code
curl -X POST https://api.poeditor.com/v2/languages/add \
     -d api_token="a9824103d8729b923fbe1d268ec69ef9" \
     -d id="7717" \
     -d language="de"
{
    "response": {
        "status": "success",
        "code": "200",
        "message": "Language was added: German [de]"
    }
}

Update Project Language

https://api.poeditor.com/v2/languages/update

Inserts / overwrites translations.

Argument Value  
api_token required Get token
id required <integer> The id of project
language required <string> The language code
fuzzy_trigger optional 0 | 1 Set it to 1 to mark corresponding translations from the other languages as fuzzy for the updated values
data required <string> JSON format (example)
curl -X POST https://api.poeditor.com/v2/languages/update \
     -d api_token="a9824103d8729b923fbe1d268ec69ef9" \
     -d id="7717" \
     -d language="fr" \
     -d data="[{\"term\":\"Projects\",\"context\":\"project list\",\"translation\":{\"content\":\"Des projets\",\"fuzzy\":0}}]"
{
    "response": {
        "status": "success",
        "code": "200",
        "message": "OK"
    },
    "result": {
        "translations": {
            "parsed": 1,
            "added": 1,
            "updated": 0
        }
    }
}
[
    {
        "term": "Projects",
        "context": "project list",
        "translation": {
            "content": "Des projets",
            "fuzzy": 0
        }
    }
]
[
    {
        "term": "%d Projects available",
        "context": "project list",
        "translation": {
            "content": {
                "one": "Un projet disponible",
                "other": "%d Projets disponibles"
            },
            "fuzzy": 1
        }
    }
]

Delete Language from Project

https://api.poeditor.com/v2/languages/delete

Deletes the specified language from the localization project.

Argument Value  
api_token required Get token
id required <integer> The project id
language required <string> The language code
curl -X POST https://api.poeditor.com/v2/languages/delete \
     -d api_token="a9824103d8729b923fbe1d268ec69ef9" \
     -d id="7717" \
     -d language="de"
{
    "response": {
        "status": "success",
        "code": "200",
        "message": "Language was deleted: German [de]"
    }
}
METHODS

Terms

List Project Terms

https://api.poeditor.com/v2/terms/list

Returns the project's terms and translations if the argument language is provided.

Argument Value  
api_token required Get token readonly accepted
id required <integer> The project id
language optional <string> The language code
curl -X POST https://api.poeditor.com/v2/terms/list \
     -d api_token="a9824103d8729b923fbe1d268ec69ef9" \
     -d id="7717" \
     -d language="en"
{
    "response": {
        "status": "success",
        "code": "200",
        "message": "OK"
    },
    "result": {
        "terms": [
            {
                "term": "app_name",
                "context": "",
                "plural": "",
                "created": "2013-06-10T11:08:54+0000",
                "updated": "",
                "translation": {
                    "content": "TODO List",
                    "fuzzy": 0,
                    "proofread": 1,
                    "updated": "2013-06-12T11:08:54+0000"
                },
                "reference": "",
                "tags": [
                    "first_upload",
                    "second_upload"
                ],
                "comment": "Don't translate the name of the app"
            },
            {
                "term": "mark_as_unread",
                "context": "",
                "plural": "",
                "created": "2013-06-10T11:08:54+0000",
                "updated": "",
                "translation": {
                    "content": "",
                    "fuzzy": 0,
                    "proofread": 0,
                    "updated": ""
                },
                "reference": "",
                "tags": [
                    "second_upload"
                ],
                "comment": ""
            },
            {
                "term": "One Item",
                "context": "",
                "plural": "%d Items",
                "created": "2013-06-10T11:24:12+0000",
                "updated": "",
                "translation": {
                    "content": {
                        "one": "",
                        "other": ""
                    },
                    "fuzzy": 0,
                    "proofread": 0,
                    "updated": ""
                },
                "reference": "",
                "tags": [],
                "comment": ""
            }
        ]
    }
}

Add Terms

https://api.poeditor.com/v2/terms/add

Adds terms to the localization project.

Argument Value  
api_token required Get token
id required <integer> The project id
data required <string> JSON format (example)
curl -X POST https://api.poeditor.com/v2/terms/add \
     -d api_token="a9824103d8729b923fbe1d268ec69ef9" \
     -d id="7717" \
     -d data="[{\"term\":\"Add new list\"}]"
{
    "response": {
        "status": "success",
        "code": "200",
        "message": "OK"
    },
    "result": {
        "terms": {
            "parsed": 1,
            "added": 1
        }
    }
}
[
    {
        "term": "Add new list",
        "context": "",
        "reference": "\/projects",
        "plural": "",
        "comment": ""
    },
    {
        "term": "one project found",
        "context": "",
        "reference": "\/projects",
        "plural": "%d projects found",
        "comment": "Make sure you translate the plural forms",
        "tags": [
            "first_tag",
            "second_tag"
        ]
    },
    {
        "term": "Show all projects",
        "context": "",
        "reference": "\/projects",
        "plural": "",
        "tags": "just_a_tag"
    }
]

Update Terms

https://api.poeditor.com/v2/terms/update

Updates project terms. Lets you change the text, context, reference, plural and tags.

Argument Value  
api_token required Get token
id required <integer> The project id
data required <string> JSON format (example)
fuzzy_trigger optional 0 | 1 Set it to 1 to mark corresponding translations from all languages as fuzzy for the updated values
curl -X POST https://api.poeditor.com/v2/terms/update \
     -d api_token="a9824103d8729b923fbe1d268ec69ef9" \
     -d id="7717" \
     -d data="[{\"term\":\"Add new list\", \"new_term\": \"Save list\"}]"
{
    "response": {
        "status": "success",
        "code": "200",
        "message": "OK"
    },
    "result": {
        "terms": {
            "parsed": 2,
            "updated": 2
        }
    }
}
[
    {
        "term": "Add new list",
        "context": "",
        "new_term": "Save list",
        "new_context": "",
        "reference": "\/projects",
        "plural": "",
        "comment": "",
        "tags": [
            "first_tag",
            "second_tag"
        ]
    },
    {
        "term": "Display list",
        "context": "",
        "new_term": "Show list",
        "new_context": ""
    }
]

Delete Terms

https://api.poeditor.com/v2/terms/delete

Deletes terms from the localization project.

Argument Value  
api_token required Get token
id required <integer> The project id
data required <string> JSON format (example)
curl -X POST https://api.poeditor.com/v2/terms/delete \
     -d api_token="a9824103d8729b923fbe1d268ec69ef9" \
     -d id="7717" \
     -d data="[{\"term\":\"one project found\", \"context\":\"\"}, {\"term\":\"Show all projects\", \"context\":\"form\"}]"
{
    "response": {
        "status": "success",
        "code": "200",
        "message": "OK"
    },
    "result": {
        "terms": {
            "parsed": 2,
            "deleted": 2
        }
    }
}
[
    {
        "term": "one project found",
        "context": ""
    },
    {
        "term": "Show all projects",
        "context": "form"
    }
]

Add Comment

https://api.poeditor.com/v2/terms/add_comment

Adds comments to existing terms.

Argument Value  
api_token required Get token
id required <integer> The id of project
data required <string> JSON format (example)
curl -X POST https://api.poeditor.com/v2/terms/add_comment \
     -d api_token="a9824103d8729b923fbe1d268ec69ef9" \
     -d id="7717" \
     -d data="[{\"term\":\"Add new list\", \"comment\":\"This is a button\"}, {\"term\":\"Show all projects\", \"comment\":\"This is a button\"}]"
{
    "response": {
        "status": "success",
        "code": "200",
        "message": "OK"
    },
    "result": {
        "terms": {
            "parsed": 2,
            "with_added_comment": 2
        }
    }
}
[
    {
        "term": "Add new list",
        "context": "",
        "comment": "This is a button"
    },
    {
        "term": "one project found",
        "context": "",
        "comment": "Make sure you translate the plural forms"
    },
    {
        "term": "Show all projects",
        "context": "",
        "comment": "This is a button"
    }
]
METHODS

Translations

Add Translations

https://api.poeditor.com/v2/translations/add

Adds translations to the localization project. If a translation exists, it will not be overwritten.

Argument Value  
api_token required Get token
id required <integer> The project id
language required <string> The language code
data required <string> JSON format (example)
curl -X POST https://api.poeditor.com/v2/translations/add \
     -d api_token="a9824103d8729b923fbe1d268ec69ef9" \
     -d id="7717" \
     -d language="en" \
     -d data="[{\"term\":\"Projects\",\"context\":\"project list\",\"translation\":{\"content\":\"Des projets\"}}]"
{
    "response": {
        "status": "success",
        "code": "200",
        "message": "OK"
    },
    "result": {
        "translations": {
            "parsed": 1,
            "added": 1
        }
    }
}
[
    {
        "term": "Projects",
        "context": "project list",
        "translation": {
            "content": "Des projets"
        }
    }
]
[
    {
        "term": "%d Projects available",
        "context": "project list",
        "translation": {
            "content": {
                "one": "Un projet disponible",
                "other": "%d Projets disponibles"
            }
        }
    }
]

Update Translations

https://api.poeditor.com/v2/translations/update

Updates existing translations.

Argument Value  
api_token required Get token
id required <integer> The project id
language required <string> The language code
data required <string> JSON format (example)
curl -X POST https://api.poeditor.com/v2/translations/update \
     -d api_token="a9824103d8729b923fbe1d268ec69ef9" \
     -d id="7717" \
     -d language="en" \
     -d data="[{\"term\":\"Projects\",\"context\":\"project list\",\"translation\":{\"content\":\"Des projets\"}}]"
{
    "response": {
        "status": "success",
        "code": "200",
        "message": "OK"
    },
    "result": {
        "translations": {
            "parsed": 1,
            "updated": 1
        }
    }
}
[
    {
        "term": "Projects",
        "context": "project list",
        "translation": {
            "content": "Des projets"
        }
    }
]
[
    {
        "term": "%d Projects available",
        "context": "project list",
        "translation": {
            "content": {
                "one": "Un projet disponible",
                "other": "%d Projets disponibles"
            }
        }
    }
]

Delete Translations

https://api.poeditor.com/v2/translations/delete

Deletes translations from the specified language.

Argument Value  
api_token required Get token
id required <integer> The project id
language required <string> The language code
data required <string> JSON format (example)
curl -X POST https://api.poeditor.com/v2/translations/delete \
     -d api_token="a9824103d8729b923fbe1d268ec69ef9" \
     -d id="7717" \
     -d language="en" \
     -d data="[{\"term\":\"Projects\",\"context\":\"project list\"}, {\"term\":\"Languages\",\"context\":\"\"}]"
{
    "response": {
        "status": "success",
        "code": "200",
        "message": "OK"
    },
    "result": {
        "translations": {
            "parsed": 2,
            "deleted": 2
        }
    }
}
[
    {
        "term": "Projects",
        "context": "project list"
    },
    {
        "term": "Languages",
        "context": ""
    }
]

Translate automatically

https://api.poeditor.com/v2/translations/automatic

Gets machine translations from integrated providers.

Argument Value  
api_token required Get token
id required <integer> The project id
source_language required <string> The language code of the source language in POEditor. The strings in this language will be sent for translation.
provider_source_language required <string> The language code from the provider that corresponds to the source_language.
provider required google | microsoft | deepl
target_languages required <string> A JSON of the languages to translate to. (example) Languages
options optional <string> A JSON of the advanced options you want to use with the selected provider. Possible options include the POEditor tag of the strings you want to send for translation and some provider-specific options (check Options example)
curl -X POST https://api.poeditor.com/v2/translations/automatic \
     -d api_token="a9824103d8729b923fbe1d268ec69ef9" \
     -d id="7717" \
     -d source_language="en" \
     -d provider_source_language="en" \
     -d provider="google" \
     -d target_languages="[{\"project_language\":\"it\",\"provider_language\":\"it\"},{\"project_language\":\"fr\",\"provider_language\":\"fr\"}]" \
     -d options="{\"tag\":\"new\",\"format\":\"html\"}"
{
    "response": {
        "status": "success",
        "code": "200",
        "message": "OK"
    },
    "result": {
        "successful": [
            {
                "source": "en",
                "target": "fr",
                "chars": 7
            },
            {
                "source": "en",
                "target": "it",
                "chars": 7
            }
        ],
        "failed": [
            {
                "source": "en",
                "target": null,
                "message": "Invalid pair."
            },
            {
                "source": "en",
                "target": "ar",
                "message": "You don't have enough AT characters for this translation."
            }
        ]
    }
}
[
    {
        "project_language": "fr",
        "provider_language": "fr"
    },
    {
        "project_language": "it",
        "provider_language": "it"
    }
]
// OPTIONS EXAMPLE
{
    "tag": "new",
    "tag_handling": "html",
    "split_sentences": "0",
    "formality": "less"
}




// FILTER BY TAG
{
    "tag": "new"
}




// AVAILABLE OPTIONS FOR GOOGLE

// Format: Tells the translation engine whether your strings are plain text or contain HTML.
// Allowed values: 
// - html (Recommended for strings that contain HTML tags.)
// - text
{
    "format": "text"
}





// AVAILABLE OPTIONS FOR DEEPL

// Tag Handling: Tells the machine translation engine what kind of tags to take into account.
// Allowed values: 
// - 
// - xml (Recommended for strings that contain XML tags.)
// - html (Recommended for strings that contain HTML tags.)
{
    "tag_handling": ""
}

// Split Sentences: Tells the translation engine whether to split the strings into sentences or to treat each string as a single sentence.
// Allowed values: 
// - 0
// - 1
// - nonewlines
{
    "split_sentences": "1"
}

// Preserve Formatting: Tells the translation engine whether to respect the original formatting (punctuation and upper/lower case at the beginning and end of the sentence).
// Allowed values: 
// - 0
// - 1
{
    "preserve_formatting": "0"
}

// Formality: Tells the translation engine whether to lean towards formal or informal language.
// Allowed values: 
// - default
// - more
// - less
{
    "formality": "default"
}





// AVAILABLE OPTIONS FOR MICROSOFT

// Format: Tells the translation engine whether your strings are plain text or contain HTML.
// Allowed values: 
// - html (Recommended for strings that contain HTML tags.)
// - plain
{
    "textType": "plain"
}
METHODS

Contributors

List Contributors

https://api.poeditor.com/v2/contributors/list

Returns the list of contributors from your localization projects.

Argument Value  
api_token required Get token readonly accepted
id optional <integer> The project id (optional, unless language is set. Then, it becomes required)
language optional <string> The language code
curl -X POST https://api.poeditor.com/v2/contributors/list \
     -d api_token="a9824103d8729b923fbe1d268ec69ef9" \
     -d id="4886"
{
    "response": {
        "status": "success",
        "code": "200",
        "message": "OK"
    },
    "result": {
        "contributors": [
            {
                "name": "final test",
                "email": "email@example.com",
                "permissions": [
                    {
                        "project": {
                            "id": "4886",
                            "name": "Twentytwelve"
                        },
                        "type": "administrator",
                        "proofreader": true
                    }
                ]
            },
            {
                "name": "Translator",
                "email": "translator@example.com",
                "permissions": [
                    {
                        "project": {
                            "id": "4886",
                            "name": "Twentytwelve"
                        },
                        "type": "contributor",
                        "proofreader": false,
                        "languages": [
                            "en",
                            "en-us"
                        ]
                    }
                ]
            }
        ]
    }
}

Add Contributor

https://api.poeditor.com/v2/contributors/add

Adds a contributor to a project language or an administrator to a project.

Argument Value  
api_token required Get token
id required <integer> The project id
name required <string> The name of the contributor
email required <string> The email of the contributor
language optional <string> The language code (required if adding a contributor)
admin optional 0 | 1 Set it to 1 to add as administrator
curl -X POST https://api.poeditor.com/v2/contributors/add \
     -d api_token="a9824103d8729b923fbe1d268ec69ef9" \
     -d id="7717" \
     -d name="caesar" \
     -d email="email@email.com" \
     -d language="en"
{
    "response": {
        "status": "success",
        "code": "200",
        "message": "Contributor added."
    }
}

Remove Contributor

https://api.poeditor.com/v2/contributors/remove

Removes a contributor from a project language or an admin from a project, if the language is not specified.

Argument Value  
api_token required Get token
id required <integer> The project id
email required <string> The email of the contributor
language optional <string> The language code (required if removing a contributor from a certain language)
curl -X POST https://api.poeditor.com/v2/contributors/remove \
     -d api_token="a9824103d8729b923fbe1d268ec69ef9" \
     -d id="7717" \
     -d email="email@email.com" \
     -d language="en"
{
    "response": {
        "status": "success",
        "code": "200",
        "message": "Contributor removed."
    }
}
METHODS

Third-Party Libraries

Wordpress Plugin

Using WordPress and all this API business seems too much for you? Try our POEditor WordPress plugin. It will let you manage your POEditor translations directly from WordPress via the POEditor API.

No technical knowledge needed.

User Contributions

Looking for a starting point for a script of your own? Check out these libraries our users are sharing.



Additional help