curl --request POST \
--url https://cloud.memsource.com/web/api2/v1/services \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"publicName": "<string>",
"sourceLangs": [
"<string>"
],
"targetLangs": [
"<string>"
],
"type": "ProfessionalTranslation"
}
'import requests
url = "https://cloud.memsource.com/web/api2/v1/services"
payload = {
"name": "<string>",
"publicName": "<string>",
"sourceLangs": ["<string>"],
"targetLangs": ["<string>"],
"type": "ProfessionalTranslation"
}
headers = {
"Authorization": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
publicName: '<string>',
sourceLangs: ['<string>'],
targetLangs: ['<string>'],
type: 'ProfessionalTranslation'
})
};
fetch('https://cloud.memsource.com/web/api2/v1/services', 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/v1/services",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'name' => '<string>',
'publicName' => '<string>',
'sourceLangs' => [
'<string>'
],
'targetLangs' => [
'<string>'
],
'type' => 'ProfessionalTranslation'
]),
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>",
"Content-Type: application/json"
],
]);
$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/v1/services"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"publicName\": \"<string>\",\n \"sourceLangs\": [\n \"<string>\"\n ],\n \"targetLangs\": [\n \"<string>\"\n ],\n \"type\": \"ProfessionalTranslation\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "<api-key>")
req.Header.Add("Content-Type", "application/json")
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/v1/services")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"publicName\": \"<string>\",\n \"sourceLangs\": [\n \"<string>\"\n ],\n \"targetLangs\": [\n \"<string>\"\n ],\n \"type\": \"ProfessionalTranslation\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://cloud.memsource.com/web/api2/v1/services")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"publicName\": \"<string>\",\n \"sourceLangs\": [\n \"<string>\"\n ],\n \"targetLangs\": [\n \"<string>\"\n ],\n \"type\": \"ProfessionalTranslation\"\n}"
response = http.request(request)
puts response.read_body{
"billingUnit": "Character",
"dateCreated": "2023-11-07T05:31:56Z",
"generationMode": "ANALYSIS_AND_QUOTE",
"name": "<string>",
"publicName": "<string>",
"sourceLangs": [
"<string>"
],
"targetLangs": [
"<string>"
],
"type": "ProfessionalTranslation",
"uid": "<string>"
}Create service
curl --request POST \
--url https://cloud.memsource.com/web/api2/v1/services \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"publicName": "<string>",
"sourceLangs": [
"<string>"
],
"targetLangs": [
"<string>"
],
"type": "ProfessionalTranslation"
}
'import requests
url = "https://cloud.memsource.com/web/api2/v1/services"
payload = {
"name": "<string>",
"publicName": "<string>",
"sourceLangs": ["<string>"],
"targetLangs": ["<string>"],
"type": "ProfessionalTranslation"
}
headers = {
"Authorization": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
publicName: '<string>',
sourceLangs: ['<string>'],
targetLangs: ['<string>'],
type: 'ProfessionalTranslation'
})
};
fetch('https://cloud.memsource.com/web/api2/v1/services', 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/v1/services",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'name' => '<string>',
'publicName' => '<string>',
'sourceLangs' => [
'<string>'
],
'targetLangs' => [
'<string>'
],
'type' => 'ProfessionalTranslation'
]),
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>",
"Content-Type: application/json"
],
]);
$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/v1/services"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"publicName\": \"<string>\",\n \"sourceLangs\": [\n \"<string>\"\n ],\n \"targetLangs\": [\n \"<string>\"\n ],\n \"type\": \"ProfessionalTranslation\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "<api-key>")
req.Header.Add("Content-Type", "application/json")
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/v1/services")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"publicName\": \"<string>\",\n \"sourceLangs\": [\n \"<string>\"\n ],\n \"targetLangs\": [\n \"<string>\"\n ],\n \"type\": \"ProfessionalTranslation\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://cloud.memsource.com/web/api2/v1/services")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"publicName\": \"<string>\",\n \"sourceLangs\": [\n \"<string>\"\n ],\n \"targetLangs\": [\n \"<string>\"\n ],\n \"type\": \"ProfessionalTranslation\"\n}"
response = http.request(request)
puts response.read_body{
"billingUnit": "Character",
"dateCreated": "2023-11-07T05:31:56Z",
"generationMode": "ANALYSIS_AND_QUOTE",
"name": "<string>",
"publicName": "<string>",
"sourceLangs": [
"<string>"
],
"targetLangs": [
"<string>"
],
"type": "ProfessionalTranslation",
"uid": "<string>"
}Authorizations
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.
Body
Service creation request
Request body for creating a service
Internal name of the service
255Public-facing name of the service
255BCP 47 source language codes
BCP 47 target language codes
Service type
ProfessionalTranslation Billing unit for the service. Uses the organization default when omitted.
Character, Word, Page, Hour Controls when quotes and analyses are generated. Uses the service default when omitted.
ANALYSIS_AND_QUOTE, ANALYSIS, NONE Response
OK
Service details
Billing unit for the service
Character, Word, Page, Hour Date the service was created
Controls when quotes and analyses are generated
ANALYSIS_AND_QUOTE, ANALYSIS, NONE Internal name of the service
Public-facing name of the service
BCP 47 source language codes
BCP 47 target language codes
Service type
ProfessionalTranslation Unique identifier of the service
Was this page helpful?