Authentication

Localize API calls are REST compliant and make use of the most common HTTPS methods such as GET, POST, PUT and DELETE.

🚧

HTTPS Requests ONLY!

Localize only allows authenticated requests to the REST API over HTTPS.
Calls made over plain HTTP will fail.

API requests without authentication will fail. Authenticate your account when using the REST API by including your API Private Key in the request. Your API key carries many privileges, so be sure to keep it secret. Don’t share it with other users or store it in insecure places.

To authenticate with the API, provide your Private Key as the Bearer value in the authentication header.

curl https://api.localizejs.com/v2.0/projects
-H 'Authorization: Bearer API_PRIVATE_KEY_HERE'
-H 'Content-Type: application/json'

Obtaining an API token

To get an API token, complete the following steps.

  1. Log into to your Localize account.
  2. Navigate to the Developer: API Keys section of the Organization settings.
  3. Select Add API Key
  4. This will add the Private Key.
  5. Use the Private Key as the Bearer value.

NOTE: After creating the API Private Key, you must click View under Actions to see the Private Key.

❗️

API Private Key Warning

The Private Key should be treated as a secret and not shared publicly!


Schema

All data is sent and received as JSON, and requests sent to the REST API as JSON must have the correct content type header: Content-Type: application/json.

Blank or empty fields are included as null instead of being omitted. All timestamps are returned in ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ.

Endpoint

The Localize API is a RESTful HTTP service. All requests to Localize must be made using HTTPS against the following URL:

https://api.localizejs.com/v2.0/

Errors

Localize uses conventional HTTP response codes to indicate the success or failure of an API request. In general, codes in the 2xx range indicate success, codes in the 4xx range indicate an error that failed given the information provided (e.g., a required parameter was omitted, a translation failed, etc.), and codes in the 5xx range indicate an error with Localize's servers.

Example

"meta": {
  "status": 400,
  "success": false,
  "error": {
    "message": "[type] The type is required"
  }
}