Add Messages

post

/api/v1/bots/{botId}/bundles

If you have a multi-language skill, you can use this method to add messages in other languages to an existing resource bundle entry. A resource bundle entry is a set of messages (strings) for a given key where each message contains the text for a different language (languageTag).

All bundle entries contain a message for the default language, and you use this method to add the translations for other languages. Say, for example, the default language is Spanish, and there is a message with the key "Hello_Message" and the languageTag "default". You can use this method to add a French version of the message with the key "Hello_Message" and the languageTag "fr".

If any objects in the request body are malformed, if a resource bundle entry doesn't exist for a specified key, or any object references a language that already exists for the key, then no changes are made, and the response status is either 400 (non-existing key) or 409 (duplicate). If the request body has some objects with non-existing keys and some objects with duplicate key/language combinations, then the response status is 409 and the response body contains only the objects with duplicate key/language combinations. If there were any objects with non-existing keys, the response body will not report these.

You can't use this method add keys or to modify existing messages or annotations. You also can't use this method to modify bundles in skills that you've pulled from the store.

Request

Path Parameters
Supported Media Types
Request Body - application/json ()
The messages to add for languages other than the default language.
Root Schema : schema
Type: object
The messages or annotations (or both) to change.
Show Source
Nested Schema : items
Type: array
The message to add or change.
Show Source
Nested Schema : LanguageBundleEntryInputForm
Type: object
The message to add or change.
Show Source
  • Any information that will be useful for those that may need to reference the message later, such as translators.
  • A unique identifier for a message in the default language and all its equivalent strings in other languages. The combination of key and languageTag identifies a specific entry in the resource bundle.
  • Language identifier using IETF BCP 47 language tag. For example, use fr for French and de for German. Use default for the skill's primary language.
  • The text to use in the skill conversation for the specified languageTag and key. This property is required for the POST method and is optional for the PATCH method.
Back to Top

Response

Supported Media Types

200 Response

Array of all the messages that were added to the resource bundle.
Body ()
Root Schema : BundleEntries
Type: array
List of a skill's resource bundle messages.
Show Source
Nested Schema : LanguageBundleEntry
Type: object
Resource bundle message.
Show Source
  • Any information that will be useful for those that may need to reference the message later, such as translators.
  • Read Only: true
    The date and time, in ISO 8601 format, that the resource was created (for example, 2018-10-17T06:50:34.045Z).
  • Allowed Values: [ "INHERITED", "CUSTOMIZED" ]
    If the skill was extended from another skill, then this property shows if the message is a custom message or it was inherited from the original skill.
  • Read Only: true
    The resource's unique ID.
  • A unique identifier for a message in the default language and all its equivalent strings in other languages. The combination of key and languageTag identifies a specific entry in the resource bundle.
  • Language identifier using IETF BCP 47 language tag. For example, use fr for French and de for German. Use default for the skill's primary language.
  • links
  • The text to use in the skill conversation for the specified languageTag and key. This property is required for the POST method and is optional for the PATCH method.
  • Read Only: true
    The date and time, in ISO 8601 format, that the resource was last modified (for example, 2018-10-17T06:50:34.045Z).

400 Response

Either the request body is malformed or one or more objects reference a key that doesn't exist in the skill's resource bundles. You can't use this method to add keys.
Body ()
Root Schema : LanguageBundleEntryErrorForm
Type: object
List of the invalid messages.
Show Source
Nested Schema : invalidEntries
Type: array
If the request failed because of bad keys or duplicate entries, this contains information about the message objects in the request body that caused the request to fail.
Show Source
Nested Schema : LanguageBundleEntry
Type: object
Resource bundle message.
Show Source
  • Any information that will be useful for those that may need to reference the message later, such as translators.
  • Read Only: true
    The date and time, in ISO 8601 format, that the resource was created (for example, 2018-10-17T06:50:34.045Z).
  • Allowed Values: [ "INHERITED", "CUSTOMIZED" ]
    If the skill was extended from another skill, then this property shows if the message is a custom message or it was inherited from the original skill.
  • Read Only: true
    The resource's unique ID.
  • A unique identifier for a message in the default language and all its equivalent strings in other languages. The combination of key and languageTag identifies a specific entry in the resource bundle.
  • Language identifier using IETF BCP 47 language tag. For example, use fr for French and de for German. Use default for the skill's primary language.
  • links
  • The text to use in the skill conversation for the specified languageTag and key. This property is required for the POST method and is optional for the PATCH method.
  • Read Only: true
    The date and time, in ISO 8601 format, that the resource was last modified (for example, 2018-10-17T06:50:34.045Z).

404 Response

A skill with the specified botId does not exist.
Body ()
Root Schema : RestError
Type: object
Show Source
Nested Schema : o:errorDetails
Type: array
Show Source
Nested Schema : Location
Type: object
Show Source
Nested Schema : Context
Type: object
Show Source

409 Response

Array of all existing resource bundle messages with key and languageTag pairs that match objects in the request body.
Body ()
Root Schema : LanguageBundleEntryErrorForm
Type: object
List of the invalid messages.
Show Source
Nested Schema : invalidEntries
Type: array
If the request failed because of bad keys or duplicate entries, this contains information about the message objects in the request body that caused the request to fail.
Show Source
Nested Schema : LanguageBundleEntry
Type: object
Resource bundle message.
Show Source
  • Any information that will be useful for those that may need to reference the message later, such as translators.
  • Read Only: true
    The date and time, in ISO 8601 format, that the resource was created (for example, 2018-10-17T06:50:34.045Z).
  • Allowed Values: [ "INHERITED", "CUSTOMIZED" ]
    If the skill was extended from another skill, then this property shows if the message is a custom message or it was inherited from the original skill.
  • Read Only: true
    The resource's unique ID.
  • A unique identifier for a message in the default language and all its equivalent strings in other languages. The combination of key and languageTag identifies a specific entry in the resource bundle.
  • Language identifier using IETF BCP 47 language tag. For example, use fr for French and de for German. Use default for the skill's primary language.
  • links
  • The text to use in the skill conversation for the specified languageTag and key. This property is required for the POST method and is optional for the PATCH method.
  • Read Only: true
    The date and time, in ISO 8601 format, that the resource was last modified (for example, 2018-10-17T06:50:34.045Z).
Back to Top