API Endpoint: https://poeditor.com/api/
To perform an action using the 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 response you'll get will be a JSON encoded object.
If the response is not sucessful, the JSON object will contain an error code and a message. You can find the full list here.
All requests to the API must contain the parameter api_token
. You can get this key from your POEditor account. You'll find it in My Account > API Access.
Please take care of your token.
If you think the key has been compromised, you can reset it from My Account > API Access by clicking the Regenerate button, or you can lock the API Access using the Lock API button.
Returns the list of projects owned by user.
Argument | Value | |
---|---|---|
api_token
required |
Get token | |
action
required |
list_projects |
|
curl -X POST https://poeditor.com/api/ \
-d api_token="a9824103d8729b923fbe1d268ec69ef9" \
-d action="list_projects"
{ "response": { "status": "success", "code": "200", "message": "OK" }, "list": [ { "id": "4886", "name": "Twentytwelve", "public": "0", "open": "0", "created": "2013-04-12 09:24:42" }, { "id": "4537", "name": "contact form", "public": "0", "open": "0", "created": "2013-04-02 23:00:06" }, { "id": "6639", "name": "POEditor WP plugin", "public": "0", "open": "0", "created": "2013-06-05 17:41:25" }, { "id": "6268", "name": "Test Project", "public": "0", "open": "0", "created": "2013-05-23 14:26:34" } ] }
Creates a new project.
Returns the id of the project (if successful).
Argument | Value | |
---|---|---|
api_token
required |
Get token | |
action
required |
create_project |
|
name
required |
<string> | The name of the project |
description
optional |
<string> | The description of the project |
curl -X POST https://poeditor.com/api/ \
-d api_token="a9824103d8729b923fbe1d268ec69ef9" \
-d action="create_project" \
-d name="Automobile"
{ "response": { "status": "success", "code": "200", "message": "Project created.", "item": 7717 } }
Returns project's details.
Argument | Value | |
---|---|---|
api_token
required |
Get token | |
action
required |
view_project |
|
id
required |
<integer> | The id of project |
curl -X POST https://poeditor.com/api/ \
-d api_token="a9824103d8729b923fbe1d268ec69ef9" \
-d action="view_project" \
-d id="7717"
{ "response": { "status": "success", "code": "200", "message": "OK" }, "item": { "id": "7717", "name": "Automobile", "public": "0", "open": "0", "reference_language": "fr", "created": "2013-07-04 17:44:37" } }
Returns project languages, percentage of translation done for each and the datetime (UTC) when the last change was made.
Argument | Value | |
---|---|---|
api_token
required |
Get token | |
action
required |
list_languages |
|
id
required |
<integer> | The id of project |
curl -X POST https://poeditor.com/api/ \
-d api_token="a9824103d8729b923fbe1d268ec69ef9" \
-d action="list_languages" \
-d id="7717"
{ "response": { "status": "success", "code": "200", "message": "OK" }, "list": [ { "name": "English", "code": "en", "percentage": 12.5, "updated": "2015-05-04 14:21:41" }, { "name": "French", "code": "fr", "percentage": 68.75, "updated": "2015-04-30 08:59:34" } ] }
Adds a new language to project.
Argument | Value | |
---|---|---|
api_token
required |
Get token | |
action
required |
add_language |
|
id
required |
<integer> | The id of project |
language
required |
<string> | The language code |
curl -X POST https://poeditor.com/api/ \
-d api_token="a9824103d8729b923fbe1d268ec69ef9" \
-d action="add_language" \
-d id="7717" \
-d language="de"
{ "response": { "status": "success", "code": "200", "message": "Language was added: German [de]" } }
Deletes existing language from project.
Argument | Value | |
---|---|---|
api_token
required |
Get token | |
action
required |
delete_language |
|
id
required |
<integer> | The id of project |
language
required |
<string> | The language code |
curl -X POST https://poeditor.com/api/ \
-d api_token="a9824103d8729b923fbe1d268ec69ef9" \
-d action="delete_language" \
-d id="7717" \
-d language="de"
{ "response": { "status": "success", "code": "200", "message": "Language was deleted: German [de]" } }
Sets a reference language to project.
Argument | Value | |
---|---|---|
api_token
required |
Get token | |
action
required |
set_reference_language |
|
id
required |
<integer> | The id of project |
language
required |
<string> | The language code |
curl -X POST https://poeditor.com/api/ \
-d api_token="a9824103d8729b923fbe1d268ec69ef9" \
-d action="set_reference_language" \
-d id="7717" \
-d language="en"
{ "response": { "status": "success", "code": "200", "message": "English [en] has been set as reference language." } }
Clears reference language from project.
Argument | Value | |
---|---|---|
api_token
required |
Get token | |
action
required |
clear_reference_language |
|
id
required |
<integer> | The id of project |
curl -X POST https://poeditor.com/api/ \
-d api_token="a9824103d8729b923fbe1d268ec69ef9" \
-d action="clear_reference_language" \
-d id="7717"
{ "response": { "status": "success", "code": "200", "message": "The reference language has been cleared." } }
Returns project's terms.
Returns project's terms and translations if the argument language is provided.
Argument | Value | |
---|---|---|
api_token
required |
Get token | |
action
required |
view_terms |
|
id
required |
<integer> | The id of project |
language
optional |
<string> | The language code |
curl -X POST https://poeditor.com/api/ \
-d api_token="a9824103d8729b923fbe1d268ec69ef9" \
-d action="view_terms" \
-d id="7717" \
-d language="en"
{ "response": { "status": "success", "code": "200", "message": "OK" }, "list": [ { "term": "app_name", "context": "", "created": "2013-06-10 11:08:54", "updated": "", "definition": { "form": "", "fuzzy": 0 }, "reference": "", "tags": [ "first_upload", "second_upload" ] }, { "term": "mark_as_unread", "context": "", "created": "2013-06-10 11:08:54", "updated": "", "definition": { "form": "", "fuzzy": 0 }, "reference": "", "tags": [ "second_upload" ] }, { "term": "test1", "context": "", "created": "2013-06-10 11:24:12", "updated": "", "definition": { "form": "", "fuzzy": 0 }, "reference": "", "tags": [] } ] }
Adds terms to project.
Argument | Value | |
---|---|---|
api_token
required |
Get token | |
action
required |
add_terms |
|
id
required |
<integer> | The id of project |
data
required |
<string> | JSON format (example) |
curl -X POST https://poeditor.com/api/ \
-d api_token="a9824103d8729b923fbe1d268ec69ef9" \
-d action="add_terms" \
-d id="7717" \
-d data="[{\"term\":\"Add new list\"}]"
{ "response": { "status": "success", "code": "200", "message": "OK" }, "details": { "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" } ]
Adds comments to existing terms.
Argument | Value | |
---|---|---|
api_token
required |
Get token | |
action
required |
add_comment |
|
id
required |
<integer> | The id of project |
data
required |
<string> | JSON format (example) |
curl -X POST https://poeditor.com/api/ \
-d api_token="a9824103d8729b923fbe1d268ec69ef9" \
-d action="add_comment" \
-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" }, "details": { "parsed": 2, "added": 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" } ]
Deletes terms from project.
Argument | Value | |
---|---|---|
api_token
required |
Get token | |
action
required |
delete_terms |
|
id
required |
<integer> | The id of project |
data
required |
<string> | JSON format (example) |
curl -X POST https://poeditor.com/api/ \
-d api_token="a9824103d8729b923fbe1d268ec69ef9" \
-d action="delete_terms" \
-d id="7717" \
-d data="[{\"term\":\"one project found\", \"context\":\"\"}, {\"term\":\"Show all projects\", \"context\":\"form\"}]"
{ "response": { "status": "success", "code": "200", "message": "OK" }, "details": { "parsed": 2, "deleted": 2 } }
[ { "term": "one project found", "context": "" }, { "term": "Show all projects", "context": "form" } ]
Syncs your project with the array you send (terms that are not found in the JSON object will be deleted from project and the new ones added).
Argument | Value | |
---|---|---|
api_token
required |
Get token | |
action
required |
sync_terms |
|
id
required |
<integer> | The id of project |
data
required |
<string> | JSON format (example) |
curl -X POST https://poeditor.com/api/ \
-d api_token="a9824103d8729b923fbe1d268ec69ef9" \
-d action="sync_terms" \
-d id="7717" \
-d data="[{\"term\":\"Add new list\"}, {\"term\":\"Add new item\"}]"
{ "response": { "status": "success", "code": "200", "message": "OK" }, "details": { "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" } ]
Inserts / overwrites translations.
Argument | Value | |
---|---|---|
api_token
required |
Get token | |
action
required |
update_language |
|
id
required |
<integer> | The id of project |
language
required |
<string> | The language code |
data
required |
<string> | JSON format (example) |
curl -X POST https://poeditor.com/api/ \
-d api_token="a9824103d8729b923fbe1d268ec69ef9" \
-d action="update_language" \
-d id="7717" \
-d language="fr" \
-d data="[{\"term\":{\"term\":\"Projects\",\"context\":\"project list\"},\"definition\":{\"forms\":[\"Des projets\"],\"fuzzy\":0}}]"
{ "response": { "status": "success", "code": "200", "message": "OK" }, "details": { "parsed": 1, "added": 1, "updated": 0 } }
[ { "term": { "term": "Projects", "context": "project list" }, "definition": { "forms": [ "Des projets" ], "fuzzy": 0 } } ]
[ { "term": { "term": "%d Projects available", "context": "project list" }, "definition": { "forms": { "one": "Un projet disponible", "other": "%d Projets disponibles" }, "fuzzy": 1 } } ]
Returns the link of the file (expires after 10 minutes).
Argument | Value | |
---|---|---|
api_token
required |
Get token | |
action
required |
export |
|
id
required |
<integer> | The id of project |
language
required |
<string> | The language code |
type
required |
<string> | File format (arb, csv, ini, key_value_json, i18next, json, po, pot, mo, properties, resw, resx, ts, apple_strings, xliff, xcstrings, xlf, xmb, xtb, xliff_1_2, rise_360_xliff, xls, xlsx, android_strings, yml) |
filters
optional |
<string> | Filter results by 'translated', 'untranslated', 'fuzzy', 'not_fuzzy', 'automatic', 'not_automatic', 'proofread', 'not_proofread' (only available when Proofreading is set to "Yes" in Project Settings); you can use either a string for a single filter or a json array for one or multiple filter (example) |
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) |
curl -X POST https://poeditor.com/api/ \
-d api_token="a9824103d8729b923fbe1d268ec69ef9" \
-d action="export" \
-d id="7717" \
-d language="fr" \
-d type="po"
{ "response": { "status": "success", "code": "200", "message": "OK" }, "item": "https:\/\/poeditor.com\/api\/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"]
Updates terms / translations - No more than one request every 30 seconds.
Argument | Value | |
---|---|---|
api_token
required |
Get token | |
action
required |
upload |
|
id
required |
<integer> | The id of project |
updating
required |
terms | terms_definitions | definitions |
|
file
required |
<file> | Uploaded file (.po, .xls or any of the supported file formats) |
language
optional |
<string> |
The language code (Required only if updating is terms_definitions or definitions ) |
overwrite
optional |
0 | 1 |
Set it to 1 if you want to overwrite definitions |
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 project and the new ones added). Ignored if updating = definitions . |
tags
optional |
<string> | Add tags to the project terms; available when updating terms or terms_definitions; you can use the following keys: "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://poeditor.com/api/ \
-F api_token="a9824103d8729b923fbe1d268ec69ef9" \
-F action="upload" \
-F id="7717" \
-F updating="terms" \
-F file=@"pathtofile/filename.po"
{ "response": { "status": "success", "code": "200", "message": "OK" }, "details": { "terms": { "parsed": 1017, "added": 1017, "deleted": 0 }, "definitions": { "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"]}
Returns a list containing all the available languages. You can find a comprehensive list of all languages supported by POEditor here.
Argument | Value | |
---|---|---|
api_token
required |
Get token | |
action
required |
available_languages |
|
curl -X POST https://poeditor.com/api/ \
-d api_token="a9824103d8729b923fbe1d268ec69ef9" \
-d action="available_languages"
{ "response": { "status": "success", "code": "200", "message": "OK" }, "list": { "Abkhazian": "ab", "Afar": "aa", "Afrikaans": "af", "Akan": "ak", "Albanian": "sq", "Amharic": "am", "Arabic": "ar", "Aragonese": "an", "Armenian": "hy", "Assamese": "as", "Yiddish": "yi", "Yoruba": "yo", "Zhuang; Chuang": "za", "Zulu": "zu" } }
Returns the list of contributors.
Argument | Value | |
---|---|---|
api_token
required |
Get token | |
action
required |
list_contributors |
|
id
optional |
<integer> | The id of project (Optional, unless language is set. Then, it becomes required) |
language
optional |
<string> | The language code |
curl -X POST https://poeditor.com/api/ \
-d api_token="a9824103d8729b923fbe1d268ec69ef9" \
-d action="list_contributors"
{ "response": { "status": "success", "code": "200", "message": "OK" }, "list": [ { "name": "final test", "email": "email@example.com", "projects": [ { "id": "4886", "name": "Twentytwelve", "type": "administrator" } ] } ] }
Adds a contributor to a project language or an administrator to a project.
Argument | Value | |
---|---|---|
api_token
required |
Get token | |
action
required |
add_contributor |
|
id
required |
<integer> | The id of project |
name
required |
<string> | The name of contributor |
email
required |
<string> | The email of contributor |
language
optional |
<string> | The language code (Required if adding a contributor) |
admin
optional |
0 | 1 |
Set it to 1 for adding as administrator |
curl -X POST https://poeditor.com/api/ \
-d api_token="a9824103d8729b923fbe1d268ec69ef9" \
-d action="add_contributor" \
-d id="7717" \
-d name="caesar" \
-d email="email@email.com" \
-d language="en"
{ "response": { "status": "success", "code": "200", "message": "Contributor added." } }
Using WordPress and all this 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.
Looking for a starting point for a script of your own? Check out these libraries our users are sharing.