Pairaphrase Translation API Documentation
The Pairaphrase translation API is an interface for processing translations using HTTP and JSON. The translation API makes it easy to create web and desktop applications.
Pricing is simple, just $0.0005 per word translated. Volume discounts are available. Learn more about why you should use the Pairaphrase API for your app, versus others on the market.
When you get your Pairaphrase API Token (account required), please note the use of https:// in the Primary API URL. All Pairaphrase API communication is encrypted over HTTPS.
Any nonsecure requests are automatically rejected, so we recommend establishing a test connection with the secure API entry point before sending sensitive data.
Have Questions?
We’re happy to answer any questions you have about the Pairaphrase translation API and how your organization can deliver high-quality translations to all your Apps.
Request Limits
Response Format
Authentication
Language Codes
API Calls
OAuth Token Exchange NEW
For third-party applications that need to authenticate Pairaphrase users without storing their credentials. The user is redirected to Pairaphrase, signs in, authorizes your app, and is redirected back to your callback URL with a one-time code. Your server then exchanges the code for the user's API token.
Step 1. Redirect the user's browser to the entry point, passing a HTTPS callback URL where Pairaphrase should send the result.
GET
https://app.pairaphrase.com/apiv2/oauth?callback=https://yourapp.com/pairaphrase/callback
Step 2. The user signs in to Pairaphrase (if not already) and is shown a consent screen. On approval, the browser is redirected to your callback URL with a one-time code in the query string. On cancel, the browser is redirected with error=access_denied.
Browser redirect
https://yourapp.com/pairaphrase/callback?code=a1b2c3d4...
Step 3. Your server exchanges the code for the user's API token. The code is single-use and expires after 60 seconds.
POST
https://app.pairaphrase.com/apiv2/oauthexchange
Body / Data
code=a1b2c3d4…
Response
{"status": 200, "token": "abc123..." }
Connected Apps
Applications registered with Pairaphrase may pass their appid on the entry point. The consent screen then names the application, and the exchange returns an app-specific token instead of the user's primary API token. Word usage from an app token counts toward the user's plan word allowance (like in-app usage) rather than the pay-per-word API balance, and returns status 402 when the plan is out of words. Registered applications are locked to their approved callback domain — the OAuth flow rejects callback URLs on any other domain. Users can revoke an app's token anytime from their API page. Contact Pairaphrase to register your application and receive an appid.
GET
https://app.pairaphrase.com/apiv2/oauth?appid=[id]&callback=https://yourapp.com/pairaphrase/callback
Response (at exchange)
{"status": 200, "token": "app-token...", "app": "..." }
String Translation
Translate single sentences or paragraphs. This request uses standard form POST to allow a binary POST, e.g., content-type: multipart/form-data.
POST
https://app.pairaphrase.com/apiv2/translate?token=[token]&source=en-US&target=fr-FR
Body / Data
text=Hello, my name is Jack. What is your name?
Response
{"status": 200, "translation":"Bonjour, je m'appelle Jack. Comment vous appelez-vous?" }
Upload Translation Memory or Glossary NEW
Upload a TM or Glossary file to be processed and added to your account. Supported types are tmx, tbx, and csv. This request uses standard form POST to allow a binary POST, e.g., content-type: multipart/form-data.
POST
https://app.pairaphrase.com/apiv2/addtm?token=[token]&source=en-US&target=fr-FR&type=tmx
Body / Data (Binary)
file=@my_memory.tmx
Response
{"status": 200, "id": "53420c22030574770594bb02"}
Return All Translation Memories
Return all translation memories that have been generated or added to Pairaphrase.
GET
https://app.pairaphrase.com/apiv2/tms?token=[token]
Response
{"status": 200, "tm": [{"_id": "id", "language pair": "EN / FR", "type":"CSV"}] }
Return Translation Memory Segments
Return all translation memory segments that have been generated or added to Pairaphrase.
GET
https://app.pairaphrase.com/apiv2/tm?token=[token]&id=[tm_id]
Response
{"status": 200, "translation":[{"source": "source_text", "target": "target_text"}, {"source": "source_text", "target": "target_text"}] }
Download Translation Memory or Glossary NEW
Download a translation memory or glossary as a file. Translation memories are returned as a tmx file; glossaries (tbx / csv) are returned as a csv file. The response is the raw file with a Content-Disposition attachment header — not JSON. Use the ID returned by the Return All Translation Memories request (/apiv2/tms).
GET
https://app.pairaphrase.com/apiv2/downloadtm?token=[token]&id=[id]
Response (Binary)
The .tmx or .csv file contents
Delete Translation Memory or Glossary NEW
Permanently delete a translation memory or glossary and all of its segments. This cannot be undone — consider downloading the file first (/apiv2/downloadtm). Use the ID returned by the Return All Translation Memories request (/apiv2/tms).
GET
https://app.pairaphrase.com/apiv2/deletetm?token=[token]&id=[id]
Response
{"status": 200, "deleted": "[id]", "type": "tm", "language pair": "en-US / fr-FR", "segments_removed": 1234 }
Upload Documents for Translation
Prepare a single or batch of files for translation. The immediate response will include the translation ID and word count. You will need the ID to submit the file for translation as well as retrieve it's status. This request uses standard form POST to allow a binary POST, e.g., content-type: multipart/form-data.
POST
https://app.pairaphrase.com/apiv2/addfiles?token=[token]
Body / Data (Binary)
document[]=@excel.csv
document[]=@books.docx
document[]=@resume.pdf
Response
{"status": 200, "result":{ "id":"[document ID]", "status":"Accepted", "word_count":10530 } }
Submit File for Translation
Submit a document's ID for full translation. You can submit multiple target languages in the query's 'target' i.e., "fr-FR,fr-CA" and this will return a field called "ids" (an array) which must be used to get document translation status and export.
You may optionally provide a webhook parameter with a valid HTTPS URL. When the translation and export are complete, Pairaphrase will send a POST request to the webhook URL with a JSON body containing the translation status and export link.
You may optionally provide an engine parameter to override your default translation engine for this file only. Valid engine IDs are returned by the Return Translation Engine request (/apiv2/translationengine), e.g., "googleAPI". Your default engine setting is not changed.
GET
https://app.pairaphrase.com/apiv2/translatefile?token=[token]&id=[document ID]&source=en-US&target=fr-FR
Response
{"status": 200 }
Webhook POST Body
{"status": 200, "id": "[id]", "file": "excel.csv", "file_status": "Ready", "export": "https://..." }
Share Translation NEW
Invite one or more email addresses to collaborate on a translation document. Invitees receive an email notification with a link to view and edit the translation. The body must be a JSON array of email addresses.
The response reports per-email results: shared for newly added, already_shared for emails that already had access, and errors for invalid or self-share attempts. Other valid emails in the same request are still processed.
POST
https://app.pairaphrase.com/apiv2/sharetranslation?token=[token]&id=[id]
Body / Data (JSON)
["alice@example.com","bob@example.com"]
Response
{"status": 200, "id": "[id]", "file": "excel.csv", "shared": ["alice@example.com","bob@example.com"], "already_shared": [], "errors": [] }
Document Translation Status
Fetch the document translation status as well as the translated document location.
GET
https://app.pairaphrase.com/apiv2/file?token=[token]&id=[document ID]
Response
{"status": 200, "file": "excel.csv", "file_status":"Ready", "export": "https://..." }
Submit Segment into TM or Glossary
Submit a individual modified source / target text to TM or Glossary. The body / data must be submitted in a valid JSON string. The URL query string uses "type=" to define "tm" or "glossary" for submission.
POST
https://app.pairaphrase.com/apiv2/submitsegment?token=[token]&source=en-US&target=fr-FR&type=tm
Body / Data (JSON)
{"source":"Good day!", "target":"Bonne journée!"}
Response
{"status": 200}
Language Detection
Detect a block of text's language. This request uses standard form POST to allow a binary POST, e.g., content-type: multipart/form-data.
POST
https://app.pairaphrase.com/apiv2/detect?token=[token]
Body / Data
text=Hello, my name is Jack. What is your name?
Response
{"status": 200, "detected":"EN" }
Return All Documents
Return all documents that have been added to Pairaphrase. Limited to 100 translations per page.
GET
https://app.pairaphrase.com/apiv2/files?token=[token]&page=0&search=abc123
Response
{"status": 200, "files": [{"_id": "id", "file": "excel.csv", "status":"Ready"}, {"_id": "id", "file": "excel.csv", "status":"Ready"}] }
Return Document Segmentation
Return a document's segmentation.
GET
https://app.pairaphrase.com/apiv2/filesegmentation?token=[token]&id=[document ID]&search=abc123
Response
{"status": 200, "translation":[{"source": "source_text", "target": "target_text"}, {"source": "source_text", "target": "target_text"}] }
Return Active Translation Engine
Return the active translation engine being used for translation.
GET
https://app.pairaphrase.com/apiv2/translationengine?token=[token]
Response
{"status": 200, "active_engine":"microsoftAPI", "available_engines":"microsoftAPI,googleAPI,..." }
Set Active Translation Engine
Set the active translation engine to use for translation.
POST
https://app.pairaphrase.com/apiv2/settranslationengine?token=[token]
Body / Data
engine=googleAPI
Response
{"status": 200}
Return LLM Settings NEW
Return the LLM assistant's current settings (industry/department, audience, writing style, and custom instructions) along with the full list of selectable options.
GET
https://app.pairaphrase.com/apiv2/llmsettings?token=[token]
Response
{"status": 200, "settings": {"gpt_domain": "Education", "gpt_audience": "Students", "gpt_style": "formal", "instructions": "..."}, "options": {"industries": [{"label": "General", "data": ["Human Resources", "..."], "values": ["Customers/Clients", "..."]}], "styles": ["general", "formal", "informal", "technical", "creative"]} }
Set LLM Settings NEW
Assign any subset of the LLM settings. Send a JSON body (or form fields). gpt_domain must be one of the industry/department options, gpt_audience must belong to that domain, and gpt_style must be one of general, formal, informal, technical, or creative. Invalid values return the list of accepted values.
POST
https://app.pairaphrase.com/apiv2/setllmsettings?token=[token]
Body / Data (JSON)
{"gpt_domain": "Education", "gpt_audience": "Students", "gpt_style": "formal", "instructions": "Keep translations parent-friendly."}
Response
{"status": 200, "settings": {"gpt_domain": "Education", "gpt_audience": "Students", "gpt_style": "formal", "instructions": "Keep translations parent-friendly."} }
Return LLM Knowledge Files NEW
Return all knowledge files attached to the LLM assistant. A maximum of 20 files may be stored.
GET
https://app.pairaphrase.com/apiv2/llmknowledge?token=[token]
Response
{"status": 200, "count": 1, "max_files": 20, "files": [{"id": "[id]", "filename": "handbook.pdf", "type": "knowledge", "summary": "Employee onboarding handbook", "words": 1234, "created": "2026-06-17T10:30:00-04:00"}] }
Upload LLM Knowledge File NEW
Upload one knowledge file for the LLM assistant. Supported types are pdf, docx, doc, csv, txt, md, json, xml, tsv, rtf, odt, pptx, and epub. The type query selects the group: glossary, knowledge, style, or procedure. This request uses standard form POST to allow a binary POST, e.g., content-type: multipart/form-data.
POST
https://app.pairaphrase.com/apiv2/addllmknowledge?token=[token]&type=knowledge
Body / Data (Binary)
file=@handbook.pdf
Response
{"status": 200, "file": {"filename": "handbook.pdf", "type": "knowledge", "words": 1234, "summary": "Employee onboarding handbook"} }
Remove LLM Knowledge File NEW
Remove a knowledge file from the LLM assistant by its ID.
GET
https://app.pairaphrase.com/apiv2/removellmknowledge?token=[token]&id=[id]
Response
{"status": 200, "removed": "[id]" }
Return Current User NEW
Return the profile of the user the token belongs to: name, email, role (Admin, Reviewer, or User), and the Translation Memory / Glossary group they are assigned to. When called with a connected-app token, the response also includes an app field naming the application the token was issued to.
GET
https://app.pairaphrase.com/apiv2/me?token=[token]
Response
{"status": 200, "user": {"id": "[id]", "email": "jane@example.com", "first_name": "Jane", "last_name": "Doe", "role": "Admin", "group_id": "", "group": "Public", "company": "example.com", "translation_disabled": false} }
View Groups NEW
Return your account's Translation Memory / Glossary groups, each with the number of users assigned. Public (id "") and None (id none) are built-in; the remaining ids are used when assigning a group to a user.
GET
https://app.pairaphrase.com/apiv2/groups?token=[token]
Response
{"status": 200, "count": 3, "groups": [{"id": "", "name": "Public", "users": 5}, {"id": "none", "name": "None", "users": 0}, {"id": "[id]", "name": "Legal", "users": 2}] }
View User List NEW
Return the users (seats) on your account, including each user's role and assigned group.
GET
https://app.pairaphrase.com/apiv2/users?token=[token]
Response
{"status": 200, "count": 2, "users": [{"id": "[id]", "email": "jane@example.com", "first_name": "Jane", "last_name": "Doe", "role": "Admin", "group_id": "", "group": "Public", "translation_disabled": false}] }
Assign Group to a User NEW
Assign a group to one of your account's users. group_id is a group id from /apiv2/groups, or "" for Public or none for None. Only account administrators may call this, and the target user must belong to your account.
POST
https://app.pairaphrase.com/apiv2/assignusergroup?token=[token]
Body / Data (JSON)
{"user_id": "[id]", "group_id": "[id]"}
Response
{"status": 200, "user_id": "[id]", "group_id": "[id]", "group": "Legal" }
Want API Access?
Sign up for a Pairaphrase account to get your token, at the link below.
