Create a new project from file upload

How to create a project that includes a file upload using the API

https://api.platform.sandbox.easytranslate.com/api/v1/teams/:team_identifier/projects

In order to create a new Project by passing a single file or files, you need to be authenticated and therefore pass your access token in the header of the request. 

You also have to use the following path variable in the endpoint:

    • team_identifier (): It can be retrieved from the api/v1/user endpoint. The team_identifier is used to identify the account in which this project should be created. 

You then have to pass data in the body of your request as formdata

    • data[type] (project): The type of the data object sent. Type is always “project”
    • data[attributes][files][0] (File stream):  This is where the file(s) containing the content to be translated need to be attached. This is the supported extensions: txt, pdf, xls, doc, xml, docx, vtt, json, xlsx, html.
    • data[attributes][source_language](string): This is the language the content is written into. It must follow ISO 639-1 and/or ISO 3166-1 (RFC 5646 and RFC 4647). To find the appropriate source language code to use, you can refer to the following table:

    Language

    Code

    Afar

    aa

    Afrikaans

    af

    Albanian

    sq

    Amharic

    am

    Arabic

    ar

    Armenian

    hy

    Azerbaijani

    az

    Bambara

    bm

    Basque

    eu

    Belarusian

    be

    Bengali

    bn

    Blin (Bilin)

    byn

    Bosnian

    bs

    Bulgarian

    bg

    Burmese

    my

    Catalan

    ca

    Chechen

    ce

    Chinese (Simplified)

    zh_CN

    Chinese (Traditional)

    zh_HK

    Croatian

    hr

    Czech

    cs

    Danish

    da

    Dari

    prs

    Dhivehi

    dv_MV

    Dutch

    nl_NL

    Dzongkha

    az

    English

    en

    Esperanto

    eo

    Estonian

    et

    Faeroese

    fo

    Farsi

    fa

    Filipino

    fil

    Finnish

    fi

    French

    fr

    Frisian

    fy

    Fula

    ff

    Galician

    gl

    Georgian

    ka

    German

    de

    Greek

    el

    Greenlandic

    kl

    Gujarati

    gu

    Hausa

    ha

    Hebrew

    he

    Hindi

    hi

    Hungarian

    hu

    Icelandic

    is

    Igbo

    ig

    Indonesian

    id

    Inuktitut

    iu

    Italian

    it

    Japanese

    ja

    Javanese

    jv

    Kannada

    kn

    Kazakh

    kk

    Khmer

    km

    Kinyarwanda

    rw

    Kirundi

    rn

    Korean

    ko

    Krio

    kri

    Kurmanji (Syria)

    kmr_SY

    Kurmanji (Turkey)

    kmr_TR

    Kyrgyz

    kz

    Lao

    lo

    Latin

    la

    Latvian

    lv

    Lingala

    ln

    Lithuanian

    lt

    Luxembourgish

    lb

    Macedonian

    mk

    Malagasy

    mg

    Malay

    ms

    Malayalam

    ml

    Maltese

    mt

    Mandingo (Mandinka)

    man

    Marathi

    mr

    Moldovian

    ro_MD

    Mongolian

    mn_MN

    Nepali

    ne_NP

    Norwegian (Bokmål)

    nb_NO

    Norwegian (Nynorsk)

    nn_NO

    Oromo

    om

    Pashto

    ps

    Persian (Farsi)

    fa_IR

    Polish

    pl

    Portuguese

    pt

    Punjabi

    pa

    Romanian

    ro

    Russian

    ru

    Sami

    se_FI

    Serbian

    sr

    Sinhalese

    si_LK

    Slovak

    sk

    Slovenian

    sl

    Somali

    so

    Sorani

    ckb

    Sotho

    st

    Spanish

    es

    Swahili

    sw

    Swedish

    sv

    Tagalog

    tl

    Tamil

    ta

    Telugu

    te

    Thai

    th

    Tibetan

    bo

    Tigre

    tig

    Tigrinya

    ti

    Turkish

    tr

    Turkmen

    tk

    Twi

    tw

    Ukrainian

    uk

    Urdu

    ur

    Uzbek

    uz

    Vietnamese

    vi

    Welsh

    cy

    Wolof

    wo

    Yiddish

    yi

    Yoruba

    yo

    Zulu

    zu

      • data[attributes][target_languages][0](Array): Here should be added the language the content should be translated into. You can have either one target language or multiples. As the source_language, each language must follow ISO 639-1 and/or ISO 3166-1 (RRC 5646 AND rfc 4647). Please note that target_languages shouldn’t contain the same value as source_language and might not use the same language codes. You can refer to the following table to find the appropriate code to use based on the language you need, but keep in mind that you are not allowed to use target_languages that are not provided by your team of translators.

        Language

        Code

        Afar

        aa

        Afrikaans

        af

        Albanian

        sq

        Amharic

        am

        Arabic

        ar

        Arabic (Egypt)

        ar_EG

        Arabic (Morocco)

        ar_MA

        Arabic (Syria)

        ar_SY

        Arabic (Sudan)

        ar_SD

        Armenian

        hy

        Azerbaijani

        az

        Bambara

        bm

        Basque

        eu

        Belarusian

        be

        Bengali

        bn

        Blin (Bilin)

        byn

        Bosnian

        bs

        Bulgarian

        bg

        Burmese

        my

        Catalan

        ca

        Chechen

        ce

        Chinese (Simplified)

        zh_CN

        Chinese (Traditional)

        zh_HK

        Croatian

        hr

        Czech

        cs

        Danish

        da

        Dari

        prs

        Dhivehi

        dv_MV

        Dutch (Belgium)

        nl_BE

        Dutch (Standard)

        nl_NL

        Dzongkha

        az

        English (Australia)

        en_AU

        English (United Kingdom)

        en_GB

        English (United States)

        en_US

        English (South Africa)

        en_ZA

        Esperanto

        eo

        Estonian

        et

        Faeroese

        fo

        Farsi

        fa

        Filipino

        fil

        Finnish

        fi

        French (Standard)

        fr_FR

        French (Belgium)

        fr_BE

        French (Canada)

        fr_CA

        French (Switzerland)

        fr_CH

        Frisian

        fy

        Fula

        ff

        Galician

        gl

        Georgian

        ka

        German

        de

        Greek

        el

        Greenlandic

        kl

        Gujarati

        gu

        Hausa

        ha

        Hebrew

        he

        Hindi

        hi

        Hungarian

        hu

        Icelandic

        is

        Igbo

        ig

        Indonesian

        id

        Inuktitut

        iu

        Italian (Standard)

        it_IT

        Italian (Switzerland)

        it_CH

        Japanese

        ja

        Javanese

        jv

        Kannada

        kn

        Kazakh

        kk

        Khmer

        km

        Kinyarwanda

        rw

        Kirundi

        rn

        Korean

        ko

        Krio

        kri

        Kurmanji (Syria)

        kmr_SY

        Kurmanji (Turkey)

        kmr_TR

        Kyrgyz

        kz

        Lao

        lo

        Latin

        la

        Latvian

        lv

        Lingala

        ln

        Lithuanian

        lt

        Luxembourgish

        lb

        Macedonian

        mk

        Malagasy

        mg

        Malay

        ms

        Malayalam

        ml

        Maltese

        mt

        Mandingo (Mandinka)

        man

        Marathi

        mr

        Moldovian

        ro_MD

        Mongolian

        mn_MN

        Nepali

        ne_NP

        Norwegian (Bokmål)

        nb_NO

        Norwegian (Nynorsk)

        nn_NO

        Oromo

        om

        Pashto

        ps

        Persian (Farsi)

        fa_IR

        Polish

        pl

        Portuguese (Brazil)

        pt_BR

        Portuguese (European)

        pt_PT

        Punjabi

        pa

        Romanian

        ro_RO

        Romansh (Switzerland)

        rm_CH

        Romani

        rom

        Russian

        ru

        Sami

        se_FI

        Serbian

        sr

        Serbian (Montenegro)

        sr_ME

        Sinhalese

        si_LK

        Slovak

        sk

        Slovenian

        sl

        Somali

        so

        Sorani

        ckb

        Sotho

        st

        Spanish (European)

        es_ES

        Spanish (Latin America)

        es_419

        Spanish (Mexico)

        es_MX

        Swahili

        sw

        Swedish

        sv

        Tagalog

        tl

        Tamil

        ta

        Telugu

        te

        Thai

        th

        Tibetan

        bo

        Tigre

        tig

        Tigrinya

        ti

        Traditional Chinese (Taiwan)

        zh_TW

        Turkish

        tr

        Turkmen

        tk

        Twi

        tw

        Ukrainian

        uk

        Urdu

        ur

        Uzbek

        uz

        Vietnamese

        vi

        Welsh

        cy

        Wolof

        wo

        Yiddish

        yi

        Yoruba

        yo

        Zulu

        zu

      • data[attributes][target_languages][1] : To use if you need an extra target_language.
      • data[attributes][target_languages][2]: To use if you need an extra target_language.
      • data[attributes][callback_url] (string): If provided, a web hook call will be triggered to this URL when each of the translations is completed. You are not required to provide a callback_url, it is optional. 
      • data[attribute][workflow] (string): You have the possibility to choose between 3 different workflows (Human translation, translation+review, machine_translation). Note that if not provided, the default workflow is “human translation”.

        The Human Translation workflow is when a translator is assigned to translate the content you are providing, the Translation & Review  is similar to the Human Translation workflow with the difference that another translator is added to the workflow to review the translation of the translated content once the translation is done and finally, you have the Machine Translation workflow where you are using the machine translation feature provided by EasyTranslate without using any translators.

      • data[attributes][folder_id] (string): If you already have a designated folder for the project, This is where the existing folder ID needs to be added. You are not required to provide a folder ID, it is optional
      • data[attributes][folder_name] (string): By providing a folder_name, you will create a folder to store this project. You are not required to provide a folder name, it is optional
      • data[attributes][name] (string): You have the option to use a description name for the project, if a name is not provided, a default name will be used. You are not required to provide a  name, it is optional