API Endpoints
EU data center
US data center
Usage
curl is used primarily to send requests to Phrase Strings in the examples. On most you’ll find a second variant using the Phrase Strings API v2 client that might be more convenient to handle. For further information check its documentation.Use of HTTP Verbs
Phrase Strings API v2 tries to use the appropriate HTTP verb for accessing each endpoint according to REST specification where possible:Identification via User-Agent
You must include the User-Agent header with the name of your application or project. It might be a good idea to include some sort of contact information as well, so that we can get in touch if necessary (e.g. to warn you about Rate-Limiting or badly formed requests). Examples of excellent User-Agent headers:Lists
When you request a list of resources, the API will typically only return an array of resources including their most important attributes. For a detailed representation of the resource you should request its detailed representation. Lists are usually paginated.Parameters
Many endpoints support additional parameters, e.g. for pagination. When passing them in a GET request you can send them as HTTP query string parameters:Errors
Request Errors
If a request contains invalid JSON or is missing a required parameter (besides resource attributes), the status400 Bad Request is returned:
Validation Errors
When the validation for a resource fails, the status422 Unprocessable Entity is returned, along with information on the affected fields:
Date Format
Times and dates are returned and expected in ISO 8601 date format:JSONP
The Phrase Strings API supports JSONP for all GET requests in order to deal with cross-domain request issues. Just send a?callback parameter along with the request to specify the Javascript function name to be called with the response content:
meta section including header data:
?access_token parameter along the request:
Conditional GET requests / HTTP Caching
Conditional GET requests are currently only supported for the Download a locale and List all translations endpoints.
If-Modified-Since and If-None-Match headers. If the resource has not changed in the meantime, we will return the status 304 Not Modified instead of rendering and returning the resource again. In most cases this is less time-consuming and makes your application/integration faster.
Please note that all conditional requests that return a response with status 304 don’t count against your rate limits. See Rate Limiting.