Skip to main content
POST
/
api2
/
v2
/
bilingualFiles
Upload bilingual file
curl --request POST \
  --url https://cloud.memsource.com/web/api2/v2/bilingualFiles \
  --header 'Authorization: <api-key>' \
  --header 'Content-Type: multipart/form-data' \
  --form 'file={
  "bytes": [
    "aSDinaTvuI8gbWludGxpZnk="
  ],
  "contentType": "<string>",
  "empty": true,
  "inputStream": {},
  "name": "<string>",
  "originalFilename": "<string>",
  "size": 123
}'
import requests

url = "https://cloud.memsource.com/web/api2/v2/bilingualFiles"

payload = "-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"file\"\r\n\r\n{\r\n \"bytes\": [\r\n \"aSDinaTvuI8gbWludGxpZnk=\"\r\n ],\r\n \"contentType\": \"<string>\",\r\n \"empty\": true,\r\n \"inputStream\": {},\r\n \"name\": \"<string>\",\r\n \"originalFilename\": \"<string>\",\r\n \"size\": 123\r\n}\r\n-----011000010111000001101001--"
headers = {
"Authorization": "<api-key>",
"Content-Type": "multipart/form-data"
}

response = requests.post(url, data=payload, headers=headers)

print(response.text)
const form = new FormData();
form.append('file', '{
"bytes": [
"aSDinaTvuI8gbWludGxpZnk="
],
"contentType": "<string>",
"empty": true,
"inputStream": {},
"name": "<string>",
"originalFilename": "<string>",
"size": 123
}');

const options = {method: 'POST', headers: {Authorization: '<api-key>'}};

options.body = form;

fetch('https://cloud.memsource.com/web/api2/v2/bilingualFiles', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));
<?php

$curl = curl_init();

curl_setopt_array($curl, [
CURLOPT_URL => "https://cloud.memsource.com/web/api2/v2/bilingualFiles",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => "-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"file\"\r\n\r\n{\r\n \"bytes\": [\r\n \"aSDinaTvuI8gbWludGxpZnk=\"\r\n ],\r\n \"contentType\": \"<string>\",\r\n \"empty\": true,\r\n \"inputStream\": {},\r\n \"name\": \"<string>\",\r\n \"originalFilename\": \"<string>\",\r\n \"size\": 123\r\n}\r\n-----011000010111000001101001--",
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>",
"Content-Type: multipart/form-data"
],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
package main

import (
"fmt"
"strings"
"net/http"
"io"
)

func main() {

url := "https://cloud.memsource.com/web/api2/v2/bilingualFiles"

payload := strings.NewReader("-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"file\"\r\n\r\n{\r\n \"bytes\": [\r\n \"aSDinaTvuI8gbWludGxpZnk=\"\r\n ],\r\n \"contentType\": \"<string>\",\r\n \"empty\": true,\r\n \"inputStream\": {},\r\n \"name\": \"<string>\",\r\n \"originalFilename\": \"<string>\",\r\n \"size\": 123\r\n}\r\n-----011000010111000001101001--")

req, _ := http.NewRequest("POST", url, payload)

req.Header.Add("Authorization", "<api-key>")

res, _ := http.DefaultClient.Do(req)

defer res.Body.Close()
body, _ := io.ReadAll(res.Body)

fmt.Println(string(body))

}
HttpResponse<String> response = Unirest.post("https://cloud.memsource.com/web/api2/v2/bilingualFiles")
.header("Authorization", "<api-key>")
.body("-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"file\"\r\n\r\n{\r\n \"bytes\": [\r\n \"aSDinaTvuI8gbWludGxpZnk=\"\r\n ],\r\n \"contentType\": \"<string>\",\r\n \"empty\": true,\r\n \"inputStream\": {},\r\n \"name\": \"<string>\",\r\n \"originalFilename\": \"<string>\",\r\n \"size\": 123\r\n}\r\n-----011000010111000001101001--")
.asString();
require 'uri'
require 'net/http'

url = URI("https://cloud.memsource.com/web/api2/v2/bilingualFiles")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["Authorization"] = '<api-key>'
request.body = "-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"file\"\r\n\r\n{\r\n \"bytes\": [\r\n \"aSDinaTvuI8gbWludGxpZnk=\"\r\n ],\r\n \"contentType\": \"<string>\",\r\n \"empty\": true,\r\n \"inputStream\": {},\r\n \"name\": \"<string>\",\r\n \"originalFilename\": \"<string>\",\r\n \"size\": 123\r\n}\r\n-----011000010111000001101001--"

response = http.request(request)
puts response.read_body
{
  "jobs": [
    {
      "continuous": true,
      "dateCreated": "2023-11-07T05:31:56Z",
      "dateDue": "2023-11-07T05:31:56Z",
      "filename": "<string>",
      "imported": true,
      "jobAssignedEmailTemplate": {},
      "notificationIntervalInMinutes": 123,
      "providers": [
        {
          "type": "<string>",
          "id": "<string>",
          "uid": "<string>"
        }
      ],
      "sourceFileUid": "<string>",
      "targetLang": "<string>",
      "uid": "<string>",
      "updateSourceDate": "2023-11-07T05:31:56Z",
      "workflowLevel": 123,
      "workflowStep": {
        "id": "<string>",
        "lqaEnabled": true,
        "name": "<string>",
        "order": 123,
        "uid": "<string>"
      }
    }
  ],
  "project": {
    "name": "<string>",
    "uid": "<string>"
  }
}

Authorizations

Authorization
string
header
required

Get a token from auth/login endpoint and then pass it in the Authorization HTTP header in every subsequent API call. For more information visit our help center.

Query Parameters

saveToTransMemory
enum<string>
default:Confirmed

Controls whether confirmed segments are saved to the translation memory

Available options:
All,
Confirmed,
None
setCompleted
boolean
default:false

When true, marks the affected job parts as completed after the upload

Body

multipart/form-data

Multipart request with files

file
object
required

Response

OK

jobs
object[]

Job parts affected by the operation

project
object