openapi: 3.2.0 info: title: Bird Language Detection API description: The MessageBird Language Detection API detects the language of a given phrase. It assumes the given phrase is written in a single language. Language detection works particularly well for longer texts. This API uses the ISO-639-3 language code standard and supports over 180 languages. version: 1.0.0 contact: name: Bird Support url: https://bird.com/en-us/contact servers: - url: https://language-detection.messagebird.com security: - AccessKey: [] tags: - name: Language Detection description: Language detection operations. paths: /api/v1/predict-language: post: tags: - Language Detection summary: Predict language description: Predicts the language for a given phrase. If the language could not be determined, it returns LANGUAGE_UNDETERMINED. Uses the ISO-639-3 standard. operationId: LanguageDetection_PredictLanguage security: - AccessKey: [] requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/PredictLanguageRequest' responses: '200': description: A successful response. content: application/json: schema: $ref: '#/components/schemas/PredictLanguageResponse' '401': description: Returned when the user is not authorized. '404': description: Returned when the resource does not exist. default: description: An unexpected error response. content: application/json: schema: $ref: '#/components/schemas/Error' /api/v1/supported-languages: get: tags: - Language Detection summary: Get supported languages description: Lists the languages supported by the Language Detection API. operationId: LanguageDetection_ListSupportedLanguages security: - AccessKey: [] responses: '200': description: A successful response. content: application/json: schema: $ref: '#/components/schemas/LanguageList' '401': description: Returned when the user is not authorized. '404': description: Returned when the resource does not exist. default: description: An unexpected error response. content: application/json: schema: $ref: '#/components/schemas/Error' components: schemas: LanguageList: type: object description: List of supported languages. properties: languages: type: array items: $ref: '#/components/schemas/Language' description: The collection of languages. example: - iso6393Code: nld languageCode: NLD name: Dutch - iso6393Code: eng languageCode: ENG name: English - iso6393Code: spa languageCode: SPA name: Spanish - iso6393Code: zho languageCode: ZHO name: Chinese PredictLanguageRequest: type: object description: A request for predicting the language from a phrase. required: - phrase properties: phrase: type: string example: Dit is iets in het Nederlands description: The phrase for which to predict the language. PredictLanguageResponse: type: object description: 'A response that contains the predicted language. If the service could not determine any language, the language field will not be populated. ' properties: language: $ref: '#/components/schemas/Language' description: 'The predicted language for the given phrase. If no known language could be determined this will be LANGUAGE_UNDETERMINED. ' Error: type: object properties: code: type: integer message: type: string details: type: array items: type: object additionalProperties: true Language: type: object description: Language that was detected from the given phrase. properties: iso6393Code: type: string example: nld description: The ISO-639-3 code of the language. name: type: string example: Dutch description: The English name of the language. languageCode: type: string example: NLD description: The ISO639-3 language code enum value. securitySchemes: AccessKey: type: apiKey name: Authorization in: header description: 'Use the word "AccessKey" followed by your API Key. Example: "AccessKey w223tVQTcLO4ufBTuJxjvzwJ22" ' externalDocs: description: Find our official documentation in the MessageBird Docs url: https://developers.messagebird.com/api