Translation API documentation

Authentication, a safe first request and the order lifecycle, with examples for plain PHP. API v1 supports text, documents and audio according to account permissions.

Base URLhttps://api.translate24.pro/v1

Access and authentication

Contact us to arrange the account and permissions. Native accounts use an issued Bearer token. This version has no self-service company key dashboard. Contact us

Authorization: Bearer YOUR_API_TOKEN

Keep the token in an environment variable or protected server configuration. Use HTTPS. Never include credentials in URLs, browser JavaScript or public repositories.

A stored password hash is not an API password. Website SSO and API authentication are separate mechanisms.

First request

Start by reading your profile. This request does not create an order or charge your balance.

cURL
curl --request GET \
  'https://api.translate24.pro/v1/user/view' \
  --header "Authorization: Bearer $TRANSLATE24_API_TOKEN" \
  --header 'Accept: application/json'

Set TRANSLATE24_API_TOKEN on your server. Check the HTTP status and JSON: a successful profile response contains a user object.

Read the live catalogues and use the returned identifiers. Example IDs may not be available for your account.

  • GET /languages/get-pairs
  • GET /languages/get-themes
  • GET /languages/get-types
  • GET /order/get-data-for-create-order

Plain PHP

This read-only example uses PHP’s cURL extension; no framework is required.

PHP
<?php
$token = getenv('TRANSLATE24_API_TOKEN');
if (!is_string($token) || $token === '') {
    throw new RuntimeException('API token is not configured.');
}

$ch = curl_init('https://api.translate24.pro/v1/user/view');
if ($ch === false) {
    throw new RuntimeException('Unable to initialize cURL.');
}
curl_setopt_array($ch, [
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_FOLLOWLOCATION => false,
    CURLOPT_CONNECTTIMEOUT => 10,
    CURLOPT_TIMEOUT => 30,
    CURLOPT_HTTPHEADER => [
        'Authorization: Bearer ' . $token,
        'Accept: application/json',
    ],
]);
$body = curl_exec($ch);
$httpStatus = (int) curl_getinfo($ch, CURLINFO_HTTP_CODE);
curl_close($ch);

if ($body === false) {
    // Keep diagnostic details in a protected server log.
    throw new RuntimeException('API connection failed.');
}
$data = json_decode($body, true, 512, JSON_THROW_ON_ERROR);
if ($httpStatus < 200 || $httpStatus >= 300) {
    throw new RuntimeException('API HTTP error: ' . $httpStatus);
}
if (!is_array($data) || isset($data['errors'])
    || !isset($data['user']) || !is_array($data['user'])) {
    throw new RuntimeException('Unexpected API response.');
}
$user = $data['user'];

Keep profile data server-side and display only the fields your application needs. The example does not print customer data or credentials.

Order lifecycle

  1. Select a language pair, type and topic from the catalogues. POST /order/create-as-draft creates a record without automatically starting paid work.
  2. Check errors, order, price and infoMessage in the response. Some documents require manual word counting.
  3. POST /order/in-work?id=ORDER_ID&pay_by=1 can debit a balance and start work. Obtain explicit approval before calling it.
  4. Read GET /order/view?id=ORDER_ID or GET /order/index to follow progress. Limit polling frequency.

Draft request fields

Draft request fieldsMeaning
type1: text · 2: files · 3: audio
source_type1: text output · 2: audio output
language_pair_idID from the catalogue, or use from_language_code and to_language_code.
translate_type_idTranslation type ID from the catalogue
translate_theme_idTopic ID from the catalogue
source_textSource text for a text order
uploadSourceFiles[]Multipart file or audio uploads
user_idOptional: a client created by the authenticated partner. Otherwise the order belongs to the authenticated account.

Use form-encoded fields for text and multipart/form-data for uploads. Let your HTTP client set the multipart boundary.

For in-work, pay_by=1 uses the authenticated account’s balance; pay_by=2 uses the order owner’s balance and requires the appropriate partner rights and ownership.

Files and audio

Documents: txt, odt, pdf, docx; up to 5 files, 5 MiB each. Audio: mp3, ogg, webm; up to 5 files, 15 MiB each.

Inspect every upload response. A returned order ID alone is not approval to start paid work when parsing or word counting fails.

Errors and retries

401: check authentication. 403: check permissions. 404: check ID and ownership. A 2xx response with errors is an application failure; some validation errors use HTTP 200.

After a timeout or 5xx, a write may already have succeeded. Check the state before retrying. Do not automatically repeat creation, payment or deletion: no idempotency-key contract is published. Read-only calls may use bounded retries with delay.

External accounts

External accounts use their supported Basic authentication path and can read only their own profile, translation history and permitted catalogues. They cannot create, submit or delete orders. Arrange a native integration or partner account for write access.

Endpoint reference

Paths are relative to the base URL. Access depends on account permissions. See Swagger for parameter schemas, or contact us to arrange access.

MethodPathPurpose
GET/user/viewYour profile
GET/user/listPartner’s clients
POST/user/registrationCreate a partner’s client
POST/user/deleteDelete a partner’s client
GET/order/indexAccessible orders
GET/order/viewOrder details
GET/order/get-data-for-create-orderOrder options
POST/order/create-as-draftCreate a draft
POST/order/in-workApprove payment and start work
POST/order/deleteDelete an eligible order
GET/languages/get-pairsLanguage pairs
GET/languages/get-themesTopics
GET/languages/get-typesTranslation types

Swagger ↗ · Contact us