POST /api/:space/translations

Description:

Creates a new language within your space.

Resource URL:

https://<apphost>.competitionlabs.com/api/<your-space-name>/translations

Request headers

KeyValueRequired
X-API-KEY
Your unique API keyYes
Content-Type
application/jsonYes

Request URL parameters

Parameter
Type
Required
Description
space
StringYes

This is the space name which is linked to the account

Post body parameters

Parameter
Type
Required
Description
key
StringYesThe language helper key retrieved from GET translations resource

EXAMPLE

Request
curl
--header "X-API-KEY: <your-api-key>"
--header "Content-Type: application/json"
--request POST https://app.competitionlabs.com/api/<your-space-name>/translations
-d '{"key": "id"}'
Response
{
    "data": {
        "jsonClass": "LanguageHelper",
        "key": "id",
        "accountId": "QmTaPGUBsZyUBGOR_u9A",
        "created": "2018-09-13T11:22:21.552+02:00",
        "id": "MrM90mUBOmEkXOJnDmTw"
    }
}

ERROR CODES

CodeHTTP StatusDescriptionExample

404Inserting or removing the necessary information of the Request URL parameter
Error Response 404
{
    "status": 404
}
1001400No Post body parameters were sent
Error Response 400
{
    "errors": [
        {
            "message": "Malformed JSON body.",
            "code": 1001,
            "status": 400
        }
    ]
}
1002404The parameter Key can not be empty;
Error Response 404
{
    "errors": [
        {
            "message": "Please enter a Key for the language helper.",
            "code": 1002,
            "status": 404
        },
        {
            "message": "A record with provided key [] was not found. For a complete list of available languages please check our user guide.",
            "code": 1007,
            "status": 404
        }
    ]
}
1007404