Kickstart Your Integration with TextUnited API

Welcome to the Quick Start Guide for the TextUnited API. This guide is designed to help you get up and running with the API quickly, allowing you to automate and integrate translation, proofreading, and localization services into your workflows. Whether you're localizing a website, mobile app, or any other digital content, this guide will walk you through the initial setup and first API call.

Prerequisites

Before you begin, ensure you have the following:

  • A TextUnited account. If you don't have one, sign up at TextUnited.
  • API access enabled in your TextUnited dashboard. Contact TextUnited support if you need assistance with this.
  • Basic knowledge of HTTP and RESTful APIs.
  • Familiarity with JSON and XML formats.

Setting Up Your Development Environment

  1. Obtain your API Key: Log in to your TextUnited account and navigate to the API section in your dashboard. Here, you'll find your unique API key, which will be used to authenticate your requests. Follow the instructions on the Authentication page.
  2. Choose Your Development Tool: Depending on your preferred programming language, select the relevant SDK or library that supports HTTP requests. Popular choices include Python, JavaScript (Node.js), and PHP.

Making Your First API Call

To familiarize yourself with the TextUnited API, let's make a simple GET request to retrieve a list of projects. Here's an example using Python and the requests library:

import requests

url = "https://api.textunited.com/v1/SegmentProjects"
username = "<YOUR_COMPANY_ID>"
password = "<YOUR_API_KEY>"

headers = {
    "Content-Type": "application/json"
}

response = requests.get(url, headers=headers, auth=(username, password))
projects = response.json()

for project in projects:
    print(project["Name"])

Replace "<YOUR_API_KEY>" with your actual API key and "<YOUR_COMPANY_ID>" with your actual company ID. This script sends a GET request to the /SegmentProjects endpoint and prints the names of all projects.


Step-by-Step Guide to Making Requests Directly on the Platform

Making Requests Directly on the Platform

Showing how to make requests directly on the platform

  1. Navigate to the API Documentation: Go to the API Reference section dedicated to the endpoint you wish to interact with.
  2. Select Your Preferred Language: Languages are listed side by side. Scroll through the options to choose the language you're working with. This ensures the request is correctly formatted for your development environment.
  3. Generate Curl Command: If you prefer to use a cURL command, look for an option to switch to a shell-like interface. This generates a cURL request suitable for command-line interfaces.
  4. Execute Request: With your preferred language selected or your cURL command ready, find the "Try It!" button. Clicking this button sends your request to the API.

Viewing Your Response

Viewing Responses Directly on the Platform

Showing how to view response (sample response) in the platform

After executing your request, the API's response will be displayed in the designated "Response" section. This section dynamically shows the data returned by the API, allowing you to examine the output directly.

To view a sample response, look for the "200 - Result" button or link. This button, indicated by the HTTP status code followed by "- Result," reveals a pre-configured example of a typical API response. This feature is very helpful for understanding the expected format and structure of API responses without needing to send a request manually.

Next Steps

Now that you've made your first API call, proceed to the Authentication page to learn how to securely connect to the TextUnited API. This page will guide you through authenticating your requests, ensuring you can access the API's functionalities with confidence.