Add Strings to Workspace

This endpoint allows you to add strings to a specific workspace. The request should be sent as an HTTP POST to https://api.onesky.app/v1/workspaces/{workspace_id}/strings.

Request Body

The request body should be in raw format and include an array of strings, where each string object contains the following parameters:

  • key (string): The key for the string.
  • context (string): The context of the string.
  • locales (object): An object containing the source locale and an array of target locales.
  • content (array of strings): An array of content related to the string.
  • tag (string): A tag associated with the string.
  • translatable (boolean): Indicates whether the string is translatable.
  • archived (boolean): Indicates whether the string is archived.
  • is_plural (boolean): Indicates whether the string is plural.
  • is_translated (boolean): Indicates whether the string is translated.
  • values (array of objects): An array of objects containing locale, value, and word count for each locale.

Response

Upon successful addition of the strings, the response will include an array of string objects, each containing the following parameters:

  • string_id (string): The ID of the added string.
  • key (string): The key of the string.
  • context (string): The context of the string.
  • total_word_count (number): The total word count of the string.
  • created_at (string): The timestamp when the string was created.
  • updated_at (string): The timestamp when the string was last updated.
  • locales (object): An object containing the source locale and an array of target locales.
  • content (array of strings): An array of content related to the string.
  • tag (string): A tag associated with the string.
  • character_limit (number): The character limit for the string.
  • translatable (boolean): Indicates whether the string is translatable.
  • archived (boolean): Indicates whether the string is archived.
  • is_plural (boolean): Indicates whether the string is plural.
  • is_translated (boolean): Indicates whether the string is translated.

Example

{
    "strings": [
        {
            "string_id": "550e8400-e29b-41d4-a716-446655440000",
            "key": "example_key",
            "context": "example_context",
            "total_word_count": 10,
            "created_at": "2021-08-20T14:30:00Z",
            "updated_at": "2021-08-22T14:30:00Z",
            "locales": {
                "source": "en_US",
                "target": [
                    "fr_FR",
                    "es_ES"
                ]
            },
            "content": [
                "Web",
                "Game"
            ],
            "tag": "content_editor",
            "character_limit": 100,
            "translatable": true,
            "archived": false,
            "is_plural": false,
            "is_translated": true
        }
    ]
}

Language
Credentials
Bearer
Click Try It! to start a request and see the response here!