{
  "openapi": "3.0.2",
  "info": {
    "description": "# Overview\n\nSend and receive messages globally over SMS, RCS, WhatsApp, Viber Business, Facebook messenger and other [popular channels](https://developers.sinch.com/docs/conversation/channel-support/) using the Sinch Conversation API.\n\n{% admonition type=\"info\" name=\"Note:\" %}\n\nIf you would like help setting up your Conversation API solution, and want to quickly get started sending and receiving messages, review our [Getting Started guide](https://developers.sinch.com/docs/conversation/getting-started/).\n\n{% /admonition %}\n\nThe Conversation API endpoint uses built-in transcoding to give you the power of conversation across all supported channels and, if required, full control over channel specific features.\n\n## Authentication\n\n## OAuth2.0 authentication\n\n{% partial file=\"/partials/authentication/oauth/_intro.md\"/ %}\n\n{% partial file=\"/partials/authentication/oauth/_instructions.md\"/ %}\n\n## Basic authentication\n\n{% partial file=\"/partials/authentication/basic/_intro.md\"/ %}\n\n{% partial file=\"/partials/authentication/basic/_instructions.md\"/ %}\n\n## Base URL\n\nThe following URLs can be used when making calls to the Conversation API:\n\n|Server|URL|\n|------|---|\n|Conversation API (US Production)|`https://us.conversation.api.sinch.com`|\n|Conversation API (EU Production)|`https://eu.conversation.api.sinch.com`|\n|Conversation API (BR Production)|`https://br.conversation.api.sinch.com`|\n\nNote that, when making a call to the Conversation API or Template Management API, you must target the regional server that corresponds to the region in which you created your Conversation API app.\n\n## Postman collection\n\nSinch offers a Postman collection for easy setup and testing during development. Our [Postman collection page](https://developers.sinch.com/docs/conversation/postman-collection) has a link to the JSON format of the collection.\n\nAfter importing the collection into Postman, fill in the following variables:\n\n| Variable | Value |\n| -------- | ----- |\n| <code>PROJECT</code> | Your PROJECT ID |\n| <code>APP</code> | Your app ID |\n| <code>CLIENT_ID</code> | Your CLIENT_ID |\n| <code>CLIENT_SECRET</code> | Your client secret |\n\nFor testing purposes, fill the WEBHOOK_URL by visiting <https://webhook.site/> and use the generated link - the one under the **Your unique URL** label.\n\n{% admonition type=\"warning\" name=\"Caution:\" %}\n\nThe <https://webhook.site/> URL given above should only be used for testing purposes. Using the Conversation API can generate high volumes of callbacks, which can easily exceed the TPS limits of certain webhook services. Additionally, sensitive information may be included in the callback, including message content and contact information. Ensure that you use a scalable and secure callback/webhook processor after your initial testing is complete.\n\n{% /admonition %}\n\nValues for other variables can be obtained by calling corresponding requests:\n\n- <code>CONTACT</code> - ID of contact created by calling **Create contact** request.\n- <code>WEBHOOK_ID</code> - ID of webhook created by calling **Create webhook** request.\n- <code>CONVERSATION</code> - In Conversation mode, a Conversation is created automatically when sending a new message. For example, with a Text Message request, send a message, then call [List conversations](https://developers.sinch.com/reference#conversation_listconversations) to get the ID of the conversation for this variable.\n\n## Errors\n\nWhen requests are erroneous, the Sinch Conversation API will respond with standard HTTP status codes, such as <code>4xx</code> for client errors. All responses include a JSON body of the form:\n\n```json\n{\n  \"error\": {\n    \"code\": 401,\n    \"message\": \"Request had invalid credentials.\",\n    \"status\": \"UNAUTHENTICATED\",\n    \"details\": [{\n      \"@type\": \"type.googleapis.com/google.rpc.RetryInfo\",\n      ...\n    }]\n  }\n}\n```\n\nThe table below describes the fields of the error object:\n\n| Name    | Description                         | JSON Type        |\n| ------- | ----------------------------------- | ---------------- |\n| Code    | HTTP status code                    | Number           |\n| Message | A developer-facing error message    | String           |\n| Status  | Response status name                | String           |\n| Details | List of detailed error descriptions | Array of objects |\n\n### Common error responses\n\n| Status | Description                                                             |\n| ------ | ----------------------------------------------------------------------- |\n| 400    | Malformed request. For example, the message body of a request made to the `message/send` endpoint does not contain the `app_id` field, which is required. Alternatively, this error may be triggered if required fields **are** included, but populated incorrectly. For example, the `app_id` field is included in a `message/send` request, but the value is not a ULID (and, therefore, fails a basic form check).|\n| 401    | Incorrect credentials. For example, you may get this error if you provide incorrect `client_id` and `client_secret` values when using basic authentication. You may also get this error if you provide a bearer token generated using incorrect basic authentication credentials or if you provide an expired token (generated using the OAuth2.0 client credentials flow).|\n| 403    | Correct credentials but you don't have access to the requested resource. This typically occurs paired with an `UNAUTHORIZED` message when the provided `client_id` and `client_secret` are not associated with the `project_id` required for most Conversation API calls. Starting February 19, 2025, this error may also be paired with a `BILLING_CREDIT_LIMIT_BREACHED` message. If paired with `BILLING_CREDIT_LIMIT_BREACHED` message, the project is blocked due to credit reasons. In this case, check your project's billing configuration and balance. |\n| 404    | The resources provided for the call are insufficient to complete the call, or the server cannot locate the required resources. For example, if the `app_id` provided in the call doesn't match a Conversation API app contained within the corresponding project, or the region in which the app was created does not match the regional server targeted by the call. Additionally, this error occurs if you provide designate Conversation API endpoint that doesn't actually exist.|\n| 429    | See [Rate Limits](https://developers.sinch.com/docs/conversation/api-reference/conversation/section/overview/rate-limits).       |\n| 500    | Something went wrong on our end, try again with exponential back-off    |\n| 501    | Something went wrong on our end, try again with exponential back-off    |\n| 503    | Something went wrong on our end, try again with exponential back-off    |\n\n## Rate Limits\n\nThe Conversation API has two kinds of rate limits that may result in status `429 Too Many Requests`:\n\n- Conversation API apps have a maximum MT ingress queue size of 500000 messages, which are drained towards the channel at a rate of 20 messages per second by default (this rate may be higher if the channel has been purchased with a higher capacity).\n- Projects are limited to 800 requests per second across all apps and most endpoints. Making over 800 requests per second over an extended period of time may saturate the app-specific ingress queue, resulting in rate limiting.\n\nIn addition to project and app level limitations, each channel also has rate limitations that can affect performance, and may return a `429 Too Many Requests` error. In some cases (for example, the SMS channel), these rate limits can be adjusted. In others (for example, the Instagram channel), they can't be adjusted. For more information about raising project, app, or channel rate limits, contact your Sinch account manager.",
    "title": "Conversation API | Sinch",
    "version": "1.0",
    "license": {
      "name": "MIT",
      "url": "https://www.sinch.com/toc"
    },
    "contact": {
      "email": "support@sinch.com",
      "name": "support at sinch"
    }
  },
  "servers": [
    {
      "url": "https://{region}.conversation.api.sinch.com",
      "variables": {
        "region": {
          "default": "us",
          "enum": [
            "us",
            "eu",
            "br"
          ]
        }
      },
      "description": "The {region} variable must be set to us, eu, or br, and it must match the region in which you created your Conversation API app."
    }
  ],
  "security": [
    {
      "Basic": []
    },
    {
      "oAuth2": []
    }
  ],
  "paths": {
    "/v1/projects/{project_id}/messages:send": {
      "parameters": [
        {
          "$ref": "#/components/parameters/project_id"
        }
      ],
      "post": {
        "description": "You can send a message from a Conversation app to a contact associated with that app. If the recipient is not associated with an existing contact, a new contact will be created.\n\nThe message is added to the active conversation with the contact if a conversation already exists. If no active conversation exists a new one is started automatically.\n\nYou can find all of your IDs and authentication credentials on the [Sinch Customer Dashboard](https://dashboard.sinch.com/settings/access-keys).",
        "tags": [
          "Messages"
        ],
        "summary": "Send a message",
        "operationId": "Messages_SendMessage",
        "requestBody": {
          "$ref": "#/components/requestBodies/SendMessageRequest"
        },
        "responses": {
          "200": {
            "$ref": "#/components/responses/sendMessageResponse"
          },
          "400": {
            "$ref": "#/components/responses/400Error"
          },
          "401": {
            "$ref": "#/components/responses/401Error"
          },
          "403": {
            "$ref": "#/components/responses/403Error"
          },
          "500": {
            "$ref": "#/components/responses/500Error"
          },
          "501": {
            "$ref": "#/components/responses/501Error"
          }
        },
        "x-codeSamples": [
          {
            "lang": "Java",
            "source": "/**\n * Sinch Java Snippet\n *\n * <p>This snippet is available at https://github.com/sinch/sinch-sdk-java\n *\n * <p>See https://github.com/sinch/sinch-sdk-java/blob/main/examples/snippets/README.md for details\n */\npackage conversation.messages;\n\nimport com.sinch.sdk.SinchClient;\nimport com.sinch.sdk.domains.conversation.api.v1.MessagesService;\nimport com.sinch.sdk.domains.conversation.models.v1.ChannelRecipientIdentities;\nimport com.sinch.sdk.domains.conversation.models.v1.ChannelRecipientIdentity;\nimport com.sinch.sdk.domains.conversation.models.v1.ConversationChannel;\nimport com.sinch.sdk.domains.conversation.models.v1.messages.AppMessage;\nimport com.sinch.sdk.domains.conversation.models.v1.messages.request.SendMessageRequest;\nimport com.sinch.sdk.domains.conversation.models.v1.messages.response.SendMessageResponse;\nimport com.sinch.sdk.domains.conversation.models.v1.messages.types.text.TextMessage;\nimport com.sinch.sdk.models.Configuration;\nimport com.sinch.sdk.models.ConversationRegion;\nimport java.util.logging.Logger;\nimport utils.Settings;\n\npublic class Send {\n\n  private static final Logger LOGGER = Logger.getLogger(Send.class.getName());\n\n  public static void main(String[] args) {\n\n    String projectId = Settings.getProjectId().orElse(\"MY_PROJECT_ID\");\n    String keyId = Settings.getKeyId().orElse(\"MY_KEY_ID\");\n    String keySecret = Settings.getKeySecret().orElse(\"MY_KEY_SECRET\");\n    String conversationRegion = Settings.getConversationRegion().orElse(\"MY_CONVERSATION_REGION\");\n\n    // The ID of the Conversation Application to send the message from\n    String conversationApplicationId = \"CONVERSATION_APPLICATION_ID\";\n    // Phone number to send the SMS message to (in E.164 format, e.g. +46701234567)\n    String smsRecipientPhoneNumber = \"RECIPIENT_PHONE_NUMBER\";\n\n    Configuration configuration =\n        Configuration.builder()\n            .setProjectId(projectId)\n            .setKeyId(keyId)\n            .setKeySecret(keySecret)\n            .setConversationRegion(ConversationRegion.from(conversationRegion))\n            .build();\n\n    SinchClient client = new SinchClient(configuration);\n\n    MessagesService messagesService = client.conversation().v1().messages();\n\n    LOGGER.info(\n        String.format(\n            \"Send SMS message with Conversation to phone number '%s'\", smsRecipientPhoneNumber));\n\n    SendMessageRequest<TextMessage> request =\n        createSMSSendMessage(conversationApplicationId, smsRecipientPhoneNumber);\n\n    SendMessageResponse response = messagesService.sendTextMessage(request);\n\n    LOGGER.info(\"Response: \" + response);\n  }\n\n  static SendMessageRequest<TextMessage> createSMSSendMessage(\n      String applicationId, String smsRecipientPhoneNumber) {\n\n    SendMessageRequest.Builder<TextMessage> builder = SendMessageRequest.<TextMessage>builder();\n\n    builder\n        .setAppId(applicationId)\n        .setMessage(\n            AppMessage.<TextMessage>builder()\n                .setBody(\n                    TextMessage.builder()\n                        .setText(\"[Java SDK: Conversation Message] Sample text message\")\n                        .build())\n                .build())\n        .setRecipient(\n            ChannelRecipientIdentities.of(\n                ChannelRecipientIdentity.builder()\n                    .setChannel(ConversationChannel.SMS)\n                    .setIdentity(smsRecipientPhoneNumber)\n                    .build()))\n        .build();\n\n    return builder.build();\n  }\n}\n"
          },
          {
            "lang": "Node.js",
            "source": "/**\n * Sinch Node.js Snippet\n * See: https://github.com/sinch/sinch-sdk-node/examples/snippets\n */\nimport { SinchClient } from '@sinch/sdk-core';\nimport * as dotenv from 'dotenv';\ndotenv.config();\n\nasync function main() {\n  const projectId = process.env.SINCH_PROJECT_ID ?? 'MY_PROJECT_ID';\n  const keyId = process.env.SINCH_KEY_ID ?? 'MY_KEY_ID';\n  const keySecret = process.env.SINCH_KEY_SECRET ?? 'MY_KEY_SECRET';\n  const conversationRegion = process.env.SINCH_CONVERSATION_REGION ?? 'MY_CONVERSATION_REGION';\n\n  // The ID of the Conversation App to send the message from\n  const appId = 'CONVERSATION_APP_ID';\n  // The phone number of the recipient in E.164 format\n  const recipientPhoneNumber = 'RECIPIENT_PHONE_NUMBER';\n\n  const sinch = new SinchClient({ projectId, keyId, keySecret, conversationRegion });\n\n  try {\n    const response = await sinch.conversation.messages.send({\n      sendMessageRequestBody :{\n        app_id: appId,\n        message: {\n          text_message: {\n            text: '[Node.js SDK: Conversation Message] Sample text message',\n          },\n        },\n        recipient: {\n          identified_by: {\n            channel_identities: [\n              {\n                channel: 'RCS',\n                identity: recipientPhoneNumber,\n              },\n            ],\n          },\n        },\n      },\n    });\n    console.log('✅ Successfully sent Message.');\n    console.log(JSON.stringify(response, null, 2));\n  } catch (err) {\n    console.error(`❌ Failed to send Message to the phone number ${recipientPhoneNumber}:`);\n    console.error(err);\n  }\n}\n\nmain();\n"
          },
          {
            "lang": "Python",
            "source": "\"\"\"\nSinch Python Snippet\n\nThis snippet is available at https://github.com/sinch/sinch-sdk-python/tree/main/examples/snippets\n\"\"\"\n\nimport os\nfrom dotenv import load_dotenv\nfrom sinch import SinchClient\n\nload_dotenv()\n\nsinch_client = SinchClient(\n    project_id=os.environ.get(\"SINCH_PROJECT_ID\") or \"MY_PROJECT_ID\",\n    key_id=os.environ.get(\"SINCH_KEY_ID\") or \"MY_KEY_ID\",\n    key_secret=os.environ.get(\"SINCH_KEY_SECRET\") or \"MY_KEY_SECRET\",\n    conversation_region=os.environ.get(\"SINCH_CONVERSATION_REGION\") or \"MY_CONVERSATION_REGION\"\n)\n\n# The ID of the Conversation App to send the message from\napp_id = \"CONVERSATION_APP_ID\"\n# The phone number of the recipient in E.164 format (e.g. +46701234567)\nrecipient_identities = [\n    {\n        \"channel\": \"RCS\",\n        \"identity\": \"RECIPIENT_PHONE_NUMBER\"\n    }\n]\n\n# The conversation message payload to send\nmessage = {\n    \"text_message\": {\n        \"text\": \"[Python SDK: Conversation Message] Sample text message\",\n    },\n}\n\nresponse = sinch_client.conversation.messages.send(\n    app_id=app_id,\n    message=message,\n    recipient_identities=recipient_identities,\n)\n\nprint(f\"Successfully sent message.\\n{response}\")\n"
          }
        ]
      }
    },
    "/v1/projects/{project_id}/messages/{message_id}": {
      "parameters": [
        {
          "$ref": "#/components/parameters/project_id"
        },
        {
          "$ref": "#/components/parameters/message_id"
        },
        {
          "$ref": "#/components/parameters/messages_source"
        }
      ],
      "patch": {
        "description": "Update a specific message metadata by its ID.",
        "tags": [
          "Messages"
        ],
        "summary": "Update message metadata",
        "operationId": "Messages_UpdateMessageMetadata",
        "requestBody": {
          "$ref": "#/components/requestBodies/UpdateMessageMetadataRequest"
        },
        "responses": {
          "200": {
            "$ref": "#/components/responses/getMessageResponse"
          },
          "400": {
            "$ref": "#/components/responses/400Error"
          },
          "401": {
            "$ref": "#/components/responses/401Error"
          },
          "403": {
            "$ref": "#/components/responses/403Error"
          },
          "500": {
            "$ref": "#/components/responses/500Error"
          },
          "501": {
            "$ref": "#/components/responses/501Error"
          }
        },
        "x-codeSamples": [
          {
            "lang": "Java",
            "source": "/**\n * Sinch Java Snippet\n *\n * <p>This snippet is available at https://github.com/sinch/sinch-sdk-java\n *\n * <p>See https://github.com/sinch/sinch-sdk-java/blob/main/examples/snippets/README.md for details\n */\npackage conversation.messages;\n\nimport com.sinch.sdk.SinchClient;\nimport com.sinch.sdk.domains.conversation.api.v1.MessagesService;\nimport com.sinch.sdk.domains.conversation.models.v1.messages.ConversationMessage;\nimport com.sinch.sdk.domains.conversation.models.v1.messages.request.MessageUpdateRequest;\nimport com.sinch.sdk.models.Configuration;\nimport com.sinch.sdk.models.ConversationRegion;\nimport java.util.logging.Logger;\nimport utils.Settings;\n\npublic class Update {\n\n  private static final Logger LOGGER = Logger.getLogger(Update.class.getName());\n\n  public static void main(String[] args) {\n\n    String projectId = Settings.getProjectId().orElse(\"MY_PROJECT_ID\");\n    String keyId = Settings.getKeyId().orElse(\"MY_KEY_ID\");\n    String keySecret = Settings.getKeySecret().orElse(\"MY_KEY_SECRET\");\n    String conversationRegion = Settings.getConversationRegion().orElse(\"MY_CONVERSATION_REGION\");\n\n    // The ID of the message to update\n    String messageId = \"MESSAGE_ID\";\n\n    Configuration configuration =\n        Configuration.builder()\n            .setProjectId(projectId)\n            .setKeyId(keyId)\n            .setKeySecret(keySecret)\n            .setConversationRegion(ConversationRegion.from(conversationRegion))\n            .build();\n\n    SinchClient client = new SinchClient(configuration);\n\n    MessagesService messagesService = client.conversation().v1().messages();\n\n    LOGGER.info(String.format(\"Update message with ID '%s'\", messageId));\n\n    MessageUpdateRequest request =\n        MessageUpdateRequest.builder()\n            .setMetadata(\"metadata value set from Java SDK snippet\")\n            .build();\n\n    ConversationMessage response = messagesService.update(messageId, request);\n\n    LOGGER.info(\"Response: \" + response);\n  }\n}\n"
          },
          {
            "lang": "Node.js",
            "source": "/**\n * Sinch Node.js Snippet\n * See: https://github.com/sinch/sinch-sdk-node/examples/snippets\n */\nimport { SinchClient } from '@sinch/sdk-core';\nimport * as dotenv from 'dotenv';\ndotenv.config();\n\nasync function main() {\n  const projectId = process.env.SINCH_PROJECT_ID ?? 'MY_PROJECT_ID';\n  const keyId = process.env.SINCH_KEY_ID ?? 'MY_KEY_ID';\n  const keySecret = process.env.SINCH_KEY_SECRET ?? 'MY_KEY_SECRET';\n  const conversationRegion = process.env.SINCH_CONVERSATION_REGION ?? 'MY_CONVERSATION_REGION';\n\n  // The ID of the Message to update\n  const messageId = 'MESSAGE_ID';\n\n  const sinch = new SinchClient({ projectId, keyId, keySecret, conversationRegion });\n\n  try {\n    const response = await sinch.conversation.messages.update({\n      message_id: messageId,\n      updateMessageRequestBody: {\n        metadata: 'Metadata value set from Node.js SDK snippet',\n      },\n    });\n    console.log('✅ Successfully updated Message metadata.');\n    console.log(JSON.stringify(response, null, 2));\n  } catch (err) {\n    console.error(`❌ Failed to update the Message with ID ${messageId}:`);\n    console.error(err);\n  }\n}\n\nmain();\n"
          },
          {
            "lang": "Python",
            "source": "\"\"\"\nSinch Python Snippet\n\nThis snippet is available at https://github.com/sinch/sinch-sdk-python/tree/main/examples/snippets\n\"\"\"\n\nimport os\nfrom dotenv import load_dotenv\nfrom sinch import SinchClient\n\nload_dotenv()\n\nsinch_client = SinchClient(\n    project_id=os.environ.get(\"SINCH_PROJECT_ID\") or \"MY_PROJECT_ID\",\n    key_id=os.environ.get(\"SINCH_KEY_ID\") or \"MY_KEY_ID\",\n    key_secret=os.environ.get(\"SINCH_KEY_SECRET\") or \"MY_KEY_SECRET\",\n    conversation_region=os.environ.get(\"SINCH_CONVERSATION_REGION\") or \"MY_CONVERSATION_REGION\"\n)\n\n# The ID of the message to update\nmessage_id = \"MESSAGE_ID\"\n# The metadata string to set on the message\nmetadata = \"MESSAGE_METADATA\"\n\nresponse = sinch_client.conversation.messages.update(\n    message_id=message_id,\n    metadata=metadata,\n)\n\nprint(f\"Updated message:\\n{response}\")\n"
          }
        ]
      },
      "get": {
        "description": "Retrieves a specific message by its ID.",
        "tags": [
          "Messages"
        ],
        "summary": "Get a message",
        "operationId": "Messages_GetMessage",
        "responses": {
          "200": {
            "$ref": "#/components/responses/getMessageResponse"
          },
          "400": {
            "$ref": "#/components/responses/400Error"
          },
          "401": {
            "$ref": "#/components/responses/401Error"
          },
          "403": {
            "$ref": "#/components/responses/403Error"
          },
          "500": {
            "$ref": "#/components/responses/500Error"
          },
          "501": {
            "$ref": "#/components/responses/501Error"
          }
        },
        "x-codeSamples": [
          {
            "lang": "Java",
            "source": "/**\n * Sinch Java Snippet\n *\n * <p>This snippet is available at https://github.com/sinch/sinch-sdk-java\n *\n * <p>See https://github.com/sinch/sinch-sdk-java/blob/main/examples/snippets/README.md for details\n */\npackage conversation.messages;\n\nimport com.sinch.sdk.SinchClient;\nimport com.sinch.sdk.domains.conversation.api.v1.MessagesService;\nimport com.sinch.sdk.domains.conversation.models.v1.messages.ConversationMessage;\nimport com.sinch.sdk.models.Configuration;\nimport com.sinch.sdk.models.ConversationRegion;\nimport java.util.logging.Logger;\nimport utils.Settings;\n\npublic class Get {\n\n  private static final Logger LOGGER = Logger.getLogger(Get.class.getName());\n\n  public static void main(String[] args) {\n\n    String projectId = Settings.getProjectId().orElse(\"MY_PROJECT_ID\");\n    String keyId = Settings.getKeyId().orElse(\"MY_KEY_ID\");\n    String keySecret = Settings.getKeySecret().orElse(\"MY_KEY_SECRET\");\n    String conversationRegion = Settings.getConversationRegion().orElse(\"MY_CONVERSATION_REGION\");\n\n    // The ID of the event to retrieve\n    String messageId = \"MESSAGE_ID\";\n\n    Configuration configuration =\n        Configuration.builder()\n            .setProjectId(projectId)\n            .setKeyId(keyId)\n            .setKeySecret(keySecret)\n            .setConversationRegion(ConversationRegion.from(conversationRegion))\n            .build();\n\n    SinchClient client = new SinchClient(configuration);\n\n    MessagesService messagesService = client.conversation().v1().messages();\n\n    LOGGER.info(String.format(\"Get conversation message for message with ID '%s'\", messageId));\n\n    ConversationMessage result = messagesService.get(messageId);\n\n    LOGGER.info(\"Response: \" + result);\n  }\n}\n"
          },
          {
            "lang": "Node.js",
            "source": "/**\n * Sinch Node.js Snippet\n * See: https://github.com/sinch/sinch-sdk-node/examples/snippets\n */\nimport { SinchClient } from '@sinch/sdk-core';\nimport * as dotenv from 'dotenv';\ndotenv.config();\n\nasync function main() {\n  const projectId = process.env.SINCH_PROJECT_ID ?? 'MY_PROJECT_ID';\n  const keyId = process.env.SINCH_KEY_ID ?? 'MY_KEY_ID';\n  const keySecret = process.env.SINCH_KEY_SECRET ?? 'MY_KEY_SECRET';\n  const conversationRegion = process.env.SINCH_CONVERSATION_REGION ?? 'MY_CONVERSATION_REGION';\n\n  // The ID of the Message to retrieve\n  const messageId = 'MESSAGE_ID';\n\n  const sinch = new SinchClient({ projectId, keyId, keySecret, conversationRegion });\n\n  try {\n    const response = await sinch.conversation.messages.get({\n      message_id: messageId,\n    });\n    console.log('✅ Successfully retrieved the Message.');\n    console.log(JSON.stringify(response, null, 2));\n  } catch (err) {\n    console.error(`❌ Failed to retrieve the Message with ID ${messageId}:`);\n    console.error(err);\n  }\n}\n\nmain();\n"
          },
          {
            "lang": "Python",
            "source": "\"\"\"\nSinch Python Snippet\n\nThis snippet is available at https://github.com/sinch/sinch-sdk-python/tree/main/examples/snippets\n\"\"\"\n\nimport os\nfrom dotenv import load_dotenv\nfrom sinch import SinchClient\n\nload_dotenv()\n\nsinch_client = SinchClient(\n    project_id=os.environ.get(\"SINCH_PROJECT_ID\") or \"MY_PROJECT_ID\",\n    key_id=os.environ.get(\"SINCH_KEY_ID\") or \"MY_KEY_ID\",\n    key_secret=os.environ.get(\"SINCH_KEY_SECRET\") or \"MY_KEY_SECRET\",\n    conversation_region=os.environ.get(\"SINCH_CONVERSATION_REGION\") or \"MY_CONVERSATION_REGION\"\n)\n\n# The ID of the message to retrieve\nmessage_id = \"MESSAGE_ID\"\n\nresponse = sinch_client.conversation.messages.get(message_id=message_id)\n\nprint(f\"Message details:\\n{response}\")\n"
          }
        ]
      },
      "delete": {
        "description": "Delete a specific message by its ID. Note that this operation deletes the message from Conversation API storage; this operation does not affect messages already delivered to recipients' handsets. Also note that removing all messages of a conversation will not automatically delete the conversation.",
        "tags": [
          "Messages"
        ],
        "summary": "Delete a message",
        "operationId": "Messages_DeleteMessage",
        "responses": {
          "200": {
            "description": "A successful response."
          },
          "400": {
            "$ref": "#/components/responses/400Error"
          },
          "401": {
            "$ref": "#/components/responses/401Error"
          },
          "403": {
            "$ref": "#/components/responses/403Error"
          },
          "500": {
            "$ref": "#/components/responses/500Error"
          },
          "501": {
            "$ref": "#/components/responses/501Error"
          }
        },
        "x-codeSamples": [
          {
            "lang": "Java",
            "source": "/**\n * Sinch Java Snippet\n *\n * <p>This snippet is available at https://github.com/sinch/sinch-sdk-java\n *\n * <p>See https://github.com/sinch/sinch-sdk-java/blob/main/examples/snippets/README.md for details\n */\npackage conversation.messages;\n\nimport com.sinch.sdk.SinchClient;\nimport com.sinch.sdk.domains.conversation.api.v1.MessagesService;\nimport com.sinch.sdk.models.Configuration;\nimport com.sinch.sdk.models.ConversationRegion;\nimport java.util.logging.Logger;\nimport utils.Settings;\n\npublic class Delete {\n\n  private static final Logger LOGGER = Logger.getLogger(Delete.class.getName());\n\n  public static void main(String[] args) {\n\n    String projectId = Settings.getProjectId().orElse(\"MY_PROJECT_ID\");\n    String keyId = Settings.getKeyId().orElse(\"MY_KEY_ID\");\n    String keySecret = Settings.getKeySecret().orElse(\"MY_KEY_SECRET\");\n    String conversationRegion = Settings.getConversationRegion().orElse(\"MY_CONVERSATION_REGION\");\n\n    // The ID of the event to delete\n    String messageId = \"MESSAGE_ID\";\n\n    Configuration configuration =\n        Configuration.builder()\n            .setProjectId(projectId)\n            .setKeyId(keyId)\n            .setKeySecret(keySecret)\n            .setConversationRegion(ConversationRegion.from(conversationRegion))\n            .build();\n\n    SinchClient client = new SinchClient(configuration);\n\n    MessagesService messagesService = client.conversation().v1().messages();\n\n    LOGGER.info(\"Deleting message: \" + messageId);\n\n    messagesService.delete(messageId);\n\n    LOGGER.info(\"Done\");\n  }\n}\n"
          },
          {
            "lang": "Node.js",
            "source": "/**\n * Sinch Node.js Snippet\n * See: https://github.com/sinch/sinch-sdk-node/examples/snippets\n */\nimport { SinchClient } from '@sinch/sdk-core';\nimport * as dotenv from 'dotenv';\ndotenv.config();\n\nasync function main() {\n  const projectId = process.env.SINCH_PROJECT_ID ?? 'MY_PROJECT_ID';\n  const keyId = process.env.SINCH_KEY_ID ?? 'MY_KEY_ID';\n  const keySecret = process.env.SINCH_KEY_SECRET ?? 'MY_KEY_SECRET';\n  const conversationRegion = process.env.SINCH_CONVERSATION_REGION ?? 'MY_CONVERSATION_REGION';\n\n  // The ID of the Message to delete\n  const messageId = 'MESSAGE_ID';\n\n  const sinch = new SinchClient({ projectId, keyId, keySecret, conversationRegion });\n\n  try {\n    await sinch.conversation.messages.delete({\n      message_id: messageId,\n    });\n    console.log(`✅ Successfully deleted Message with ID ${messageId}.`);\n  } catch (err) {\n    console.error(`❌ Failed to delete the Message with ID ${messageId}:`);\n    console.error(err);\n  }\n}\n\nmain();\n"
          },
          {
            "lang": "Python",
            "source": "\"\"\"\nSinch Python Snippet\n\nThis snippet is available at https://github.com/sinch/sinch-sdk-python/tree/main/examples/snippets\n\"\"\"\n\nimport os\nfrom dotenv import load_dotenv\nfrom sinch import SinchClient\n\nload_dotenv()\n\nsinch_client = SinchClient(\n    project_id=os.environ.get(\"SINCH_PROJECT_ID\") or \"MY_PROJECT_ID\",\n    key_id=os.environ.get(\"SINCH_KEY_ID\") or \"MY_KEY_ID\",\n    key_secret=os.environ.get(\"SINCH_KEY_SECRET\") or \"MY_KEY_SECRET\",\n    conversation_region=os.environ.get(\"SINCH_CONVERSATION_REGION\") or \"MY_CONVERSATION_REGION\"\n)\n\n# The ID of the message to delete\nmessage_id = \"MESSAGE_ID\"\n\nsinch_client.conversation.messages.delete(message_id=message_id)\n\nprint(\"Message deleted successfully\")\n"
          }
        ]
      }
    },
    "/v1/projects/{project_id}/messages": {
      "parameters": [
        {
          "$ref": "#/components/parameters/project_id"
        },
        {
          "$ref": "#/components/parameters/query_conversation_id"
        },
        {
          "$ref": "#/components/parameters/query_contact_id"
        },
        {
          "name": "app_id",
          "description": "Id of the app.",
          "in": "query",
          "schema": {
            "type": "string"
          }
        },
        {
          "name": "channel_identity",
          "description": "Channel identity of the contact.",
          "in": "query",
          "schema": {
            "type": "string"
          }
        },
        {
          "name": "start_time",
          "description": "Filter messages with `accept_time` after this timestamp. Must be before `end_time` if that is specified.",
          "in": "query",
          "schema": {
            "type": "string",
            "format": "date-time"
          }
        },
        {
          "name": "end_time",
          "description": "Filter messages with `accept_time` before this timestamp.",
          "in": "query",
          "schema": {
            "type": "string",
            "format": "date-time"
          }
        },
        {
          "description": "Maximum number of messages to fetch. Defaults to 10\nand the maximum is 1000.",
          "name": "page_size",
          "in": "query",
          "schema": {
            "type": "integer",
            "format": "int32"
          }
        },
        {
          "description": "Next page token previously returned if any. When specifying this token, make sure to use the same values\nfor the other parameters from the request that originated the token, otherwise the paged results may be inconsistent.",
          "name": "page_token",
          "in": "query",
          "schema": {
            "type": "string"
          }
        },
        {
          "name": "view",
          "in": "query",
          "schema": {
            "$ref": "#/components/schemas/ConversationMessagesView"
          }
        },
        {
          "$ref": "#/components/parameters/messages_source"
        },
        {
          "$ref": "#/components/parameters/only_recipient_originated"
        },
        {
          "description": "Only fetch messages from the `channel`.",
          "name": "channel",
          "in": "query",
          "schema": {
            "$ref": "#/components/schemas/ConversationChannel"
          }
        },
        {
          "name": "direction",
          "in": "query",
          "description": "Optional. Only fetch messages with the specified `direction`. If direction is not specified, it will list both TO_APP and TO_CONTACT messages.",
          "schema": {
            "$ref": "#/components/schemas/ConversationDirection"
          }
        }
      ],
      "get": {
        "description": "This operation lists all messages sent or received via particular [Processing Modes](https://developers.sinch.com/docs/conversation/processing-modes/).\n\nSetting the `messages_source` parameter to `CONVERSATION_SOURCE` allows for querying messages in `CONVERSATION` mode, and setting it to `DISPATCH_SOURCE`\nwill allow for queries of messages in `DISPATCH` mode. Note that `conversation_id` and `contact_id` are only supported as query parameters if `messages_source` is set to `CONVERSATION_SOURCE`.\n\nCombining multiple parameters is supported for more detailed filtering of messages, but some of them are not supported\ndepending on the value specified for `messages_source`. The description for each field will inform if that field may not be supported.\n\nThe messages are ordered by their `accept_time` property in descending order,\nwhere `accept_time` is a timestamp of when the message was enqueued by the Conversation API.\nThis means messages received most recently will be listed first.",
        "tags": [
          "Messages"
        ],
        "summary": "List messages",
        "operationId": "Messages_ListMessages",
        "responses": {
          "200": {
            "description": "A successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ListMessagesResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/400Error"
          },
          "401": {
            "$ref": "#/components/responses/401Error"
          },
          "403": {
            "$ref": "#/components/responses/403Error"
          },
          "500": {
            "$ref": "#/components/responses/500Error"
          },
          "501": {
            "$ref": "#/components/responses/501Error"
          }
        },
        "x-codeSamples": [
          {
            "lang": "Java",
            "source": "/**\n * Sinch Java Snippet\n *\n * <p>This snippet is available at https://github.com/sinch/sinch-sdk-java\n *\n * <p>See https://github.com/sinch/sinch-sdk-java/blob/main/examples/snippets/README.md for details\n */\npackage conversation.messages;\n\nimport com.sinch.sdk.SinchClient;\nimport com.sinch.sdk.domains.conversation.api.v1.MessagesService;\nimport com.sinch.sdk.domains.conversation.models.v1.messages.request.MessagesListQueryParameters;\nimport com.sinch.sdk.domains.conversation.models.v1.messages.response.MessagesListResponse;\nimport com.sinch.sdk.models.Configuration;\nimport com.sinch.sdk.models.ConversationRegion;\nimport java.util.logging.Logger;\nimport utils.Settings;\n\npublic class List {\n\n  private static final Logger LOGGER = Logger.getLogger(List.class.getName());\n\n  public static void main(String[] args) {\n\n    String projectId = Settings.getProjectId().orElse(\"MY_PROJECT_ID\");\n    String keyId = Settings.getKeyId().orElse(\"MY_KEY_ID\");\n    String keySecret = Settings.getKeySecret().orElse(\"MY_KEY_SECRET\");\n    String conversationRegion = Settings.getConversationRegion().orElse(\"MY_CONVERSATION_REGION\");\n\n    // The ID of the Conversation Application to list messages for\n    String conversationApplicationId = \"APPLICATION_ID\";\n\n    Configuration configuration =\n        Configuration.builder()\n            .setProjectId(projectId)\n            .setKeyId(keyId)\n            .setKeySecret(keySecret)\n            .setConversationRegion(ConversationRegion.from(conversationRegion))\n            .build();\n\n    SinchClient client = new SinchClient(configuration);\n\n    MessagesService messagesService = client.conversation().v1().messages();\n\n    LOGGER.info(\n        String.format(\"List messages for application with ID '%s'\", conversationApplicationId));\n\n    MessagesListQueryParameters request =\n        MessagesListQueryParameters.builder().setAppId(conversationApplicationId).build();\n\n    MessagesListResponse response = messagesService.list(request);\n\n    LOGGER.info(\"Response:\");\n\n    response.iterator().forEachRemaining(f -> LOGGER.info(f.toString()));\n  }\n}\n"
          },
          {
            "lang": "Node.js",
            "source": "/**\n * Sinch Node.js Snippet\n * See: https://github.com/sinch/sinch-sdk-node/examples/snippets\n */\nimport { SinchClient } from '@sinch/sdk-core';\nimport * as dotenv from 'dotenv';\ndotenv.config();\n\nasync function main() {\n  const projectId = process.env.SINCH_PROJECT_ID ?? 'MY_PROJECT_ID';\n  const keyId = process.env.SINCH_KEY_ID ?? 'MY_KEY_ID';\n  const keySecret = process.env.SINCH_KEY_SECRET ?? 'MY_KEY_SECRET';\n  const conversationRegion = process.env.SINCH_CONVERSATION_REGION ?? 'MY_CONVERSATION_REGION';\n\n  // The ID of the Conversation App to list Messages from\n  const appId = 'CONVERSATION_APP_ID';\n\n  const sinch = new SinchClient({ projectId, keyId, keySecret, conversationRegion });\n\n  try {\n    const response = await sinch.conversation.messages.list({\n      app_id: appId,\n    });\n    if (response.data.length === 0) {\n      console.log('No Messages found.');\n      return;\n    }\n    console.log(`✅ Found ${response.data.length} Messages.`);\n    response.data.forEach((message) => {\n      console.log(message);\n    });\n  } catch (err) {\n    console.error('❌ Failed to list the Messages:');\n    console.error(err);\n  }\n}\n\nmain();\n"
          },
          {
            "lang": "Python",
            "source": "\"\"\"\nSinch Python Snippet\n\nThis snippet is available at https://github.com/sinch/sinch-sdk-python/tree/main/examples/snippets\n\"\"\"\n\nimport os\nfrom dotenv import load_dotenv\nfrom sinch import SinchClient\n\nload_dotenv()\n\nsinch_client = SinchClient(\n    project_id=os.environ.get(\"SINCH_PROJECT_ID\") or \"MY_PROJECT_ID\",\n    key_id=os.environ.get(\"SINCH_KEY_ID\") or \"MY_KEY_ID\",\n    key_secret=os.environ.get(\"SINCH_KEY_SECRET\") or \"MY_KEY_SECRET\",\n    conversation_region=os.environ.get(\"SINCH_CONVERSATION_REGION\") or \"MY_CONVERSATION_REGION\"\n)\n\n# The ID of the Conversation App to list messages from\napp_id = \"CONVERSATION_APP_ID\"\n\nmessages = sinch_client.conversation.messages.list(\n    app_id=app_id,\n)\n\npage_counter = 1\nwhile True:\n    print(f\"Page {page_counter} List of Messages: {messages}\")\n\n    if not messages.has_next_page:\n        break\n\n    messages = messages.next_page()\n    page_counter += 1\n"
          }
        ]
      }
    },
    "/v1/projects/{project_id}/messages:fetch-last-message": {
      "parameters": [
        {
          "$ref": "#/components/parameters/project_id"
        }
      ],
      "post": {
        "description": "Retrieves the last message sent to specified channel identities. In CONVERSATION_SOURCE mode, you can query either by channel_identities or by contact_ids. Note: Use either contact_ids OR channel_identities per request, not both. DISPATCH_SOURCE mode does not support contact_ids.",
        "tags": [
          "Messages"
        ],
        "summary": "List messages by channel identity",
        "operationId": "Messages_ListMessagesByChannelIdentity",
        "requestBody": {
          "$ref": "#/components/requestBodies/ListMessagesByChannelIdentityRequest"
        },
        "responses": {
          "200": {
            "description": "A successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ListMessagesResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/400Error"
          },
          "401": {
            "$ref": "#/components/responses/401Error"
          },
          "403": {
            "$ref": "#/components/responses/403Error"
          },
          "500": {
            "$ref": "#/components/responses/500Error"
          },
          "501": {
            "$ref": "#/components/responses/501Error"
          }
        },
        "x-codeSamples": [
          {
            "lang": "Java",
            "source": "/**\n * Sinch Java Snippet\n *\n * <p>This snippet is available at https://github.com/sinch/sinch-sdk-java\n *\n * <p>See https://github.com/sinch/sinch-sdk-java/blob/main/examples/snippets/README.md for details\n */\npackage conversation.messages;\n\nimport com.sinch.sdk.SinchClient;\nimport com.sinch.sdk.domains.conversation.api.v1.MessagesService;\nimport com.sinch.sdk.domains.conversation.models.v1.messages.request.LastMessagesByChannelIdentityListQueryParameters;\nimport com.sinch.sdk.domains.conversation.models.v1.messages.response.MessagesListResponse;\nimport com.sinch.sdk.models.Configuration;\nimport com.sinch.sdk.models.ConversationRegion;\nimport java.util.Arrays;\nimport java.util.List;\nimport java.util.logging.Logger;\nimport utils.Settings;\n\npublic class ListLastMessagesByChannelIdentity {\n\n  private static final Logger LOGGER =\n      Logger.getLogger(ListLastMessagesByChannelIdentity.class.getName());\n\n  public static void main(String[] args) {\n\n    String projectId = Settings.getProjectId().orElse(\"MY_PROJECT_ID\");\n    String keyId = Settings.getKeyId().orElse(\"MY_KEY_ID\");\n    String keySecret = Settings.getKeySecret().orElse(\"MY_KEY_SECRET\");\n    String conversationRegion = Settings.getConversationRegion().orElse(\"MY_CONVERSATION_REGION\");\n\n    List<String> channelIdentities = Arrays.asList(\"CHANNEL_IDENTITY1\", \"CHANNEL_IDENTITY2\");\n\n    Configuration configuration =\n        Configuration.builder()\n            .setProjectId(projectId)\n            .setKeyId(keyId)\n            .setKeySecret(keySecret)\n            .setConversationRegion(ConversationRegion.from(conversationRegion))\n            .build();\n\n    SinchClient client = new SinchClient(configuration);\n\n    MessagesService messagesService = client.conversation().v1().messages();\n\n    LOGGER.info(String.format(\"List last messages for identities '%s'\", channelIdentities));\n\n    LastMessagesByChannelIdentityListQueryParameters request =\n        LastMessagesByChannelIdentityListQueryParameters.builder()\n            .setChannelIdentities(channelIdentities)\n            .build();\n\n    MessagesListResponse response = messagesService.listLastMessagesByChannelIdentity(request);\n\n    LOGGER.info(\"Response:\");\n\n    response.iterator().forEachRemaining(f -> LOGGER.info(f.toString()));\n  }\n}\n"
          },
          {
            "lang": "Node.js",
            "source": "/**\n * Sinch Node.js Snippet\n * See: https://github.com/sinch/sinch-sdk-node/examples/snippets\n */\nimport { SinchClient } from '@sinch/sdk-core';\nimport * as dotenv from 'dotenv';\ndotenv.config();\n\nasync function main() {\n  const projectId = process.env.SINCH_PROJECT_ID ?? 'MY_PROJECT_ID';\n  const keyId = process.env.SINCH_KEY_ID ?? 'MY_KEY_ID';\n  const keySecret = process.env.SINCH_KEY_SECRET ?? 'MY_KEY_SECRET';\n  const conversationRegion = process.env.SINCH_CONVERSATION_REGION ?? 'MY_CONVERSATION_REGION';\n\n  // Channel identities to fetch the last message (can be phone numbers, social media IDs, etc. depending on the channel)\n  const channelIdentities = ['CHANNEL_IDENTITY_1', 'CHANNEL_IDENTITY_2'];\n\n  const sinch = new SinchClient({ projectId, keyId, keySecret, conversationRegion });\n\n  try {\n    const response = await sinch.conversation.messages.listLastMessagesByChannelIdentity({\n      listLastMessagesByChannelIdentityRequestBody: {\n        channel_identities: channelIdentities,\n        messages_source: 'DISPATCH_SOURCE',\n      },\n    });\n    if (response.data.length === 0) {\n      console.log('No Messages found for the specified identities.');\n      return;\n    }\n    console.log(`✅ Found ${response.data.length} Messages.`);\n    response.data.forEach((message) => {\n      console.log(message);\n    });\n  } catch (err) {\n    console.error('❌ Failed to list the Messages for the specified identities:');\n    console.error(err);\n  }\n}\n\nmain();\n"
          },
          {
            "lang": "Python",
            "source": "\"\"\"\nSinch Python Snippet\n\nThis snippet is available at https://github.com/sinch/sinch-sdk-python/tree/main/examples/snippets\n\"\"\"\n\nimport os\nfrom dotenv import load_dotenv\nfrom sinch import SinchClient\n\nload_dotenv()\n\nsinch_client = SinchClient(\n    project_id=os.environ.get(\"SINCH_PROJECT_ID\") or \"MY_PROJECT_ID\",\n    key_id=os.environ.get(\"SINCH_KEY_ID\") or \"MY_KEY_ID\",\n    key_secret=os.environ.get(\"SINCH_KEY_SECRET\") or \"MY_KEY_SECRET\",\n    conversation_region=os.environ.get(\"SINCH_CONVERSATION_REGION\") or \"MY_CONVERSATION_REGION\"\n)\n\n# The channel identities to fetch the last message for\nchannel_identities = [\"CHANNEL_IDENTITY_1\", \"CHANNEL_IDENTITY_2\"]\n\nmessages = sinch_client.conversation.messages.list_last_messages_by_channel_identity(\n    channel_identities=channel_identities,\n)\n\npage_counter = 1\nwhile True:\n    print(f\"Page {page_counter} Last messages: {messages}\")\n\n    if not messages.has_next_page:\n        break\n\n    messages = messages.next_page()\n    page_counter += 1\n"
          }
        ]
      }
    },
    "/v1/projects/{project_id}/apps": {
      "parameters": [
        {
          "$ref": "#/components/parameters/project_id"
        }
      ],
      "get": {
        "description": "Get a list of all apps in the specified project.",
        "tags": [
          "App"
        ],
        "summary": "List all apps for a given project",
        "operationId": "App_ListApps",
        "responses": {
          "200": {
            "$ref": "#/components/responses/listAppsResponse"
          },
          "400": {
            "$ref": "#/components/responses/400Error"
          },
          "401": {
            "$ref": "#/components/responses/401Error"
          },
          "403": {
            "$ref": "#/components/responses/403Error"
          },
          "500": {
            "$ref": "#/components/responses/500Error"
          },
          "501": {
            "$ref": "#/components/responses/501Error"
          }
        },
        "x-codeSamples": [
          {
            "lang": "Java",
            "source": "/**\n * Sinch Java Snippet\n *\n * <p>This snippet is available at https://github.com/sinch/sinch-sdk-java\n *\n * <p>See https://github.com/sinch/sinch-sdk-java/blob/main/examples/snippets/README.md for details\n */\npackage conversation.applications;\n\nimport com.sinch.sdk.SinchClient;\nimport com.sinch.sdk.domains.conversation.api.v1.AppsService;\nimport com.sinch.sdk.domains.conversation.models.v1.apps.response.AppsListResponse;\nimport com.sinch.sdk.models.Configuration;\nimport com.sinch.sdk.models.ConversationRegion;\nimport java.util.logging.Logger;\nimport utils.Settings;\n\npublic class List {\n\n  private static final Logger LOGGER = Logger.getLogger(List.class.getName());\n\n  public static void main(String[] args) {\n\n    String projectId = Settings.getProjectId().orElse(\"MY_PROJECT_ID\");\n    String keyId = Settings.getKeyId().orElse(\"MY_KEY_ID\");\n    String keySecret = Settings.getKeySecret().orElse(\"MY_KEY_SECRET\");\n    String conversationRegion = Settings.getConversationRegion().orElse(\"MY_CONVERSATION_REGION\");\n\n    Configuration configuration =\n        Configuration.builder()\n            .setProjectId(projectId)\n            .setKeyId(keyId)\n            .setKeySecret(keySecret)\n            .setConversationRegion(ConversationRegion.from(conversationRegion))\n            .build();\n\n    SinchClient client = new SinchClient(configuration);\n\n    AppsService appService = client.conversation().v1().apps();\n\n    LOGGER.info(\"List conversations\");\n\n    AppsListResponse result = appService.list();\n\n    LOGGER.info(\"Response: \");\n\n    result\n        .iterator()\n        .forEachRemaining(\n            f -> LOGGER.info(String.format(\"- %s (%s) : %s\", f.getDisplayName(), f.getId(), f)));\n  }\n}\n"
          },
          {
            "lang": "Node.js",
            "source": "/**\n * Sinch Node.js Snippet\n * See: https://github.com/sinch/sinch-sdk-node/examples/snippets\n */\nimport { SinchClient } from '@sinch/sdk-core';\nimport * as dotenv from 'dotenv';\ndotenv.config();\n\nasync function main() {\n  const projectId = process.env.SINCH_PROJECT_ID ?? 'MY_PROJECT_ID';\n  const keyId = process.env.SINCH_KEY_ID ?? 'MY_KEY_ID';\n  const keySecret = process.env.SINCH_KEY_SECRET ?? 'MY_KEY_SECRET';\n  const conversationRegion = process.env.SINCH_CONVERSATION_REGION ?? 'MY_CONVERSATION_REGION';\n\n  const sinch = new SinchClient({ projectId, keyId, keySecret, conversationRegion });\n\n  try {\n    const response = await sinch.conversation.app.list({});\n    if (!response.apps?.length) {\n      console.log('No Conversation Apps found.');\n      return;\n    }\n    console.log(`✅ Found ${response.apps.length} Conversation Apps.`);\n    response.apps.forEach((app) => {\n      console.log(app);\n    });\n  } catch (err) {\n    console.error('❌ Failed to list Conversation Apps:');\n    console.error(err);\n  }\n}\n\nmain();\n"
          }
        ]
      },
      "post": {
        "tags": [
          "App"
        ],
        "summary": "Create an app",
        "description": "You can create a new Conversation API app using the API. You can create an app for one or more channels at once. The ID of the app is generated at creation and will be returned in the response.",
        "operationId": "App_CreateApp",
        "requestBody": {
          "$ref": "#/components/requestBodies/CreateAppRequest"
        },
        "responses": {
          "200": {
            "$ref": "#/components/responses/createAppResponse"
          },
          "400": {
            "$ref": "#/components/responses/400Error"
          },
          "401": {
            "$ref": "#/components/responses/401Error"
          },
          "403": {
            "$ref": "#/components/responses/403Error"
          },
          "500": {
            "$ref": "#/components/responses/500Error"
          },
          "501": {
            "$ref": "#/components/responses/501Error"
          }
        },
        "x-codeSamples": [
          {
            "lang": "Java",
            "source": "/**\n * Sinch Java Snippet\n *\n * <p>This snippet is available at https://github.com/sinch/sinch-sdk-java\n *\n * <p>See https://github.com/sinch/sinch-sdk-java/blob/main/examples/snippets/README.md for details\n */\npackage conversation.applications;\n\nimport com.sinch.sdk.SinchClient;\nimport com.sinch.sdk.domains.conversation.api.v1.AppsService;\nimport com.sinch.sdk.domains.conversation.models.v1.apps.request.AppCreateRequest;\nimport com.sinch.sdk.domains.conversation.models.v1.apps.response.AppResponse;\nimport com.sinch.sdk.domains.conversation.models.v1.credentials.ConversationChannelCredentials;\nimport com.sinch.sdk.domains.conversation.models.v1.credentials.ConversationChannelCredentialsBuilderFactory;\nimport com.sinch.sdk.domains.conversation.models.v1.credentials.StaticBearerCredentials;\nimport com.sinch.sdk.models.Configuration;\nimport com.sinch.sdk.models.ConversationRegion;\nimport java.util.Arrays;\nimport java.util.List;\nimport java.util.logging.Logger;\nimport utils.Settings;\n\npublic class Create {\n\n  private static final Logger LOGGER = Logger.getLogger(Create.class.getName());\n\n  public static void main(String[] args) {\n\n    String projectId = Settings.getProjectId().orElse(\"MY_PROJECT_ID\");\n    String keyId = Settings.getKeyId().orElse(\"MY_KEY_ID\");\n    String keySecret = Settings.getKeySecret().orElse(\"MY_KEY_SECRET\");\n    String conversationRegion = Settings.getConversationRegion().orElse(\"MY_CONVERSATION_REGION\");\n\n    // The service plan ID and API token for the SMS channel\n    String smsServicePlanId = Settings.getServicePlanId().orElse(\"SMS_SERVICE_PLAN_ID\");\n    String smsApiToken = (\"SMS_API_TOKEN\");\n\n    Configuration configuration =\n        Configuration.builder()\n            .setProjectId(projectId)\n            .setKeyId(keyId)\n            .setKeySecret(keySecret)\n            .setConversationRegion(ConversationRegion.from(conversationRegion))\n            .build();\n\n    SinchClient client = new SinchClient(configuration);\n\n    AppsService appService = client.conversation().v1().apps();\n\n    LOGGER.info(\n        String.format(\n            \"Create conversation application with SMS channel for service plan ID '%s'\",\n            smsServicePlanId));\n\n    ConversationChannelCredentials smsChannel =\n        ConversationChannelCredentialsBuilderFactory.sms(\n                StaticBearerCredentials.builder()\n                    .setClaimedIdentity(smsServicePlanId)\n                    .setToken(smsApiToken)\n                    .build())\n            .build();\n\n    List<ConversationChannelCredentials> channelCredentials = Arrays.asList(smsChannel);\n\n    AppCreateRequest request =\n        AppCreateRequest.builder()\n            .setChannelCredentials(channelCredentials)\n            .setDisplayName(\"Created from Java SDK snippet\")\n            .build();\n\n    AppResponse response = appService.create(request);\n\n    LOGGER.info(\"Response: \" + response);\n  }\n}\n"
          },
          {
            "lang": "Node.js",
            "source": "/**\n * Sinch Node.js Snippet\n * See: https://github.com/sinch/sinch-sdk-node/examples/snippets\n */\nimport { SinchClient } from '@sinch/sdk-core';\nimport * as dotenv from 'dotenv';\ndotenv.config();\n\nasync function main() {\n  const projectId = process.env.SINCH_PROJECT_ID ?? 'MY_PROJECT_ID';\n  const keyId = process.env.SINCH_KEY_ID ?? 'MY_KEY_ID';\n  const keySecret = process.env.SINCH_KEY_SECRET ?? 'MY_KEY_SECRET';\n  const conversationRegion = process.env.SINCH_CONVERSATION_REGION ?? 'MY_CONVERSATION_REGION';\n\n  // RCS credentials - replace with your own\n  const rcsAgentId = 'RCS_SENDER_AGENT_ID';\n  const rcsAgentAccessToken = 'RCS_BEARER_TOKEN';\n  // Name of the Conversation App to create\n  const appName = 'Created from Node.js SDK snippet';\n\n  const sinch = new SinchClient({ projectId, keyId, keySecret, conversationRegion });\n\n  try {\n    const response = await sinch.conversation.app.create({\n      appCreateRequestBody: {\n        display_name: appName,\n        channel_credentials: [\n          {\n            channel: 'RCS',\n            static_bearer: {\n              claimed_identity: rcsAgentId,\n              token: rcsAgentAccessToken,\n            },\n          },\n        ],\n      },\n    });\n    console.log('✅ Successfully created the Conversation App.');\n    console.log(JSON.stringify(response, null, 2));\n  } catch (err) {\n    console.error(`❌ Failed to create the Conversation App with name ${appName}:`);\n    console.error(err);\n  }\n}\n\nmain();\n"
          }
        ]
      }
    },
    "/v1/projects/{project_id}/apps/{app_id}": {
      "parameters": [
        {
          "$ref": "#/components/parameters/project_id"
        },
        {
          "$ref": "#/components/parameters/app_id"
        }
      ],
      "get": {
        "tags": [
          "App"
        ],
        "summary": "Get an app",
        "description": "Returns a particular app as specified by the App ID.",
        "operationId": "App_GetApp",
        "responses": {
          "200": {
            "$ref": "#/components/responses/getAppResponse"
          },
          "400": {
            "$ref": "#/components/responses/400Error"
          },
          "401": {
            "$ref": "#/components/responses/401Error"
          },
          "403": {
            "$ref": "#/components/responses/403Error"
          },
          "500": {
            "$ref": "#/components/responses/500Error"
          },
          "501": {
            "$ref": "#/components/responses/501Error"
          }
        },
        "x-codeSamples": [
          {
            "lang": "Java",
            "source": "/**\n * Sinch Java Snippet\n *\n * <p>This snippet is available at https://github.com/sinch/sinch-sdk-java\n *\n * <p>See https://github.com/sinch/sinch-sdk-java/blob/main/examples/snippets/README.md for details\n */\npackage conversation.applications;\n\nimport com.sinch.sdk.SinchClient;\nimport com.sinch.sdk.domains.conversation.api.v1.AppsService;\nimport com.sinch.sdk.domains.conversation.models.v1.apps.response.AppResponse;\nimport com.sinch.sdk.models.Configuration;\nimport com.sinch.sdk.models.ConversationRegion;\nimport java.util.logging.Logger;\nimport utils.Settings;\n\npublic class Get {\n\n  private static final Logger LOGGER = Logger.getLogger(Get.class.getName());\n\n  public static void main(String[] args) {\n\n    String projectId = Settings.getProjectId().orElse(\"MY_PROJECT_ID\");\n    String keyId = Settings.getKeyId().orElse(\"MY_KEY_ID\");\n    String keySecret = Settings.getKeySecret().orElse(\"MY_KEY_SECRET\");\n    String conversationRegion = Settings.getConversationRegion().orElse(\"MY_CONVERSATION_REGION\");\n\n    // The ID of the Conversation App to retrieve\n    String conversationApplicationId = \"CONVERSATION_APP_ID\";\n\n    Configuration configuration =\n        Configuration.builder()\n            .setProjectId(projectId)\n            .setKeyId(keyId)\n            .setKeySecret(keySecret)\n            .setConversationRegion(ConversationRegion.from(conversationRegion))\n            .build();\n\n    SinchClient client = new SinchClient(configuration);\n\n    AppsService appService = client.conversation().v1().apps();\n\n    LOGGER.info(\n        String.format(\"Get details for application with ID '%s'\", conversationApplicationId));\n\n    AppResponse response = appService.get(conversationApplicationId);\n\n    LOGGER.info(\"Response: \" + response);\n  }\n}\n"
          },
          {
            "lang": "Node.js",
            "source": "/**\n * Sinch Node.js Snippet\n * See: https://github.com/sinch/sinch-sdk-node/examples/snippets\n */\nimport { SinchClient } from '@sinch/sdk-core';\nimport * as dotenv from 'dotenv';\ndotenv.config();\n\nasync function main() {\n  const projectId = process.env.SINCH_PROJECT_ID ?? 'MY_PROJECT_ID';\n  const keyId = process.env.SINCH_KEY_ID ?? 'MY_KEY_ID';\n  const keySecret = process.env.SINCH_KEY_SECRET ?? 'MY_KEY_SECRET';\n  const conversationRegion = process.env.SINCH_CONVERSATION_REGION ?? 'MY_CONVERSATION_REGION';\n\n  // The ID of the Conversation App to retrieve\n  const appId = 'CONVERSATION_APP_ID';\n\n  const sinch = new SinchClient({ projectId, keyId, keySecret, conversationRegion });\n\n  try {\n    const response = await sinch.conversation.app.get({\n      app_id: appId,\n    });\n    console.log('✅ Successfully retrieved the Conversation App.');\n    console.log(JSON.stringify(response, null, 2));\n  } catch (err) {\n    console.error(`❌ Failed to retrieve the Conversation App with ID ${appId}:`);\n    console.error(err);\n  }\n}\n\nmain();\n"
          }
        ]
      },
      "delete": {
        "tags": [
          "App"
        ],
        "summary": "Delete an app",
        "description": "Deletes the app specified by the App ID. Note that this operation will not delete contacts (which are stored at the project level) nor any channel-specific resources (for example, WhatsApp Sender Identities will not be deleted).",
        "operationId": "App_DeleteApp",
        "responses": {
          "200": {
            "description": "A successful response."
          },
          "400": {
            "$ref": "#/components/responses/400Error"
          },
          "401": {
            "$ref": "#/components/responses/401Error"
          },
          "403": {
            "$ref": "#/components/responses/403Error"
          },
          "500": {
            "$ref": "#/components/responses/500Error"
          },
          "501": {
            "$ref": "#/components/responses/501Error"
          }
        },
        "x-codeSamples": [
          {
            "lang": "Java",
            "source": "/**\n * Sinch Java Snippet\n *\n * <p>This snippet is available at https://github.com/sinch/sinch-sdk-java\n *\n * <p>See https://github.com/sinch/sinch-sdk-java/blob/main/examples/snippets/README.md for details\n */\npackage conversation.applications;\n\nimport com.sinch.sdk.SinchClient;\nimport com.sinch.sdk.domains.conversation.api.v1.AppsService;\nimport com.sinch.sdk.models.Configuration;\nimport com.sinch.sdk.models.ConversationRegion;\nimport java.util.logging.Logger;\nimport utils.Settings;\n\npublic class Delete {\n\n  private static final Logger LOGGER = Logger.getLogger(Delete.class.getName());\n\n  public static void main(String[] args) {\n\n    String projectId = Settings.getProjectId().orElse(\"MY_PROJECT_ID\");\n    String keyId = Settings.getKeyId().orElse(\"MY_KEY_ID\");\n    String keySecret = Settings.getKeySecret().orElse(\"MY_KEY_SECRET\");\n    String conversationRegion = Settings.getConversationRegion().orElse(\"MY_CONVERSATION_REGION\");\n\n    // The ID of the Conversation App to delete\n    String conversationApplicationId = \"CONVERSATION_APP_ID\";\n\n    Configuration configuration =\n        Configuration.builder()\n            .setProjectId(projectId)\n            .setKeyId(keyId)\n            .setKeySecret(keySecret)\n            .setConversationRegion(ConversationRegion.from(conversationRegion))\n            .build();\n\n    SinchClient client = new SinchClient(configuration);\n\n    AppsService appService = client.conversation().v1().apps();\n\n    LOGGER.info(\n        String.format(\"Delete conversation application with ID '%s'\", conversationApplicationId));\n\n    appService.delete(conversationApplicationId);\n\n    LOGGER.info(\"Done\");\n  }\n}\n"
          },
          {
            "lang": "Node.js",
            "source": "/**\n * Sinch Node.js Snippet\n * See: https://github.com/sinch/sinch-sdk-node/examples/snippets\n */\nimport { SinchClient } from '@sinch/sdk-core';\nimport * as dotenv from 'dotenv';\ndotenv.config();\n\nasync function main() {\n  const projectId = process.env.SINCH_PROJECT_ID ?? 'MY_PROJECT_ID';\n  const keyId = process.env.SINCH_KEY_ID ?? 'MY_KEY_ID';\n  const keySecret = process.env.SINCH_KEY_SECRET ?? 'MY_KEY_SECRET';\n  const conversationRegion = process.env.SINCH_CONVERSATION_REGION ?? 'MY_CONVERSATION_REGION';\n\n  // The ID of the Conversation App to delete\n  const appId = 'CONVERSATION_APP_ID';\n\n  const sinch = new SinchClient({ projectId, keyId, keySecret, conversationRegion });\n\n  try {\n    await sinch.conversation.app.delete({\n      app_id: appId,\n    });\n    console.log(`✅ Successfully deleted the Conversation App with ID ${appId}.`);\n  } catch (err) {\n    console.error(`❌ Failed to delete the Conversation App with ID ${appId}:`);\n    console.error(err);\n  }\n}\n\nmain();\n"
          }
        ]
      },
      "patch": {
        "tags": [
          "App"
        ],
        "summary": "Update an app",
        "description": "Updates a particular app as specified by the App ID. Note that this is a `PATCH` operation, so any specified field values will replace existing values. Therefore, **if you'd like to add additional configurations to an existing Conversation API app, ensure that you include existing values AND new values in the call**. For example, if you'd like to add new `channel_credentials`, you can [get](https://developers.sinch.com/docs/conversation/api-reference/conversation/tag/App/#tag/App/operation/App_GetApp) your existing Conversation API app, extract the existing `channel_credentials` list, append your new configuration to that list, and include the updated `channel_credentials` list in this update call.",
        "operationId": "App_UpdateApp",
        "parameters": [
          {
            "$ref": "#/components/parameters/update_mask"
          }
        ],
        "requestBody": {
          "$ref": "#/components/requestBodies/UpdateAppRequest"
        },
        "responses": {
          "200": {
            "$ref": "#/components/responses/updateAppResponse"
          },
          "400": {
            "$ref": "#/components/responses/400Error"
          },
          "401": {
            "$ref": "#/components/responses/401Error"
          },
          "403": {
            "$ref": "#/components/responses/403Error"
          },
          "500": {
            "$ref": "#/components/responses/500Error"
          },
          "501": {
            "$ref": "#/components/responses/501Error"
          }
        },
        "x-codeSamples": [
          {
            "lang": "Java",
            "source": "/**\n * Sinch Java Snippet\n *\n * <p>This snippet is available at https://github.com/sinch/sinch-sdk-java\n *\n * <p>See https://github.com/sinch/sinch-sdk-java/blob/main/examples/snippets/README.md for details\n */\npackage conversation.applications;\n\nimport com.sinch.sdk.SinchClient;\nimport com.sinch.sdk.domains.conversation.api.v1.AppsService;\nimport com.sinch.sdk.domains.conversation.models.v1.apps.request.AppUpdateRequest;\nimport com.sinch.sdk.domains.conversation.models.v1.apps.response.AppResponse;\nimport com.sinch.sdk.models.Configuration;\nimport com.sinch.sdk.models.ConversationRegion;\nimport java.util.logging.Logger;\nimport utils.Settings;\n\npublic class Update {\n\n  private static final Logger LOGGER = Logger.getLogger(Update.class.getName());\n\n  public static void main(String[] args) {\n\n    String projectId = Settings.getProjectId().orElse(\"MY_PROJECT_ID\");\n    String keyId = Settings.getKeyId().orElse(\"MY_KEY_ID\");\n    String keySecret = Settings.getKeySecret().orElse(\"MY_KEY_SECRET\");\n    String conversationRegion = Settings.getConversationRegion().orElse(\"MY_CONVERSATION_REGION\");\n\n    // The ID of the Conversation App to update\n    String conversationApplicationId = \"CONVERSATION_APP_ID\";\n    // New name for the Conversation App\n    String updatedAppName = \"Updated from Java SDK snippet\";\n\n    Configuration configuration =\n        Configuration.builder()\n            .setProjectId(projectId)\n            .setKeyId(keyId)\n            .setKeySecret(keySecret)\n            .setConversationRegion(ConversationRegion.from(conversationRegion))\n            .build();\n\n    SinchClient client = new SinchClient(configuration);\n\n    AppsService appService = client.conversation().v1().apps();\n\n    LOGGER.info(String.format(\"Update application with ID '%s'\", conversationApplicationId));\n\n    AppUpdateRequest parameters = AppUpdateRequest.builder().setDisplayName(updatedAppName).build();\n\n    AppResponse result = appService.update(conversationApplicationId, parameters);\n\n    LOGGER.info(\"Response: \" + result);\n  }\n}\n"
          },
          {
            "lang": "Node.js",
            "source": "/**\n * Sinch Node.js Snippet\n * See: https://github.com/sinch/sinch-sdk-node/examples/snippets\n */\nimport { SinchClient } from '@sinch/sdk-core';\nimport * as dotenv from 'dotenv';\ndotenv.config();\n\nasync function main() {\n  const projectId = process.env.SINCH_PROJECT_ID ?? 'MY_PROJECT_ID';\n  const keyId = process.env.SINCH_KEY_ID ?? 'MY_KEY_ID';\n  const keySecret = process.env.SINCH_KEY_SECRET ?? 'MY_KEY_SECRET';\n  const conversationRegion = process.env.SINCH_CONVERSATION_REGION ?? 'MY_CONVERSATION_REGION';\n\n  // The ID of the Conversation App to update\n  const appId = 'CONVERSATION_APP_ID';\n  // New name for the Conversation App\n  const updatedAppName = 'Updated from Node.js SDK snippet';\n\n  const sinch = new SinchClient({ projectId, keyId, keySecret, conversationRegion });\n\n  try {\n    const response = await sinch.conversation.app.update({\n      app_id: appId,\n      appUpdateRequestBody: {\n        display_name: updatedAppName,\n      },\n    });\n    console.log('✅ Successfully updated the Conversation App.');\n    console.log(JSON.stringify(response, null, 2));\n  } catch (err) {\n    console.error(`❌ Failed to update the Conversation App with ID ${appId}:`);\n    console.error(err);\n  }\n}\n\nmain();\n"
          }
        ]
      }
    },
    "/v1/projects/{project_id}/apps/{app_id}/webhooks": {
      "parameters": [
        {
          "$ref": "#/components/parameters/project_id"
        },
        {
          "$ref": "#/components/parameters/app_id"
        }
      ],
      "get": {
        "description": "List all webhooks for a given app as specified by the App ID.",
        "tags": [
          "Webhooks"
        ],
        "summary": "List webhooks",
        "operationId": "Webhooks_ListWebhooks",
        "responses": {
          "200": {
            "$ref": "#/components/responses/listWebhooksResponse"
          },
          "400": {
            "$ref": "#/components/responses/400Error"
          },
          "401": {
            "$ref": "#/components/responses/401Error"
          },
          "403": {
            "$ref": "#/components/responses/403Error"
          },
          "500": {
            "$ref": "#/components/responses/500Error"
          },
          "501": {
            "$ref": "#/components/responses/501Error"
          }
        },
        "x-codeSamples": [
          {
            "lang": "Java",
            "source": "/**\n * Sinch Java Snippet\n *\n * <p>This snippet is available at https://github.com/sinch/sinch-sdk-java\n *\n * <p>See https://github.com/sinch/sinch-sdk-java/blob/main/examples/snippets/README.md for details\n */\npackage conversation.eventdestinations;\n\nimport com.sinch.sdk.SinchClient;\nimport com.sinch.sdk.domains.conversation.api.v1.EventDestinationsService;\nimport com.sinch.sdk.domains.conversation.models.v1.eventdestinations.response.EventDestinationsListResponse;\nimport com.sinch.sdk.models.Configuration;\nimport com.sinch.sdk.models.ConversationRegion;\nimport java.util.logging.Logger;\nimport utils.Settings;\n\npublic class List {\n\n  private static final Logger LOGGER = Logger.getLogger(List.class.getName());\n\n  public static void main(String[] args) {\n\n    String projectId = Settings.getProjectId().orElse(\"MY_PROJECT_ID\");\n    String keyId = Settings.getKeyId().orElse(\"MY_KEY_ID\");\n    String keySecret = Settings.getKeySecret().orElse(\"MY_KEY_SECRET\");\n    String conversationRegion = Settings.getConversationRegion().orElse(\"MY_CONVERSATION_REGION\");\n\n    // The ID of the conversation application to list event destinations for\n    String conversationApplicationId = \"APPLICATION_ID\";\n\n    Configuration configuration =\n        Configuration.builder()\n            .setProjectId(projectId)\n            .setKeyId(keyId)\n            .setKeySecret(keySecret)\n            .setConversationRegion(ConversationRegion.from(conversationRegion))\n            .build();\n\n    SinchClient client = new SinchClient(configuration);\n\n    EventDestinationsService eventDestinationsService =\n        client.conversation().v1().eventDestinations();\n\n    LOGGER.info(\"List\");\n\n    EventDestinationsListResponse response =\n        eventDestinationsService.list(conversationApplicationId);\n\n    LOGGER.info(\"Response: \");\n    response.iterator().forEachRemaining(f -> LOGGER.info(f.toString()));\n  }\n}\n"
          },
          {
            "lang": "Node.js",
            "source": "/**\n * Sinch Node.js Snippet\n * See: https://github.com/sinch/sinch-sdk-node/examples/snippets\n */\nimport { SinchClient } from '@sinch/sdk-core';\nimport * as dotenv from 'dotenv';\ndotenv.config();\n\nasync function main() {\n  const projectId = process.env.SINCH_PROJECT_ID ?? 'MY_PROJECT_ID';\n  const keyId = process.env.SINCH_KEY_ID ?? 'MY_KEY_ID';\n  const keySecret = process.env.SINCH_KEY_SECRET ?? 'MY_KEY_SECRET';\n  const conversationRegion = process.env.SINCH_CONVERSATION_REGION ?? 'MY_CONVERSATION_REGION';\n\n  // The ID of the Conversation App to list Webhooks for\n  const appId = 'CONVERSATION_APP_ID';\n\n  const sinch = new SinchClient({ projectId, keyId, keySecret, conversationRegion });\n\n  try {\n    const response = await sinch.conversation.webhooks.list({\n      app_id: appId,\n    });\n    if (!response.webhooks?.length) {\n      console.log(`No Webhooks found for the Conversation App with ID ${appId}.`);\n      return;\n    }\n    console.log(`✅ Found ${response.webhooks.length} Webhooks.`);\n    response.webhooks.forEach((webhook) => {\n      console.log(webhook);\n    });\n  } catch (err) {\n    console.error(`❌ Failed to list the Webhooks for the Conversation App with ID ${appId}:`);\n    console.error(err);\n  }\n}\n\nmain();\n"
          }
        ]
      }
    },
    "/v1/projects/{project_id}/apps/{app_id}/consents/{list_type}": {
      "parameters": [
        {
          "$ref": "#/components/parameters/project_id"
        },
        {
          "$ref": "#/components/parameters/app_id"
        },
        {
          "$ref": "#/components/parameters/list_type"
        }
      ],
      "get": {
        "description": "Get all identities contained within a consent list for a given project id, app id, and list type.",
        "tags": [
          "Consent"
        ],
        "summary": "Get identities from consent list",
        "operationId": "Consents_GetConsents",
        "parameters": [
          {
            "description": "Optional. The maximum number of records to fetch. The default is 10\nand the maximum is 50.",
            "name": "page_size",
            "in": "query",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "description": "Optional. The page number to fetch. Defaults to first page (0). DEPRECATED: please use page_token instead.",
            "name": "page_number",
            "deprecated": true,
            "in": "query",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "page_token",
            "in": "query",
            "description": "A page token, received from a previous Get identities from consent list call.\nProvide this to retrieve a subsequent page.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "$ref": "#/components/responses/getIdentitiesFromConsentResponse"
          },
          "400": {
            "$ref": "#/components/responses/400Error"
          },
          "401": {
            "$ref": "#/components/responses/401Error"
          },
          "403": {
            "$ref": "#/components/responses/403Error"
          },
          "404": {
            "$ref": "#/components/responses/404Error"
          },
          "500": {
            "$ref": "#/components/responses/500Error"
          },
          "501": {
            "$ref": "#/components/responses/501Error"
          }
        },
        "x-codeSamples": [
          {
            "lang": "Node.js",
            "source": "/**\n * Sinch Node.js Snippet\n * See: https://github.com/sinch/sinch-sdk-node/examples/snippets\n */\nimport { SinchClient } from '@sinch/sdk-core';\nimport * as dotenv from 'dotenv';\ndotenv.config();\n\nasync function main() {\n  const projectId = process.env.SINCH_PROJECT_ID ?? 'MY_PROJECT_ID';\n  const keyId = process.env.SINCH_KEY_ID ?? 'MY_KEY_ID';\n  const keySecret = process.env.SINCH_KEY_SECRET ?? 'MY_KEY_SECRET';\n  const conversationRegion = process.env.SINCH_CONVERSATION_REGION ?? 'MY_CONVERSATION_REGION';\n\n  // The ID of the Conversation App to list the Consent Identities from\n  const appId = 'CONVERSATION_APP_ID';\n\n  const sinch = new SinchClient({ projectId, keyId, keySecret, conversationRegion });\n\n  try {\n    const response = await sinch.conversation.consents.listIdentities({\n      app_id: appId,\n      list_type: 'OPT_OUT_ALL',\n    });\n    if (response.data.length === 0) {\n      console.log('No Consent Identities found.');\n      return;\n    }\n    console.log(`✅ Found ${response.data.length} Consent Identities.`);\n    response.data.forEach((consentIdentity) => {\n      console.log(consentIdentity);\n    });\n  } catch (err) {\n    console.error('❌ Failed to list the Consent Identities:');\n    console.error(err);\n  }\n}\n\nmain();\n"
          }
        ]
      }
    },
    "/v1/projects/{project_id}/apps/{app_id}/consents/identities/{identity}": {
      "parameters": [
        {
          "$ref": "#/components/parameters/project_id"
        },
        {
          "$ref": "#/components/parameters/app_id"
        },
        {
          "$ref": "#/components/parameters/identity"
        }
      ],
      "get": {
        "description": "Get all audit records associated with the given identity from the consent lists within the specified project and app.",
        "tags": [
          "Consent"
        ],
        "summary": "Get audit records from consent lists",
        "operationId": "Consents_GetConsentsAuditRecords",
        "responses": {
          "200": {
            "$ref": "#/components/responses/getAuditRecordsFromConsentResponse"
          },
          "400": {
            "$ref": "#/components/responses/400Error"
          },
          "401": {
            "$ref": "#/components/responses/401Error"
          },
          "403": {
            "$ref": "#/components/responses/403Error"
          },
          "404": {
            "$ref": "#/components/responses/404Error"
          },
          "500": {
            "$ref": "#/components/responses/500Error"
          },
          "501": {
            "$ref": "#/components/responses/501Error"
          }
        },
        "x-codeSamples": [
          {
            "lang": "Node.js",
            "source": "/**\n * Sinch Node.js Snippet\n * See: https://github.com/sinch/sinch-sdk-node/examples/snippets\n */\nimport { SinchClient } from '@sinch/sdk-core';\nimport * as dotenv from 'dotenv';\ndotenv.config();\n\nasync function main() {\n  const projectId = process.env.SINCH_PROJECT_ID ?? 'MY_PROJECT_ID';\n  const keyId = process.env.SINCH_KEY_ID ?? 'MY_KEY_ID';\n  const keySecret = process.env.SINCH_KEY_SECRET ?? 'MY_KEY_SECRET';\n  const conversationRegion = process.env.SINCH_CONVERSATION_REGION ?? 'MY_CONVERSATION_REGION';\n\n  // The ID of the Conversation App to list the audit records from, for a given identity\n  const appId = 'CONVERSATION_APP_ID';\n  // The phone number of the recipient in E.164 format without the leading '+' (e.g., 46701234567)\n  const recipientPhoneNumber = 'RECIPIENT_PHONE_NUMBER';\n\n  const sinch = new SinchClient({ projectId, keyId, keySecret, conversationRegion });\n\n  try {\n    const response = await sinch.conversation.consents.listAuditRecords({\n      app_id: appId,\n      identity: recipientPhoneNumber,\n    });\n    console.log('✅ Successfully listed the audit records.');\n    console.log(JSON.stringify(response, null, 2));\n  } catch (err) {\n    console.error(`❌ Failed to list the audit records for the identity ${recipientPhoneNumber} in the Conversation App with ID ${appId}:`);\n    console.error(err);\n  }\n}\n\nmain();\n"
          }
        ]
      }
    },
    "/v1/projects/{project_id}/capability:query": {
      "parameters": [
        {
          "$ref": "#/components/parameters/project_id"
        }
      ],
      "post": {
        "description": "This method is asynchronous - it immediately returns the requested Capability registration. Capability check is then delivered as a callback to registered webhooks with trigger CAPABILITY for every reachable channel.",
        "tags": [
          "Capability"
        ],
        "summary": "Capability lookup",
        "operationId": "Capability_QueryCapability",
        "requestBody": {
          "$ref": "#/components/requestBodies/QueryCapabilityRequest"
        },
        "responses": {
          "200": {
            "$ref": "#/components/responses/queryCapabilityResponse"
          },
          "400": {
            "$ref": "#/components/responses/400Error"
          },
          "401": {
            "$ref": "#/components/responses/401Error"
          },
          "403": {
            "$ref": "#/components/responses/403Error"
          },
          "500": {
            "$ref": "#/components/responses/500Error"
          },
          "501": {
            "$ref": "#/components/responses/501Error"
          }
        },
        "x-codeSamples": [
          {
            "lang": "Java",
            "source": "/**\n * Sinch Java Snippet\n *\n * <p>This snippet is available at https://github.com/sinch/sinch-sdk-java\n *\n * <p>See https://github.com/sinch/sinch-sdk-java/blob/main/examples/snippets/README.md for details\n */\npackage conversation.capability;\n\nimport com.sinch.sdk.SinchClient;\nimport com.sinch.sdk.domains.conversation.api.v1.CapabilityService;\nimport com.sinch.sdk.domains.conversation.models.v1.ChannelRecipientIdentities;\nimport com.sinch.sdk.domains.conversation.models.v1.ChannelRecipientIdentity;\nimport com.sinch.sdk.domains.conversation.models.v1.ConversationChannel;\nimport com.sinch.sdk.domains.conversation.models.v1.Recipient;\nimport com.sinch.sdk.domains.conversation.models.v1.capability.request.QueryCapabilityRequest;\nimport com.sinch.sdk.domains.conversation.models.v1.capability.response.QueryCapabilityResponse;\nimport com.sinch.sdk.models.Configuration;\nimport com.sinch.sdk.models.ConversationRegion;\nimport java.util.logging.Logger;\nimport utils.Settings;\n\npublic class Capability {\n\n  private static final Logger LOGGER = Logger.getLogger(Capability.class.getName());\n\n  public static void main(String[] args) {\n\n    String projectId = Settings.getProjectId().orElse(\"MY_PROJECT_ID\");\n    String keyId = Settings.getKeyId().orElse(\"MY_KEY_ID\");\n    String keySecret = Settings.getKeySecret().orElse(\"MY_KEY_SECRET\");\n    String conversationRegion = Settings.getConversationRegion().orElse(\"MY_CONVERSATION_REGION\");\n\n    // The ID of the Conversation App where the recipient channel is configured\n    String conversationApplicationId = \"CONVERSATION_APP_ID\";\n    // The channel to look up the capabilities for\n    ConversationChannel recipientChannel = ConversationChannel.SMS;\n    // The phone number of the recipient to look up the capabilities for\n    String recipientPhoneNumber = \"RECIPIENT_PHONE_NUMBER\";\n\n    Configuration configuration =\n        Configuration.builder()\n            .setProjectId(projectId)\n            .setKeyId(keyId)\n            .setKeySecret(keySecret)\n            .setConversationRegion(ConversationRegion.from(conversationRegion))\n            .build();\n\n    SinchClient client = new SinchClient(configuration);\n\n    CapabilityService capabilityService = client.conversation().v1().capability();\n\n    Recipient channelRecipients =\n        ChannelRecipientIdentities.of(\n            ChannelRecipientIdentity.builder()\n                .setChannel(recipientChannel)\n                .setIdentity(recipientPhoneNumber)\n                .build());\n\n    QueryCapabilityRequest request =\n        QueryCapabilityRequest.builder()\n            .setAppId(conversationApplicationId)\n            .setRecipient(channelRecipients)\n            .build();\n\n    LOGGER.info(\n        String.format(\"Trigger capability lookup for phone number '%s'\", recipientPhoneNumber));\n\n    QueryCapabilityResponse response = capabilityService.lookup(request);\n\n    LOGGER.info(\"Response: \" + response);\n  }\n}\n"
          },
          {
            "lang": "Node.js",
            "source": "/**\n * Sinch Node.js Snippet\n * See: https://github.com/sinch/sinch-sdk-node/examples/snippets\n */\nimport { SinchClient } from '@sinch/sdk-core';\nimport * as dotenv from 'dotenv';\ndotenv.config();\n\nasync function main() {\n  const projectId = process.env.SINCH_PROJECT_ID ?? 'MY_PROJECT_ID';\n  const keyId = process.env.SINCH_KEY_ID ?? 'MY_KEY_ID';\n  const keySecret = process.env.SINCH_KEY_SECRET ?? 'MY_KEY_SECRET';\n  const conversationRegion = process.env.SINCH_CONVERSATION_REGION ?? 'MY_CONVERSATION_REGION';\n\n  // The ID of the Conversation App where the recipient channel is configured\n  const appId = 'CONVERSATION_APP_ID';\n  // The phone number of the recipient to look up the capabilities for\n  const recipientPhoneNumber = 'RECIPIENT_PHONE_NUMBER';\n\n  const sinch = new SinchClient({ projectId, keyId, keySecret, conversationRegion });\n\n  try {\n    const response = await sinch.conversation.capability.lookup({\n      lookupCapabilityRequestBody: {\n        app_id: appId,\n        recipient: {\n          identified_by: {\n            channel_identities: [\n              {\n                channel: 'RCS',\n                identity: recipientPhoneNumber,\n              },\n            ],\n          },\n        },\n      },\n    });\n    console.log('✅ Successfully looked up the recipient capabilities - check the CAPABILITY webhook for the result.');\n    console.log(JSON.stringify(response, null, 2));\n  } catch (err) {\n    console.error(`❌ Failed to look up the recipient capabilities for phone number ${recipientPhoneNumber}:`);\n    console.error(err);\n  }\n}\n\nmain();\n"
          }
        ]
      }
    },
    "/v1/projects/{project_id}/contacts": {
      "parameters": [
        {
          "$ref": "#/components/parameters/project_id"
        }
      ],
      "get": {
        "description": "List all contacts in the project. Note that, if a WhatsApp contact is returned, the `display_name` field of that contact may be populated with the WhatsApp display name (if the name is already stored on the server and the `display_name` field has not been overwritten by the user).",
        "tags": [
          "Contact"
        ],
        "summary": "List Contacts",
        "operationId": "Contact_ListContacts",
        "parameters": [
          {
            "description": "Optional. The maximum number of contacts to fetch. The default is 10\nand the maximum is 20.",
            "name": "page_size",
            "in": "query",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "description": "Optional. Next page token previously returned if any.",
            "name": "page_token",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Optional. Contact identifier in an external system. If used, `channel` and `identity` query parameters can't be used.",
            "name": "external_id",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Optional. Specifies a channel, and must be set to one of the enum values. If set, the `identity` parameter must be set and `external_id` can't be used. Used in conjunction with `identity` to uniquely identify the specified channel identity.",
            "name": "channel",
            "in": "query",
            "schema": {
              "$ref": "#/components/schemas/ConversationChannel"
            }
          },
          {
            "description": "Optional. If set, the `channel` parameter must be set and `external_id` can't be used. Used in conjunction with `channel` to uniquely identify the specified channel identity. This will differ from channel to channel. For example, a phone number for SMS, WhatsApp, and Viber Business.",
            "name": "identity",
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "$ref": "#/components/responses/listContactsResponse"
          },
          "400": {
            "$ref": "#/components/responses/400Error"
          },
          "401": {
            "$ref": "#/components/responses/401Error"
          },
          "403": {
            "$ref": "#/components/responses/403Error"
          },
          "500": {
            "$ref": "#/components/responses/500Error"
          },
          "501": {
            "$ref": "#/components/responses/501Error"
          }
        },
        "x-codeSamples": [
          {
            "lang": "Java",
            "source": "/**\n * Sinch Java Snippet\n *\n * <p>This snippet is available at https://github.com/sinch/sinch-sdk-java\n *\n * <p>See https://github.com/sinch/sinch-sdk-java/blob/main/examples/snippets/README.md for details\n */\npackage conversation.contacts;\n\nimport com.sinch.sdk.SinchClient;\nimport com.sinch.sdk.domains.conversation.api.v1.ContactsService;\nimport com.sinch.sdk.domains.conversation.models.v1.contacts.response.ContactsListResponse;\nimport com.sinch.sdk.models.Configuration;\nimport com.sinch.sdk.models.ConversationRegion;\nimport java.util.logging.Logger;\nimport utils.Settings;\n\npublic class List {\n\n  private static final Logger LOGGER = Logger.getLogger(List.class.getName());\n\n  public static void main(String[] args) {\n\n    String projectId = Settings.getProjectId().orElse(\"MY_PROJECT_ID\");\n    String keyId = Settings.getKeyId().orElse(\"MY_KEY_ID\");\n    String keySecret = Settings.getKeySecret().orElse(\"MY_KEY_SECRET\");\n    String conversationRegion = Settings.getConversationRegion().orElse(\"MY_CONVERSATION_REGION\");\n\n    Configuration configuration =\n        Configuration.builder()\n            .setProjectId(projectId)\n            .setKeyId(keyId)\n            .setKeySecret(keySecret)\n            .setConversationRegion(ConversationRegion.from(conversationRegion))\n            .build();\n\n    SinchClient client = new SinchClient(configuration);\n\n    ContactsService contactService = client.conversation().v1().contacts();\n\n    LOGGER.info(\"List contacts\");\n\n    ContactsListResponse response = contactService.list();\n\n    LOGGER.info(\"Response: \");\n\n    response.iterator().forEachRemaining(f -> LOGGER.info(f.toString()));\n  }\n}\n"
          },
          {
            "lang": "Node.js",
            "source": "/**\n * Sinch Node.js Snippet\n * See: https://github.com/sinch/sinch-sdk-node/examples/snippets\n */\nimport { SinchClient } from '@sinch/sdk-core';\nimport * as dotenv from 'dotenv';\ndotenv.config();\n\nasync function main() {\n  const projectId = process.env.SINCH_PROJECT_ID ?? 'MY_PROJECT_ID';\n  const keyId = process.env.SINCH_KEY_ID ?? 'MY_KEY_ID';\n  const keySecret = process.env.SINCH_KEY_SECRET ?? 'MY_KEY_SECRET';\n  const conversationRegion = process.env.SINCH_CONVERSATION_REGION ?? 'MY_CONVERSATION_REGION';\n\n  const sinch = new SinchClient({ projectId, keyId, keySecret, conversationRegion });\n\n  try {\n    const response = await sinch.conversation.contact.list({});\n    if (response.data.length === 0) {\n      console.log('No Contacts found.');\n      return;\n    }\n    console.log(`✅ Found ${response.data.length} Contacts.`);\n    response.data.forEach((contact) => {\n      console.log(contact);\n    });\n  } catch (err) {\n    console.error('❌ Failed to list the Contacts:');\n    console.error(err);\n  }\n}\n\nmain();\n"
          }
        ]
      },
      "post": {
        "tags": [
          "Contact"
        ],
        "summary": "Create a Contact",
        "description": "Most Conversation API contacts are [created automatically](https://developers.sinch.com/docs/conversation/contact-management/) when a message is sent to a new recipient. You can also create a new contact manually using this API call.",
        "operationId": "Contact_CreateContact",
        "requestBody": {
          "$ref": "#/components/requestBodies/CreateContactRequest"
        },
        "responses": {
          "200": {
            "$ref": "#/components/responses/createContactResponse"
          },
          "400": {
            "$ref": "#/components/responses/400Error"
          },
          "401": {
            "$ref": "#/components/responses/401Error"
          },
          "403": {
            "$ref": "#/components/responses/403Error"
          },
          "500": {
            "$ref": "#/components/responses/500Error"
          },
          "501": {
            "$ref": "#/components/responses/501Error"
          }
        },
        "x-codeSamples": [
          {
            "lang": "Java",
            "source": "/**\n * Sinch Java Snippet\n *\n * <p>This snippet is available at https://github.com/sinch/sinch-sdk-java\n *\n * <p>See https://github.com/sinch/sinch-sdk-java/blob/main/examples/snippets/README.md for details\n */\npackage conversation.contacts;\n\nimport com.sinch.sdk.SinchClient;\nimport com.sinch.sdk.domains.conversation.api.v1.ContactsService;\nimport com.sinch.sdk.domains.conversation.models.v1.ChannelIdentity;\nimport com.sinch.sdk.domains.conversation.models.v1.ConversationChannel;\nimport com.sinch.sdk.domains.conversation.models.v1.contacts.Contact;\nimport com.sinch.sdk.domains.conversation.models.v1.contacts.ContactLanguage;\nimport com.sinch.sdk.domains.conversation.models.v1.contacts.request.ContactCreateRequest;\nimport com.sinch.sdk.models.Configuration;\nimport com.sinch.sdk.models.ConversationRegion;\nimport java.util.Arrays;\nimport java.util.logging.Logger;\nimport utils.Settings;\n\npublic class Create {\n\n  private static final Logger LOGGER = Logger.getLogger(Create.class.getName());\n\n  public static void main(String[] args) {\n\n    String projectId = Settings.getProjectId().orElse(\"MY_PROJECT_ID\");\n    String keyId = Settings.getKeyId().orElse(\"MY_KEY_ID\");\n    String keySecret = Settings.getKeySecret().orElse(\"MY_KEY_SECRET\");\n    String conversationRegion = Settings.getConversationRegion().orElse(\"MY_CONVERSATION_REGION\");\n\n    // The channel to use for the contact\n    ConversationChannel recipientChannel = ConversationChannel.SMS;\n    // The phone number of the contact to create\n    String recipientPhoneNumber = \"RECIPIENT_PHONE_NUMBER\";\n    // The display name of the contact to create\n    String contactDisplayName = \"Created from Java SDK snippet\";\n    // The language of the contact to create\n    ContactLanguage contactLanguage = ContactLanguage.FR;\n\n    Configuration configuration =\n        Configuration.builder()\n            .setProjectId(projectId)\n            .setKeyId(keyId)\n            .setKeySecret(keySecret)\n            .setConversationRegion(ConversationRegion.from(conversationRegion))\n            .build();\n\n    SinchClient client = new SinchClient(configuration);\n\n    ContactsService contactService = client.conversation().v1().contacts();\n\n    LOGGER.info(\"Create contact\");\n\n    ContactCreateRequest contact =\n        ContactCreateRequest.builder()\n            .setChannelIdentities(\n                Arrays.asList(\n                    ChannelIdentity.builder()\n                        .setChannel(recipientChannel)\n                        .setIdentity(recipientPhoneNumber)\n                        .build()))\n            .setDisplayName(contactDisplayName)\n            .setLanguage(contactLanguage)\n            .build();\n\n    Contact result = contactService.create(contact);\n\n    LOGGER.info(\"Response: \" + result);\n  }\n}\n"
          },
          {
            "lang": "Node.js",
            "source": "/**\n * Sinch Node.js Snippet\n * See: https://github.com/sinch/sinch-sdk-node/examples/snippets\n */\nimport { SinchClient } from '@sinch/sdk-core';\nimport * as dotenv from 'dotenv';\ndotenv.config();\n\nasync function main() {\n  const projectId = process.env.SINCH_PROJECT_ID ?? 'MY_PROJECT_ID';\n  const keyId = process.env.SINCH_KEY_ID ?? 'MY_KEY_ID';\n  const keySecret = process.env.SINCH_KEY_SECRET ?? 'MY_KEY_SECRET';\n  const conversationRegion = process.env.SINCH_CONVERSATION_REGION ?? 'MY_CONVERSATION_REGION';\n\n  // Parameters to create a contact\n  const recipientPhoneNumber = 'RECIPIENT_PHONE_NUMBER';\n  const contactDisplayName = 'Created from Node.js SDK snippet';\n  const contactLanguage = 'FR';\n\n  const sinch = new SinchClient({ projectId, keyId, keySecret, conversationRegion });\n\n  try {\n    const response = await sinch.conversation.contact.create({\n      contactCreateRequestBody: {\n        channel_identities: [\n          {\n            channel: 'RCS',\n            identity: recipientPhoneNumber,\n          },\n        ],\n        display_name: contactDisplayName,\n        language: contactLanguage,\n      },\n    });\n    console.log('✅ Successfully created the Contact.');\n    console.log(JSON.stringify(response, null, 2));\n  } catch (err) {\n    console.error(`❌ Failed to create the Contact for phone number ${recipientPhoneNumber}:`);\n    console.error(err);\n  }\n}\n\nmain();\n"
          }
        ]
      }
    },
    "/v1/projects/{project_id}/contacts/{contact_id}": {
      "parameters": [
        {
          "$ref": "#/components/parameters/project_id"
        },
        {
          "$ref": "#/components/parameters/contact_id"
        }
      ],
      "get": {
        "description": "Returns a specific contact as specified by the contact ID. Note the following:\n\n- If a WhatsApp contact is returned, the `display_name` field of that contact may be populated with the WhatsApp display name (if the name is already stored on the server and the `display_name` field has not been overwritten by the user).\n\n- If you receive an Inbound Message callback for an MO message on the Instagram channel, the corresponding payload will not include the Instagram username. You may use the `contact_id` and `channel_identity` values included in the callback to retreive the username (detailed in the `display_name` field) with this Conversation API operation.",
        "tags": [
          "Contact"
        ],
        "summary": "Get a Contact",
        "operationId": "Contact_GetContact",
        "responses": {
          "200": {
            "$ref": "#/components/responses/getContactResponse"
          },
          "400": {
            "$ref": "#/components/responses/400Error"
          },
          "401": {
            "$ref": "#/components/responses/401Error"
          },
          "403": {
            "$ref": "#/components/responses/403Error"
          },
          "500": {
            "$ref": "#/components/responses/500Error"
          },
          "501": {
            "$ref": "#/components/responses/501Error"
          }
        },
        "x-codeSamples": [
          {
            "lang": "Java",
            "source": "/**\n * Sinch Java Snippet\n *\n * <p>This snippet is available at https://github.com/sinch/sinch-sdk-java\n *\n * <p>See https://github.com/sinch/sinch-sdk-java/blob/main/examples/snippets/README.md for details\n */\npackage conversation.contacts;\n\nimport com.sinch.sdk.SinchClient;\nimport com.sinch.sdk.domains.conversation.api.v1.ContactsService;\nimport com.sinch.sdk.domains.conversation.models.v1.contacts.Contact;\nimport com.sinch.sdk.models.Configuration;\nimport com.sinch.sdk.models.ConversationRegion;\nimport java.util.logging.Logger;\nimport utils.Settings;\n\npublic class Get {\n\n  private static final Logger LOGGER = Logger.getLogger(Get.class.getName());\n\n  public static void main(String[] args) {\n\n    String projectId = Settings.getProjectId().orElse(\"MY_PROJECT_ID\");\n    String keyId = Settings.getKeyId().orElse(\"MY_KEY_ID\");\n    String keySecret = Settings.getKeySecret().orElse(\"MY_KEY_SECRET\");\n    String conversationRegion = Settings.getConversationRegion().orElse(\"MY_CONVERSATION_REGION\");\n\n    // The ID of the contact to retrieve\n    String conversationContactId = \"CONTACT_ID\";\n\n    Configuration configuration =\n        Configuration.builder()\n            .setProjectId(projectId)\n            .setKeyId(keyId)\n            .setKeySecret(keySecret)\n            .setConversationRegion(ConversationRegion.from(conversationRegion))\n            .build();\n\n    SinchClient client = new SinchClient(configuration);\n\n    ContactsService contactService = client.conversation().v1().contacts();\n\n    LOGGER.info(String.format(\"Get details for contact with ID '%s'\", conversationContactId));\n\n    Contact result = contactService.get(conversationContactId);\n\n    LOGGER.info(\"Response: \" + result);\n  }\n}\n"
          },
          {
            "lang": "Node.js",
            "source": "/**\n * Sinch Node.js Snippet\n * See: https://github.com/sinch/sinch-sdk-node/examples/snippets\n */\nimport { SinchClient } from '@sinch/sdk-core';\nimport * as dotenv from 'dotenv';\ndotenv.config();\n\nasync function main() {\n  const projectId = process.env.SINCH_PROJECT_ID ?? 'MY_PROJECT_ID';\n  const keyId = process.env.SINCH_KEY_ID ?? 'MY_KEY_ID';\n  const keySecret = process.env.SINCH_KEY_SECRET ?? 'MY_KEY_SECRET';\n  const conversationRegion = process.env.SINCH_CONVERSATION_REGION ?? 'MY_CONVERSATION_REGION';\n\n  // The ID of the Contact to retrieve\n  const contactId = 'CONTACT_ID';\n\n  const sinch = new SinchClient({ projectId, keyId, keySecret, conversationRegion });\n\n  try {\n    const response = await sinch.conversation.contact.get({\n      contact_id: contactId,\n    });\n    console.log('✅ Successfully retrieved the Contact.');\n    console.log(JSON.stringify(response, null, 2));\n  } catch (err) {\n    console.error(`❌ Failed to retrieve the Contact with ID ${contactId}:`);\n    console.error(err);\n  }\n}\n\nmain();\n"
          }
        ]
      },
      "delete": {
        "description": "Delete a contact as specified by the contact ID.",
        "tags": [
          "Contact"
        ],
        "summary": "Delete a Contact",
        "operationId": "Contact_DeleteContact",
        "responses": {
          "200": {
            "description": "A successful response."
          },
          "400": {
            "$ref": "#/components/responses/400Error"
          },
          "401": {
            "$ref": "#/components/responses/401Error"
          },
          "403": {
            "$ref": "#/components/responses/403Error"
          },
          "500": {
            "$ref": "#/components/responses/500Error"
          },
          "501": {
            "$ref": "#/components/responses/501Error"
          }
        },
        "x-codeSamples": [
          {
            "lang": "Java",
            "source": "/**\n * Sinch Java Snippet\n *\n * <p>This snippet is available at https://github.com/sinch/sinch-sdk-java\n *\n * <p>See https://github.com/sinch/sinch-sdk-java/blob/main/examples/snippets/README.md for details\n */\npackage conversation.contacts;\n\nimport com.sinch.sdk.SinchClient;\nimport com.sinch.sdk.domains.conversation.api.v1.ContactsService;\nimport com.sinch.sdk.models.Configuration;\nimport com.sinch.sdk.models.ConversationRegion;\nimport java.util.logging.Logger;\nimport utils.Settings;\n\npublic class Delete {\n\n  private static final Logger LOGGER = Logger.getLogger(Delete.class.getName());\n\n  public static void main(String[] args) {\n\n    String projectId = Settings.getProjectId().orElse(\"MY_PROJECT_ID\");\n    String keyId = Settings.getKeyId().orElse(\"MY_KEY_ID\");\n    String keySecret = Settings.getKeySecret().orElse(\"MY_KEY_SECRET\");\n    String conversationRegion = Settings.getConversationRegion().orElse(\"MY_CONVERSATION_REGION\");\n\n    // The ID of the contact to delete\n    String conversationContactId = \"CONTACT_ID\";\n\n    Configuration configuration =\n        Configuration.builder()\n            .setProjectId(projectId)\n            .setKeyId(keyId)\n            .setKeySecret(keySecret)\n            .setConversationRegion(ConversationRegion.from(conversationRegion))\n            .build();\n\n    SinchClient client = new SinchClient(configuration);\n\n    ContactsService contactService = client.conversation().v1().contacts();\n\n    LOGGER.info(String.format(\"Delete conversation contact with ID '%s'\", conversationContactId));\n\n    contactService.delete(conversationContactId);\n\n    LOGGER.info(\"Done\");\n  }\n}\n"
          },
          {
            "lang": "Node.js",
            "source": "/**\n * Sinch Node.js Snippet\n * See: https://github.com/sinch/sinch-sdk-node/examples/snippets\n */\nimport { SinchClient } from '@sinch/sdk-core';\nimport * as dotenv from 'dotenv';\ndotenv.config();\n\nasync function main() {\n  const projectId = process.env.SINCH_PROJECT_ID ?? 'MY_PROJECT_ID';\n  const keyId = process.env.SINCH_KEY_ID ?? 'MY_KEY_ID';\n  const keySecret = process.env.SINCH_KEY_SECRET ?? 'MY_KEY_SECRET';\n  const conversationRegion = process.env.SINCH_CONVERSATION_REGION ?? 'MY_CONVERSATION_REGION';\n\n  // The ID of the Contact to delete\n  const contactId = 'CONTACT_ID';\n\n  const sinch = new SinchClient({ projectId, keyId, keySecret, conversationRegion });\n\n  try {\n    await sinch.conversation.contact.delete({\n      contact_id: contactId,\n    });\n    console.log(`✅ Successfully deleted the Contact with ID ${contactId}.`);\n  } catch (err) {\n    console.error(`❌ Failed to delete the Contact with ID ${contactId}:`);\n    console.error(err);\n  }\n}\n\nmain();\n"
          }
        ]
      },
      "patch": {
        "description": "Updates a contact as specified by the contact ID.",
        "tags": [
          "Contact"
        ],
        "summary": "Update a Contact",
        "operationId": "Contact_UpdateContact",
        "parameters": [
          {
            "$ref": "#/components/parameters/update_mask"
          }
        ],
        "requestBody": {
          "$ref": "#/components/requestBodies/UpdateContactRequest"
        },
        "responses": {
          "200": {
            "$ref": "#/components/responses/updateContactResponse"
          },
          "400": {
            "$ref": "#/components/responses/400Error"
          },
          "401": {
            "$ref": "#/components/responses/401Error"
          },
          "403": {
            "$ref": "#/components/responses/403Error"
          },
          "500": {
            "$ref": "#/components/responses/500Error"
          },
          "501": {
            "$ref": "#/components/responses/501Error"
          }
        },
        "x-codeSamples": [
          {
            "lang": "Java",
            "source": "/**\n * Sinch Java Snippet\n *\n * <p>This snippet is available at https://github.com/sinch/sinch-sdk-java\n *\n * <p>See https://github.com/sinch/sinch-sdk-java/blob/main/examples/snippets/README.md for details\n */\npackage conversation.contacts;\n\nimport com.sinch.sdk.SinchClient;\nimport com.sinch.sdk.domains.conversation.api.v1.ContactsService;\nimport com.sinch.sdk.domains.conversation.models.v1.contacts.Contact;\nimport com.sinch.sdk.models.Configuration;\nimport com.sinch.sdk.models.ConversationRegion;\nimport java.util.logging.Logger;\nimport utils.Settings;\n\npublic class Update {\n\n  private static final Logger LOGGER = Logger.getLogger(Update.class.getName());\n\n  public static void main(String[] args) {\n\n    String projectId = Settings.getProjectId().orElse(\"MY_PROJECT_ID\");\n    String keyId = Settings.getKeyId().orElse(\"MY_KEY_ID\");\n    String keySecret = Settings.getKeySecret().orElse(\"MY_KEY_SECRET\");\n    String conversationRegion = Settings.getConversationRegion().orElse(\"MY_CONVERSATION_REGION\");\n\n    // The ID of the contact to update\n    String conversationContactId = \"CONTACT_ID\";\n\n    Configuration configuration =\n        Configuration.builder()\n            .setProjectId(projectId)\n            .setKeyId(keyId)\n            .setKeySecret(keySecret)\n            .setConversationRegion(ConversationRegion.from(conversationRegion))\n            .build();\n\n    SinchClient client = new SinchClient(configuration);\n\n    ContactsService contactService = client.conversation().v1().contacts();\n\n    LOGGER.info(String.format(\"Update contact with ID '%s'\", conversationContactId));\n\n    Contact contact = Contact.builder().setDisplayName(\"updated from Java SDK snippet\").build();\n\n    Contact result = contactService.update(conversationContactId, contact);\n\n    LOGGER.info(\"Response: \" + result);\n  }\n}\n"
          },
          {
            "lang": "Node.js",
            "source": "/**\n * Sinch Node.js Snippet\n * See: https://github.com/sinch/sinch-sdk-node/examples/snippets\n */\nimport { SinchClient } from '@sinch/sdk-core';\nimport * as dotenv from 'dotenv';\ndotenv.config();\n\nasync function main() {\n  const projectId = process.env.SINCH_PROJECT_ID ?? 'MY_PROJECT_ID';\n  const keyId = process.env.SINCH_KEY_ID ?? 'MY_KEY_ID';\n  const keySecret = process.env.SINCH_KEY_SECRET ?? 'MY_KEY_SECRET';\n  const conversationRegion = process.env.SINCH_CONVERSATION_REGION ?? 'MY_CONVERSATION_REGION';\n\n  // The contact ID to update\n  const contactId = 'CONTACT_ID';\n  // The new name for the contact\n  const updatedContactName = 'Updated from Node.js SDK snippet';\n\n  const sinch = new SinchClient({ projectId, keyId, keySecret, conversationRegion });\n\n  try {\n    const response = await sinch.conversation.contact.update({\n      contact_id: contactId,\n      updateContactRequestBody: {\n        display_name: updatedContactName,\n      },\n    });\n    console.log('✅ Successfully updated the Contact.');\n    console.log(JSON.stringify(response, null, 2));\n  } catch (err) {\n    console.error(`❌ Failed to update the Contact with ID ${contactId}:`);\n    console.error(err);\n  }\n}\n\nmain();\n"
          }
        ]
      }
    },
    "/v1/projects/{project_id}/contacts/{destination_id}:merge": {
      "parameters": [
        {
          "$ref": "#/components/parameters/project_id"
        },
        {
          "$ref": "#/components/parameters/destination_id"
        }
      ],
      "post": {
        "description": "The remaining contact will contain all conversations that the removed\ncontact did. If both contacts had conversations within the same App,\nmessages from the removed contact will be merged into corresponding active\nconversations in the destination contact. Channel\nidentities will be moved from the source contact to the destination contact\nonly for channels that weren't present there before. Moved channel\nidentities will be placed at the bottom of the channel priority list.\nOptional fields from the source contact will be copied only if\ncorresponding fields in the destination contact are empty The contact being\nremoved cannot be referenced after this call.",
        "tags": [
          "Contact"
        ],
        "summary": "Merge two Contacts",
        "operationId": "Contact_MergeContact",
        "requestBody": {
          "$ref": "#/components/requestBodies/MergeContactRequest"
        },
        "responses": {
          "200": {
            "$ref": "#/components/responses/mergeContactResponse"
          },
          "400": {
            "$ref": "#/components/responses/400Error"
          },
          "401": {
            "$ref": "#/components/responses/401Error"
          },
          "403": {
            "$ref": "#/components/responses/403Error"
          },
          "500": {
            "$ref": "#/components/responses/500Error"
          },
          "501": {
            "$ref": "#/components/responses/501Error"
          }
        },
        "x-codeSamples": [
          {
            "lang": "Java",
            "source": "/**\n * Sinch Java Snippet\n *\n * <p>This snippet is available at https://github.com/sinch/sinch-sdk-java\n *\n * <p>See https://github.com/sinch/sinch-sdk-java/blob/main/examples/snippets/README.md for details\n */\npackage conversation.contacts;\n\nimport com.sinch.sdk.SinchClient;\nimport com.sinch.sdk.domains.conversation.api.v1.ContactsService;\nimport com.sinch.sdk.domains.conversation.models.v1.contacts.Contact;\nimport com.sinch.sdk.domains.conversation.models.v1.contacts.request.MergeContactRequest;\nimport com.sinch.sdk.models.Configuration;\nimport com.sinch.sdk.models.ConversationRegion;\nimport java.util.logging.Logger;\nimport utils.Settings;\n\npublic class Merge {\n\n  private static final Logger LOGGER = Logger.getLogger(Merge.class.getName());\n\n  public static void main(String[] args) {\n\n    String projectId = Settings.getProjectId().orElse(\"MY_PROJECT_ID\");\n    String keyId = Settings.getKeyId().orElse(\"MY_KEY_ID\");\n    String keySecret = Settings.getKeySecret().orElse(\"MY_KEY_SECRET\");\n    String conversationRegion = Settings.getConversationRegion().orElse(\"MY_CONVERSATION_REGION\");\n\n    //  The ID of the contact to merge from (the source contact)\n    String sourceContactId = \"SOURCE_CONTACT_ID\";\n    // The ID of the contact to merge into (the destination contact)\n    String destinationContactId = \"DESTINATION_CONTACT_ID\";\n\n    Configuration configuration =\n        Configuration.builder()\n            .setProjectId(projectId)\n            .setKeyId(keyId)\n            .setKeySecret(keySecret)\n            .setConversationRegion(ConversationRegion.from(conversationRegion))\n            .build();\n\n    SinchClient client = new SinchClient(configuration);\n\n    ContactsService contactService = client.conversation().v1().contacts();\n\n    LOGGER.info(\n        String.format(\n            \"Merge contact with ID '%s' onto contact with ID '%s'\",\n            sourceContactId, destinationContactId));\n\n    MergeContactRequest request =\n        MergeContactRequest.builder().setSourceId(sourceContactId).build();\n    Contact result = contactService.mergeContact(destinationContactId, request);\n\n    LOGGER.info(\"Response: \" + result);\n  }\n}\n"
          },
          {
            "lang": "Node.js",
            "source": "/**\n * Sinch Node.js Snippet\n * See: https://github.com/sinch/sinch-sdk-node/examples/snippets\n */\nimport { SinchClient } from '@sinch/sdk-core';\nimport * as dotenv from 'dotenv';\ndotenv.config();\n\nasync function main() {\n  const projectId = process.env.SINCH_PROJECT_ID ?? 'MY_PROJECT_ID';\n  const keyId = process.env.SINCH_KEY_ID ?? 'MY_KEY_ID';\n  const keySecret = process.env.SINCH_KEY_SECRET ?? 'MY_KEY_SECRET';\n  const conversationRegion = process.env.SINCH_CONVERSATION_REGION ?? 'MY_CONVERSATION_REGION';\n\n  // The ID of the Contact to merge into\n  const destinationContactId = 'DESTINATION_CONTACT_ID';\n  // The source Contact will be merged into the destination Contact and then deleted\n  const sourceContactId = 'SOURCE_CONTACT_ID';\n\n  const sinch = new SinchClient({ projectId, keyId, keySecret, conversationRegion });\n\n  try {\n    const response = await sinch.conversation.contact.mergeContact({\n      destination_id: destinationContactId,\n      mergeContactRequestBody: {\n        source_id: sourceContactId,\n      },\n    });\n    console.log('✅ Successfully merged the Contacts.');\n    console.log(JSON.stringify(response, null, 2));\n  } catch (err) {\n    console.error(`❌ Failed to merge the Contact with ID ${sourceContactId} into the Contact with ID ${destinationContactId}:`);\n    console.error(err);\n  }\n}\n\nmain();\n"
          }
        ]
      }
    },
    "/v1/projects/{project_id}/contacts:getChannelProfile": {
      "parameters": [
        {
          "$ref": "#/components/parameters/project_id"
        }
      ],
      "post": {
        "description": "Get user profile from a specific channel.\nOnly supported on `MESSENGER`, `INSTAGRAM`, `VIBER` and `LINE` channels. Note that, in order to retrieve a WhatsApp display name, you can use the Get a Contact or List Contacts operations, which will populate the `display_name` field of each returned contact with the WhatsApp display name (if the name is already stored on the server and the `display_name` field has not been overwritten by the user).",
        "tags": [
          "Contact"
        ],
        "summary": "Get Channel Profile",
        "operationId": "Contact_GetChannelProfile",
        "requestBody": {
          "$ref": "#/components/requestBodies/GetChannelProfileRequest"
        },
        "responses": {
          "200": {
            "$ref": "#/components/responses/getChannelProfileResponse"
          },
          "400": {
            "$ref": "#/components/responses/400Error"
          },
          "401": {
            "$ref": "#/components/responses/401Error"
          },
          "403": {
            "$ref": "#/components/responses/403Error"
          },
          "500": {
            "$ref": "#/components/responses/500Error"
          },
          "501": {
            "$ref": "#/components/responses/501Error"
          }
        },
        "x-codeSamples": [
          {
            "lang": "Java",
            "source": "/**\n * Sinch Java Snippet\n *\n * <p>This snippet is available at https://github.com/sinch/sinch-sdk-java\n *\n * <p>See https://github.com/sinch/sinch-sdk-java/blob/main/examples/snippets/README.md for details\n */\npackage conversation.contacts;\n\nimport com.sinch.sdk.SinchClient;\nimport com.sinch.sdk.domains.conversation.api.v1.ContactsService;\nimport com.sinch.sdk.domains.conversation.models.v1.contacts.request.ContactGetChannelProfileByContactIdRequest;\nimport com.sinch.sdk.domains.conversation.models.v1.contacts.request.GetChannelProfileConversationChannel;\nimport com.sinch.sdk.domains.conversation.models.v1.contacts.response.GetChannelProfileResponse;\nimport com.sinch.sdk.models.Configuration;\nimport com.sinch.sdk.models.ConversationRegion;\nimport java.util.logging.Logger;\nimport utils.Settings;\n\npublic class GetChannelProfile {\n\n  private static final Logger LOGGER = Logger.getLogger(GetChannelProfile.class.getName());\n\n  public static void main(String[] args) {\n\n    String projectId = Settings.getProjectId().orElse(\"MY_PROJECT_ID\");\n    String keyId = Settings.getKeyId().orElse(\"MY_KEY_ID\");\n    String keySecret = Settings.getKeySecret().orElse(\"MY_KEY_SECRET\");\n    String conversationRegion = Settings.getConversationRegion().orElse(\"MY_CONVERSATION_REGION\");\n\n    // The ID of the Conversation application the contact belongs to\n    String conversationApplicationId = \"APPLICATION_ID\";\n    // The ID of the contact to retrieve the channel profile for\n    String conversationContactId = \"CONTACT_ID\";\n    // The channel associated with the contact\n    GetChannelProfileConversationChannel conversationChannel =\n        GetChannelProfileConversationChannel.MESSENGER;\n\n    Configuration configuration =\n        Configuration.builder()\n            .setProjectId(projectId)\n            .setKeyId(keyId)\n            .setKeySecret(keySecret)\n            .setConversationRegion(ConversationRegion.from(conversationRegion))\n            .build();\n\n    SinchClient client = new SinchClient(configuration);\n\n    ContactsService contactService = client.conversation().v1().contacts();\n\n    ContactGetChannelProfileByContactIdRequest parametersByContactId =\n        ContactGetChannelProfileByContactIdRequest.builder()\n            .setAppId(conversationApplicationId)\n            .setChannel(conversationChannel)\n            .setContactId(conversationContactId)\n            .build();\n\n    LOGGER.info(\n        String.format(\n            \"Get MESSENGER channel profile for contact with ID '%s'\", conversationContactId));\n\n    GetChannelProfileResponse result =\n        contactService.getChannelProfileByContactId(parametersByContactId);\n\n    LOGGER.info(\"Response: \" + result);\n  }\n}\n"
          },
          {
            "lang": "Node.js",
            "source": "/**\n * Sinch Node.js Snippet\n * See: https://github.com/sinch/sinch-sdk-node/examples/snippets\n */\nimport { SinchClient } from '@sinch/sdk-core';\nimport * as dotenv from 'dotenv';\ndotenv.config();\n\nasync function main() {\n  const projectId = process.env.SINCH_PROJECT_ID ?? 'MY_PROJECT_ID';\n  const keyId = process.env.SINCH_KEY_ID ?? 'MY_KEY_ID';\n  const keySecret = process.env.SINCH_KEY_SECRET ?? 'MY_KEY_SECRET';\n  const conversationRegion = process.env.SINCH_CONVERSATION_REGION ?? 'MY_CONVERSATION_REGION';\n\n  // The ID of the Conversation App where the channel is configured\n  const appId = 'CONVERSATION_APP_ID';\n  // The ID of the contact to fetch the channel profile for\n  const contactId = 'CONTACT_ID';\n  // Supported channels: 'MESSENGER', 'INSTAGRAM', 'LINE'\n  const channel = 'MESSENGER';\n\n  const sinch = new SinchClient({ projectId, keyId, keySecret, conversationRegion });\n\n  try {\n    const response = await sinch.conversation.contact.getChannelProfile({\n      getChannelProfileRequestBody: {\n        app_id: appId,\n        channel,\n        recipient: {\n          contact_id: contactId,\n        },\n      },\n    });\n    console.log('✅ Successfully retrieved the channel profile for the Contact.');\n    console.log(JSON.stringify(response, null, 2));\n  } catch (err) {\n    console.error(`❌ Failed to retrieve the channel profile (on ${channel}) for the Contact with ID ${contactId}:`);\n    console.error(err);\n  }\n}\n\nmain();\n"
          }
        ]
      }
    },
    "/v1/projects/{project_id}/contacts:identityConflicts": {
      "parameters": [
        {
          "$ref": "#/components/parameters/project_id"
        }
      ],
      "get": {
        "description": "Lists contact identity conflicts across supported SIM-based channels (SMS, MMS, RCS).\nUse this to identify contact records sharing the same identity (e.g., phone number), which must be resolved before enabling the Unified Contact ID feature.",
        "tags": [
          "Contact"
        ],
        "summary": "Lists Contact Identity Conflicts",
        "operationId": "Contact_ListIdentityConflicts",
        "parameters": [
          {
            "description": "Maximum number of conflicts to return (max 20).",
            "name": "page_size",
            "in": "query",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "description": "Pagination token for retrieving next page.",
            "name": "page_token",
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "A successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "conflicts": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "identity": {
                            "type": "string",
                            "description": "The identity value (e.g., phone number) that is duplicated across contacts."
                          },
                          "channels": {
                            "type": "array",
                            "items": {
                              "type": "string"
                            },
                            "description": "List of channels where this identity is present."
                          },
                          "contact_ids": {
                            "type": "array",
                            "items": {
                              "type": "string"
                            },
                            "description": "List of contact IDs that share this identity."
                          }
                        }
                      }
                    },
                    "next_page_token": {
                      "type": "string",
                      "description": "Token for retrieving the next page of results."
                    }
                  }
                },
                "examples": {
                  "conflictExample": {
                    "summary": "Example response with channels",
                    "value": {
                      "conflicts": [
                        {
                          "identity": "{PHONE_NUMBER}",
                          "channels": [
                            "MMS",
                            "RCS",
                            "SMS"
                          ],
                          "contact_ids": [
                            "01JYGNEVNG48XM1RFZKD0B2S7K",
                            "01JZMH3ZZYP6V84EJ5FSHFH3P8"
                          ]
                        }
                      ],
                      "next_page_token": ""
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/400Error"
          },
          "401": {
            "$ref": "#/components/responses/401Error"
          },
          "403": {
            "$ref": "#/components/responses/403Error"
          },
          "500": {
            "$ref": "#/components/responses/500Error"
          },
          "501": {
            "$ref": "#/components/responses/501Error"
          }
        },
        "x-codeSamples": [
          {
            "lang": "Java",
            "source": "/**\n * Sinch Java Snippet\n *\n * <p>This snippet is available at https://github.com/sinch/sinch-sdk-java\n *\n * <p>See https://github.com/sinch/sinch-sdk-java/blob/main/examples/snippets/README.md for details\n */\npackage conversation.contacts;\n\nimport com.sinch.sdk.SinchClient;\nimport com.sinch.sdk.domains.conversation.api.v1.ContactsService;\nimport com.sinch.sdk.domains.conversation.models.v1.contacts.response.IdentityConflictsListResponse;\nimport com.sinch.sdk.models.Configuration;\nimport com.sinch.sdk.models.ConversationRegion;\nimport java.util.logging.Logger;\nimport utils.Settings;\n\npublic class ListIdentityConflicts {\n\n  private static final Logger LOGGER = Logger.getLogger(ListIdentityConflicts.class.getName());\n\n  public static void main(String[] args) {\n\n    String projectId = Settings.getProjectId().orElse(\"MY_PROJECT_ID\");\n    String keyId = Settings.getKeyId().orElse(\"MY_KEY_ID\");\n    String keySecret = Settings.getKeySecret().orElse(\"MY_KEY_SECRET\");\n    String conversationRegion = Settings.getConversationRegion().orElse(\"MY_CONVERSATION_REGION\");\n\n    Configuration configuration =\n        Configuration.builder()\n            .setProjectId(projectId)\n            .setKeyId(keyId)\n            .setKeySecret(keySecret)\n            .setConversationRegion(ConversationRegion.from(conversationRegion))\n            .build();\n\n    SinchClient client = new SinchClient(configuration);\n\n    ContactsService contactService = client.conversation().v1().contacts();\n\n    LOGGER.info(\"List identity conflicts\");\n\n    IdentityConflictsListResponse response = contactService.listIdentityConflicts();\n\n    LOGGER.info(\"Response: \");\n\n    response.iterator().forEachRemaining(f -> LOGGER.info(f.toString()));\n  }\n}\n"
          },
          {
            "lang": "Node.js",
            "source": "/**\n * Sinch Node.js Snippet\n * See: https://github.com/sinch/sinch-sdk-node/examples/snippets\n */\nimport { SinchClient } from '@sinch/sdk-core';\nimport * as dotenv from 'dotenv';\ndotenv.config();\n\nasync function main() {\n  const projectId = process.env.SINCH_PROJECT_ID ?? 'MY_PROJECT_ID';\n  const keyId = process.env.SINCH_KEY_ID ?? 'MY_KEY_ID';\n  const keySecret = process.env.SINCH_KEY_SECRET ?? 'MY_KEY_SECRET';\n  const conversationRegion = process.env.SINCH_CONVERSATION_REGION ?? 'MY_CONVERSATION_REGION';\n\n  const sinch = new SinchClient({ projectId, keyId, keySecret, conversationRegion });\n\n  try {\n    const response = await sinch.conversation.contact.listIdentityConflicts({});\n    if (response.data.length === 0) {\n      console.log('No Identity Conflicts found.');\n      return;\n    }\n    console.log(`✅ Found ${response.data.length} Identity Conflicts.`);\n    response.data.forEach((identityConflict) => {\n      console.log(identityConflict);\n    });\n  } catch (err) {\n    console.error('❌ Failed to list the Identity Conflicts:');\n    console.error(err);\n  }\n}\n\nmain();\n"
          }
        ]
      }
    },
    "/v1/projects/{project_id}/conversations": {
      "parameters": [
        {
          "$ref": "#/components/parameters/project_id"
        }
      ],
      "get": {
        "description": "This operation lists all conversations that are associated with an app and/or a contact.  Note that either `app_id` or `contact_id` is required in order for the operation to function correctly.",
        "tags": [
          "Conversation"
        ],
        "summary": "List conversations",
        "operationId": "Conversation_ListConversations",
        "parameters": [
          {
            "$ref": "#/components/parameters/query_app_id"
          },
          {
            "$ref": "#/components/parameters/query_contact_id"
          },
          {
            "description": "Set to `true` to list only active conversations. Set to `false` to list only inactive conversations.",
            "name": "only_active",
            "in": "query",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "description": "The maximum number of conversations to fetch. Defaults to 10 and the maximum is 20.",
            "name": "page_size",
            "in": "query",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "description": "Next page token previously returned if any.",
            "name": "page_token",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Only fetch conversations from the `active_channel`",
            "name": "active_channel",
            "in": "query",
            "schema": {
              "$ref": "#/components/schemas/ConversationChannel"
            }
          }
        ],
        "responses": {
          "200": {
            "$ref": "#/components/responses/listConversationsResponse"
          },
          "400": {
            "$ref": "#/components/responses/400Error"
          },
          "401": {
            "$ref": "#/components/responses/401Error"
          },
          "403": {
            "$ref": "#/components/responses/403Error"
          },
          "500": {
            "$ref": "#/components/responses/500Error"
          },
          "501": {
            "$ref": "#/components/responses/501Error"
          }
        },
        "x-codeSamples": [
          {
            "lang": "Java",
            "source": "/**\n * Sinch Java Snippet\n *\n * <p>This snippet is available at https://github.com/sinch/sinch-sdk-java\n *\n * <p>See https://github.com/sinch/sinch-sdk-java/blob/main/examples/snippets/README.md for details\n */\npackage conversation.conversations;\n\nimport com.sinch.sdk.SinchClient;\nimport com.sinch.sdk.domains.conversation.api.v1.ConversationsService;\nimport com.sinch.sdk.domains.conversation.models.v1.conversations.request.ConversationsListQueryParameters;\nimport com.sinch.sdk.domains.conversation.models.v1.conversations.response.ConversationsListResponse;\nimport com.sinch.sdk.models.Configuration;\nimport com.sinch.sdk.models.ConversationRegion;\nimport java.util.logging.Logger;\nimport utils.Settings;\n\npublic class List {\n\n  private static final Logger LOGGER = Logger.getLogger(List.class.getName());\n\n  public static void main(String[] args) {\n\n    String projectId = Settings.getProjectId().orElse(\"MY_PROJECT_ID\");\n    String keyId = Settings.getKeyId().orElse(\"MY_KEY_ID\");\n    String keySecret = Settings.getKeySecret().orElse(\"MY_KEY_SECRET\");\n    String conversationRegion = Settings.getConversationRegion().orElse(\"MY_CONVERSATION_REGION\");\n\n    // The ID of the application to list conversations for\n    String conversationApplicationId = \"APPLICATION_ID\";\n\n    Configuration configuration =\n        Configuration.builder()\n            .setProjectId(projectId)\n            .setKeyId(keyId)\n            .setKeySecret(keySecret)\n            .setConversationRegion(ConversationRegion.from(conversationRegion))\n            .build();\n\n    SinchClient client = new SinchClient(configuration);\n\n    ConversationsService conversationsService = client.conversation().v1().conversations();\n\n    LOGGER.info(\n        String.format(\n            \"List conversations for application with ID '%s'\", conversationApplicationId));\n\n    ConversationsListQueryParameters request =\n        ConversationsListQueryParameters.builder().setAppId(conversationApplicationId).build();\n\n    ConversationsListResponse response = conversationsService.list(request);\n\n    LOGGER.info(\"Response:\");\n\n    response.iterator().forEachRemaining(f -> LOGGER.info(f.toString()));\n  }\n}\n"
          },
          {
            "lang": "Node.js",
            "source": "/**\n * Sinch Node.js Snippet\n * See: https://github.com/sinch/sinch-sdk-node/examples/snippets\n */\nimport { SinchClient } from '@sinch/sdk-core';\nimport * as dotenv from 'dotenv';\ndotenv.config();\n\nasync function main() {\n  const projectId = process.env.SINCH_PROJECT_ID ?? 'MY_PROJECT_ID';\n  const keyId = process.env.SINCH_KEY_ID ?? 'MY_KEY_ID';\n  const keySecret = process.env.SINCH_KEY_SECRET ?? 'MY_KEY_SECRET';\n  const conversationRegion = process.env.SINCH_CONVERSATION_REGION ?? 'MY_CONVERSATION_REGION';\n\n  // The ID of the Conversation App to list Conversations from\n  const appId = 'CONVERSATION_APP_ID';\n\n  const sinch = new SinchClient({ projectId, keyId, keySecret, conversationRegion });\n\n  try {\n    const response = await sinch.conversation.conversation.list({\n      app_id: appId,\n    });\n    if (response.data.length === 0) {\n      console.log('No Conversations found.');\n      return;\n    }\n    console.log(`✅ Found ${response.data.length} Conversations.`);\n    response.data.forEach((conversation) => {\n      console.log(conversation);\n    });\n  } catch (err) {\n    console.error('❌ Failed to list the Conversations:');\n    console.error(err);\n  }\n}\n\nmain();\n"
          }
        ]
      },
      "post": {
        "description": "Creates a new empty conversation. In Conversation mode, it is generally not needed to create\na conversation explicitly since sending or receiving a message\nautomatically creates a new conversation if it does not already\nexist between the given app and contact.\nCreating empty conversation is useful if the metadata of the conversation\nshould be populated when the first message in the conversation is a contact message\nor the first message in the conversation comes out-of-band and\nneeds to be injected with InjectMessage endpoint.",
        "tags": [
          "Conversation"
        ],
        "summary": "Create a conversation",
        "operationId": "Conversation_CreateConversation",
        "requestBody": {
          "$ref": "#/components/requestBodies/CreateConversationRequest"
        },
        "responses": {
          "200": {
            "$ref": "#/components/responses/createConversationResponse"
          },
          "400": {
            "$ref": "#/components/responses/400Error"
          },
          "401": {
            "$ref": "#/components/responses/401Error"
          },
          "403": {
            "$ref": "#/components/responses/403Error"
          },
          "500": {
            "$ref": "#/components/responses/500Error"
          },
          "501": {
            "$ref": "#/components/responses/501Error"
          }
        },
        "x-codeSamples": [
          {
            "lang": "Java",
            "source": "/**\n * Sinch Java Snippet\n *\n * <p>This snippet is available at https://github.com/sinch/sinch-sdk-java\n *\n * <p>See https://github.com/sinch/sinch-sdk-java/blob/main/examples/snippets/README.md for details\n */\npackage conversation.conversations;\n\nimport com.sinch.sdk.SinchClient;\nimport com.sinch.sdk.domains.conversation.api.v1.ConversationsService;\nimport com.sinch.sdk.domains.conversation.models.v1.conversations.Conversation;\nimport com.sinch.sdk.domains.conversation.models.v1.conversations.request.CreateConversationRequest;\nimport com.sinch.sdk.models.Configuration;\nimport com.sinch.sdk.models.ConversationRegion;\nimport java.util.logging.Logger;\nimport utils.Settings;\n\npublic class Create {\n\n  private static final Logger LOGGER = Logger.getLogger(Create.class.getName());\n\n  public static void main(String[] args) {\n\n    String projectId = Settings.getProjectId().orElse(\"MY_PROJECT_ID\");\n    String keyId = Settings.getKeyId().orElse(\"MY_KEY_ID\");\n    String keySecret = Settings.getKeySecret().orElse(\"MY_KEY_SECRET\");\n    String conversationRegion = Settings.getConversationRegion().orElse(\"MY_CONVERSATION_REGION\");\n\n    // The ID of the application to create the conversation in\n    String conversationApplicationId = \"APPLICATION_ID\";\n    // The ID of the contact to create the conversation with\n    String conversationContactId = \"CONTACT_ID\";\n\n    Configuration configuration =\n        Configuration.builder()\n            .setProjectId(projectId)\n            .setKeyId(keyId)\n            .setKeySecret(keySecret)\n            .setConversationRegion(ConversationRegion.from(conversationRegion))\n            .build();\n\n    SinchClient client = new SinchClient(configuration);\n\n    ConversationsService conversationsService = client.conversation().v1().conversations();\n\n    CreateConversationRequest request =\n        CreateConversationRequest.builder()\n            .setAppId(conversationApplicationId)\n            .setContactId(conversationContactId)\n            .build();\n\n    LOGGER.info(\n        String.format(\n            \"Create conversation for applicatoin with ID '%s'\", conversationApplicationId));\n\n    Conversation response = conversationsService.create(request);\n\n    LOGGER.info(\"Response: \" + response);\n  }\n}\n"
          },
          {
            "lang": "Node.js",
            "source": "/**\n * Sinch Node.js Snippet\n * See: https://github.com/sinch/sinch-sdk-node/examples/snippets\n */\nimport { SinchClient } from '@sinch/sdk-core';\nimport * as dotenv from 'dotenv';\ndotenv.config();\n\nasync function main() {\n  const projectId = process.env.SINCH_PROJECT_ID ?? 'MY_PROJECT_ID';\n  const keyId = process.env.SINCH_KEY_ID ?? 'MY_KEY_ID';\n  const keySecret = process.env.SINCH_KEY_SECRET ?? 'MY_KEY_SECRET';\n  const conversationRegion = process.env.SINCH_CONVERSATION_REGION ?? 'MY_CONVERSATION_REGION';\n\n  // The ID of the Conversation App to create the Conversation in\n  const appId = 'CONVERSATION_APP_ID';\n  // The ID of the Contact to create the Conversation with\n  const contactId = 'CONTACT_ID';\n\n  const sinch = new SinchClient({ projectId, keyId, keySecret, conversationRegion });\n\n  try {\n    const response = await sinch.conversation.conversation.create({\n      createConversationRequestBody: {\n        app_id: appId,\n        contact_id: contactId,\n      },\n    });\n    console.log('✅ Successfully created the Conversation.');\n    console.log(JSON.stringify(response, null, 2));\n  } catch (err) {\n    console.error(`❌ Failed to create the Conversation in the App ${appId} with Contact ${contactId}:`);\n    console.error(err);\n  }\n}\n\nmain();\n"
          }
        ]
      }
    },
    "/v1/projects/{project_id}/conversations/{conversation_id}": {
      "parameters": [
        {
          "$ref": "#/components/parameters/project_id"
        },
        {
          "$ref": "#/components/parameters/conversation_id"
        }
      ],
      "get": {
        "description": "Retrieves a conversation by id. A conversation has two participating\nentities, an app and a contact.",
        "tags": [
          "Conversation"
        ],
        "summary": "Get a conversation",
        "operationId": "Conversation_GetConversation",
        "responses": {
          "200": {
            "$ref": "#/components/responses/getConversationResponse"
          },
          "400": {
            "$ref": "#/components/responses/400Error"
          },
          "401": {
            "$ref": "#/components/responses/401Error"
          },
          "403": {
            "$ref": "#/components/responses/403Error"
          },
          "500": {
            "$ref": "#/components/responses/500Error"
          },
          "501": {
            "$ref": "#/components/responses/501Error"
          }
        },
        "x-codeSamples": [
          {
            "lang": "Java",
            "source": "/**\n * Sinch Java Snippet\n *\n * <p>This snippet is available at https://github.com/sinch/sinch-sdk-java\n *\n * <p>See https://github.com/sinch/sinch-sdk-java/blob/main/examples/snippets/README.md for details\n */\npackage conversation.conversations;\n\nimport com.sinch.sdk.SinchClient;\nimport com.sinch.sdk.domains.conversation.api.v1.ConversationsService;\nimport com.sinch.sdk.domains.conversation.models.v1.conversations.Conversation;\nimport com.sinch.sdk.models.Configuration;\nimport com.sinch.sdk.models.ConversationRegion;\nimport java.util.logging.Logger;\nimport utils.Settings;\n\npublic class Get {\n\n  private static final Logger LOGGER = Logger.getLogger(Get.class.getName());\n\n  public static void main(String[] args) {\n\n    String projectId = Settings.getProjectId().orElse(\"MY_PROJECT_ID\");\n    String keyId = Settings.getKeyId().orElse(\"MY_KEY_ID\");\n    String keySecret = Settings.getKeySecret().orElse(\"MY_KEY_SECRET\");\n    String conversationRegion = Settings.getConversationRegion().orElse(\"MY_CONVERSATION_REGION\");\n\n    // The ID of the conversation to retrieve\n    String conversationId = \"CONVERSATION_ID\";\n\n    Configuration configuration =\n        Configuration.builder()\n            .setProjectId(projectId)\n            .setKeyId(keyId)\n            .setKeySecret(keySecret)\n            .setConversationRegion(ConversationRegion.from(conversationRegion))\n            .build();\n\n    SinchClient client = new SinchClient(configuration);\n\n    ConversationsService conversationsService = client.conversation().v1().conversations();\n\n    LOGGER.info(String.format(\"Get information for conversation with ID '%s'\", conversationId));\n\n    Conversation response = conversationsService.get(conversationId);\n\n    LOGGER.info(\"Response: \" + response);\n  }\n}\n"
          },
          {
            "lang": "Node.js",
            "source": "/**\n * Sinch Node.js Snippet\n * See: https://github.com/sinch/sinch-sdk-node/examples/snippets\n */\nimport { SinchClient } from '@sinch/sdk-core';\nimport * as dotenv from 'dotenv';\ndotenv.config();\n\nasync function main() {\n  const projectId = process.env.SINCH_PROJECT_ID ?? 'MY_PROJECT_ID';\n  const keyId = process.env.SINCH_KEY_ID ?? 'MY_KEY_ID';\n  const keySecret = process.env.SINCH_KEY_SECRET ?? 'MY_KEY_SECRET';\n  const conversationRegion = process.env.SINCH_CONVERSATION_REGION ?? 'MY_CONVERSATION_REGION';\n\n  // The ID of the Conversation to retrieve\n  const conversationId = 'CONVERSATION_ID';\n\n  const sinch = new SinchClient({ projectId, keyId, keySecret, conversationRegion });\n\n  try {\n    const response = await sinch.conversation.conversation.get({\n      conversation_id: conversationId,\n    });\n    console.log('✅ Successfully retrieved the Conversation.');\n    console.log(JSON.stringify(response, null, 2));\n  } catch (err) {\n    console.error(`❌ Failed to retrieve the Conversation with ID ${conversationId}:`);\n    console.error(err);\n  }\n}\n\nmain();\n"
          }
        ]
      },
      "delete": {
        "description": "Deletes a conversation together with all the messages sent as part of the conversation.",
        "tags": [
          "Conversation"
        ],
        "summary": "Delete a conversation",
        "operationId": "Conversation_DeleteConversation",
        "responses": {
          "200": {
            "description": "A successful response."
          },
          "400": {
            "$ref": "#/components/responses/400Error"
          },
          "401": {
            "$ref": "#/components/responses/401Error"
          },
          "403": {
            "$ref": "#/components/responses/403Error"
          },
          "500": {
            "$ref": "#/components/responses/500Error"
          },
          "501": {
            "$ref": "#/components/responses/501Error"
          }
        },
        "x-codeSamples": [
          {
            "lang": "Java",
            "source": "/**\n * Sinch Java Snippet\n *\n * <p>This snippet is available at https://github.com/sinch/sinch-sdk-java\n *\n * <p>See https://github.com/sinch/sinch-sdk-java/blob/main/examples/snippets/README.md for details\n */\npackage conversation.conversations;\n\nimport com.sinch.sdk.SinchClient;\nimport com.sinch.sdk.domains.conversation.api.v1.ConversationsService;\nimport com.sinch.sdk.models.Configuration;\nimport com.sinch.sdk.models.ConversationRegion;\nimport java.util.logging.Logger;\nimport utils.Settings;\n\npublic class Delete {\n\n  private static final Logger LOGGER = Logger.getLogger(Delete.class.getName());\n\n  public static void main(String[] args) {\n\n    String projectId = Settings.getProjectId().orElse(\"MY_PROJECT_ID\");\n    String keyId = Settings.getKeyId().orElse(\"MY_KEY_ID\");\n    String keySecret = Settings.getKeySecret().orElse(\"MY_KEY_SECRET\");\n    String conversationRegion = Settings.getConversationRegion().orElse(\"MY_CONVERSATION_REGION\");\n\n    // The ID of the conversation to delete\n    String conversationId = \"CONVERSATION_ID\";\n\n    Configuration configuration =\n        Configuration.builder()\n            .setProjectId(projectId)\n            .setKeyId(keyId)\n            .setKeySecret(keySecret)\n            .setConversationRegion(ConversationRegion.from(conversationRegion))\n            .build();\n\n    SinchClient client = new SinchClient(configuration);\n\n    ConversationsService conversationsService = client.conversation().v1().conversations();\n\n    LOGGER.info(String.format(\"Delete conversation with ID '%s'\", conversationId));\n\n    conversationsService.delete(conversationId);\n\n    LOGGER.info(\"Done\");\n  }\n}\n"
          },
          {
            "lang": "Node.js",
            "source": "/**\n * Sinch Node.js Snippet\n * See: https://github.com/sinch/sinch-sdk-node/examples/snippets\n */\nimport { SinchClient } from '@sinch/sdk-core';\nimport * as dotenv from 'dotenv';\ndotenv.config();\n\nasync function main() {\n  const projectId = process.env.SINCH_PROJECT_ID ?? 'MY_PROJECT_ID';\n  const keyId = process.env.SINCH_KEY_ID ?? 'MY_KEY_ID';\n  const keySecret = process.env.SINCH_KEY_SECRET ?? 'MY_KEY_SECRET';\n  const conversationRegion = process.env.SINCH_CONVERSATION_REGION ?? 'MY_CONVERSATION_REGION';\n\n  // The ID of the Conversation to delete\n  const conversationId = 'CONVERSATION_ID';\n\n  const sinch = new SinchClient({ projectId, keyId, keySecret, conversationRegion });\n\n  try {\n    await sinch.conversation.conversation.delete({\n      conversation_id: conversationId,\n    });\n    console.log(`✅ Successfully deleted the Conversation with ID ${conversationId}.`);\n  } catch (err) {\n    console.error(`❌ Failed to delete the Conversation with ID ${conversationId}:`);\n    console.error(err);\n  }\n}\n\nmain();\n"
          }
        ]
      },
      "patch": {
        "description": "This operation updates a conversation which can, for instance, be used to\nupdate the metadata associated with a conversation.",
        "tags": [
          "Conversation"
        ],
        "summary": "Update a conversation",
        "operationId": "Conversation_UpdateConversation",
        "parameters": [
          {
            "$ref": "#/components/parameters/update_mask"
          },
          {
            "description": "Update strategy for the `conversation_metadata` field.",
            "name": "metadata_update_strategy",
            "in": "query",
            "schema": {
              "$ref": "#/components/schemas/MetadataUpdateStrategy"
            },
            "required": false
          }
        ],
        "requestBody": {
          "$ref": "#/components/requestBodies/UpdateConversationRequest"
        },
        "responses": {
          "200": {
            "$ref": "#/components/responses/getConversationResponse"
          },
          "400": {
            "$ref": "#/components/responses/400Error"
          },
          "401": {
            "$ref": "#/components/responses/401Error"
          },
          "403": {
            "$ref": "#/components/responses/403Error"
          },
          "500": {
            "$ref": "#/components/responses/500Error"
          },
          "501": {
            "$ref": "#/components/responses/501Error"
          }
        },
        "x-codeSamples": [
          {
            "lang": "Java",
            "source": "/**\n * Sinch Java Snippet\n *\n * <p>This snippet is available at https://github.com/sinch/sinch-sdk-java\n *\n * <p>See https://github.com/sinch/sinch-sdk-java/blob/main/examples/snippets/README.md for details\n */\npackage conversation.conversations;\n\nimport com.sinch.sdk.SinchClient;\nimport com.sinch.sdk.domains.conversation.api.v1.ConversationsService;\nimport com.sinch.sdk.domains.conversation.models.v1.conversations.Conversation;\nimport com.sinch.sdk.domains.conversation.models.v1.conversations.request.ConversationsUpdateQueryParameters;\nimport com.sinch.sdk.domains.conversation.models.v1.request.MetadataUpdateStrategy;\nimport com.sinch.sdk.models.Configuration;\nimport com.sinch.sdk.models.ConversationRegion;\nimport java.util.logging.Logger;\nimport utils.Settings;\n\npublic class Update {\n\n  private static final Logger LOGGER = Logger.getLogger(Update.class.getName());\n\n  public static void main(String[] args) {\n\n    String projectId = Settings.getProjectId().orElse(\"MY_PROJECT_ID\");\n    String keyId = Settings.getKeyId().orElse(\"MY_KEY_ID\");\n    String keySecret = Settings.getKeySecret().orElse(\"MY_KEY_SECRET\");\n    String conversationRegion = Settings.getConversationRegion().orElse(\"MY_CONVERSATION_REGION\");\n\n    // The ID of the conversation to update\n    String conversationId = \"CONVERSATION_ID\";\n\n    Configuration configuration =\n        Configuration.builder()\n            .setProjectId(projectId)\n            .setKeyId(keyId)\n            .setKeySecret(keySecret)\n            .setConversationRegion(ConversationRegion.from(conversationRegion))\n            .build();\n\n    SinchClient client = new SinchClient(configuration);\n\n    ConversationsService conversationsService = client.conversation().v1().conversations();\n\n    ConversationsUpdateQueryParameters request =\n        ConversationsUpdateQueryParameters.builder()\n            .setMetadataUpdateStrategy(MetadataUpdateStrategy.REPLACE)\n            .build();\n\n    Conversation conversation = Conversation.builder().setActive(true).build();\n\n    LOGGER.info(String.format(\"Update conversation with ID '%s'\", conversationId));\n\n    Conversation result = conversationsService.update(conversationId, request, conversation);\n\n    LOGGER.info(\"Response: \" + result);\n  }\n}\n"
          },
          {
            "lang": "Node.js",
            "source": "/**\n * Sinch Node.js Snippet\n * See: https://github.com/sinch/sinch-sdk-node/examples/snippets\n */\nimport { SinchClient } from '@sinch/sdk-core';\nimport * as dotenv from 'dotenv';\ndotenv.config();\n\nasync function main() {\n  const projectId = process.env.SINCH_PROJECT_ID ?? 'MY_PROJECT_ID';\n  const keyId = process.env.SINCH_KEY_ID ?? 'MY_KEY_ID';\n  const keySecret = process.env.SINCH_KEY_SECRET ?? 'MY_KEY_SECRET';\n  const conversationRegion = process.env.SINCH_CONVERSATION_REGION ?? 'MY_CONVERSATION_REGION';\n\n  // The ID of the Conversation to update\n  const conversationId = 'CONVERSATION_ID';\n\n  const sinch = new SinchClient({ projectId, keyId, keySecret, conversationRegion });\n\n  try {\n    const response = await sinch.conversation.conversation.update({\n      conversation_id: conversationId,\n      updateConversationRequestBody: {\n        active: true,\n      },\n    });\n    console.log('✅ Successfully updated the Conversation.');\n    console.log(JSON.stringify(response, null, 2));\n  } catch (err) {\n    console.error(`❌ Failed to update the Conversation with ID ${conversationId}:`);\n    console.error(err);\n  }\n}\n\nmain();\n"
          }
        ]
      }
    },
    "/v1/projects/{project_id}/conversations:recent": {
      "get": {
        "description": "This operation lists conversations and their most recent message, ordered by when the most\nrecent message was sent for that conversation.",
        "tags": [
          "Conversation"
        ],
        "summary": "List recent conversations",
        "operationId": "Conversation_ListRecentConversations",
        "parameters": [
          {
            "$ref": "#/components/parameters/project_id"
          },
          {
            "name": "app_id",
            "description": "The application ID",
            "required": true,
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "only_active",
            "description": "True if only active conversations should be listed. Default is false.",
            "in": "query",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "page_size",
            "description": "The maximum number of conversations to fetch.\nDefaults to 10 and the maximum value is 50.",
            "in": "query",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "page_token",
            "description": "Next page token previously returned if any. When specifying this token, make sure to use the same values\nfor the other parameters from the request that originated the token, otherwise the paged results may be inconsistent.",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "order",
            "in": "query",
            "description": "Whether to sort conversations by newest message first or oldest. Default is DESC (newest first)",
            "required": false,
            "schema": {
              "type": "string",
              "x-enumDescriptions": {
                "DESC": "Descending order. Newest first.",
                "ASC": "Ascending order. Oldest first."
              },
              "enum": [
                "ASC",
                "DESC"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "$ref": "#/components/responses/listRecentConversationResponse"
          },
          "400": {
            "$ref": "#/components/responses/400Error"
          },
          "401": {
            "$ref": "#/components/responses/401Error"
          },
          "403": {
            "$ref": "#/components/responses/403Error"
          },
          "500": {
            "$ref": "#/components/responses/500Error"
          },
          "501": {
            "$ref": "#/components/responses/501Error"
          }
        },
        "x-codeSamples": [
          {
            "lang": "Java",
            "source": "/**\n * Sinch Java Snippet\n *\n * <p>This snippet is available at https://github.com/sinch/sinch-sdk-java\n *\n * <p>See https://github.com/sinch/sinch-sdk-java/blob/main/examples/snippets/README.md for details\n */\npackage conversation.conversations;\n\nimport com.sinch.sdk.SinchClient;\nimport com.sinch.sdk.domains.conversation.api.v1.ConversationsService;\nimport com.sinch.sdk.domains.conversation.models.v1.conversations.request.RecentConversationsListQueryParameters;\nimport com.sinch.sdk.domains.conversation.models.v1.conversations.response.RecentConversationsListResponse;\nimport com.sinch.sdk.models.Configuration;\nimport com.sinch.sdk.models.ConversationRegion;\nimport java.util.logging.Logger;\nimport utils.Settings;\n\npublic class ListRecent {\n\n  private static final Logger LOGGER = Logger.getLogger(ListRecent.class.getName());\n\n  public static void main(String[] args) {\n\n    String projectId = Settings.getProjectId().orElse(\"MY_PROJECT_ID\");\n    String keyId = Settings.getKeyId().orElse(\"MY_KEY_ID\");\n    String keySecret = Settings.getKeySecret().orElse(\"MY_KEY_SECRET\");\n    String conversationRegion = Settings.getConversationRegion().orElse(\"MY_CONVERSATION_REGION\");\n\n    // The ID of the application to list recent conversations for\n    String conversationApplicationId = \"APPLICATION_ID\";\n\n    Configuration configuration =\n        Configuration.builder()\n            .setProjectId(projectId)\n            .setKeyId(keyId)\n            .setKeySecret(keySecret)\n            .setConversationRegion(ConversationRegion.from(conversationRegion))\n            .build();\n\n    SinchClient client = new SinchClient(configuration);\n\n    ConversationsService conversationsService = client.conversation().v1().conversations();\n\n    LOGGER.info(\n        String.format(\n            \"List recent conversations for application with ID '%s'\", conversationApplicationId));\n\n    RecentConversationsListQueryParameters request =\n        RecentConversationsListQueryParameters.builder()\n            .setOnlyActive(false)\n            .setAppId(conversationApplicationId)\n            .build();\n\n    RecentConversationsListResponse response = conversationsService.listRecent(request);\n\n    LOGGER.info(\"Response:\");\n\n    response.iterator().forEachRemaining(f -> LOGGER.info(f.toString()));\n  }\n}\n"
          },
          {
            "lang": "Node.js",
            "source": "/**\n * Sinch Node.js Snippet\n * See: https://github.com/sinch/sinch-sdk-node/examples/snippets\n */\nimport { SinchClient } from '@sinch/sdk-core';\nimport * as dotenv from 'dotenv';\ndotenv.config();\n\nasync function main() {\n  const projectId = process.env.SINCH_PROJECT_ID ?? 'MY_PROJECT_ID';\n  const keyId = process.env.SINCH_KEY_ID ?? 'MY_KEY_ID';\n  const keySecret = process.env.SINCH_KEY_SECRET ?? 'MY_KEY_SECRET';\n  const conversationRegion = process.env.SINCH_CONVERSATION_REGION ?? 'MY_CONVERSATION_REGION';\n\n  // The ID of the Conversation App to list Recent Conversations from\n  const appId = 'CONVERSATION_APP_ID';\n\n  const sinch = new SinchClient({ projectId, keyId, keySecret, conversationRegion });\n\n  try {\n    const response = await sinch.conversation.conversation.listRecent({\n      app_id: appId,\n      only_active: true,\n    });\n    if (response.data.length === 0) {\n      console.log('No Recent Conversations found.');\n      return;\n    }\n    console.log(`✅ Found ${response.data.length} Recent Conversations.`);\n    response.data.forEach((recentConversation) => {\n      console.log(recentConversation);\n    });\n  } catch (err) {\n    console.error('❌ Failed to list the Recent Conversations:');\n    console.error(err);\n  }\n}\n\nmain();\n"
          }
        ]
      }
    },
    "/v1/projects/{project_id}/conversations/{conversation_id}:inject-event": {
      "parameters": [
        {
          "$ref": "#/components/parameters/project_id"
        },
        {
          "$ref": "#/components/parameters/conversation_id"
        }
      ],
      "post": {
        "summary": "Inject an event",
        "description": "This operation injects a conversation event in to a specific conversation. It only supports injecting App events in `CONVERSATION` mode.",
        "tags": [
          "Conversation"
        ],
        "operationId": "Events_InjectEvent",
        "requestBody": {
          "$ref": "#/components/requestBodies/InjectEventRequest"
        },
        "responses": {
          "200": {
            "$ref": "#/components/responses/injectEventResponse"
          },
          "400": {
            "$ref": "#/components/responses/400Error"
          },
          "401": {
            "$ref": "#/components/responses/401Error"
          },
          "403": {
            "$ref": "#/components/responses/403Error"
          },
          "500": {
            "$ref": "#/components/responses/500Error"
          },
          "501": {
            "$ref": "#/components/responses/501Error"
          }
        },
        "x-codeSamples": [
          {
            "lang": "Java",
            "source": "/**\n * Sinch Java Snippet\n *\n * <p>This snippet is available at https://github.com/sinch/sinch-sdk-java\n *\n * <p>See https://github.com/sinch/sinch-sdk-java/blob/main/examples/snippets/README.md for details\n */\npackage conversation.conversations;\n\nimport com.sinch.sdk.SinchClient;\nimport com.sinch.sdk.domains.conversation.api.v1.ConversationsService;\nimport com.sinch.sdk.domains.conversation.models.v1.ChannelIdentity;\nimport com.sinch.sdk.domains.conversation.models.v1.ConversationChannel;\nimport com.sinch.sdk.domains.conversation.models.v1.ProcessingMode;\nimport com.sinch.sdk.domains.conversation.models.v1.conversations.request.InjectEventRequest;\nimport com.sinch.sdk.domains.conversation.models.v1.conversations.response.InjectEventResponse;\nimport com.sinch.sdk.domains.conversation.models.v1.events.AppEvent;\nimport com.sinch.sdk.domains.conversation.models.v1.events.types.GenericEvent;\nimport com.sinch.sdk.models.Configuration;\nimport com.sinch.sdk.models.ConversationRegion;\nimport java.time.Instant;\nimport java.util.HashMap;\nimport java.util.Map;\nimport java.util.logging.Logger;\nimport utils.Settings;\n\npublic class InjectEvent {\n\n  private static final Logger LOGGER = Logger.getLogger(InjectEvent.class.getName());\n\n  public static void main(String[] args) {\n\n    String projectId = Settings.getProjectId().orElse(\"MY_PROJECT_ID\");\n    String keyId = Settings.getKeyId().orElse(\"MY_KEY_ID\");\n    String keySecret = Settings.getKeySecret().orElse(\"MY_KEY_SECRET\");\n    String conversationRegion = Settings.getConversationRegion().orElse(\"MY_CONVERSATION_REGION\");\n\n    // The ID of the conversation to inject the event into\n    String conversationId = \"CONVERSATION_ID\";\n    // The channel to use for the recipient\n    ConversationChannel recipientChannel = ConversationChannel.SMS;\n    // The identity of the recipient (e.g. phone number for SMS)\n    String recipientPhoneNumber = \"RECIPIENT_PHONE_NUMBER\";\n\n    Configuration configuration =\n        Configuration.builder()\n            .setProjectId(projectId)\n            .setKeyId(keyId)\n            .setKeySecret(keySecret)\n            .setConversationRegion(ConversationRegion.from(conversationRegion))\n            .build();\n\n    SinchClient client = new SinchClient(configuration);\n\n    ConversationsService conversationsService = client.conversation().v1().conversations();\n\n    Map<String, String> map = new HashMap<>();\n    map.put(\"a property key\", \"a property value\");\n\n    AppEvent event = GenericEvent.builder().setPayload(map).build();\n\n    InjectEventRequest request =\n        InjectEventRequest.builder()\n            .setAcceptTime(Instant.now())\n            .setAppEvent(event)\n            .setChannelIdentity(\n                ChannelIdentity.builder()\n                    .setChannel(recipientChannel)\n                    .setIdentity(recipientPhoneNumber)\n                    .build())\n            .setConversationId(conversationId)\n            .setProcessingMode(ProcessingMode.CONVERSATION)\n            .build();\n\n    LOGGER.info(\"Inject event request: \" + request);\n\n    InjectEventResponse response = conversationsService.injectEvent(conversationId, request);\n\n    LOGGER.info(\"Inject event response: \" + response);\n  }\n}\n"
          },
          {
            "lang": "Node.js",
            "source": "/**\n * Sinch Node.js Snippet\n * See: https://github.com/sinch/sinch-sdk-node/examples/snippets\n */\nimport { SinchClient } from '@sinch/sdk-core';\nimport * as dotenv from 'dotenv';\ndotenv.config();\n\nasync function main() {\n  const projectId = process.env.SINCH_PROJECT_ID ?? 'MY_PROJECT_ID';\n  const keyId = process.env.SINCH_KEY_ID ?? 'MY_KEY_ID';\n  const keySecret = process.env.SINCH_KEY_SECRET ?? 'MY_KEY_SECRET';\n  const conversationRegion = process.env.SINCH_CONVERSATION_REGION ?? 'MY_CONVERSATION_REGION';\n\n  // The ID of the Conversation to inject an event to\n  const conversationId = 'CONVERSATION_ID';\n  // The phone number of the recipient to inject an event to\n  const recipientPhoneNumber = 'RECIPIENT_PHONE_NUMBER';\n\n  const sinch = new SinchClient({ projectId, keyId, keySecret, conversationRegion });\n\n  try {\n    const response = await sinch.conversation.conversation.injectEvent({\n      conversation_id: conversationId,\n      injectConversationEventRequestBody: {\n        accept_time: new Date(),\n        app_event: {\n          generic_event: {\n            payload: {\n              'a_property_key': 'a property value',\n            },\n          },\n        },\n        channel_identity: {\n          channel: 'RCS',\n          identity: recipientPhoneNumber,\n        },\n        conversation_id: conversationId,\n        processing_mode: 'CONVERSATION',\n      },\n    });\n    console.log('✅ Successfully injected the Event.');\n    console.log(JSON.stringify(response, null, 2));\n  } catch (err) {\n    console.error(`❌ Failed to inject an Event in the conversation ${conversationId} for recipient ${recipientPhoneNumber}:`);\n    console.error(err);\n  }\n}\n\nmain();\n"
          }
        ]
      }
    },
    "/v1/projects/{project_id}/conversations/{conversation_id}:stop": {
      "parameters": [
        {
          "$ref": "#/components/parameters/project_id"
        },
        {
          "$ref": "#/components/parameters/conversation_id"
        }
      ],
      "post": {
        "description": "This operation stops the referenced conversation, if the conversation is still active.\nIn Conversation mode, A new conversation will be created if a new message is exchanged between the app or contact\nthat was part of the stopped conversation.",
        "tags": [
          "Conversation"
        ],
        "summary": "Stop conversation",
        "operationId": "Conversation_StopActiveConversation",
        "responses": {
          "200": {
            "description": "A successful response."
          },
          "400": {
            "$ref": "#/components/responses/400Error"
          },
          "401": {
            "$ref": "#/components/responses/401Error"
          },
          "403": {
            "$ref": "#/components/responses/403Error"
          },
          "500": {
            "$ref": "#/components/responses/500Error"
          },
          "501": {
            "$ref": "#/components/responses/501Error"
          }
        },
        "x-codeSamples": [
          {
            "lang": "Java",
            "source": "/**\n * Sinch Java Snippet\n *\n * <p>This snippet is available at https://github.com/sinch/sinch-sdk-java\n *\n * <p>See https://github.com/sinch/sinch-sdk-java/blob/main/examples/snippets/README.md for details\n */\npackage conversation.conversations;\n\nimport com.sinch.sdk.SinchClient;\nimport com.sinch.sdk.domains.conversation.api.v1.ConversationsService;\nimport com.sinch.sdk.models.Configuration;\nimport com.sinch.sdk.models.ConversationRegion;\nimport java.util.logging.Logger;\nimport utils.Settings;\n\npublic class StopActive {\n\n  private static final Logger LOGGER = Logger.getLogger(StopActive.class.getName());\n\n  public static void main(String[] args) {\n\n    String projectId = Settings.getProjectId().orElse(\"MY_PROJECT_ID\");\n    String keyId = Settings.getKeyId().orElse(\"MY_KEY_ID\");\n    String keySecret = Settings.getKeySecret().orElse(\"MY_KEY_SECRET\");\n    String conversationRegion = Settings.getConversationRegion().orElse(\"MY_CONVERSATION_REGION\");\n\n    // The ID of the conversation to stop\n    String conversationId = \"CONVERSATION_ID\";\n\n    Configuration configuration =\n        Configuration.builder()\n            .setProjectId(projectId)\n            .setKeyId(keyId)\n            .setKeySecret(keySecret)\n            .setConversationRegion(ConversationRegion.from(conversationRegion))\n            .build();\n\n    SinchClient client = new SinchClient(configuration);\n\n    ConversationsService conversationsService = client.conversation().v1().conversations();\n\n    LOGGER.info(String.format(\"Stop conversation with ID '%s'\", conversationId));\n\n    conversationsService.stopActive(conversationId);\n\n    LOGGER.info(\"Done\");\n  }\n}\n"
          },
          {
            "lang": "Node.js",
            "source": "/**\n * Sinch Node.js Snippet\n * See: https://github.com/sinch/sinch-sdk-node/examples/snippets\n */\nimport { SinchClient } from '@sinch/sdk-core';\nimport * as dotenv from 'dotenv';\ndotenv.config();\n\nasync function main() {\n  const projectId = process.env.SINCH_PROJECT_ID ?? 'MY_PROJECT_ID';\n  const keyId = process.env.SINCH_KEY_ID ?? 'MY_KEY_ID';\n  const keySecret = process.env.SINCH_KEY_SECRET ?? 'MY_KEY_SECRET';\n  const conversationRegion = process.env.SINCH_CONVERSATION_REGION ?? 'MY_CONVERSATION_REGION';\n\n  // The ID of the Conversation to stop\n  const conversationId = 'CONVERSATION_ID';\n\n  const sinch = new SinchClient({ projectId, keyId, keySecret, conversationRegion });\n\n  try {\n    await sinch.conversation.conversation.stopActive({\n      conversation_id: conversationId,\n    });\n    console.log(`✅ Successfully stopped the conversation with Id ${conversationId}.`);\n  } catch (err) {\n    console.error(`❌ Failed to stop the conversation with ID ${conversationId}:`);\n    console.error(err);\n  }\n}\n\nmain();\n"
          }
        ]
      }
    },
    "/v1/projects/{project_id}/conversations/{conversation_id}:inject-message": {
      "parameters": [
        {
          "$ref": "#/components/parameters/project_id"
        },
        {
          "description": "The ID of the conversation.",
          "name": "conversation_id",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string"
          }
        }
      ],
      "post": {
        "description": "This operation injects a conversation message in to a specific conversation.",
        "tags": [
          "Conversation"
        ],
        "summary": "Inject a message",
        "operationId": "Conversation_InjectMessage",
        "requestBody": {
          "$ref": "#/components/requestBodies/InjectMessageRequest"
        },
        "responses": {
          "200": {
            "description": "A successful response."
          },
          "400": {
            "$ref": "#/components/responses/400Error"
          },
          "401": {
            "$ref": "#/components/responses/401Error"
          },
          "403": {
            "$ref": "#/components/responses/403Error"
          },
          "500": {
            "$ref": "#/components/responses/500Error"
          },
          "501": {
            "$ref": "#/components/responses/501Error"
          }
        },
        "x-codeSamples": [
          {
            "lang": "Java",
            "source": "/**\n * Sinch Java Snippet\n *\n * <p>This snippet is available at https://github.com/sinch/sinch-sdk-java\n *\n * <p>See https://github.com/sinch/sinch-sdk-java/blob/main/examples/snippets/README.md for details\n */\npackage conversation.conversations;\n\nimport com.sinch.sdk.SinchClient;\nimport com.sinch.sdk.domains.conversation.api.v1.ConversationsService;\nimport com.sinch.sdk.domains.conversation.models.v1.ChannelIdentity;\nimport com.sinch.sdk.domains.conversation.models.v1.ConversationChannel;\nimport com.sinch.sdk.domains.conversation.models.v1.ConversationDirection;\nimport com.sinch.sdk.domains.conversation.models.v1.conversations.request.InjectMessageRequest;\nimport com.sinch.sdk.domains.conversation.models.v1.messages.AppMessage;\nimport com.sinch.sdk.domains.conversation.models.v1.messages.types.text.TextMessage;\nimport com.sinch.sdk.models.Configuration;\nimport com.sinch.sdk.models.ConversationRegion;\nimport java.time.Instant;\nimport java.util.logging.Logger;\nimport utils.Settings;\n\npublic class InjectMessage {\n\n  private static final Logger LOGGER = Logger.getLogger(InjectMessage.class.getName());\n\n  public static void main(String[] args) {\n\n    String projectId = Settings.getProjectId().orElse(\"MY_PROJECT_ID\");\n    String keyId = Settings.getKeyId().orElse(\"MY_KEY_ID\");\n    String keySecret = Settings.getKeySecret().orElse(\"MY_KEY_SECRET\");\n    String conversationRegion = Settings.getConversationRegion().orElse(\"MY_CONVERSATION_REGION\");\n\n    // The ID of the conversation to inject the message into\n    String conversationId = \"CONVERSATION_ID\";\n    // The ID of the contact to inject the message into\n    String conversationContactId = \"CONTACT_ID\";\n    // The channel to use for the recipient\n    ConversationChannel recipientChannel = ConversationChannel.SMS;\n    // The phone number of the recipient in E.164 format\n    String recipientPhoneNumber = \"RECIPIENT_PHONE_NUMBER\";\n\n    Configuration configuration =\n        Configuration.builder()\n            .setProjectId(projectId)\n            .setKeyId(keyId)\n            .setKeySecret(keySecret)\n            .setConversationRegion(ConversationRegion.from(conversationRegion))\n            .build();\n\n    SinchClient client = new SinchClient(configuration);\n\n    ConversationsService conversationsService = client.conversation().v1().conversations();\n\n    AppMessage appMessage =\n        AppMessage.<TextMessage>builder()\n            .setBody(TextMessage.builder().setText(\"Text from Inject AppMessage\").build())\n            .build();\n\n    InjectMessageRequest request =\n        InjectMessageRequest.builder()\n            .setContactId(conversationContactId)\n            .setBody(appMessage)\n            .setChannelIdentity(\n                ChannelIdentity.builder()\n                    .setChannel(recipientChannel)\n                    .setIdentity(recipientPhoneNumber)\n                    .build())\n            .setDirection(ConversationDirection.TO_CONTACT)\n            .setAcceptTime(Instant.now())\n            .build();\n\n    LOGGER.info(String.format(\"Inject message to conversation with ID '%s'\", conversationId));\n\n    conversationsService.injectMessage(conversationId, request);\n\n    LOGGER.info(\"Done\");\n  }\n}\n"
          },
          {
            "lang": "Node.js",
            "source": "/**\n * Sinch Node.js Snippet\n * See: https://github.com/sinch/sinch-sdk-node/examples/snippets\n */\nimport { SinchClient } from '@sinch/sdk-core';\nimport * as dotenv from 'dotenv';\ndotenv.config();\n\nasync function main() {\n  const projectId = process.env.SINCH_PROJECT_ID ?? 'MY_PROJECT_ID';\n  const keyId = process.env.SINCH_KEY_ID ?? 'MY_KEY_ID';\n  const keySecret = process.env.SINCH_KEY_SECRET ?? 'MY_KEY_SECRET';\n  const conversationRegion = process.env.SINCH_CONVERSATION_REGION ?? 'MY_CONVERSATION_REGION';\n\n  // The ID of the Conversation to inject a message into\n  const conversationId = 'CONVERSATION_ID';\n  // The ID of the Contact to inject a message into\n  const contactId = 'CONTACT_ID';\n  // The phone number of the recipient in E.164 format as identity for a given channel\n  const recipientPhoneNumber = 'RECIPIENT_PHONE_NUMBER';\n\n  const sinch = new SinchClient({ projectId, keyId, keySecret, conversationRegion });\n\n  try {\n    const response = await sinch.conversation.conversation.injectMessage({\n      conversation_id: conversationId,\n      injectMessageRequestBody: {\n        contact_id: contactId,\n        contact_message: {\n          text_message: {\n            text: 'Text from Inject AppMessage',\n          },\n        },\n        channel_identity: {\n          channel: 'RCS',\n          identity: recipientPhoneNumber,\n        },\n        direction: 'TO_CONTACT',\n        accept_time: new Date(),\n      },\n    });\n    console.log('✅ Successfully injected the Message.');\n    console.log(JSON.stringify(response, null, 2));\n  } catch (err) {\n    console.error(`❌ Failed to inject a Message in the conversation ${conversationId} for recipient ${recipientPhoneNumber}:`);\n    console.error(err);\n  }\n}\n\nmain();\n"
          }
        ]
      }
    },
    "/v1/projects/{project_id}/events:send": {
      "parameters": [
        {
          "$ref": "#/components/parameters/project_id"
        }
      ],
      "post": {
        "description": "Sends an event to the referenced contact from the referenced app.\nNote that this operation enqueues the event in a queue so a successful\nresponse only indicates that the event has been queued.",
        "tags": [
          "Events"
        ],
        "summary": "Send an event",
        "operationId": "Events_SendEvent",
        "requestBody": {
          "description": "The event to be sent.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SendEventRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "A successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SendEventResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/400Error"
          },
          "401": {
            "$ref": "#/components/responses/401Error"
          },
          "403": {
            "$ref": "#/components/responses/403Error"
          },
          "500": {
            "$ref": "#/components/responses/500Error"
          },
          "501": {
            "$ref": "#/components/responses/501Error"
          }
        },
        "x-codeSamples": [
          {
            "lang": "Java",
            "source": "/**\n * Sinch Java Snippet\n *\n * <p>This snippet is available at https://github.com/sinch/sinch-sdk-java\n *\n * <p>See https://github.com/sinch/sinch-sdk-java/blob/main/examples/snippets/README.md for details\n */\npackage conversation.events;\n\nimport com.sinch.sdk.SinchClient;\nimport com.sinch.sdk.domains.conversation.api.v1.EventsService;\nimport com.sinch.sdk.domains.conversation.models.v1.ChannelRecipientIdentities;\nimport com.sinch.sdk.domains.conversation.models.v1.ChannelRecipientIdentity;\nimport com.sinch.sdk.domains.conversation.models.v1.ConversationChannel;\nimport com.sinch.sdk.domains.conversation.models.v1.events.AppEvent;\nimport com.sinch.sdk.domains.conversation.models.v1.events.request.SendEventRequest;\nimport com.sinch.sdk.domains.conversation.models.v1.events.response.SendEventResponse;\nimport com.sinch.sdk.domains.conversation.models.v1.events.types.ComposingEndEvent;\nimport com.sinch.sdk.models.Configuration;\nimport com.sinch.sdk.models.ConversationRegion;\nimport java.util.logging.Logger;\nimport utils.Settings;\n\npublic class Send {\n\n  private static final Logger LOGGER = Logger.getLogger(Send.class.getName());\n\n  public static void main(String[] args) {\n\n    String projectId = Settings.getProjectId().orElse(\"MY_PROJECT_ID\");\n    String keyId = Settings.getKeyId().orElse(\"MY_KEY_ID\");\n    String keySecret = Settings.getKeySecret().orElse(\"MY_KEY_SECRET\");\n    String conversationRegion = Settings.getConversationRegion().orElse(\"MY_CONVERSATION_REGION\");\n\n    // The ID of the Conversation Application to send the event from\n    String conversationApplicationId = \"APPLICATION_ID\";\n    // The channel to use for the recipient\n    ConversationChannel recipientChannel = ConversationChannel.SMS;\n    // The identity of the recipient (e.g. phone number for SMS)\n    String recipientPhoneNumber = \"RECIPIENT_PHONE_NUMBER\";\n\n    Configuration configuration =\n        Configuration.builder()\n            .setProjectId(projectId)\n            .setKeyId(keyId)\n            .setKeySecret(keySecret)\n            .setConversationRegion(ConversationRegion.from(conversationRegion))\n            .build();\n\n    SinchClient client = new SinchClient(configuration);\n\n    EventsService eventsService = client.conversation().v1().events();\n\n    AppEvent event = ComposingEndEvent.COMPOSING_END_EVENT;\n\n    SendEventRequest request =\n        SendEventRequest.builder()\n            .setAppId(conversationApplicationId)\n            .setEvent(event)\n            .setRecipient(\n                ChannelRecipientIdentities.of(\n                    ChannelRecipientIdentity.builder()\n                        .setChannel(recipientChannel)\n                        .setIdentity(recipientPhoneNumber)\n                        .build()))\n            .build();\n\n    LOGGER.info(String.format(\"Send event to application with ID '%s'\", conversationApplicationId));\n\n    SendEventResponse response = eventsService.send(request);\n\n    LOGGER.info(\"Response: \" + response);\n  }\n}\n"
          },
          {
            "lang": "Node.js",
            "source": "/**\n * Sinch Node.js Snippet\n * See: https://github.com/sinch/sinch-sdk-node/examples/snippets\n */\nimport { SinchClient } from '@sinch/sdk-core';\nimport * as dotenv from 'dotenv';\ndotenv.config();\n\nasync function main() {\n  const projectId = process.env.SINCH_PROJECT_ID ?? 'MY_PROJECT_ID';\n  const keyId = process.env.SINCH_KEY_ID ?? 'MY_KEY_ID';\n  const keySecret = process.env.SINCH_KEY_SECRET ?? 'MY_KEY_SECRET';\n  const conversationRegion = process.env.SINCH_CONVERSATION_REGION ?? 'MY_CONVERSATION_REGION';\n\n  // The ID of the Conversation Application to send the Event from\n  const applicationId = 'CONVERSATION_APP_ID';\n  // The phone number to send the Event to, in E.164 format\n  const recipientPhoneNumber = 'RECIPIENT_PHONE_NUMBER';\n\n  const sinch = new SinchClient({ projectId, keyId, keySecret, conversationRegion });\n\n  try {\n    const response = await sinch.conversation.events.send({\n      sendEventRequestBody: {\n        app_id: applicationId,\n        event: {\n          composing_event: {},\n        },\n        recipient: {\n          identified_by: {\n            channel_identities: [\n              {\n                channel: 'RCS',\n                identity: recipientPhoneNumber,\n              },\n            ],\n          },\n        },\n      },\n    });\n    console.log('✅ Successfully sent Event.');\n    console.log(JSON.stringify(response, null, 2));\n  } catch (err) {\n    console.error(`❌ Failed to send Event to the recipient ${recipientPhoneNumber}:`);\n    console.error(err);\n  }\n}\n\nmain();\n"
          }
        ]
      }
    },
    "/v1/projects/{project_id}/events/{event_id}": {
      "parameters": [
        {
          "$ref": "#/components/parameters/project_id"
        },
        {
          "$ref": "#/components/parameters/event_id"
        }
      ],
      "get": {
        "description": "Get event from ID",
        "tags": [
          "Events"
        ],
        "summary": "Get an event",
        "operationId": "Events_GetEvent",
        "responses": {
          "200": {
            "$ref": "#/components/responses/getEventResponse"
          },
          "400": {
            "$ref": "#/components/responses/400Error"
          },
          "401": {
            "$ref": "#/components/responses/401Error"
          },
          "403": {
            "$ref": "#/components/responses/403Error"
          },
          "500": {
            "$ref": "#/components/responses/500Error"
          },
          "501": {
            "$ref": "#/components/responses/501Error"
          }
        },
        "x-codeSamples": [
          {
            "lang": "Java",
            "source": "/**\n * Sinch Java Snippet\n *\n * <p>This snippet is available at https://github.com/sinch/sinch-sdk-java\n *\n * <p>See https://github.com/sinch/sinch-sdk-java/blob/main/examples/snippets/README.md for details\n */\npackage conversation.events;\n\nimport com.sinch.sdk.SinchClient;\nimport com.sinch.sdk.domains.conversation.api.v1.EventsService;\nimport com.sinch.sdk.domains.conversation.models.v1.events.ConversationEvent;\nimport com.sinch.sdk.models.Configuration;\nimport com.sinch.sdk.models.ConversationRegion;\nimport java.util.logging.Logger;\nimport utils.Settings;\n\npublic class Get {\n\n  private static final Logger LOGGER = Logger.getLogger(Get.class.getName());\n\n  public static void main(String[] args) {\n\n    String projectId = Settings.getProjectId().orElse(\"MY_PROJECT_ID\");\n    String keyId = Settings.getKeyId().orElse(\"MY_KEY_ID\");\n    String keySecret = Settings.getKeySecret().orElse(\"MY_KEY_SECRET\");\n    String conversationRegion = Settings.getConversationRegion().orElse(\"MY_CONVERSATION_REGION\");\n\n    // The ID of the event to retrieve\n    String eventId = \"EVENT_ID\";\n\n    Configuration configuration =\n        Configuration.builder()\n            .setProjectId(projectId)\n            .setKeyId(keyId)\n            .setKeySecret(keySecret)\n            .setConversationRegion(ConversationRegion.from(conversationRegion))\n            .build();\n\n    SinchClient client = new SinchClient(configuration);\n\n    EventsService eventsService = client.conversation().v1().events();\n\n    LOGGER.info(String.format(\"Get information for event with ID '%s'\", eventId));\n\n    ConversationEvent response = eventsService.get(eventId);\n\n    LOGGER.info(\"Response: \" + response);\n  }\n}\n"
          },
          {
            "lang": "Node.js",
            "source": "/**\n * Sinch Node.js Snippet\n * See: https://github.com/sinch/sinch-sdk-node/examples/snippets\n */\nimport { SinchClient } from '@sinch/sdk-core';\nimport * as dotenv from 'dotenv';\ndotenv.config();\n\nasync function main() {\n  const projectId = process.env.SINCH_PROJECT_ID ?? 'MY_PROJECT_ID';\n  const keyId = process.env.SINCH_KEY_ID ?? 'MY_KEY_ID';\n  const keySecret = process.env.SINCH_KEY_SECRET ?? 'MY_KEY_SECRET';\n  const conversationRegion = process.env.SINCH_CONVERSATION_REGION ?? 'MY_CONVERSATION_REGION';\n\n  // The ID of the Contact to retrieve\n  const eventId = 'EVENT_ID';\n\n  const sinch = new SinchClient({ projectId, keyId, keySecret, conversationRegion });\n\n  try {\n    const response = await sinch.conversation.events.get({\n      event_id: eventId,\n    });\n    console.log('✅ Successfully retrieved the Event.');\n    console.log(JSON.stringify(response, null, 2));\n  } catch (err) {\n    console.error(`❌ Failed to retrieve the Event with ID ${eventId}:`);\n    console.error(err);\n  }\n}\n\nmain();\n"
          }
        ]
      },
      "delete": {
        "description": "Delete a specific event by its ID.",
        "tags": [
          "Events"
        ],
        "summary": "Delete an event",
        "operationId": "Events_DeleteEvents",
        "responses": {
          "200": {
            "description": "A successful response."
          },
          "400": {
            "$ref": "#/components/responses/400Error"
          },
          "401": {
            "$ref": "#/components/responses/401Error"
          },
          "403": {
            "$ref": "#/components/responses/403Error"
          },
          "500": {
            "$ref": "#/components/responses/500Error"
          },
          "501": {
            "$ref": "#/components/responses/501Error"
          }
        },
        "x-codeSamples": [
          {
            "lang": "Java",
            "source": "/**\n * Sinch Java Snippet\n *\n * <p>This snippet is available at https://github.com/sinch/sinch-sdk-java\n *\n * <p>See https://github.com/sinch/sinch-sdk-java/blob/main/examples/snippets/README.md for details\n */\npackage conversation.events;\n\nimport com.sinch.sdk.SinchClient;\nimport com.sinch.sdk.domains.conversation.api.v1.EventsService;\nimport com.sinch.sdk.models.Configuration;\nimport com.sinch.sdk.models.ConversationRegion;\nimport java.util.logging.Logger;\nimport utils.Settings;\n\npublic class Delete {\n\n  private static final Logger LOGGER = Logger.getLogger(Delete.class.getName());\n\n  public static void main(String[] args) {\n\n    String projectId = Settings.getProjectId().orElse(\"MY_PROJECT_ID\");\n    String keyId = Settings.getKeyId().orElse(\"MY_KEY_ID\");\n    String keySecret = Settings.getKeySecret().orElse(\"MY_KEY_SECRET\");\n    String conversationRegion = Settings.getConversationRegion().orElse(\"MY_CONVERSATION_REGION\");\n\n    // The ID of the event to delete\n    String eventId = \"EVENT_ID\";\n\n    Configuration configuration =\n        Configuration.builder()\n            .setProjectId(projectId)\n            .setKeyId(keyId)\n            .setKeySecret(keySecret)\n            .setConversationRegion(ConversationRegion.from(conversationRegion))\n            .build();\n\n    SinchClient client = new SinchClient(configuration);\n\n    EventsService eventsService = client.conversation().v1().events();\n\n    LOGGER.info(String.format(\"Delete event with ID '%s' \", eventId));\n\n    eventsService.delete(eventId);\n\n    LOGGER.info(\"Done\");\n  }\n}\n"
          },
          {
            "lang": "Node.js",
            "source": "/**\n * Sinch Node.js Snippet\n * See: https://github.com/sinch/sinch-sdk-node/examples/snippets\n */\nimport { SinchClient } from '@sinch/sdk-core';\nimport * as dotenv from 'dotenv';\ndotenv.config();\n\nasync function main() {\n  const projectId = process.env.SINCH_PROJECT_ID ?? 'MY_PROJECT_ID';\n  const keyId = process.env.SINCH_KEY_ID ?? 'MY_KEY_ID';\n  const keySecret = process.env.SINCH_KEY_SECRET ?? 'MY_KEY_SECRET';\n  const conversationRegion = process.env.SINCH_CONVERSATION_REGION ?? 'MY_CONVERSATION_REGION';\n\n  // The ID of the Event to delete\n  const eventId = 'EVENT_ID';\n\n  const sinch = new SinchClient({ projectId, keyId, keySecret, conversationRegion });\n\n  try {\n    await sinch.conversation.events.delete({\n      event_id: eventId,\n    });\n    console.log(`✅ Successfully deleted the Event with ID ${eventId}.`);\n  } catch (err) {\n    console.error(`❌ Failed to delete the Event with ID ${eventId}:`);\n    console.error(err);\n  }\n}\n\nmain();\n"
          }
        ]
      }
    },
    "/v1/projects/{project_id}/events": {
      "parameters": [
        {
          "$ref": "#/components/parameters/project_id"
        }
      ],
      "get": {
        "summary": "List events",
        "description": "List all events in a project",
        "tags": [
          "Events"
        ],
        "operationId": "Events_ListEvents",
        "parameters": [
          {
            "name": "conversation_id",
            "description": "Resource name (id) of the conversation. One of conversation_id or contact_id needs to be present.",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "contact_id",
            "description": "Resource name (id) of the contact. One of conversation_id or contact_id needs to be present.",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "page_size",
            "description": "Maximum number of events to fetch. Defaults to 10\nand the maximum is 20.",
            "in": "query",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "page_token",
            "description": "Next page token previously returned if any. When specifying this token, make sure to use the same values\nfor the other parameters from the request that originated the token, otherwise the paged results may be inconsistent.",
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "$ref": "#/components/responses/listEventsResponse"
          },
          "400": {
            "$ref": "#/components/responses/400Error"
          },
          "401": {
            "$ref": "#/components/responses/401Error"
          },
          "403": {
            "$ref": "#/components/responses/403Error"
          },
          "500": {
            "$ref": "#/components/responses/500Error"
          },
          "501": {
            "$ref": "#/components/responses/501Error"
          }
        },
        "x-codeSamples": [
          {
            "lang": "Java",
            "source": "/**\n * Sinch Java Snippet\n *\n * <p>This snippet is available at https://github.com/sinch/sinch-sdk-java\n *\n * <p>See https://github.com/sinch/sinch-sdk-java/blob/main/examples/snippets/README.md for details\n */\npackage conversation.events;\n\nimport com.sinch.sdk.SinchClient;\nimport com.sinch.sdk.domains.conversation.api.v1.EventsService;\nimport com.sinch.sdk.domains.conversation.models.v1.events.request.EventsListQueryParameters;\nimport com.sinch.sdk.domains.conversation.models.v1.events.response.EventsListResponse;\nimport com.sinch.sdk.models.Configuration;\nimport com.sinch.sdk.models.ConversationRegion;\nimport java.util.logging.Logger;\nimport utils.Settings;\n\npublic class List {\n\n  private static final Logger LOGGER = Logger.getLogger(List.class.getName());\n\n  public static void main(String[] args) {\n\n    String projectId = Settings.getProjectId().orElse(\"MY_PROJECT_ID\");\n    String keyId = Settings.getKeyId().orElse(\"MY_KEY_ID\");\n    String keySecret = Settings.getKeySecret().orElse(\"MY_KEY_SECRET\");\n    String conversationRegion = Settings.getConversationRegion().orElse(\"MY_CONVERSATION_REGION\");\n\n    // The ID of the conversation to list events for\n    String conversationId = \"CONVERSATION_ID\";\n\n    Configuration configuration =\n        Configuration.builder()\n            .setProjectId(projectId)\n            .setKeyId(keyId)\n            .setKeySecret(keySecret)\n            .setConversationRegion(ConversationRegion.from(conversationRegion))\n            .build();\n\n    SinchClient client = new SinchClient(configuration);\n\n    EventsService eventsService = client.conversation().v1().events();\n\n    LOGGER.info(String.format(\"List events for conversation with ID '%s'\", conversationId));\n\n    EventsListQueryParameters request =\n        EventsListQueryParameters.builder().setConversationId(conversationId).build();\n\n    EventsListResponse response = eventsService.list(request);\n\n    LOGGER.info(\"Response:\");\n\n    response.iterator().forEachRemaining(f -> LOGGER.info(f.toString()));\n  }\n}\n"
          },
          {
            "lang": "Node.js",
            "source": "/**\n * Sinch Node.js Snippet\n * See: https://github.com/sinch/sinch-sdk-node/examples/snippets\n */\nimport { SinchClient } from '@sinch/sdk-core';\nimport * as dotenv from 'dotenv';\ndotenv.config();\n\nasync function main() {\n  const projectId = process.env.SINCH_PROJECT_ID ?? 'MY_PROJECT_ID';\n  const keyId = process.env.SINCH_KEY_ID ?? 'MY_KEY_ID';\n  const keySecret = process.env.SINCH_KEY_SECRET ?? 'MY_KEY_SECRET';\n  const conversationRegion = process.env.SINCH_CONVERSATION_REGION ?? 'MY_CONVERSATION_REGION';\n\n  // The ID of the Conversation to list Events for\n  const conversationId = 'CONVERSATION_ID';\n\n  const sinch = new SinchClient({ projectId, keyId, keySecret, conversationRegion });\n\n  try {\n    const response = await sinch.conversation.events.list({\n      conversation_id: conversationId,\n    });\n    if (response.data.length === 0) {\n      console.log('No Events found.');\n      return;\n    }\n    console.log(`✅ Found ${response.data.length} Events.`);\n    response.data.forEach((event) => {\n      console.log(event);\n    });\n  } catch (err) {\n    console.error('❌ Failed to list the Events:');\n    console.error(err);\n  }\n}\n\nmain();\n"
          }
        ]
      }
    },
    "/v1/projects/{project_id}/messages:transcode": {
      "parameters": [
        {
          "$ref": "#/components/parameters/project_id"
        }
      ],
      "post": {
        "description": "Transcodes the message from the Conversation API format to the\nchannel-specific formats for the requested channels. No message\nis sent to the contact.",
        "tags": [
          "Transcoding"
        ],
        "summary": "Transcode a message",
        "operationId": "Transcoding_TranscodeMessage",
        "requestBody": {
          "description": "The message to be transcoded, and the app and channels for which the message is to be transcoded.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TranscodeMessageRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "A successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TranscodeMessageResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/400Error"
          },
          "401": {
            "$ref": "#/components/responses/401Error"
          },
          "403": {
            "$ref": "#/components/responses/403Error"
          },
          "500": {
            "$ref": "#/components/responses/500Error"
          },
          "501": {
            "$ref": "#/components/responses/501Error"
          }
        },
        "x-codeSamples": [
          {
            "lang": "Java",
            "source": "/**\n * Sinch Java Snippet\n *\n * <p>This snippet is available at https://github.com/sinch/sinch-sdk-java\n *\n * <p>See https://github.com/sinch/sinch-sdk-java/blob/main/examples/snippets/README.md for details\n */\npackage conversation.transcoding;\n\nimport com.sinch.sdk.SinchClient;\nimport com.sinch.sdk.domains.conversation.api.v1.TranscodingService;\nimport com.sinch.sdk.domains.conversation.models.v1.ConversationChannel;\nimport com.sinch.sdk.domains.conversation.models.v1.messages.AppMessage;\nimport com.sinch.sdk.domains.conversation.models.v1.messages.types.location.Coordinates;\nimport com.sinch.sdk.domains.conversation.models.v1.messages.types.location.LocationMessage;\nimport com.sinch.sdk.domains.conversation.models.v1.transcoding.request.TranscodeMessageRequest;\nimport com.sinch.sdk.domains.conversation.models.v1.transcoding.response.TranscodeMessageResponse;\nimport com.sinch.sdk.models.Configuration;\nimport com.sinch.sdk.models.ConversationRegion;\nimport java.util.Arrays;\nimport java.util.logging.Logger;\nimport utils.Settings;\n\npublic class Transcode {\n\n  private static final Logger LOGGER = Logger.getLogger(Transcode.class.getName());\n\n  public static void main(String[] args) {\n\n    String projectId = Settings.getProjectId().orElse(\"MY_PROJECT_ID\");\n    String keyId = Settings.getKeyId().orElse(\"MY_KEY_ID\");\n    String keySecret = Settings.getKeySecret().orElse(\"MY_KEY_SECRET\");\n    String conversationRegion = Settings.getConversationRegion().orElse(\"MY_CONVERSATION_REGION\");\n\n    // ID of the Conversation application to use for transcoding\n    String conversationApplicationId = \"APPLICATION_ID\";\n    // The channel to transcode the message for\n    ConversationChannel conversationChannel = ConversationChannel.WHATSAPP;\n\n    Configuration configuration =\n        Configuration.builder()\n            .setProjectId(projectId)\n            .setKeyId(keyId)\n            .setKeySecret(keySecret)\n            .setConversationRegion(ConversationRegion.from(conversationRegion))\n            .build();\n\n    SinchClient client = new SinchClient(configuration);\n\n    TranscodingService transcodingService = client.conversation().v1().transcoding();\n\n    AppMessage<?> appMessage =\n        AppMessage.<LocationMessage>builder()\n            .setBody(\n                LocationMessage.builder()\n                    .setCoordinates(\n                        Coordinates.builder()\n                            .setLatitude(47.627980)\n                            .setLongitude(-2.822915)\n                            .build())\n                    .setTitle(\"Coordinates title\")\n                    .build())\n            .build();\n\n    TranscodeMessageRequest request =\n        TranscodeMessageRequest.builder()\n            .setAppId(conversationApplicationId)\n            .setAppMessage(appMessage)\n            .setChannels(Arrays.asList(conversationChannel))\n            .build();\n\n    LOGGER.info(\"Transcode message request: \" + request);\n\n    TranscodeMessageResponse response = transcodingService.transcodeMessage(request);\n\n    LOGGER.info(\"Transcode message response: \" + response);\n  }\n}\n"
          },
          {
            "lang": "Node.js",
            "source": "/**\n * Sinch Node.js Snippet\n * See: https://github.com/sinch/sinch-sdk-node/examples/snippets\n */\nimport { SinchClient } from '@sinch/sdk-core';\nimport * as dotenv from 'dotenv';\ndotenv.config();\n\nasync function main() {\n  const projectId = process.env.SINCH_PROJECT_ID ?? 'MY_PROJECT_ID';\n  const keyId = process.env.SINCH_KEY_ID ?? 'MY_KEY_ID';\n  const keySecret = process.env.SINCH_KEY_SECRET ?? 'MY_KEY_SECRET';\n  const conversationRegion = process.env.SINCH_CONVERSATION_REGION ?? 'MY_CONVERSATION_REGION';\n\n  // The ID of the conversation application that must contain the target channels for transcoding\n  const appId = 'CONVERSATION_APP_ID';\n  // Add other channels as needed, e.g., 'SMS', 'RCS', 'MESSENGER'.\n  const targetChannels = ['WHATSAPP'];\n\n  const sinch = new SinchClient({ projectId, keyId, keySecret, conversationRegion });\n\n  try {\n    const response = await sinch.conversation.transcoding.transcodeMessage({\n      transcodeMessageRequestBody: {\n        app_id: appId,\n        app_message: {\n          location_message: {\n            title: 'Coordinates title',\n            coordinates: {\n              latitude: 59.3360453,\n              longitude: 18.0117363,\n            },\n          },\n        },\n        channels: targetChannels,\n      },\n    });\n    console.log('✅ Successfully transcoded the message.');\n    console.log(JSON.stringify(response, null, 2));\n  } catch (err) {\n    console.error('❌ Failed to transcode the message:');\n    console.error(err);\n  }\n}\n\nmain();\n"
          }
        ]
      }
    },
    "/v1/projects/{project_id}/webhooks": {
      "parameters": [
        {
          "$ref": "#/components/parameters/project_id"
        }
      ],
      "post": {
        "description": "Creates a webhook for receiving callbacks on specific triggers.\nYou can create up to 5 webhooks per app.",
        "tags": [
          "Webhooks"
        ],
        "summary": "Create a new webhook",
        "operationId": "Webhooks_CreateWebhook",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/Webhook"
                  },
                  {
                    "type": "object",
                    "required": [
                      "app_id"
                    ]
                  }
                ]
              }
            }
          },
          "description": "Required. The Webhook to create",
          "required": true
        },
        "responses": {
          "200": {
            "description": "A successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Webhook"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/400Error"
          },
          "401": {
            "$ref": "#/components/responses/401Error"
          },
          "403": {
            "$ref": "#/components/responses/403Error"
          },
          "500": {
            "$ref": "#/components/responses/500Error"
          },
          "501": {
            "$ref": "#/components/responses/501Error"
          }
        },
        "x-codeSamples": [
          {
            "lang": "Java",
            "source": "/**\n * Sinch Java Snippet\n *\n * <p>This snippet is available at https://github.com/sinch/sinch-sdk-java\n *\n * <p>See https://github.com/sinch/sinch-sdk-java/blob/main/examples/snippets/README.md for details\n */\npackage conversation.eventdestinations;\n\nimport com.sinch.sdk.SinchClient;\nimport com.sinch.sdk.domains.conversation.api.v1.EventDestinationsService;\nimport com.sinch.sdk.domains.conversation.models.v1.eventdestinations.EventDestination;\nimport com.sinch.sdk.domains.conversation.models.v1.eventdestinations.EventDestinationTrigger;\nimport com.sinch.sdk.domains.conversation.models.v1.eventdestinations.request.EventDestinationCreateRequest;\nimport com.sinch.sdk.models.Configuration;\nimport com.sinch.sdk.models.ConversationRegion;\nimport java.util.Arrays;\nimport java.util.logging.Logger;\nimport utils.Settings;\n\npublic class Create {\n\n  private static final Logger LOGGER = Logger.getLogger(Create.class.getName());\n\n  public static void main(String[] args) {\n\n    String projectId = Settings.getProjectId().orElse(\"MY_PROJECT_ID\");\n    String keyId = Settings.getKeyId().orElse(\"MY_KEY_ID\");\n    String keySecret = Settings.getKeySecret().orElse(\"MY_KEY_SECRET\");\n    String conversationRegion = Settings.getConversationRegion().orElse(\"MY_CONVERSATION_REGION\");\n\n    // The ID of the conversation application to create the event destination for\n    String conversationApplicationId = \"APPLICATION_ID\";\n\n    Configuration configuration =\n        Configuration.builder()\n            .setProjectId(projectId)\n            .setKeyId(keyId)\n            .setKeySecret(keySecret)\n            .setConversationRegion(ConversationRegion.from(conversationRegion))\n            .build();\n\n    SinchClient client = new SinchClient(configuration);\n\n    EventDestinationsService eventDestinationsService =\n        client.conversation().v1().eventDestinations();\n\n    EventDestinationCreateRequest eventDestinationCreateRequest =\n        EventDestinationCreateRequest.builder()\n            .setAppId(conversationApplicationId)\n            .setTarget(\"https://foo.com\")\n            .setTriggers(Arrays.asList(EventDestinationTrigger.CAPABILITY))\n            .build();\n\n    LOGGER.info(\"Create event destination: \" + eventDestinationCreateRequest);\n\n    EventDestination response = eventDestinationsService.create(eventDestinationCreateRequest);\n\n    LOGGER.info(\"Response: \" + response);\n  }\n}\n"
          },
          {
            "lang": "Node.js",
            "source": "/**\n * Sinch Node.js Snippet\n * See: https://github.com/sinch/sinch-sdk-node/examples/snippets\n */\nimport { SinchClient } from '@sinch/sdk-core';\nimport * as dotenv from 'dotenv';\ndotenv.config();\n\nasync function main() {\n  const projectId = process.env.SINCH_PROJECT_ID ?? 'MY_PROJECT_ID';\n  const keyId = process.env.SINCH_KEY_ID ?? 'MY_KEY_ID';\n  const keySecret = process.env.SINCH_KEY_SECRET ?? 'MY_KEY_SECRET';\n  const conversationRegion = process.env.SINCH_CONVERSATION_REGION ?? 'MY_CONVERSATION_REGION';\n\n  // The ID of the Conversation App to create the Webhook for\n  const appId = 'CONVERSATION_APP_ID';\n\n  const sinch = new SinchClient({ projectId, keyId, keySecret, conversationRegion });\n\n  try {\n    const response = await sinch.conversation.webhooks.create({\n      webhookCreateRequestBody: {\n        app_id: appId,\n        target: 'https://foo.com/webhook',\n        triggers: ['CAPABILITY'],\n      },\n    });\n    console.log('✅ Successfully created the Webhook.');\n    console.log(JSON.stringify(response, null, 2));\n  } catch (err) {\n    console.error(`❌ Failed to create the Webhook for the Conversation App with ID ${appId}:`);\n    console.error(err);\n  }\n}\n\nmain();\n"
          }
        ]
      }
    },
    "/v1/projects/{project_id}/webhooks/{webhook_id}": {
      "parameters": [
        {
          "$ref": "#/components/parameters/project_id"
        },
        {
          "$ref": "#/components/parameters/webhook_id"
        }
      ],
      "get": {
        "description": "Get a webhook as specified by the webhook ID.",
        "tags": [
          "Webhooks"
        ],
        "summary": "Get a webhook",
        "operationId": "Webhooks_GetWebhook",
        "responses": {
          "200": {
            "description": "A successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Webhook"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/400Error"
          },
          "401": {
            "$ref": "#/components/responses/401Error"
          },
          "403": {
            "$ref": "#/components/responses/403Error"
          },
          "500": {
            "$ref": "#/components/responses/500Error"
          },
          "501": {
            "$ref": "#/components/responses/501Error"
          }
        },
        "x-codeSamples": [
          {
            "lang": "Java",
            "source": "/**\n * Sinch Java Snippet\n *\n * <p>This snippet is available at https://github.com/sinch/sinch-sdk-java\n *\n * <p>See https://github.com/sinch/sinch-sdk-java/blob/main/examples/snippets/README.md for details\n */\npackage conversation.eventdestinations;\n\nimport com.sinch.sdk.SinchClient;\nimport com.sinch.sdk.domains.conversation.api.v1.EventDestinationsService;\nimport com.sinch.sdk.domains.conversation.models.v1.eventdestinations.EventDestination;\nimport com.sinch.sdk.models.Configuration;\nimport com.sinch.sdk.models.ConversationRegion;\nimport java.util.logging.Logger;\nimport utils.Settings;\n\npublic class Get {\n\n  private static final Logger LOGGER = Logger.getLogger(Get.class.getName());\n\n  public static void main(String[] args) {\n\n    String projectId = Settings.getProjectId().orElse(\"MY_PROJECT_ID\");\n    String keyId = Settings.getKeyId().orElse(\"MY_KEY_ID\");\n    String keySecret = Settings.getKeySecret().orElse(\"MY_KEY_SECRET\");\n    String conversationRegion = Settings.getConversationRegion().orElse(\"MY_CONVERSATION_REGION\");\n\n    // The ID of the conversation event destination to retrieve\n    String eventDestinationId = \"EVENT_DESTINATION_ID\";\n\n    Configuration configuration =\n        Configuration.builder()\n            .setProjectId(projectId)\n            .setKeyId(keyId)\n            .setKeySecret(keySecret)\n            .setConversationRegion(ConversationRegion.from(conversationRegion))\n            .build();\n\n    SinchClient client = new SinchClient(configuration);\n\n    EventDestinationsService eventDestinationsService =\n        client.conversation().v1().eventDestinations();\n\n    LOGGER.info(\n        String.format(\"Get information about event destination with ID '%s'\", eventDestinationId));\n\n    EventDestination response = eventDestinationsService.get(eventDestinationId);\n\n    LOGGER.info(\"Response: \" + response);\n  }\n}\n"
          },
          {
            "lang": "Node.js",
            "source": "/**\n * Sinch Node.js Snippet\n * See: https://github.com/sinch/sinch-sdk-node/examples/snippets\n */\nimport { SinchClient } from '@sinch/sdk-core';\nimport * as dotenv from 'dotenv';\ndotenv.config();\n\nasync function main() {\n  const projectId = process.env.SINCH_PROJECT_ID ?? 'MY_PROJECT_ID';\n  const keyId = process.env.SINCH_KEY_ID ?? 'MY_KEY_ID';\n  const keySecret = process.env.SINCH_KEY_SECRET ?? 'MY_KEY_SECRET';\n  const conversationRegion = process.env.SINCH_CONVERSATION_REGION ?? 'MY_CONVERSATION_REGION';\n\n  // The ID of the Webhook to retrieve\n  const webhookId = 'WEBHOOK_ID';\n\n  const sinch = new SinchClient({ projectId, keyId, keySecret, conversationRegion });\n\n  try {\n    const response = await sinch.conversation.webhooks.get({\n      webhook_id: webhookId,\n    });\n    console.log('✅ Successfully retrieved the Webhook.');\n    console.log(JSON.stringify(response, null, 2));\n  } catch (err) {\n    console.error(`❌ Failed to retrieve the Webhook with ID ${webhookId}:`);\n    console.error(err);\n  }\n}\n\nmain();\n"
          }
        ]
      },
      "patch": {
        "description": "Updates an existing webhook as specified by the webhook ID.",
        "tags": [
          "Webhooks"
        ],
        "summary": "Update an existing webhook",
        "operationId": "Webhooks_UpdateWebhook",
        "parameters": [
          {
            "$ref": "#/components/parameters/update_mask"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Webhook"
              }
            }
          },
          "description": "Required. The Webhook to update",
          "required": true
        },
        "responses": {
          "200": {
            "description": "A successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Webhook"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/400Error"
          },
          "401": {
            "$ref": "#/components/responses/401Error"
          },
          "403": {
            "$ref": "#/components/responses/403Error"
          },
          "500": {
            "$ref": "#/components/responses/500Error"
          },
          "501": {
            "$ref": "#/components/responses/501Error"
          }
        },
        "x-codeSamples": [
          {
            "lang": "Java",
            "source": "/**\n * Sinch Java Snippet\n *\n * <p>This snippet is available at https://github.com/sinch/sinch-sdk-java\n *\n * <p>See https://github.com/sinch/sinch-sdk-java/blob/main/examples/snippets/README.md for details\n */\npackage conversation.eventdestinations;\n\nimport com.sinch.sdk.SinchClient;\nimport com.sinch.sdk.domains.conversation.api.v1.EventDestinationsService;\nimport com.sinch.sdk.domains.conversation.models.v1.eventdestinations.EventDestination;\nimport com.sinch.sdk.domains.conversation.models.v1.eventdestinations.EventDestinationTargetType;\nimport com.sinch.sdk.domains.conversation.models.v1.eventdestinations.EventDestinationTrigger;\nimport com.sinch.sdk.models.Configuration;\nimport com.sinch.sdk.models.ConversationRegion;\nimport java.util.Arrays;\nimport java.util.logging.Logger;\nimport utils.Settings;\n\npublic class Update {\n\n  private static final Logger LOGGER = Logger.getLogger(Update.class.getName());\n\n  public static void main(String[] args) {\n\n    String projectId = Settings.getProjectId().orElse(\"MY_PROJECT_ID\");\n    String keyId = Settings.getKeyId().orElse(\"MY_KEY_ID\");\n    String keySecret = Settings.getKeySecret().orElse(\"MY_KEY_SECRET\");\n    String conversationRegion = Settings.getConversationRegion().orElse(\"MY_CONVERSATION_REGION\");\n\n    // The ID of the conversation event destination to update\n    String eventDestinationId = \"EVENT_DESTINATION_ID\";\n\n    Configuration configuration =\n        Configuration.builder()\n            .setProjectId(projectId)\n            .setKeyId(keyId)\n            .setKeySecret(keySecret)\n            .setConversationRegion(ConversationRegion.from(conversationRegion))\n            .build();\n\n    SinchClient client = new SinchClient(configuration);\n\n    EventDestinationsService eventDestinationsService =\n        client.conversation().v1().eventDestinations();\n\n    EventDestination eventDestination =\n        EventDestination.builder()\n            .setTarget(\"https://foo.com\")\n            .setTriggers(\n                Arrays.asList(\n                    EventDestinationTrigger.CAPABILITY, EventDestinationTrigger.CHANNEL_EVENT))\n            .setTargetType(EventDestinationTargetType.HTTP)\n            .build();\n\n    LOGGER.info(String.format(\"Update event destination with ID '%s'\", eventDestinationId));\n\n    EventDestination response =\n        eventDestinationsService.update(eventDestinationId, eventDestination);\n\n    LOGGER.info(\"Response: \" + response);\n  }\n}\n"
          },
          {
            "lang": "Node.js",
            "source": "/**\n * Sinch Node.js Snippet\n * See: https://github.com/sinch/sinch-sdk-node/examples/snippets\n */\nimport { SinchClient } from '@sinch/sdk-core';\nimport * as dotenv from 'dotenv';\ndotenv.config();\n\nasync function main() {\n  const projectId = process.env.SINCH_PROJECT_ID ?? 'MY_PROJECT_ID';\n  const keyId = process.env.SINCH_KEY_ID ?? 'MY_KEY_ID';\n  const keySecret = process.env.SINCH_KEY_SECRET ?? 'MY_KEY_SECRET';\n  const conversationRegion = process.env.SINCH_CONVERSATION_REGION ?? 'MY_CONVERSATION_REGION';\n\n  // The ID of the Webhook to update\n  const webhookId = 'WEBHOOK_ID';\n\n  const sinch = new SinchClient({ projectId, keyId, keySecret, conversationRegion });\n\n  try {\n    const response = await sinch.conversation.webhooks.update({\n      webhook_id: webhookId,\n      webhookUpdateRequestBody: {\n        target: 'https://foo.com/webhook_updated',\n        triggers: ['MESSAGE_SUBMIT', 'MESSAGE_DELIVERY'],\n        target_type: 'HTTP',\n      },\n    });\n    console.log('✅ Successfully updated the Webhook.');\n    console.log(JSON.stringify(response, null, 2));\n  } catch (err) {\n    console.error(`❌ Failed to update the Webhook with ID ${webhookId}:`);\n    console.error(err);\n  }\n}\n\nmain();\n"
          }
        ]
      },
      "delete": {
        "description": "Deletes a webhook as specified by the webhook ID.",
        "tags": [
          "Webhooks"
        ],
        "summary": "Delete an existing webhook",
        "operationId": "Webhooks_DeleteWebhook",
        "responses": {
          "200": {
            "description": "A successful response."
          },
          "400": {
            "$ref": "#/components/responses/400Error"
          },
          "401": {
            "$ref": "#/components/responses/401Error"
          },
          "403": {
            "$ref": "#/components/responses/403Error"
          },
          "500": {
            "$ref": "#/components/responses/500Error"
          },
          "501": {
            "$ref": "#/components/responses/501Error"
          }
        },
        "x-codeSamples": [
          {
            "lang": "Java",
            "source": "/**\n * Sinch Java Snippet\n *\n * <p>This snippet is available at https://github.com/sinch/sinch-sdk-java\n *\n * <p>See https://github.com/sinch/sinch-sdk-java/blob/main/examples/snippets/README.md for details\n */\npackage conversation.eventdestinations;\n\nimport com.sinch.sdk.SinchClient;\nimport com.sinch.sdk.domains.conversation.api.v1.EventDestinationsService;\nimport com.sinch.sdk.models.Configuration;\nimport com.sinch.sdk.models.ConversationRegion;\nimport java.util.logging.Logger;\nimport utils.Settings;\n\npublic class Delete {\n\n  private static final Logger LOGGER = Logger.getLogger(Delete.class.getName());\n\n  public static void main(String[] args) {\n\n    String projectId = Settings.getProjectId().orElse(\"MY_PROJECT_ID\");\n    String keyId = Settings.getKeyId().orElse(\"MY_KEY_ID\");\n    String keySecret = Settings.getKeySecret().orElse(\"MY_KEY_SECRET\");\n    String conversationRegion = Settings.getConversationRegion().orElse(\"MY_CONVERSATION_REGION\");\n\n    // The ID of the event destination to delete\n    String eventDestinationId = \"EVENT_DESTINATION_ID\";\n\n    Configuration configuration =\n        Configuration.builder()\n            .setProjectId(projectId)\n            .setKeyId(keyId)\n            .setKeySecret(keySecret)\n            .setConversationRegion(ConversationRegion.from(conversationRegion))\n            .build();\n\n    SinchClient client = new SinchClient(configuration);\n\n    EventDestinationsService eventDestinationsService =\n        client.conversation().v1().eventDestinations();\n\n    LOGGER.info(\"Deleting event destination: \" + eventDestinationId);\n\n    eventDestinationsService.delete(eventDestinationId);\n\n    LOGGER.info(\"Done\");\n  }\n}\n"
          },
          {
            "lang": "Node.js",
            "source": "/**\n * Sinch Node.js Snippet\n * See: https://github.com/sinch/sinch-sdk-node/examples/snippets\n */\nimport { SinchClient } from '@sinch/sdk-core';\nimport * as dotenv from 'dotenv';\ndotenv.config();\n\nasync function main() {\n  const projectId = process.env.SINCH_PROJECT_ID ?? 'MY_PROJECT_ID';\n  const keyId = process.env.SINCH_KEY_ID ?? 'MY_KEY_ID';\n  const keySecret = process.env.SINCH_KEY_SECRET ?? 'MY_KEY_SECRET';\n  const conversationRegion = process.env.SINCH_CONVERSATION_REGION ?? 'MY_CONVERSATION_REGION';\n\n  // The ID of the Webhook to delete\n  const webhookId = 'WEBHOOK_ID';\n\n  const sinch = new SinchClient({ projectId, keyId, keySecret, conversationRegion });\n\n  try {\n    await sinch.conversation.webhooks.delete({\n      webhook_id: webhookId,\n    });\n    console.log('✅ Successfully deleted the Webhook.');\n  } catch (err) {\n    console.error(`❌ Failed to delete the Webhook with ID ${webhookId}:`);\n    console.error(err);\n  }\n}\n\nmain();\n"
          }
        ]
      }
    },
    "/v1/projects/{project_id}/settings": {
      "parameters": [
        {
          "$ref": "#/components/parameters/project_id"
        }
      ],
      "get": {
        "tags": [
          "Project Settings"
        ],
        "summary": "Get Project Settings",
        "description": "Retrieves the current settings for the specified project, including contact management options such as Unified Contact ID.\n",
        "operationId": "ProjectSettings_GetSettings",
        "responses": {
          "200": {
            "description": "A successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProjectSettings"
                },
                "examples": {
                  "enabledUnifiedContactId": {
                    "summary": "Example response with Unified Contact ID enabled",
                    "value": {
                      "project_id": "{PROJECT_ID}",
                      "settings": {
                        "contact_settings": {
                          "unified_contact_id_enabled": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/400Error"
          },
          "401": {
            "$ref": "#/components/responses/401Error"
          },
          "403": {
            "$ref": "#/components/responses/403Error"
          },
          "500": {
            "$ref": "#/components/responses/500Error"
          },
          "501": {
            "$ref": "#/components/responses/501Error"
          }
        },
        "x-codeSamples": [
          {
            "lang": "Java",
            "source": "/**\n * Sinch Java Snippet\n *\n * <p>This snippet is available at https://github.com/sinch/sinch-sdk-java\n *\n * <p>See https://github.com/sinch/sinch-sdk-java/blob/main/examples/snippets/README.md for details\n */\npackage conversation.projectsettings;\n\nimport com.sinch.sdk.SinchClient;\nimport com.sinch.sdk.domains.conversation.api.v1.ProjectSettingsService;\nimport com.sinch.sdk.domains.conversation.models.v1.projectsettings.response.ProjectSettingsResponse;\nimport com.sinch.sdk.models.Configuration;\nimport com.sinch.sdk.models.ConversationRegion;\nimport java.util.logging.Logger;\nimport utils.Settings;\n\npublic class Get {\n\n  private static final Logger LOGGER = Logger.getLogger(Get.class.getName());\n\n  public static void main(String[] args) {\n\n    String projectId = Settings.getProjectId().orElse(\"MY_PROJECT_ID\");\n    String keyId = Settings.getKeyId().orElse(\"MY_KEY_ID\");\n    String keySecret = Settings.getKeySecret().orElse(\"MY_KEY_SECRET\");\n    String conversationRegion = Settings.getConversationRegion().orElse(\"MY_CONVERSATION_REGION\");\n\n    Configuration configuration =\n        Configuration.builder()\n            .setProjectId(projectId)\n            .setKeyId(keyId)\n            .setKeySecret(keySecret)\n            .setConversationRegion(ConversationRegion.from(conversationRegion))\n            .build();\n\n    SinchClient client = new SinchClient(configuration);\n\n    ProjectSettingsService service = client.conversation().v1().projectSettings();\n\n    LOGGER.info(\"Get conversation project settings\");\n\n    ProjectSettingsResponse result = service.get();\n\n    LOGGER.info(\"Response: \" + result);\n  }\n}\n"
          },
          {
            "lang": "Node.js",
            "source": "/**\n * Sinch Node.js Snippet\n * See: https://github.com/sinch/sinch-sdk-node/examples/snippets\n */\nimport { SinchClient } from '@sinch/sdk-core';\nimport * as dotenv from 'dotenv';\ndotenv.config();\n\nasync function main() {\n  const projectId = process.env.SINCH_PROJECT_ID ?? 'MY_PROJECT_ID';\n  const keyId = process.env.SINCH_KEY_ID ?? 'MY_KEY_ID';\n  const keySecret = process.env.SINCH_KEY_SECRET ?? 'MY_KEY_SECRET';\n  const conversationRegion = process.env.SINCH_CONVERSATION_REGION ?? 'MY_CONVERSATION_REGION';\n\n  const sinch = new SinchClient({ projectId, keyId, keySecret, conversationRegion });\n\n  try {\n    const response = await sinch.conversation.projectSettings.get({});\n    console.log('✅ Successfully retrieved the Project Settings.');\n    console.log(JSON.stringify(response, null, 2));\n  } catch (err) {\n    console.error('❌ Failed to retrieve the Project Settings:');\n    console.error(err);\n  }\n}\n\nmain();\n"
          }
        ]
      },
      "post": {
        "tags": [
          "Project Settings"
        ],
        "summary": "Create Project Settings",
        "description": "Creates initial settings for the project. Useful for enabling features like Unified Contact ID. For new projects with no existing contacts, you can enable Unified Contact ID immediately.\n",
        "operationId": "ProjectSettings_CreateSettings",
        "requestBody": {
          "description": "The project settings to create.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ProjectSettingsRequest"
              },
              "examples": {
                "enableUnifiedContactId": {
                  "summary": "Enable Unified Contact ID",
                  "value": {
                    "contact_settings": {
                      "unified_contact_id_enabled": true
                    }
                  }
                }
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "A successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProjectSettings"
                },
                "examples": {
                  "enabledUnifiedContactId": {
                    "summary": "Example response with Unified Contact ID enabled",
                    "value": {
                      "project_id": "{PROJECT_ID}",
                      "settings": {
                        "contact_settings": {
                          "unified_contact_id_enabled": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/400Error"
          },
          "401": {
            "$ref": "#/components/responses/401Error"
          },
          "403": {
            "$ref": "#/components/responses/403Error"
          },
          "500": {
            "$ref": "#/components/responses/500Error"
          },
          "501": {
            "$ref": "#/components/responses/501Error"
          }
        },
        "x-codeSamples": [
          {
            "lang": "Java",
            "source": "/**\n * Sinch Java Snippet\n *\n * <p>This snippet is available at https://github.com/sinch/sinch-sdk-java\n *\n * <p>See https://github.com/sinch/sinch-sdk-java/blob/main/examples/snippets/README.md for details\n */\npackage conversation.projectsettings;\n\nimport com.sinch.sdk.SinchClient;\nimport com.sinch.sdk.domains.conversation.api.v1.ProjectSettingsService;\nimport com.sinch.sdk.domains.conversation.models.v1.projectsettings.ContactSettings;\nimport com.sinch.sdk.domains.conversation.models.v1.projectsettings.request.ProjectSettingsRequest;\nimport com.sinch.sdk.domains.conversation.models.v1.projectsettings.response.ProjectSettingsResponse;\nimport com.sinch.sdk.models.Configuration;\nimport com.sinch.sdk.models.ConversationRegion;\nimport java.util.logging.Logger;\nimport utils.Settings;\n\npublic class Create {\n\n  private static final Logger LOGGER = Logger.getLogger(Create.class.getName());\n\n  public static void main(String[] args) {\n\n    String projectId = Settings.getProjectId().orElse(\"MY_PROJECT_ID\");\n    String keyId = Settings.getKeyId().orElse(\"MY_KEY_ID\");\n    String keySecret = Settings.getKeySecret().orElse(\"MY_KEY_SECRET\");\n    String conversationRegion = Settings.getConversationRegion().orElse(\"MY_CONVERSATION_REGION\");\n\n    Configuration configuration =\n        Configuration.builder()\n            .setProjectId(projectId)\n            .setKeyId(keyId)\n            .setKeySecret(keySecret)\n            .setConversationRegion(ConversationRegion.from(conversationRegion))\n            .build();\n\n    SinchClient client = new SinchClient(configuration);\n\n    ProjectSettingsService service = client.conversation().v1().projectSettings();\n\n    LOGGER.info(\"Create conversation project settings\");\n\n    ContactSettings contactSettings =\n        ContactSettings.builder().setUnifiedContactIdEnabled(false).build();\n\n    ProjectSettingsRequest request =\n        ProjectSettingsRequest.builder().setContactSettings(contactSettings).build();\n\n    ProjectSettingsResponse result = service.create(request);\n\n    LOGGER.info(\"Response: \" + result);\n  }\n}\n"
          },
          {
            "lang": "Node.js",
            "source": "/**\n * Sinch Node.js Snippet\n * See: https://github.com/sinch/sinch-sdk-node/examples/snippets\n */\nimport { SinchClient } from '@sinch/sdk-core';\nimport * as dotenv from 'dotenv';\ndotenv.config();\n\nasync function main() {\n  const projectId = process.env.SINCH_PROJECT_ID ?? 'MY_PROJECT_ID';\n  const keyId = process.env.SINCH_KEY_ID ?? 'MY_KEY_ID';\n  const keySecret = process.env.SINCH_KEY_SECRET ?? 'MY_KEY_SECRET';\n  const conversationRegion = process.env.SINCH_CONVERSATION_REGION ?? 'MY_CONVERSATION_REGION';\n\n  const sinch = new SinchClient({ projectId, keyId, keySecret, conversationRegion });\n\n  try {\n    const response = await sinch.conversation.projectSettings.create({\n      createProjectSettingsRequestBody: {\n        contact_settings: {\n          unified_contact_id_enabled: false,\n        },\n      },\n    });\n    console.log('✅ Successfully created the ProjectSettings.');\n    console.log(JSON.stringify(response, null, 2));\n  } catch (err) {\n    console.error('❌ Failed to create the ProjectSettings:');\n    console.error(err);\n  }\n}\n\nmain();\n"
          }
        ]
      },
      "patch": {
        "tags": [
          "Project Settings"
        ],
        "summary": "Update Project Settings",
        "description": "Updates project settings (e.g. enabling/disabling Unified Contact ID). For existing projects, you must resolve all identity conflicts before enabling Unified Contact ID.\n",
        "operationId": "ProjectSettings_UpdateSettings",
        "requestBody": {
          "description": "The project settings to update.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ProjectSettingsRequest"
              },
              "examples": {
                "enableUnifiedContactId": {
                  "summary": "Enable Unified Contact ID",
                  "value": {
                    "contact_settings": {
                      "unified_contact_id_enabled": true
                    }
                  }
                }
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "A successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProjectSettings"
                },
                "examples": {
                  "enabledUnifiedContactId": {
                    "summary": "Example response with Unified Contact ID enabled",
                    "value": {
                      "project_id": "{PROJECT_ID}",
                      "settings": {
                        "contact_settings": {
                          "unified_contact_id_enabled": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/400Error"
          },
          "401": {
            "$ref": "#/components/responses/401Error"
          },
          "403": {
            "$ref": "#/components/responses/403Error"
          },
          "500": {
            "$ref": "#/components/responses/500Error"
          },
          "501": {
            "$ref": "#/components/responses/501Error"
          }
        },
        "x-codeSamples": [
          {
            "lang": "Java",
            "source": "/**\n * Sinch Java Snippet\n *\n * <p>This snippet is available at https://github.com/sinch/sinch-sdk-java\n *\n * <p>See https://github.com/sinch/sinch-sdk-java/blob/main/examples/snippets/README.md for details\n */\npackage conversation.projectsettings;\n\nimport com.sinch.sdk.SinchClient;\nimport com.sinch.sdk.domains.conversation.api.v1.ProjectSettingsService;\nimport com.sinch.sdk.domains.conversation.models.v1.projectsettings.ContactSettings;\nimport com.sinch.sdk.domains.conversation.models.v1.projectsettings.request.ProjectSettingsRequest;\nimport com.sinch.sdk.domains.conversation.models.v1.projectsettings.response.ProjectSettingsResponse;\nimport com.sinch.sdk.models.Configuration;\nimport com.sinch.sdk.models.ConversationRegion;\nimport java.io.IOException;\nimport java.util.logging.Logger;\nimport utils.Settings;\n\npublic class Update {\n\n  private static final Logger LOGGER = Logger.getLogger(Update.class.getName());\n\n  public static void main(String[] args) throws IOException {\n\n    String projectId = Settings.getProjectId().orElse(\"MY_PROJECT_ID\");\n    String keyId = Settings.getKeyId().orElse(\"MY_KEY_ID\");\n    String keySecret = Settings.getKeySecret().orElse(\"MY_KEY_SECRET\");\n    String conversationRegion = Settings.getConversationRegion().orElse(\"MY_CONVERSATION_REGION\");\n\n    Configuration configuration =\n        Configuration.builder()\n            .setProjectId(projectId)\n            .setKeyId(keyId)\n            .setKeySecret(keySecret)\n            .setConversationRegion(ConversationRegion.from(conversationRegion))\n            .build();\n\n    SinchClient client = new SinchClient(configuration);\n\n    ProjectSettingsService service = client.conversation().v1().projectSettings();\n\n    LOGGER.info(\"conversation project settings\");\n\n    ContactSettings contactSettings =\n        ContactSettings.builder().setUnifiedContactIdEnabled(false).build();\n\n    ProjectSettingsRequest request =\n        ProjectSettingsRequest.builder().setContactSettings(contactSettings).build();\n\n    ProjectSettingsResponse result = service.update(request);\n\n    LOGGER.info(\"Response: \" + result);\n  }\n}\n"
          },
          {
            "lang": "Node.js",
            "source": "/**\n * Sinch Node.js Snippet\n * See: https://github.com/sinch/sinch-sdk-node/examples/snippets\n */\nimport { SinchClient } from '@sinch/sdk-core';\nimport * as dotenv from 'dotenv';\ndotenv.config();\n\nasync function main() {\n  const projectId = process.env.SINCH_PROJECT_ID ?? 'MY_PROJECT_ID';\n  const keyId = process.env.SINCH_KEY_ID ?? 'MY_KEY_ID';\n  const keySecret = process.env.SINCH_KEY_SECRET ?? 'MY_KEY_SECRET';\n  const conversationRegion = process.env.SINCH_CONVERSATION_REGION ?? 'MY_CONVERSATION_REGION';\n\n  const sinch = new SinchClient({ projectId, keyId, keySecret, conversationRegion });\n\n  try {\n    const response = await sinch.conversation.projectSettings.update({\n      updateProjectSettingsRequestBody: {\n        contact_settings: {\n          unified_contact_id_enabled: true,\n        },\n      },\n    });\n    console.log('✅ Successfully updated the Project Settings.');\n    console.log(JSON.stringify(response, null, 2));\n  } catch (err) {\n    console.error('❌ Failed to update the Project Settings:');\n    console.error(err);\n  }\n}\n\nmain();\n"
          }
        ]
      },
      "delete": {
        "tags": [
          "Project Settings"
        ],
        "summary": "Delete Project Settings",
        "description": "Deletes all project-level settings for the specified project.",
        "operationId": "ProjectSettings_DeleteSettings",
        "responses": {
          "200": {
            "description": "A successful response."
          },
          "400": {
            "$ref": "#/components/responses/400Error"
          },
          "401": {
            "$ref": "#/components/responses/401Error"
          },
          "403": {
            "$ref": "#/components/responses/403Error"
          },
          "500": {
            "$ref": "#/components/responses/500Error"
          },
          "501": {
            "$ref": "#/components/responses/501Error"
          }
        },
        "x-codeSamples": [
          {
            "lang": "Java",
            "source": "/**\n * Sinch Java Snippet\n *\n * <p>This snippet is available at https://github.com/sinch/sinch-sdk-java\n *\n * <p>See https://github.com/sinch/sinch-sdk-java/blob/main/examples/snippets/README.md for details\n */\npackage conversation.projectsettings;\n\nimport com.sinch.sdk.SinchClient;\nimport com.sinch.sdk.domains.conversation.api.v1.ProjectSettingsService;\nimport com.sinch.sdk.models.Configuration;\nimport com.sinch.sdk.models.ConversationRegion;\nimport java.util.logging.Logger;\nimport utils.Settings;\n\npublic class Delete {\n\n  private static final Logger LOGGER = Logger.getLogger(Delete.class.getName());\n\n  public static void main(String[] args) {\n\n    String projectId = Settings.getProjectId().orElse(\"MY_PROJECT_ID\");\n    String keyId = Settings.getKeyId().orElse(\"MY_KEY_ID\");\n    String keySecret = Settings.getKeySecret().orElse(\"MY_KEY_SECRET\");\n    String conversationRegion = Settings.getConversationRegion().orElse(\"MY_CONVERSATION_REGION\");\n\n    Configuration configuration =\n        Configuration.builder()\n            .setProjectId(projectId)\n            .setKeyId(keyId)\n            .setKeySecret(keySecret)\n            .setConversationRegion(ConversationRegion.from(conversationRegion))\n            .build();\n\n    SinchClient client = new SinchClient(configuration);\n\n    ProjectSettingsService service = client.conversation().v1().projectSettings();\n\n    LOGGER.info(\"Delete conversation project settings\");\n\n    service.delete();\n\n    LOGGER.info(\"Deletion done.\");\n  }\n}\n"
          },
          {
            "lang": "Node.js",
            "source": "/**\n * Sinch Node.js Snippet\n * See: https://github.com/sinch/sinch-sdk-node/examples/snippets\n */\nimport { SinchClient } from '@sinch/sdk-core';\nimport * as dotenv from 'dotenv';\ndotenv.config();\n\nasync function main() {\n  const projectId = process.env.SINCH_PROJECT_ID ?? 'MY_PROJECT_ID';\n  const keyId = process.env.SINCH_KEY_ID ?? 'MY_KEY_ID';\n  const keySecret = process.env.SINCH_KEY_SECRET ?? 'MY_KEY_SECRET';\n  const conversationRegion = process.env.SINCH_CONVERSATION_REGION ?? 'MY_CONVERSATION_REGION';\n\n  const sinch = new SinchClient({ projectId, keyId, keySecret, conversationRegion });\n\n  try {\n    await sinch.conversation.projectSettings.delete({});\n    console.log('✅ Successfully deleted the Project Settings.');\n  } catch (err) {\n    console.error('❌ Failed to delete the Project Settings:');\n    console.error(err);\n  }\n}\n\nmain();\n"
          }
        ]
      }
    }
  },
  "tags": [
    {
      "description": "To start sending messages you must have a Conversation API [**app**](https://dashboard.sinch.com/convapi/apps). The app holds information about the channel credentials and registered webhooks to which the API delivers callbacks such as message delivery receipts and contact messages. If you don't already have an app please follow the instructions in the getting started guide available in the [Sinch Dashboard](https://dashboard.sinch.com/convapi/getting-started) to create one.",
      "name": "Messages",
      "x-displayName": "Messages"
    },
    {
      "description": "Apps are created and configured through the [Sinch Dashboard](https://dashboard.sinch.com/convapi/apps), are tied to the API user and come with a set of **channel credentials** for each underlying connected channel. The app has a list of **conversations** between itself and different **contacts** which share the same **project**.\n\nWebhooks, which the app is attached to, defines the destination for various events coming from the Conversation API. An **app** has the following configurable properties:\n\n| Field                        | Description                                                                                                       |\n| ---------------------------- | ----------------------------------------------------------------------------------------------------------------- |\n| Display name                 | The name visible in the [Sinch Dashboard](https://dashboard.sinch.com/convapi/apps).                                 |\n| Conversation metadata report | Specifies the amount of **conversation**metadata that's returned as part of each callback.                        |\n| Retention Policy             | The retention policy specifies how long messages, sent to or from an **app**, are stored by the Conversation API. |",
      "name": "App",
      "x-displayName": "Apps"
    },
    {
      "description": "A contact is a collection that groups together underlying connected **channel recipient identities**. It's tied to a specific **project** and is therefore considered public to all **apps** sharing the same **project**. Most contact creation and maintenance is handled by the Conversation API's automatic [contact management](https://developers.sinch.com/docs/conversation/contact-management/) processes. However, you can also use API calls to manually manage your contacts.\n\nA **contact** has the following configurable properties:\n\n| Field              | Description                                                                                                                                         |\n| ------------------ | --------------------------------------------------------------------------------------------------------------------------------------------------- |\n| Channel identities | List of channel identities specifying how the contact is identified on underlying channels                                                          |\n| Channel priority   | Specifies the channel priority order used when sending messages to this contact. This can be overridden by message specific channel priority order. |\n| Display name       | Optional display name used in chat windows and other UIs                                                                                            |\n| Email              | Optional Email of the contact                                                                                                                       |\n| External id        | Optional identifier of the contact in external systems                                                                                              |\n| Metadata           | Optional metadata associated with the contact.                                                                                                      |",
      "name": "Contact",
      "x-displayName": "Contacts"
    },
    {
      "description": "Endpoints for working with the conversation log.",
      "name": "Conversation",
      "x-displayName": "Conversations"
    },
    {
      "description": "Endpoint for sending events.",
      "name": "Events",
      "x-displayName": "Events"
    },
    {
      "description": "Endpoint for transcoding generic message format to channel-specific one.",
      "name": "Transcoding",
      "x-displayName": "Transcode"
    },
    {
      "description": "A capability query determines which options are available for reaching a [contact](https://developers.sinch.com/docs/conversation/keyconcepts/#contact) on the channels on which the contact has a channel identity.\n\nTo execute the request, either the contact ID or the channel recipient identities of the contact are required.\n\nThe request is executed asynchronously. Therefore the service responds with immediate acknowledgment. The final result of the capability query is sent to a [webhook](https://developers.sinch.com/docs/conversation/keyconcepts/#webhook) registered for the `CAPABILITY` trigger.\n\nWhen no authoritative source of truth exists for a given channel's capability, the endpoint **MUST** respond as `Capable` for that channel. This ensures that any configured fallback and upscale routing strategies continue to function as expected.\n\n{% admonition type=\"info\" name=\"Note:\" %}\nThe `status` received via the `MESSAGE_DELIVERY` callback should be treated as the definitive indication of reachability for the corresponding recipient at the time of the delivery attempt. For example, a `RECIPIENT_NOT_REACHABLE` status may legitimately follow an earlier `Capable` response from the Capability endpoint, as reachability can change between the time of capability assessment and the time of actual message delivery.\n{% /admonition %}",
      "name": "Capability",
      "x-displayName": "Capability"
    },
    {
      "description": "Consent queries provide a way to retreive any identities stored within a given consent list. You can also retrieve audit records that provide details for a given identity's journey through [consent management](https://developers.sinch.com/docs/conversation/consent-management/).",
      "name": "Consent",
      "x-displayName": "Consents"
    },
    {
      "description": "Endpoint for managing various settings for your [Sinch project](https://developers.sinch.com/docs/conversation/keyconcepts#project).",
      "name": "Project Settings",
      "x-displayName": "Projects"
    }
  ],
  "x-explorer-enabled": false,
  "x-samples-languages": [
    "curl",
    "java",
    "csharp",
    "node",
    "php"
  ],
  "components": {
    "parameters": {
      "project_id": {
        "name": "project_id",
        "description": "The unique ID of the project. You can find this on the [Sinch Dashboard](https://dashboard.sinch.com/convapi/apps).",
        "in": "path",
        "required": true,
        "schema": {
          "type": "string"
        }
      },
      "app_id": {
        "name": "app_id",
        "description": "The unique ID of the app. You can find this on the [Sinch Dashboard](https://dashboard.sinch.com/convapi/apps).",
        "in": "path",
        "required": true,
        "schema": {
          "type": "string"
        }
      },
      "contact_id": {
        "name": "contact_id",
        "description": "The unique ID of the contact.",
        "in": "path",
        "required": true,
        "schema": {
          "type": "string"
        }
      },
      "webhook_id": {
        "name": "webhook_id",
        "description": "The unique ID of the webhook.",
        "in": "path",
        "required": true,
        "schema": {
          "type": "string"
        }
      },
      "destination_id": {
        "name": "destination_id",
        "description": "The unique ID of the contact that should be kept when merging two contacts.",
        "in": "path",
        "required": true,
        "schema": {
          "type": "string"
        }
      },
      "conversation_id": {
        "name": "conversation_id",
        "description": "The unique ID of the conversation. This is generated by the system.",
        "in": "path",
        "required": true,
        "schema": {
          "type": "string"
        }
      },
      "message_id": {
        "name": "message_id",
        "description": "The unique ID of the message.",
        "in": "path",
        "required": true,
        "schema": {
          "type": "string"
        }
      },
      "query_app_id": {
        "description": "The ID of the app involved in the conversations.",
        "name": "app_id",
        "in": "query",
        "schema": {
          "type": "string"
        }
      },
      "query_conversation_id": {
        "description": "Resource name (ID) of the conversation.",
        "name": "conversation_id",
        "in": "query",
        "schema": {
          "type": "string"
        }
      },
      "query_contact_id": {
        "name": "contact_id",
        "description": "Resource name (ID) of the contact.",
        "in": "query",
        "schema": {
          "type": "string"
        }
      },
      "messages_source": {
        "name": "messages_source",
        "description": "Specifies the message source for which the request will be processed. Used for operations on messages in Dispatch Mode. For more information, see [Processing Modes](https://developers.sinch.com/docs/conversation/processing-modes/).",
        "in": "query",
        "schema": {
          "$ref": "#/components/schemas/MessageSource"
        }
      },
      "order": {
        "name": "order",
        "description": "Order of the recent conversations.",
        "in": "query",
        "schema": {
          "x-enumDescriptions": {
            "DESC": "Descending order. Newest first.",
            "ASC": "Ascending order. Oldest first."
          },
          "default": "DESC",
          "type": "string",
          "enum": [
            "ASC",
            "DESC"
          ]
        }
      },
      "only_recipient_originated": {
        "description": "If true, fetch only recipient originated messages.",
        "name": "only_recipient_originated",
        "in": "query",
        "schema": {
          "type": "boolean"
        }
      },
      "update_mask": {
        "description": "The set of field mask paths.",
        "name": "update_mask",
        "in": "query",
        "explode": false,
        "schema": {
          "type": "array",
          "items": {
            "type": "string"
          }
        }
      },
      "request_id": {
        "description": "ID for the asynchronous request, will be generated if not set. Currently this field is not used for idempotency but it will be added in v1.",
        "name": "request_id",
        "in": "query",
        "schema": {
          "type": "string"
        }
      },
      "event_id": {
        "description": "The unique ID of the event.",
        "name": "event_id",
        "required": true,
        "in": "path",
        "schema": {
          "type": "string"
        }
      },
      "list_type": {
        "name": "list_type",
        "description": "The consent list type. One of `OPT_OUT_ALL`, `OPT_OUT_MARKETING`, and or `OPT_OUT_NOTIFICATION`.",
        "in": "path",
        "required": true,
        "schema": {
          "$ref": "#/components/schemas/ConsentsListType"
        }
      },
      "identity": {
        "name": "identity",
        "description": "An identity to use on Consent audit records queries.",
        "in": "path",
        "required": true,
        "schema": {
          "type": "string"
        }
      }
    },
    "examples": {
      "createFacebookApp": {
        "summary": "Create Facebook App",
        "value": {
          "channel_credentials": [
            {
              "channel": "MESSENGER",
              "static_token": {
                "token": "{Facebook_Token}"
              }
            }
          ],
          "display_name": "Demo Facebook App"
        }
      },
      "createSMSApp": {
        "summary": "Create SMS App",
        "value": {
          "channel_credentials": [
            {
              "channel": "SMS",
              "static_bearer": {
                "claimed_identity": "{Service_Plan_Id}",
                "token": "{API_Token}"
              }
            }
          ],
          "display_name": "Demo SMS App"
        }
      },
      "createWhatsAppApp": {
        "summary": "Create WhatsApp App",
        "value": {
          "channel_credentials": [
            {
              "channel": "WHATSAPP",
              "static_bearer": {
                "claimed_identity": "{WhatsApp_Sender_ID}",
                "token": "{WhatsApp_Bearer_Token}"
              }
            }
          ],
          "display_name": "Demo WhatsApp App"
        }
      },
      "sendMessageContactId": {
        "summary": "Send message with contact_id recipient",
        "value": {
          "app_id": "{APP_ID}",
          "recipient": {
            "contact_id": "{CONTACT_ID}"
          },
          "message": {
            "text_message": {
              "text": "This is a text message."
            }
          }
        }
      },
      "sendMessageIdentifiedBy": {
        "summary": "Send message with identified_by recipient",
        "value": {
          "app_id": "{APP_ID}",
          "recipient": {
            "identified_by": {
              "channel_identities": [
                {
                  "channel": "{CHANNEL}",
                  "identity": "{IDENTITY}"
                }
              ]
            }
          },
          "message": {
            "text_message": {
              "text": "This is a text message."
            }
          }
        }
      },
      "sendOmniTemplate": {
        "summary": "Send message using an omnichannel template",
        "value": {
          "app_id": "{APP_ID}",
          "recipient": {
            "identified_by": {
              "channel_identities": [
                {
                  "channel": "{CHANNEL}",
                  "identity": "{IDENTITY}"
                }
              ]
            }
          },
          "message": {
            "template_message": {
              "omni_template": {
                "template_id": "YOUR_omni_template_id",
                "version": "latest",
                "language_code": "en_US",
                "parameters": {}
              }
            }
          }
        }
      },
      "sendExplicitChannelOmniMessage": {
        "summary": "Send explicit channel message, overriding omni message",
        "value": {
          "app_id": "{APP_ID}",
          "recipient": {
            "identified_by": {
              "channel_identities": [
                {
                  "channel": "{CHANNEL}",
                  "identity": "{IDENTITY}"
                }
              ]
            }
          },
          "message": {
            "explicit_channel_omni_message": {
              "SMS": {
                "template_reference": {
                  "template_id": "YOUR_omni_template_id",
                  "version": "latest",
                  "language_code": "en_US",
                  "parameters": {}
                }
              }
            }
          }
        }
      },
      "listMessagesByChannelIdentity": {
        "summary": "List messages by channel identity",
        "value": {
          "app_id": "YOUR_APP_ID",
          "messages_source": "DISPATCH_SOURCE",
          "channel_identities": [
            "447700900000",
            "447700900001",
            "447700900002"
          ],
          "direction": "TO_CONTACT",
          "view": "WITHOUT_METADATA",
          "channel": "WHATSAPP",
          "start_time": "2026-01-01T08:30:00Z",
          "end_time": "2026-01-31T22:30:00Z"
        }
      },
      "listMessagesByContactId": {
        "summary": "List messages by contact ID",
        "value": {
          "app_id": "YOUR_APP_ID",
          "messages_source": "CONVERSATION_SOURCE",
          "contact_ids": [
            "01H5XXXXXXXXXXXXXXXXXXX1",
            "01H5XXXXXXXXXXXXXXXXXXX2",
            "01H5XXXXXXXXXXXXXXXXXXX3"
          ],
          "direction": "TO_CONTACT",
          "view": "WITHOUT_METADATA",
          "channel": "WHATSAPP",
          "start_time": "2026-01-01T08:30:00Z",
          "end_time": "2026-01-31T22:30:00Z"
        }
      },
      "createContactWithOneChannel": {
        "summary": "Create new contact with only one channel",
        "value": {
          "channel_identities": [
            {
              "channel": "WHATSAPP",
              "identity": "{{WHATSAPP_PHONE_NUMBER}}"
            }
          ],
          "language": "EN_US",
          "display_name": "New Contact",
          "email": "new.contact@email.com"
        }
      },
      "createConversationRequest": {
        "summary": "Create a new conversation",
        "value": {
          "active": true,
          "active_channel": "WHATSAPP",
          "app_id": "{APP_ID}",
          "contact_id": "{CONTACT_ID}",
          "id": "string",
          "metadata": "string",
          "metadata_json": {}
        }
      },
      "updateConversationRequest": {
        "summary": "Update a conversation",
        "value": {
          "app_id": "string ",
          "metadata": "string",
          "active_channel": "WHATSAPP",
          "active": true
        }
      },
      "updateMessageMetadataRequest": {
        "summary": "Update certain fields of a message. For now only metadata update is allowed.",
        "value": {
          "metadata": "New metadata value"
        }
      },
      "createContactWithManyChannels": {
        "summary": "Create new contact with multiple channels",
        "value": {
          "channel_identities": [
            {
              "channel": "MESSENGER",
              "identity": "{{FACEBOOK_USER_NAME}}",
              "app_id": "{{APP_ID}}"
            },
            {
              "channel": "SMS",
              "identity": "{{PHONE_NUMBER}}"
            },
            {
              "channel": "VIBER",
              "identity": "{{PHONE_NUMBER}}",
              "app_id": "{{APP_ID}}"
            }
          ],
          "channel_priority": [
            "MESSENGER",
            "VIBER",
            "SMS"
          ],
          "language": "EN_US",
          "display_name": "New Contact",
          "email": "new.contact@email.com"
        }
      },
      "updateApp": {
        "summary": "Update app",
        "value": {
          "channel_credentials": [
            {
              "channel": "WHATSAPP",
              "static_bearer": {
                "claimed_identity": "{{WhatsApp_Sender_Id}}",
                "token": "{{WhatsApp_Bearer_Token}}"
              },
              "callback_secret": "{{Callback_Secret_1}}"
            },
            {
              "channel": "MESSENGER",
              "static_token": {
                "token": "{{Facebook_Token}}"
              },
              "callback_secret": "{{Callback_Secret_2}}"
            },
            {
              "channel": "SMS",
              "static_bearer": {
                "claimed_identity": "{{Service_Plan_Id}}",
                "token": "{{API_Token}}"
              }
            }
          ],
          "display_name": "New App Display Name"
        }
      },
      "updateContactRequest": {
        "summary": "Update contact",
        "value": {
          "channel_identities": [
            {
              "channel": "MESSENGER",
              "identity": "{{FACEBOOK_USER_NAME}}",
              "app_id": "{{APP_ID}}"
            },
            {
              "channel": "VIBER",
              "identity": "{{PHONE_NUMBER}}",
              "app_id": "{{APP_ID}}"
            }
          ],
          "channel_priority": [
            "MESSENGER",
            "VIBER"
          ],
          "email": "string",
          "language": "FR",
          "metadata": "string"
        }
      },
      "updateContactResponse": {
        "summary": "Updated contact",
        "value": {
          "channel_identities": [
            {
              "channel": "MESSENGER",
              "identity": "{{FACEBOOK_USER_NAME}}",
              "app_id": "{{APP_ID}}"
            },
            {
              "channel": "VIBER",
              "identity": "{{PHONE_NUMBER}}",
              "app_id": "{{APP_ID}}"
            }
          ],
          "channel_priority": [
            "MESSENGER",
            "VIBER"
          ],
          "display_name": "string",
          "external_id": "string",
          "email": "string",
          "language": "EN_US",
          "metadata": "string"
        }
      },
      "mergeContactResponse": {
        "summary": "Merged contact",
        "value": {
          "id": "ID_of_target_contact",
          "channel_identities": [
            {
              "channel": "TELEGRAM",
              "identity": "{TELEGRAM_ID}",
              "app_id": ""
            },
            {
              "channel": "WHATSAPP",
              "identity": "{WHATSAPP_ID}",
              "app_id": ""
            }
          ],
          "channel_priority": [
            "TELEGRAM",
            "WHATSAPP"
          ],
          "display_name": "{CONTACT_DISPLAY_NAME}",
          "email": "",
          "external_id": "",
          "metadata": "",
          "language": "ZU"
        }
      },
      "CardMessage": {
        "summary": "Card message",
        "description": "An example payload of a card message.",
        "value": {
          "app_id": "{{APP_ID}}",
          "recipient": {
            "identified_by": {
              "channel_identities": [
                {
                  "channel": "{CHANNEL}",
                  "identity": "{IDENTITY}"
                }
              ]
            }
          },
          "message": {
            "card_message": {
              "title": "Sign up for our newsletter",
              "description": "Our weekly newsletter with deals and extra content!",
              "media_message": {
                "url": "https://1vxc0v12qhrm1e72gq1mmxkf-wpengine.netdna-ssl.com/wp-content/uploads/2019/05/Sinch-logo-Events.png"
              },
              "choices": [
                {
                  "text_message": {
                    "text": "Sign up here"
                  }
                }
              ],
              "message_properties": [
                {
                  "whatsapp_header": "WhatsApp header text"
                }
              ]
            }
          }
        }
      },
      "CarouselMessage": {
        "summary": "Carousel message",
        "description": "An example payload of a carousel message.",
        "value": {
          "app_id": "{{APP_ID}}",
          "recipient": {
            "identified_by": {
              "channel_identities": [
                {
                  "channel": "{CHANNEL}",
                  "identity": "{IDENTITY}"
                }
              ]
            }
          },
          "message": {
            "carousel_message": {
              "cards": [
                {
                  "title": "Sign up for our weekly newsletter",
                  "description": "Our weekly newsletter is filled with deals and extra content!",
                  "media_message": {
                    "url": "https://1vxc0v12qhrm1e72gq1mmxkf-wpengine.netdna-ssl.com/wp-content/uploads/2019/05/Sinch-logo-Events.png"
                  },
                  "choices": [
                    {
                      "text_message": {
                        "text": "Sign up here"
                      }
                    }
                  ]
                },
                {
                  "title": "Visit our website",
                  "description": "You can view your account and place orders from our convenient dashboard.",
                  "media_message": {
                    "url": "https://1vxc0v12qhrm1e72gq1mmxkf-wpengine.netdna-ssl.com/wp-content/uploads/2019/05/Sinch-logo-Events.png"
                  },
                  "choices": [
                    {
                      "url_message": {
                        "title": "Website",
                        "url": "https://www.sinch.com"
                      }
                    }
                  ]
                },
                {
                  "title": "Call our customer support line",
                  "description": "Our dedicated support staff can answer your questions and concerns.",
                  "media_message": {
                    "url": "https://1vxc0v12qhrm1e72gq1mmxkf-wpengine.netdna-ssl.com/wp-content/uploads/2019/05/Sinch-logo-Events.png"
                  },
                  "choices": [
                    {
                      "call_message": {
                        "title": "Support line",
                        "phone_number": "46732000000"
                      }
                    }
                  ]
                }
              ]
            }
          }
        }
      },
      "ChoiceMessage": {
        "summary": "Choice message",
        "description": "An example payload of a choice message.",
        "value": {
          "app_id": "{{APP_ID}}",
          "recipient": {
            "identified_by": {
              "channel_identities": [
                {
                  "channel": "{CHANNEL}",
                  "identity": "{IDENTITY}"
                }
              ]
            }
          },
          "message": {
            "choice_message": {
              "text_message": {
                "text": "Friendly reminder of your appointment tomorrow at 10AM. Please confirm your booking by replying below."
              },
              "choices": [
                {
                  "text_message": {
                    "text": "Confirm"
                  }
                },
                {
                  "text_message": {
                    "text": "Cancel"
                  }
                }
              ],
              "message_properties": [
                {
                  "whatsapp_footer": "WhatsApp footer text"
                }
              ]
            }
          }
        }
      },
      "LocationMessage": {
        "summary": "Location message",
        "description": "An example payload of a location message.",
        "value": {
          "app_id": "{{APP_ID}}",
          "recipient": {
            "identified_by": {
              "channel_identities": [
                {
                  "channel": "{CHANNEL}",
                  "identity": "{IDENTITY}"
                }
              ]
            }
          },
          "message": {
            "location_message": {
              "title": "Your ride is here!",
              "label": "Meet your driver at the specified address.",
              "coordinates": {
                "latitude": 55.610479,
                "longitude": 13.002873
              }
            }
          }
        }
      },
      "MediaMessage": {
        "summary": "Media message",
        "description": "An example message of a media message.",
        "value": {
          "app_id": "{{APP_ID}}",
          "recipient": {
            "identified_by": {
              "channel_identities": [
                {
                  "channel": "{CHANNEL}",
                  "identity": "{IDENTITY}"
                }
              ]
            }
          },
          "message": {
            "media_message": {
              "url": "{{URL_TO_MEDIA}}"
            }
          }
        }
      },
      "TextMessage": {
        "summary": "Text message",
        "description": "An example message of a text message.",
        "value": {
          "app_id": "{{APP_ID}}",
          "recipient": {
            "identified_by": {
              "channel_identities": [
                {
                  "channel": "{CHANNEL}",
                  "identity": "{IDENTITY}"
                }
              ]
            }
          },
          "message": {
            "text_message": {
              "text": "Greetings from Sinch Conversation API."
            }
          }
        }
      },
      "ListMessage": {
        "summary": "List message with choices",
        "description": "An example message of a list message with choices",
        "value": {
          "app_id": "{{APP_ID}}",
          "recipient": {
            "identified_by": {
              "channel_identities": [
                {
                  "channel": "{CHANNEL}",
                  "identity": "{IDENTITY}"
                }
              ]
            }
          },
          "message": {
            "list_message": {
              "title": "Choose your icecream flavor",
              "description": "The best icecream in town!",
              "sections": [
                {
                  "title": "Fruit flavors",
                  "items": [
                    {
                      "choice": {
                        "title": "Strawberry",
                        "postback_data": "Strawberry postback"
                      }
                    },
                    {
                      "choice": {
                        "title": "Blueberry",
                        "postback_data": "Blueberry postback"
                      }
                    }
                  ]
                },
                {
                  "title": "Other flavors",
                  "items": [
                    {
                      "choice": {
                        "title": "Chocolate",
                        "postback_data": "Chocolate postback"
                      }
                    },
                    {
                      "choice": {
                        "title": "Vanilla",
                        "postback_data": "Vanilla postback"
                      }
                    }
                  ]
                }
              ],
              "message_properties": {
                "menu": "Menu text",
                "whatsapp_header": "WhatsApp header text"
              }
            }
          }
        }
      },
      "ProductMessage": {
        "summary": "List message with products",
        "description": "An example message of a list message with products",
        "value": {
          "app_id": "{{APP_ID}}",
          "recipient": {
            "identified_by": {
              "channel_identities": [
                {
                  "channel": "{CHANNEL}",
                  "identity": "{IDENTITY}"
                }
              ]
            }
          },
          "message": {
            "list_message": {
              "title": "Title for the list message with products",
              "description": "Description (or subtitle) for list message with products",
              "sections": [
                {
                  "title": "Facebook product catalog item set name",
                  "items": [
                    {
                      "product": {
                        "id": "product_1_id",
                        "marketplace": "FACEBOOK"
                      }
                    },
                    {
                      "product": {
                        "id": "product_2_id",
                        "marketplace": "FACEBOOK"
                      }
                    }
                  ]
                }
              ],
              "message_properties": {
                "catalog_id": "id_of_catalog"
              }
            }
          }
        }
      },
      "injectMessageRequest": {
        "summary": "Inject a message into a specific conversation",
        "value": {
          "direction": "TO_CONTACT",
          "channel_identity": {
            "channel": "{{CHANNEL_NAME}}",
            "identity": "{{CHANNEL_IDENTITY}}"
          },
          "app_message": {
            "text_message": {
              "text": "string"
            }
          },
          "contact_id": "string",
          "accept_time": "YYYY-MM-DDTHH:MM:SS"
        }
      },
      "injectEventRequest": {
        "summary": "Inject Event Request",
        "value": {
          "id": "string",
          "direction": "TO_APP",
          "channel_identity": {
            "channel": "MESSENGER",
            "identity": "{{FACEBOOK_USER_NAME}}",
            "app_id": "{{APP_ID}}"
          },
          "app_event": {
            "composing_event": {}
          },
          "accept_time": "YYYY-MM-DDTHH:MM:SS"
        }
      },
      "injectEventResponse": {
        "summary": "Inject event response",
        "value": {
          "event_id": "string",
          "accepted_time": "YYYY-MM-DDTHH:MM:SS"
        }
      }
    },
    "responses": {
      "400Error": {
        "description": "Malformed request. See [common error responses](https://developers.sinch.com/docs/conversation/api-reference/#common-error-responses) for more information.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/runtimeError"
            },
            "example": {
              "code": 400,
              "message": "Malformed request",
              "status": "INVALID_REQUEST",
              "details": []
            }
          }
        }
      },
      "401Error": {
        "description": "Incorrect credentials. See [common error responses](https://developers.sinch.com/docs/conversation/api-reference/#common-error-responses) for more information.",
        "content": {
          "application/json": {
            "schema": {
              "type": "object"
            }
          }
        }
      },
      "404Error": {
        "description": "No information was found. See [common error responses](https://developers.sinch.com/docs/conversation/api-reference/#common-error-responses) for more information.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/runtimeError"
            },
            "example": {
              "code": 404,
              "message": "information not found",
              "status": "NOT_FOUND",
              "details": []
            }
          }
        }
      },
      "403Error": {
        "description": "Correct credentials but you don't have access to the requested resource. See [common error responses](https://developers.sinch.com/docs/conversation/api-reference/#common-error-responses) for more information.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/runtimeError"
            },
            "example": {
              "code": 403,
              "message": "You do not have access to the requested resource.",
              "status": "UNAUTHORIZED",
              "details": []
            }
          }
        }
      },
      "500Error": {
        "description": "Correct credentials but you don't have access to the requested resource. See [common error responses](https://developers.sinch.com/docs/conversation/api-reference/#common-error-responses) for more information.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/runtimeError"
            },
            "example": {
              "code": 500,
              "message": "There was an internal server error.",
              "status": "INTERNAL_ERROR",
              "details": []
            }
          }
        }
      },
      "501Error": {
        "description": "Something went wrong on our end, try again with exponential back-off. See [common error responses](https://developers.sinch.com/docs/conversation/api-reference/#common-error-responses) for more information.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/runtimeError"
            },
            "example": {
              "code": 501,
              "message": "There was an internal server error.",
              "status": "INTERNAL_ERROR",
              "details": []
            }
          }
        }
      },
      "sendMessageResponse": {
        "description": "A successful response. More information is available in [delivery report callbacks](https://developers.sinch.com/docs/conversation/callbacks/).",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/SendMessageResponse"
            }
          }
        }
      },
      "getMessageResponse": {
        "description": "A successful response.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/ConversationMessage"
            }
          }
        }
      },
      "createAppResponse": {
        "description": "A successful response.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/AppResponse"
            }
          }
        }
      },
      "createContactResponse": {
        "description": "A successful response.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Contact"
            }
          }
        }
      },
      "createConversationResponse": {
        "description": "A successful response.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Conversation"
            }
          }
        }
      },
      "getAppResponse": {
        "description": "A successful response.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/AppResponse"
            }
          }
        }
      },
      "getContactResponse": {
        "description": "A successful response.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Contact"
            }
          }
        }
      },
      "getConversationResponse": {
        "description": "A successful response.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Conversation"
            }
          }
        }
      },
      "updateAppResponse": {
        "description": "A successful response.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/AppResponse"
            }
          }
        }
      },
      "updateContactResponse": {
        "description": "A successful response.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Contact"
            },
            "examples": {
              "updatedContact": {
                "$ref": "#/components/examples/updateContactResponse"
              }
            }
          }
        }
      },
      "listAppsResponse": {
        "description": "A successful response.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/ListAppsResponse"
            }
          }
        }
      },
      "listContactsResponse": {
        "description": "A successful response.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/ListContactsResponse"
            }
          }
        }
      },
      "listConversationsResponse": {
        "description": "A successful response.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/ListConversationsResponse"
            }
          }
        }
      },
      "listRecentConversationResponse": {
        "description": "A successful response.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/ListRecentConversationsResponse"
            }
          }
        }
      },
      "listWebhooksResponse": {
        "description": "A successful response.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/ListWebhooksResponse"
            }
          }
        }
      },
      "getAuditRecordsFromConsentResponse": {
        "description": "A successful response.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/GetAuditRecordsFromConsentResponse"
            }
          }
        }
      },
      "getIdentitiesFromConsentResponse": {
        "description": "A successful response.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/GetIdentitiesFromConsentResponse"
            }
          }
        }
      },
      "mergeContactResponse": {
        "description": "A successful response.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Contact"
            },
            "examples": {
              "mergedContact": {
                "$ref": "#/components/examples/mergeContactResponse"
              }
            }
          }
        }
      },
      "getChannelProfileResponse": {
        "description": "A successful response.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/GetChannelProfileResponse"
            }
          }
        }
      },
      "queryCapabilityResponse": {
        "description": "A successful response.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/QueryCapabilityResponse"
            }
          }
        }
      },
      "getEventResponse": {
        "description": "A successful response.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/ConversationEvent"
            }
          }
        }
      },
      "listEventsResponse": {
        "description": "A successful response.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/ListEventsResponse"
            }
          }
        }
      },
      "injectEventResponse": {
        "description": "A succcessful response.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/InjectEventResponse"
            },
            "examples": {
              "injectEventResponse": {
                "$ref": "#/components/examples/injectEventResponse"
              }
            }
          }
        }
      }
    },
    "requestBodies": {
      "CreateAppRequest": {
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/AppCreateRequest"
            },
            "examples": {
              "createFacebookApp": {
                "$ref": "#/components/examples/createFacebookApp"
              },
              "createWhatsAppApp": {
                "$ref": "#/components/examples/createWhatsAppApp"
              },
              "createSMSApp": {
                "$ref": "#/components/examples/createSMSApp"
              }
            }
          }
        },
        "description": "The app to create.",
        "required": true
      },
      "CreateContactRequest": {
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/ContactCreateRequest"
            },
            "examples": {
              "createContactOneChannel": {
                "$ref": "#/components/examples/createContactWithOneChannel"
              },
              "createContactMultipleChannels": {
                "$ref": "#/components/examples/createContactWithManyChannels"
              }
            }
          }
        },
        "description": "The contact to create.",
        "required": true
      },
      "CreateConversationRequest": {
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/CreateConversationRequest"
            },
            "examples": {
              "createNewConversation": {
                "$ref": "#/components/examples/createConversationRequest"
              }
            }
          }
        },
        "description": "The conversation to create. ID will be generated for the conversation and any ID in the given conversation will be ignored.",
        "required": true
      },
      "InjectMessageRequest": {
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/InjectMessageRequest"
            },
            "examples": {
              "injectNewMessage": {
                "$ref": "#/components/examples/injectMessageRequest"
              }
            }
          }
        },
        "description": "Message to be injected.",
        "required": true
      },
      "InjectEventRequest": {
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/InjectConversationEventRequest"
            },
            "examples": {
              "injectEventRequest": {
                "$ref": "#/components/examples/injectEventRequest"
              }
            }
          }
        },
        "description": "Inject event request",
        "required": true
      },
      "MergeContactRequest": {
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/MergeContactRequest"
            }
          }
        },
        "description": "The contact to be removed.",
        "required": true
      },
      "GetChannelProfileRequest": {
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/GetChannelProfileRequest"
            }
          }
        },
        "required": true
      },
      "QueryCapabilityRequest": {
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/QueryCapability"
            }
          }
        },
        "description": "The query capability request.",
        "required": true
      },
      "UpdateAppRequest": {
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/AppUpdateRequest"
            },
            "examples": {
              "updateApp": {
                "$ref": "#/components/examples/updateApp"
              }
            }
          }
        },
        "description": "The updated app.",
        "required": true
      },
      "UpdateContactRequest": {
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Contact"
            },
            "examples": {
              "updateContact": {
                "$ref": "#/components/examples/updateContactRequest"
              }
            }
          }
        },
        "description": "The contact to be updated",
        "required": true
      },
      "UpdateConversationRequest": {
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Conversation"
            },
            "examples": {
              "updateConversationRequest": {
                "$ref": "#/components/examples/updateConversationRequest"
              }
            }
          }
        },
        "description": "The updated conversation.",
        "required": true
      },
      "UpdateMessageMetadataRequest": {
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/UpdateMessageMetadataRequest"
            },
            "examples": {
              "updateMessageMetadataRequest": {
                "$ref": "#/components/examples/updateMessageMetadataRequest"
              }
            }
          }
        },
        "description": "Update message metadata request.",
        "required": true
      },
      "SendMessageRequest": {
        "description": "This is the request body for sending a message. `app_id`, `recipient`, and `message` are all required fields.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/SendMessageRequest"
            },
            "examples": {
              "IdentifiedBy": {
                "$ref": "#/components/examples/sendMessageIdentifiedBy"
              },
              "CardSendExample": {
                "$ref": "#/components/examples/CardMessage"
              },
              "CarouselSendExample": {
                "$ref": "#/components/examples/CarouselMessage"
              },
              "ChoiceSendExample": {
                "$ref": "#/components/examples/ChoiceMessage"
              },
              "ListSendExample": {
                "$ref": "#/components/examples/ListMessage"
              },
              "ProductListSendExample": {
                "$ref": "#/components/examples/ProductMessage"
              },
              "LocationSendExample": {
                "$ref": "#/components/examples/LocationMessage"
              },
              "MediaSendEample": {
                "$ref": "#/components/examples/MediaMessage"
              },
              "ContactId": {
                "$ref": "#/components/examples/sendMessageContactId"
              },
              "OmniMessage": {
                "$ref": "#/components/examples/sendOmniTemplate"
              },
              "ExplicitChannelOmniMessage": {
                "$ref": "#/components/examples/sendExplicitChannelOmniMessage"
              }
            }
          }
        },
        "required": true
      },
      "ListMessagesByChannelIdentityRequest": {
        "description": "Request body for listing messages by channel identity. NOTE: You can use either contact_ids OR channel_identities, but not both in the same request.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/ListMessagesByChannelIdentityRequest"
            },
            "examples": {
              "ListMessagesByChannelIdentity": {
                "$ref": "#/components/examples/listMessagesByChannelIdentity"
              },
              "ListMessagesByContactId": {
                "$ref": "#/components/examples/listMessagesByContactId"
              }
            }
          }
        },
        "required": true
      }
    },
    "schemas": {
      "ConsentsListType": {
        "type": "string",
        "description": "The consent list type. See [consent management](https://developers.sinch.com/docs/conversation/consent-management) page for more information.",
        "enum": [
          "OPT_OUT_ALL",
          "OPT_OUT_MARKETING",
          "OPT_OUT_NOTIFICATION"
        ],
        "x-enumDescriptions": {
          "OPT_OUT_ALL": "List type that blocks all kinds of messages",
          "OPT_OUT_MARKETING": "List type that blocks only marketing messages",
          "OPT_OUT_NOTIFICATION": "List type that blocks only notification messages"
        }
      },
      "protobufAny": {
        "type": "object",
        "properties": {
          "type_url": {
            "type": "string"
          },
          "value": {
            "type": "string",
            "format": "byte"
          }
        }
      },
      "runtimeError": {
        "type": "object",
        "properties": {
          "error": {
            "type": "object",
            "properties": {
              "code": {
                "type": "integer",
                "format": "int32"
              },
              "details": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/protobufAny"
                }
              },
              "message": {
                "type": "string"
              },
              "status": {
                "type": "string"
              }
            }
          }
        }
      },
      "AppCreateRequest": {
        "description": "The request sent to the API endpoint to create a new app.",
        "type": "object",
        "title": "Conversation API app",
        "required": [
          "display_name",
          "channel_credentials"
        ],
        "properties": {
          "channel_credentials": {
            "description": "An array of channel credentials. The order of the credentials defines the app channel priority.",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ConversationChannelCredentials"
            }
          },
          "conversation_metadata_report_view": {
            "$ref": "#/components/schemas/ConversationMetadataReportView"
          },
          "display_name": {
            "description": "The display name for the app.",
            "type": "string",
            "example": "Sinch Conversation API Demo App 001"
          },
          "retention_policy": {
            "$ref": "#/components/schemas/RetentionPolicy"
          },
          "dispatch_retention_policy": {
            "$ref": "#/components/schemas/DispatchRetentionPolicy"
          },
          "processing_mode": {
            "$ref": "#/components/schemas/ProcessingMode"
          },
          "smart_conversation": {
            "$ref": "#/components/schemas/SmartConversation"
          },
          "callback_settings": {
            "$ref": "#/components/schemas/CallbackSettings"
          },
          "message_retry_settings": {
            "$ref": "#/components/schemas/MessageRetrySettings"
          },
          "delivery_report_based_fallback": {
            "$ref": "#/components/schemas/DeliveryReportBasedFallback"
          }
        }
      },
      "AppUpdateRequest": {
        "description": "The request sent to the API endpoint to update the configuration of an app.",
        "type": "object",
        "title": "Conversation API app",
        "properties": {
          "channel_credentials": {
            "description": "An array of channel credentials. The order of the credentials defines the app channel priority.",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ConversationChannelCredentials"
            }
          },
          "conversation_metadata_report_view": {
            "$ref": "#/components/schemas/ConversationMetadataReportView"
          },
          "display_name": {
            "description": "The display name for the app.",
            "type": "string",
            "example": "Sinch Conversation API Demo App 001"
          },
          "retention_policy": {
            "$ref": "#/components/schemas/RetentionPolicy"
          },
          "dispatch_retention_policy": {
            "$ref": "#/components/schemas/DispatchRetentionPolicy"
          },
          "processing_mode": {
            "$ref": "#/components/schemas/ProcessingMode"
          },
          "smart_conversation": {
            "$ref": "#/components/schemas/SmartConversation"
          },
          "callback_settings": {
            "$ref": "#/components/schemas/CallbackSettings"
          },
          "message_retry_settings": {
            "$ref": "#/components/schemas/MessageRetrySettings"
          },
          "delivery_report_based_fallback": {
            "$ref": "#/components/schemas/DeliveryReportBasedFallback"
          }
        }
      },
      "AppResponse": {
        "description": "The response showing information about the app.",
        "type": "object",
        "title": "Conversation API app",
        "properties": {
          "channel_credentials": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ConversationChannelCredentials"
            }
          },
          "conversation_metadata_report_view": {
            "$ref": "#/components/schemas/ConversationMetadataReportView"
          },
          "display_name": {
            "description": "The display name for the app.",
            "type": "string",
            "example": "Sinch Conversation API Demo App 001"
          },
          "id": {
            "description": "The ID of the app. You can find this on the [Sinch Dashboard](https://dashboard.sinch.com/convapi/apps).",
            "type": "string",
            "example": "{APP_ID}"
          },
          "rate_limits": {
            "$ref": "#/components/schemas/RateLimits"
          },
          "retention_policy": {
            "$ref": "#/components/schemas/RetentionPolicy"
          },
          "dispatch_retention_policy": {
            "$ref": "#/components/schemas/DispatchRetentionPolicy"
          },
          "processing_mode": {
            "$ref": "#/components/schemas/ProcessingMode"
          },
          "smart_conversation": {
            "$ref": "#/components/schemas/SmartConversation"
          },
          "queue_stats": {
            "$ref": "#/components/schemas/QueueStats"
          },
          "callback_settings": {
            "$ref": "#/components/schemas/CallbackSettings"
          },
          "delivery_report_based_fallback": {
            "$ref": "#/components/schemas/DeliveryReportBasedFallback"
          },
          "message_retry_settings": {
            "$ref": "#/components/schemas/MessageRetrySettings"
          }
        }
      },
      "AppMessageObject": {
        "type": "object",
        "title": "App",
        "properties": {
          "app_message": {
            "$ref": "#/components/schemas/AppMessage"
          }
        }
      },
      "AppMessage": {
        "type": "object",
        "title": "Message originating from app",
        "description": "A message originating from a Conversation API app",
        "allOf": [
          {
            "$ref": "#/components/schemas/AppMessageTypes"
          },
          {
            "$ref": "#/components/schemas/AppMessageCommonProps"
          }
        ]
      },
      "AppMessageTypes": {
        "type": "object",
        "oneOf": [
          {
            "$ref": "#/components/schemas/CardMessageField"
          },
          {
            "$ref": "#/components/schemas/CarouselMessageField"
          },
          {
            "$ref": "#/components/schemas/ChoiceMessageField"
          },
          {
            "$ref": "#/components/schemas/LocationMessageField"
          },
          {
            "$ref": "#/components/schemas/MediaMessageField"
          },
          {
            "$ref": "#/components/schemas/TemplateMessageField"
          },
          {
            "$ref": "#/components/schemas/TextMessageField"
          },
          {
            "$ref": "#/components/schemas/ListMessageField"
          },
          {
            "$ref": "#/components/schemas/ContactInfoMessageField"
          }
        ]
      },
      "AppMessageCommonProps": {
        "type": "object",
        "properties": {
          "explicit_channel_message": {
            "description": "Allows you to specify a channel and define a corresponding channel specific message payload that will override the standard Conversation API message types. The key in the map must point to a valid conversation channel as defined in the enum `ConversationChannel`. The message content must be provided in a string format. You may use the [transcoding endpoint](https://developers.sinch.com/docs/conversation/api-reference/conversation/tag/Transcoding/) to help create your message. For more information about how to construct an explicit channel message for a particular channel, see that [channel's corresponding documentation](https://developers.sinch.com/docs/conversation/channel-support/) (for example, using explicit channel messages with [the WhatsApp channel](https://developers.sinch.com/docs/conversation/channel-support/whatsapp/message-support/#explicit-channel-messages)).",
            "type": "object",
            "additionalProperties": {
              "type": "string"
            }
          },
          "explicit_channel_omni_message": {
            "description": "Override the message's content for specified channels. The key in the map must point to a valid conversation channel as defined in the enum `ConversationChannel`. The content defined under the specified channel will be sent on that channel.",
            "type": "object",
            "additionalProperties": {
              "$ref": "#/components/schemas/OmniMessageOverride"
            }
          },
          "channel_specific_message": {
            "description": "Channel specific messages, overriding any transcoding. The structure of this property is more well-defined than the open structure of the `explicit_channel_message` property, and may be easier to use.\nThe key in the map must point to a valid conversation channel as defined in the enum `ConversationChannel`.",
            "type": "object",
            "additionalProperties": {
              "$ref": "#/components/schemas/ChannelSpecificMessage"
            }
          },
          "agent": {
            "$ref": "#/components/schemas/Agent"
          }
        }
      },
      "AppEventField": {
        "type": "object",
        "title": "App Event Type",
        "properties": {
          "app_event": {
            "description": "Event originating from an app",
            "type": "object",
            "title": "App Event",
            "oneOf": [
              {
                "$ref": "#/components/schemas/ComposingEventField"
              },
              {
                "$ref": "#/components/schemas/ComposingEndEventField"
              },
              {
                "$ref": "#/components/schemas/CommentReplyEventField"
              },
              {
                "$ref": "#/components/schemas/AgentJoinedEventField"
              },
              {
                "$ref": "#/components/schemas/AgentLeftEventField"
              },
              {
                "$ref": "#/components/schemas/GenericEventField"
              }
            ]
          }
        }
      },
      "BasicAuthCredentials": {
        "description": "It consists of a username and a password.",
        "type": "object",
        "required": [
          "password",
          "username"
        ],
        "title": "Basic Auth Credential",
        "properties": {
          "password": {
            "description": "Basic auth password.",
            "type": "string",
            "format": "password"
          },
          "username": {
            "description": "Basic auth username.",
            "type": "string"
          }
        }
      },
      "CallMessageField": {
        "description": "Message for triggering a call.",
        "type": "object",
        "title": "Call",
        "properties": {
          "call_message": {
            "title": "Call Message",
            "type": "object",
            "required": [
              "phone_number",
              "title"
            ],
            "properties": {
              "phone_number": {
                "description": "Phone number in E.164 with leading +.",
                "type": "string",
                "example": "+15551231234"
              },
              "title": {
                "description": "Title shown close to the phone number.\nThe title is clickable in some cases.",
                "type": "string",
                "example": "Message text"
              }
            }
          }
        }
      },
      "CardHeight": {
        "description": "You can set the desired size of the card in the message.",
        "type": "string",
        "x-enumDescriptions": {
          "UNSPECIFIED_HEIGHT": "The height of the card is unspecified.",
          "SHORT": "The shortest card height.",
          "MEDIUM": "Medium card height.",
          "TALL": "The tallest card height."
        },
        "enum": [
          "UNSPECIFIED_HEIGHT",
          "SHORT",
          "MEDIUM",
          "TALL"
        ]
      },
      "CardMessageField": {
        "description": "Field containing a Card Message",
        "type": "object",
        "title": "Card",
        "properties": {
          "card_message": {
            "$ref": "#/components/schemas/CardMessage"
          }
        }
      },
      "CardMessage": {
        "description": "Message containing text, media and choices.",
        "title": "Card Message",
        "type": "object",
        "properties": {
          "choices": {
            "description": "You may include choices in your Card Message. The number of choices is limited to 10.",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Choice"
            }
          },
          "description": {
            "description": "This is an optional description field that is displayed below the title on the card.",
            "type": "string"
          },
          "height": {
            "$ref": "#/components/schemas/CardHeight"
          },
          "title": {
            "description": "The title of the card message.",
            "type": "string"
          },
          "media_message": {
            "type": "object",
            "description": "A message containing a media component.",
            "allOf": [
              {
                "$ref": "#/components/schemas/MediaProperties"
              }
            ]
          },
          "message_properties": {
            "type": "object",
            "description": "Optional additional properties.",
            "properties": {
              "whatsapp_header": {
                "description": "Optional. Sets the header for the footer of a WhatsApp reply button message, if there is no media in the message. Ignored for other channels. Ignored if not transcoded to a native WhatsApp message with reply buttons.",
                "type": "string"
              }
            }
          }
        }
      },
      "CarouselMessageField": {
        "description": "Message containing a list of cards often rendered horizontally on supported channels.",
        "type": "object",
        "title": "Carousel",
        "properties": {
          "carousel_message": {
            "title": "Carousel Message",
            "type": "object",
            "required": [
              "cards"
            ],
            "properties": {
              "cards": {
                "description": "A list of up to 10 cards.",
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/CardMessage"
                }
              },
              "choices": {
                "description": "Optional. Outer choices on the carousel level. The number of outer choices is limited to 3.",
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/Choice"
                }
              }
            }
          }
        }
      },
      "ChannelIdentities": {
        "required": [
          "channel_identities"
        ],
        "type": "object",
        "properties": {
          "channel_identities": {
            "description": "A list of specific channel identities.\nThe API will use these identities when sending to specific channels.",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ChannelRecipientIdentity"
            }
          }
        }
      },
      "ChannelIdentity": {
        "description": "A unique identity of message recipient on a particular channel.\nFor example, the channel identity on SMS, WHATSAPP or VIBERBM is a MSISDN phone number.",
        "type": "object",
        "title": "Channel Identity",
        "required": [
          "identity",
          "channel"
        ],
        "properties": {
          "app_id": {
            "description": "Required if using a channel that uses app-scoped channel identities. Currently, FB Messenger, Instagram, LINE, and WeChat use app-scoped channel identities, which means contacts will have different channel identities on different Conversation API apps. These can be thought of as virtual identities that are app-specific and, therefore, the app_id must be included in the API call.",
            "type": "string"
          },
          "channel": {
            "$ref": "#/components/schemas/ConversationChannel"
          },
          "identity": {
            "description": "The channel identity. This will differ from channel to channel. For example, a phone number for SMS, WhatsApp, and Viber Business.",
            "type": "string"
          }
        }
      },
      "ChannelRecipientIdentity": {
        "type": "object",
        "required": [
          "identity",
          "channel"
        ],
        "properties": {
          "channel": {
            "$ref": "#/components/schemas/ConversationChannel"
          },
          "identity": {
            "description": "The channel recipient identity.",
            "type": "string"
          }
        }
      },
      "Choices": {
        "type": "object",
        "properties": {
          "choices": {
            "type": "array",
            "description": "The number of choices is limited to 10.",
            "items": {
              "$ref": "#/components/schemas/Choice"
            }
          }
        }
      },
      "Choice": {
        "description": "A choice is an action the user can take such as buttons for quick replies or other call to actions.",
        "type": "object",
        "title": "Choice message",
        "allOf": [
          {
            "$ref": "#/components/schemas/choiceTypes"
          },
          {
            "$ref": "#/components/schemas/choiceCommonProps"
          }
        ]
      },
      "choiceTypes": {
        "type": "object",
        "oneOf": [
          {
            "$ref": "#/components/schemas/CallMessageField"
          },
          {
            "$ref": "#/components/schemas/LocationMessageField"
          },
          {
            "$ref": "#/components/schemas/TextMessageField"
          },
          {
            "$ref": "#/components/schemas/UrlMessageField"
          },
          {
            "$ref": "#/components/schemas/CalendarMessageField"
          },
          {
            "$ref": "#/components/schemas/ShareLocationMessageField"
          }
        ]
      },
      "choiceCommonProps": {
        "type": "object",
        "properties": {
          "postback_data": {
            "description": "An optional field. This data will be returned in the ChoiceResponseMessage. The default is message_id_{text, title}."
          }
        }
      },
      "ChoiceMessageField": {
        "description": "Message containing choices/actions.",
        "type": "object",
        "title": "Choice",
        "properties": {
          "choice_message": {
            "title": "Choice Message",
            "type": "object",
            "required": [
              "choices"
            ],
            "allOf": [
              {
                "description": "A message containing choices."
              },
              {
                "$ref": "#/components/schemas/Choices"
              },
              {
                "$ref": "#/components/schemas/TextMessageField"
              },
              {
                "$ref": "#/components/schemas/ChoiceMessagePropertiesField"
              }
            ]
          }
        }
      },
      "ChoiceResponseMessageField": {
        "description": "Represents a response to a choice message.",
        "type": "object",
        "title": "Choice Response",
        "properties": {
          "choice_response_message": {
            "title": "Choice Response Message",
            "type": "object",
            "required": [
              "message_id",
              "postback_data"
            ],
            "properties": {
              "message_id": {
                "description": "The message id containing the choice.",
                "type": "string"
              },
              "postback_data": {
                "description": "The postback_data defined in the selected choice.",
                "type": "string"
              }
            }
          }
        }
      },
      "ClientCredentials": {
        "type": "object",
        "description": "Optional. Used for OAuth2 authentication.",
        "required": [
          "client_id",
          "client_secret",
          "endpoint"
        ],
        "properties": {
          "client_id": {
            "description": "The Client ID that will be used in the OAuth2 Client Credentials flow.",
            "type": "string"
          },
          "client_secret": {
            "description": "The Client Secret that will be used in the OAuth2 Client Credentials flow.",
            "type": "string",
            "format": "password"
          },
          "endpoint": {
            "description": "The endpoint that will be used in the OAuth2 Client Credentials flow. Expected to return a JSON with an access token and `expires_in` value (in seconds). The `expires_in` value, which must be a minimum of 30 seconds and a maximum of 3600 seconds, is how long Sinch will save the access token before asking for a new one.",
            "type": "string"
          },
          "scope": {
            "description": "Optional. Space-separated string per RFC 6749. Used to limit the access granted by the token.\nMax length: 1024 characters.\nIf blank or omitted, this is not included in the token request.\n",
            "type": "string",
            "maxLength": 1024
          },
          "response_type": {
            "description": "Optional. When granting `client_credentials`, this is generally omitted. If you do provide a value, it will be forwarded to your OAuth provider as-is.\nMax length: 64 characters.\n",
            "type": "string",
            "maxLength": 64
          },
          "token_request_type": {
            "description": "Optional. Controls how `client_id` and `client_secret` are sent to the token endpoint. Either `BASIC` or `FORM`. If not set or unrecognized, `BASIC` is used by default.\n",
            "type": "string",
            "x-enumDescriptions": {
              "BASIC": "Sent using the HTTP Authorization header (Basic auth). In this case, `client_id` and `client_secret` are NOT included in the form body.",
              "FORM": "Sent in the form body as `client_id` and `client_secret`. No Authorization header is added."
            },
            "enum": [
              "BASIC",
              "FORM"
            ],
            "default": "BASIC"
          }
        }
      },
      "CommentReplyEventField": {
        "type": "object",
        "title": "Comment Reply Event Type",
        "properties": {
          "comment_reply_event": {
            "title": "Comment Reply Event",
            "description": "Represents a response to a comment event.",
            "type": "object",
            "required": [
              "text"
            ],
            "properties": {
              "text": {
                "description": "The text of the comment reply.",
                "type": "string"
              }
            }
          }
        }
      },
      "ComposingEventField": {
        "type": "object",
        "title": "Composing",
        "properties": {
          "composing_event": {
            "title": "Composing Event Type",
            "type": "object",
            "description": "An empty object. Represents a typing indicator."
          }
        }
      },
      "ComposingEndEventField": {
        "type": "object",
        "title": "Composing End Event Type",
        "properties": {
          "composing_end_event": {
            "title": "Composing End Event",
            "type": "object",
            "description": "An empty object. Represents a typing end indicator."
          }
        }
      },
      "ConversationDeletedEventField": {
        "type": "object",
        "title": "Conversation Deleted Event Type",
        "properties": {
          "conversation_deleted_event": {
            "title": "Conversation Deleted Event",
            "type": "object",
            "description": "An empty object. Represents a conversation deleted by the contact."
          }
        }
      },
      "AgentJoinedEventField": {
        "type": "object",
        "title": "Agent Joined Event Type",
        "properties": {
          "agent_joined_event": {
            "title": "Agent Joined Event",
            "type": "object",
            "properties": {
              "agent": {
                "$ref": "#/components/schemas/Agent"
              }
            },
            "required": [
              "agent"
            ]
          }
        }
      },
      "AgentLeftEventField": {
        "type": "object",
        "title": "Agent Left Event Type",
        "properties": {
          "agent_left_event": {
            "title": "Agent Left Event",
            "type": "object",
            "properties": {
              "agent": {
                "$ref": "#/components/schemas/Agent"
              }
            },
            "required": [
              "agent"
            ]
          }
        }
      },
      "GenericEventField": {
        "type": "object",
        "title": "Generic Type",
        "properties": {
          "generic_event": {
            "title": "Generic Event",
            "type": "object",
            "properties": {
              "payload": {
                "description": "Arbitrary data set to the event. A valid JSON object.",
                "type": "object"
              }
            },
            "description": "Event that contains only a flexible payload field.",
            "required": [
              "payload"
            ]
          }
        }
      },
      "Agent": {
        "description": "Represents an agent that is involved in a conversation.",
        "type": "object",
        "title": "Agent",
        "properties": {
          "display_name": {
            "description": "Agent's display name",
            "type": "string"
          },
          "type": {
            "$ref": "#/components/schemas/AgentType"
          },
          "picture_url": {
            "description": "The Agent's picture url.",
            "type": "string"
          }
        }
      },
      "AgentType": {
        "description": "Agent's classification. It can be UNKNOWN_AGENT_TYPE, HUMAN or BOT.",
        "enum": [
          "UNKNOWN_AGENT_TYPE",
          "HUMAN",
          "BOT"
        ],
        "x-enumDescriptions": {
          "UNKNOWN_AGENT_TYPE": "The default AgentType. When the agent type is unknown.",
          "HUMAN": "Human agent.",
          "BOT": "Bot agent."
        },
        "type": "string",
        "default": "UNKNOWN_AGENT_TYPE"
      },
      "ContactCreateRequest": {
        "description": "A participant in a conversation typically representing a person. It is associated with a collection of channel identities.",
        "type": "object",
        "title": "Contact creation request",
        "required": [
          "channel_identities",
          "language"
        ],
        "properties": {
          "channel_identities": {
            "description": "List of channel identities. Array must contain at least one item.",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ChannelIdentity"
            }
          },
          "channel_priority": {
            "description": "List of channels defining the channel priority. The channel at the top of the list is tried first.",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ConversationChannel"
            }
          },
          "display_name": {
            "type": "string",
            "description": "The display name. A default 'Unknown' will be assigned if left empty."
          },
          "email": {
            "description": "Email of the contact.",
            "type": "string"
          },
          "external_id": {
            "description": "Contact identifier in an external system.",
            "type": "string"
          },
          "language": {
            "$ref": "#/components/schemas/ContactLanguage"
          },
          "metadata": {
            "description": "Metadata associated with the contact. Up to 1024 characters long.",
            "type": "string"
          }
        }
      },
      "Contact": {
        "description": "A participant in a conversation typically representing a person. It is associated with a collection of channel identities.",
        "type": "object",
        "title": "Contact",
        "properties": {
          "channel_identities": {
            "description": "List of channel identities.",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ChannelIdentity"
            }
          },
          "channel_priority": {
            "description": "List of channels defining the channel priority.",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ConversationChannel"
            }
          },
          "display_name": {
            "type": "string",
            "description": "The display name. A default 'Unknown' will be assigned if left empty."
          },
          "email": {
            "description": "Email of the contact.",
            "type": "string"
          },
          "external_id": {
            "description": "Contact identifier in an external system.",
            "type": "string"
          },
          "id": {
            "description": "The ID of the contact.",
            "type": "string",
            "example": "{CONTACT_ID}"
          },
          "language": {
            "$ref": "#/components/schemas/ContactLanguage"
          },
          "metadata": {
            "description": "Metadata associated with the contact. Up to 1024 characters long.",
            "type": "string"
          }
        }
      },
      "ContactIDField": {
        "type": "object",
        "title": "Contact ID",
        "properties": {
          "contact_id": {
            "title": "Contact ID string",
            "description": "The ID of the contact.",
            "type": "string",
            "example": "{CONTACT_ID}"
          }
        }
      },
      "ContactLanguage": {
        "type": "string",
        "enum": [
          "AF",
          "SQ",
          "AR",
          "AZ",
          "BN",
          "BG",
          "CA",
          "ZH",
          "ZH_CN",
          "ZH_HK",
          "ZH_TW",
          "HR",
          "CS",
          "DA",
          "NL",
          "EN",
          "EN_GB",
          "EN_US",
          "ET",
          "FIL",
          "FI",
          "FR",
          "DE",
          "EL",
          "GU",
          "HA",
          "HE",
          "HI",
          "HU",
          "ID",
          "GA",
          "IT",
          "JA",
          "KN",
          "KK",
          "KO",
          "LO",
          "LV",
          "LT",
          "MK",
          "MS",
          "ML",
          "MR",
          "NB",
          "FA",
          "PL",
          "PT",
          "PT_BR",
          "PT_PT",
          "PA",
          "RO",
          "RU",
          "SR",
          "SK",
          "SL",
          "ES",
          "ES_AR",
          "ES_ES",
          "ES_MX",
          "SW",
          "SV",
          "TA",
          "TE",
          "TH",
          "TR",
          "UK",
          "UR",
          "UZ",
          "VI",
          "ZU"
        ],
        "x-enumDescriptions": {
          "AF": "Afrikaans",
          "SQ": "Albanian",
          "AR": "Arabic",
          "AZ": "Azerbaijani",
          "BN": "Bengali",
          "BG": "Bulgarian",
          "CA": "Catalan",
          "ZH": "Chinese",
          "ZH_CN": "Chinese (CHN)",
          "ZH_HK": "Chinese (HKG)",
          "ZH_TW": "Chinese (TAI)",
          "HR": "Croatian",
          "CS": "Czech",
          "DA": "Danish",
          "NL": "Dutch",
          "EN": "English",
          "EN_GB": "English (UK)",
          "EN_US": "English (US)",
          "ET": "Estonian",
          "FIL": "Filipino",
          "FI": "Finnish",
          "FR": "French",
          "DE": "German",
          "EL": "Greek",
          "GU": "Gujarati",
          "HA": "Hausa",
          "HE": "Hebrew",
          "HI": "Hindi",
          "HU": "Hungarian",
          "ID": "Indonesian",
          "GA": "Irish",
          "IT": "Italian",
          "JA": "Japanese",
          "KN": "Kannada",
          "KK": "Kazakh",
          "KO": "Korean",
          "LO": "Lao",
          "LV": "Latvian",
          "LT": "Lithuanian",
          "MK": "Macedonian",
          "MS": "Malay",
          "ML": "Malayalam",
          "MR": "Marathi",
          "NB": "Norwegian",
          "FA": "Persian",
          "PL": "Polish",
          "PT": "Portuguese",
          "PT_BR": "Portuguese (BR)",
          "PT_PT": "Portuguese (PT)",
          "PA": "Punjabi",
          "RO": "Romanian",
          "RU": "Russian",
          "SR": "Serbian",
          "SK": "Slovak",
          "SL": "Slovenian",
          "ES": "Spanish",
          "ES_AR": "Spanish (ARG)",
          "ES_ES": "Spanish (SPA)",
          "ES_MX": "Spanish (MEX)",
          "SW": "Swahili",
          "SV": "Swedish",
          "TA": "Tamil",
          "TE": "Telugu",
          "TH": "Thai",
          "TR": "Turkish",
          "UK": "Ukrainian",
          "UR": "Urdu",
          "UZ": "Uzbek",
          "VI": "Vietnamese",
          "ZU": "Zulu"
        }
      },
      "ContactMessage": {
        "title": "Message originating from a contact",
        "description": "A message originating from a contact.",
        "type": "object",
        "allOf": [
          {
            "$ref": "#/components/schemas/ContactMessageTypes"
          },
          {
            "$ref": "#/components/schemas/ContactMessageCommonProps"
          }
        ]
      },
      "ContactMessageTypes": {
        "type": "object",
        "oneOf": [
          {
            "$ref": "#/components/schemas/ChannelSpecificContactMessage"
          },
          {
            "$ref": "#/components/schemas/ChoiceResponseMessageField"
          },
          {
            "$ref": "#/components/schemas/FallbackMessageField"
          },
          {
            "$ref": "#/components/schemas/LocationMessageField"
          },
          {
            "$ref": "#/components/schemas/MediaCardMessageField"
          },
          {
            "$ref": "#/components/schemas/MediaMessageField"
          },
          {
            "$ref": "#/components/schemas/ProductResponseMessage"
          },
          {
            "$ref": "#/components/schemas/TextMessageField"
          }
        ]
      },
      "ContactMessageCommonProps": {
        "type": "object",
        "allOf": [
          {
            "$ref": "#/components/schemas/ReplyToField"
          }
        ]
      },
      "ConversationBase": {
        "description": "A collection of messages exchanged between a contact and an app.\nConversations are normally created on the fly by Conversation API once\na message is sent and there is no active conversation already.\nThere can be only one active conversation at any given time between\na particular contact and an app.",
        "type": "object",
        "title": "Conversation",
        "properties": {
          "active": {
            "description": "Flag for whether this conversation is active.",
            "type": "boolean"
          },
          "active_channel": {
            "$ref": "#/components/schemas/ConversationChannel"
          },
          "app_id": {
            "description": "The ID of the participating app.",
            "type": "string"
          },
          "contact_id": {
            "description": "The ID of the participating contact.",
            "type": "string"
          },
          "metadata": {
            "description": "Arbitrary data set by the Conversation API clients.\nUp to 1024 characters long.\nNOTE: This field has been deprecated due to changes in the system architecture or functionality.\nIt is no longer actively maintained and may be removed in future versions. Please avoid relying on this field in new code.",
            "type": "string",
            "deprecated": true
          },
          "metadata_json": {
            "description": "Arbitrary data set by the Conversation API clients and/or provided in the `conversation_metadata` field of a SendMessageRequest.\nA valid JSON object.",
            "type": "object"
          },
          "correlation_id": {
            "type": "string",
            "description": "Arbitrary correlation ID related to the MT message set by the Conversation API user."
          }
        }
      },
      "Conversation": {
        "description": "A collection of messages exchanged between a contact and an app.\nConversations are normally created on the fly by Conversation API once\na message is sent and there is no active conversation already.\nThere can be only one active conversation at any given time between\na particular contact and an app.",
        "type": "object",
        "title": "Conversation",
        "allOf": [
          {
            "$ref": "#/components/schemas/ConversationBase"
          },
          {
            "type": "object",
            "properties": {
              "id": {
                "description": "The ID of the conversation.",
                "type": "string"
              },
              "last_received": {
                "description": "The timestamp of the latest message in the conversation. The timestamp will be\nThursday January 01, 1970 00:00:00 UTC if the conversation contains no messages.",
                "type": "string",
                "format": "date-time",
                "readOnly": true
              }
            }
          }
        ]
      },
      "ConversationChannel": {
        "type": "string",
        "title": "Channel Identifier",
        "description": "The identifier of the channel you want to include. Must be one of the enum values.",
        "example": "WHATSAPP",
        "x-enumDescriptions": {
          "WHATSAPP": "The WhatsApp channel.",
          "RCS": "The RCS channel.",
          "SMS": "The SMS channel.",
          "MESSENGER": "The Facebook Messenger channel.",
          "VIBERBM": "The Viber Business Messages channel.",
          "MMS": "The MMS channel.",
          "INSTAGRAM": "The Instagram channel.",
          "TELEGRAM": "The Telegram channel.",
          "KAKAOTALK": "The KakaoTalk channel.",
          "KAKAOTALKCHAT": "The KakaoTalk chat channel (used primarily in ConsultationTalk).",
          "LINE": "The LINE channel.",
          "WECHAT": "The WeChat channel.",
          "APPLEBC": "The Apple Messages for Business channel."
        },
        "enum": [
          "WHATSAPP",
          "RCS",
          "SMS",
          "MESSENGER",
          "VIBERBM",
          "MMS",
          "INSTAGRAM",
          "TELEGRAM",
          "KAKAOTALK",
          "KAKAOTALKCHAT",
          "LINE",
          "WECHAT",
          "APPLEBC"
        ]
      },
      "CredentialOrdinalNumber": {
        "type": "integer",
        "description": "The ordinal number of the credential. This field is used when the application supports multiple credential integrations per channel. Currently, this is only applicable to the `LINE` channel. For other channels, this value will always be set to `0`. In the case in which there are multiple credential integrations per channel on a single app, this field must have a unique value for each multi-credential channel entry.",
        "default": 0,
        "minimum": 0,
        "maximum": 255
      },
      "CreateConversationRequest": {
        "required": [
          "app_id",
          "contact_id"
        ],
        "description": "The conversation to create.",
        "type": "object",
        "title": "Conversation",
        "allOf": [
          {
            "$ref": "#/components/schemas/ConversationBase"
          }
        ]
      },
      "GetChannelProfileConversationChannel": {
        "type": "string",
        "title": "Channel Identifier",
        "description": "The channel. Must be one of the supported channels for this operation.",
        "example": "MESSENGER",
        "x-enumDescriptions": {
          "MESSENGER": "The Facebook Messenger channel.",
          "INSTAGRAM": "The Instagram channel.",
          "VIBER": "The Viber Bot channel.",
          "LINE": "The LINE channel."
        },
        "enum": [
          "MESSENGER",
          "INSTAGRAM",
          "VIBER",
          "LINE"
        ]
      },
      "ChannelCredentialsTypes": {
        "type": "object",
        "oneOf": [
          {
            "$ref": "#/components/schemas/StaticBearerCredentialsField"
          },
          {
            "$ref": "#/components/schemas/StaticTokenCredentialsField"
          },
          {
            "$ref": "#/components/schemas/MMSCredentialsField"
          },
          {
            "$ref": "#/components/schemas/KakaoTalkCredentialsField"
          },
          {
            "$ref": "#/components/schemas/TelegramCredentialsField"
          },
          {
            "$ref": "#/components/schemas/LineCredentialsField"
          },
          {
            "$ref": "#/components/schemas/LineEnterpriseCredentialsField"
          },
          {
            "$ref": "#/components/schemas/WeChatCredentialsField"
          },
          {
            "$ref": "#/components/schemas/InstagramCredentialsField"
          },
          {
            "$ref": "#/components/schemas/AppleBcCredentialsField"
          },
          {
            "$ref": "#/components/schemas/KakaoTalkChatCredentialsField"
          }
        ]
      },
      "ChannelCredentialsCommonTypes": {
        "type": "object",
        "properties": {
          "callback_secret": {
            "description": "The secret used to verify the channel callbacks\nfor channels which support callback verification.\nThe callback verification is not needed for Sinch-managed\nchannels because the callbacks are not leaving\nSinch internal networks.\nMax length is 256 characters.\nNote: leaving channel_callback_secret empty for channels with\ncallback verification will disable the verification.",
            "type": "string",
            "format": "password"
          },
          "channel": {
            "$ref": "#/components/schemas/ConversationChannel"
          },
          "state": {
            "readOnly": true,
            "allOf": [
              {
                "$ref": "#/components/schemas/ChannelIntegrationState"
              }
            ]
          },
          "channel_known_id": {
            "description": "Additional identifier set by the channel that represents an specific id used by the channel.",
            "type": "string",
            "readOnly": true
          },
          "credential_ordinal_number": {
            "allOf": [
              {
                "$ref": "#/components/schemas/CredentialOrdinalNumber"
              }
            ]
          }
        }
      },
      "ConversationChannelCredentials": {
        "type": "object",
        "description": "Enables access to the underlying messaging channel.",
        "allOf": [
          {
            "$ref": "#/components/schemas/ChannelCredentialsTypes"
          },
          {
            "$ref": "#/components/schemas/ChannelCredentialsCommonTypes"
          }
        ]
      },
      "ConversationDirection": {
        "type": "string",
        "description": "The direction of the message flow, indicating whether the message was sent to or from the Conversation API app.",
        "x-enumDescriptions": {
          "TO_APP": "Sent to the Conversation API app.",
          "TO_CONTACT": "Sent to a recipient/contact from the Conversation API app."
        },
        "enum": [
          "TO_APP",
          "TO_CONTACT"
        ]
      },
      "ConversationMergeStrategy": {
        "type": "string",
        "default": "MERGE",
        "x-enumDescriptions": {
          "MERGE": "Merge the contents of the two subjects."
        },
        "enum": [
          "MERGE"
        ]
      },
      "InjectMessageRequest": {
        "description": "A message on a particular channel.",
        "type": "object",
        "title": "Conversation Message Injected",
        "allOf": [
          {
            "$ref": "#/components/schemas/ConversationMessageTypesInject"
          },
          {
            "$ref": "#/components/schemas/InjectMessageCommonProps"
          }
        ]
      },
      "InjectMessageCommonProps": {
        "type": "object",
        "required": [
          "channel_identity",
          "contact_id",
          "direction",
          "accept_time"
        ],
        "properties": {
          "accept_time": {
            "description": "The processed time of the message in UTC timezone. Must be less than current_time and greater than (current_time - 30 days)",
            "type": "string",
            "format": "date-time"
          },
          "channel_identity": {
            "$ref": "#/components/schemas/ChannelIdentity"
          },
          "contact_id": {
            "description": "The ID of the contact registered in the conversation provided.",
            "type": "string"
          },
          "direction": {
            "$ref": "#/components/schemas/ConversationDirection"
          },
          "conversation_id": {
            "type": "string",
            "description": "The ID of the conversation."
          },
          "sender_id": {
            "description": "For Contact Messages (MO messages), the sender ID represents the recipient to which the message was sent. This may be a phone number (in the case of SMS and MMS) or a unique ID (in the case of WhatsApp). This is field is not supported on all channels, nor is it supported for MT messages.",
            "type": "string"
          },
          "processing_mode": {
            "$ref": "#/components/schemas/ProcessingMode"
          },
          "metadata": {
            "description": "Optional. Metadata associated with the contact.\nUp to 1024 characters long.",
            "type": "string"
          }
        }
      },
      "ConversationMessage": {
        "description": "A message on a particular channel.",
        "type": "object",
        "title": "Conversation Message",
        "allOf": [
          {
            "$ref": "#/components/schemas/ConversationMessageTypes"
          },
          {
            "$ref": "#/components/schemas/ConversationMessageCommonProps"
          }
        ]
      },
      "ConversationMessageTypes": {
        "type": "object",
        "oneOf": [
          {
            "type": "object",
            "properties": {
              "app_message": {
                "$ref": "#/components/schemas/AppMessage"
              }
            },
            "title": "App Message"
          },
          {
            "type": "object",
            "properties": {
              "contact_message": {
                "$ref": "#/components/schemas/ContactMessage"
              }
            },
            "title": "Contact Message"
          }
        ]
      },
      "ConversationMessageTypesInject": {
        "type": "object",
        "oneOf": [
          {
            "type": "object",
            "properties": {
              "app_message": {
                "$ref": "#/components/schemas/AppMessage"
              }
            },
            "title": "App Message to be injected"
          },
          {
            "type": "object",
            "properties": {
              "contact_message": {
                "$ref": "#/components/schemas/ContactMessage"
              }
            },
            "title": "Contact Message to be injected"
          }
        ]
      },
      "ConversationMessageCommonProps": {
        "type": "object",
        "properties": {
          "accept_time": {
            "description": "The time Conversation API processed the message.",
            "type": "string",
            "format": "date-time",
            "readOnly": true
          },
          "channel_identity": {
            "$ref": "#/components/schemas/ChannelIdentity"
          },
          "contact_id": {
            "description": "The ID of the contact.",
            "type": "string"
          },
          "conversation_id": {
            "description": "The ID of the conversation.",
            "type": "string"
          },
          "direction": {
            "$ref": "#/components/schemas/ConversationDirection"
          },
          "id": {
            "description": "The ID of the message.",
            "type": "string"
          },
          "metadata": {
            "description": "Optional. Metadata associated with the contact.\nUp to 1024 characters long.",
            "type": "string"
          },
          "injected": {
            "description": "Flag for whether this message was injected.",
            "type": "boolean",
            "readOnly": true
          },
          "sender_id": {
            "description": "For Contact Messages (MO messages), the sender ID represents the recipient to which the message was sent. This may be a phone number (in the case of SMS and MMS) or a unique ID (in the case of WhatsApp). This is field is not supported on all channels, nor is it supported for MT messages.",
            "type": "string"
          },
          "processing_mode": {
            "$ref": "#/components/schemas/ProcessingMode"
          }
        }
      },
      "ConversationMetadataReportView": {
        "type": "string",
        "default": "NONE",
        "description": "NONE - Omit metadata.\nFULL - Include all metadata assigned to the conversation.",
        "x-enumDescriptions": {
          "NONE": "Omit metadata.",
          "FULL": "Include all metadata assigned to the conversation."
        },
        "enum": [
          "NONE",
          "FULL"
        ]
      },
      "Coordinates": {
        "type": "object",
        "title": "Geographic coordinates",
        "required": [
          "latitude",
          "longitude"
        ],
        "properties": {
          "latitude": {
            "description": "The latitude.",
            "type": "number",
            "format": "float"
          },
          "longitude": {
            "description": "The longitude.",
            "type": "number",
            "format": "float"
          }
        }
      },
      "FallbackMessageField": {
        "description": "Fallback message. Used when original contact message can not be handled.",
        "type": "object",
        "title": "Fallback",
        "properties": {
          "fallback_message": {
            "title": "Fallback Message",
            "type": "object",
            "properties": {
              "raw_message": {
                "description": "Optional. The raw fallback message if provided by the channel.",
                "type": "string"
              },
              "reason": {
                "$ref": "#/components/schemas/Reason"
              }
            }
          }
        }
      },
      "IdentifiedByField": {
        "type": "object",
        "title": "Channel Identities",
        "properties": {
          "identified_by": {
            "title": "Channel Identity List",
            "type": "object",
            "description": "The identity as specified by the channel.",
            "allOf": [
              {
                "$ref": "#/components/schemas/ChannelIdentities"
              }
            ]
          }
        }
      },
      "KakaoTalkCredentialsField": {
        "type": "object",
        "title": "KakaoTalk",
        "properties": {
          "kakaotalk_credentials": {
            "type": "object",
            "title": "KakaoTalk Credentials",
            "required": [
              "kakaotalk_plus_friend_id",
              "kakaotalk_sender_key"
            ],
            "description": "If you are including the KakaoTalk channel in the `channel_identifier` property, you must include this object.",
            "properties": {
              "kakaotalk_plus_friend_id": {
                "description": "KakaoTalk Business Channel ID.",
                "type": "string"
              },
              "kakaotalk_sender_key": {
                "description": "KakaoTalk Sender Key.",
                "type": "string"
              }
            }
          }
        }
      },
      "LocationMessageField": {
        "type": "object",
        "description": "Message containing geographic location.",
        "title": "Location",
        "properties": {
          "location_message": {
            "title": "Location Message",
            "type": "object",
            "required": [
              "coordinates",
              "title"
            ],
            "properties": {
              "coordinates": {
                "$ref": "#/components/schemas/Coordinates"
              },
              "label": {
                "description": "Label or name for the position.",
                "type": "string"
              },
              "title": {
                "description": "The title is shown close to the button or link that leads to a map showing the location. The title can be clickable in some cases.",
                "type": "string"
              }
            }
          }
        }
      },
      "MMSCredentialsField": {
        "type": "object",
        "title": "MMS",
        "properties": {
          "mms_credentials": {
            "type": "object",
            "title": "MMS Credentials",
            "required": [
              "account_id",
              "api_key"
            ],
            "description": "If you are including the MMS channel in the `channel_identifier` property, you must include this object.",
            "properties": {
              "account_id": {
                "description": "MMS Account ID.",
                "type": "string"
              },
              "api_key": {
                "description": "MMS API Key.",
                "type": "string"
              },
              "basic_auth": {
                "$ref": "#/components/schemas/BasicAuthCredentials"
              }
            }
          }
        }
      },
      "MediaCardMessageField": {
        "type": "object",
        "title": "Media Card",
        "description": "A message containing a media component, such as an image or video.",
        "properties": {
          "media_card_message": {
            "type": "object",
            "title": "Media Card Message",
            "required": [
              "url"
            ],
            "properties": {
              "caption": {
                "description": "Caption for the media on supported channels.",
                "type": "string"
              },
              "url": {
                "description": "Url to the media file.",
                "type": "string"
              }
            }
          }
        }
      },
      "MediaMessageField": {
        "type": "object",
        "title": "Media Message",
        "description": "A message containing a media component, such as an image, document, or video.",
        "properties": {
          "media_message": {
            "$ref": "#/components/schemas/MediaProperties"
          }
        }
      },
      "MediaProperties": {
        "title": "Media Properties",
        "type": "object",
        "required": [
          "url"
        ],
        "properties": {
          "thumbnail_url": {
            "type": "string",
            "description": "An optional parameter. Will be used where it is natively supported."
          },
          "url": {
            "description": "Url to the media file.",
            "type": "string"
          },
          "filename_override": {
            "description": "Overrides the media file name.",
            "type": "string"
          }
        }
      },
      "ChoiceItem": {
        "type": "object",
        "title": "Choice",
        "description": "A message component for interactive messages, containing a choice.",
        "required": [
          "title"
        ],
        "properties": {
          "title": {
            "type": "string",
            "description": "Required parameter. Title for the choice item."
          },
          "description": {
            "type": "string",
            "description": "Optional parameter. The description (or subtitle) of this choice item."
          },
          "media": {
            "description": "Optional parameter. The media of this choice item.",
            "allOf": [
              {
                "$ref": "#/components/schemas/MediaProperties"
              }
            ]
          },
          "postback_data": {
            "type": "string",
            "description": "Optional parameter. Postback data that will be returned in the MO if the user selects this option."
          }
        }
      },
      "ProductItem": {
        "type": "object",
        "title": "Product",
        "description": "A message component for interactive messages, containing a product.",
        "required": [
          "id",
          "marketplace"
        ],
        "properties": {
          "id": {
            "type": "string",
            "description": "Required parameter. The ID for the product."
          },
          "marketplace": {
            "type": "string",
            "description": "Required parameter. The marketplace to which the product belongs.",
            "example": "FACEBOOK"
          },
          "quantity": {
            "type": "integer",
            "format": "int32",
            "description": "Output only. The quantity of the chosen product."
          },
          "item_price": {
            "type": "number",
            "format": "float",
            "description": "Output only. The price for one unit of the chosen product."
          },
          "currency": {
            "type": "string",
            "description": "Output only. The currency of the item_price."
          }
        }
      },
      "ListItem": {
        "type": "object",
        "title": "List Item",
        "description": "Item containing either choiceItem or ProductItem",
        "oneOf": [
          {
            "required": [
              "choice"
            ],
            "type": "object",
            "properties": {
              "choice": {
                "$ref": "#/components/schemas/ChoiceItem"
              }
            },
            "title": "Choice"
          },
          {
            "required": [
              "product"
            ],
            "type": "object",
            "properties": {
              "product": {
                "$ref": "#/components/schemas/ProductItem"
              }
            },
            "title": "Product"
          }
        ]
      },
      "ProductResponseMessage": {
        "type": "object",
        "title": "Product Response Message",
        "description": "Represents an interactive WhatsApp message containing ProductItem objects",
        "required": [
          "products"
        ],
        "properties": {
          "product_response_message": {
            "type": "object",
            "properties": {
              "products": {
                "description": "The selected products.",
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/ProductItem"
                }
              },
              "title": {
                "description": "Optional parameter. Text that may be sent with selected products.",
                "type": "string"
              },
              "catalog_id": {
                "description": "Optional parameter. The catalog id that the selected products belong to.",
                "type": "string"
              }
            }
          }
        }
      },
      "ListSection": {
        "type": "object",
        "title": "List Section",
        "description": "Section for interactive WhatsApp messages containing ListItem",
        "required": [
          "items"
        ],
        "properties": {
          "title": {
            "description": "Optional parameter. Title for list section.",
            "type": "string"
          },
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ListItem"
            }
          }
        }
      },
      "ListMessageField": {
        "type": "object",
        "title": "List",
        "description": "A message containing a list of options to choose from. All items must be of the same type.",
        "properties": {
          "list_message": {
            "title": "List Message",
            "type": "object",
            "required": [
              "title",
              "sections"
            ],
            "properties": {
              "title": {
                "description": "A title for the message that is displayed near the products or choices.",
                "type": "string"
              },
              "description": {
                "description": "This is an optional field, containing a description for the message.",
                "type": "string"
              },
              "media": {
                "$ref": "#/components/schemas/MediaProperties"
              },
              "sections": {
                "description": "List of ListSection objects containing choices to be presented in the list message.",
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/ListSection"
                }
              },
              "message_properties": {
                "description": "Additional properties for the message. Required if sending a product list message.",
                "properties": {
                  "catalog_id": {
                    "description": "Required if sending a product list message. The ID of the catalog to which the products belong.",
                    "type": "string"
                  },
                  "menu": {
                    "description": "Optional. Sets the text for the menu of a choice list message.",
                    "type": "string"
                  },
                  "whatsapp_header": {
                    "description": "Optional. Sets the text for the header of a WhatsApp choice list message. Ignored for other channels.",
                    "type": "string"
                  }
                }
              }
            }
          }
        }
      },
      "MessageQueue": {
        "type": "string",
        "description": "Select the priority type for the message",
        "default": "NORMAL_PRIORITY",
        "example": "NORMAL_PRIORITY",
        "x-enumDescriptions": {
          "NORMAL_PRIORITY": "The normal priority queue.",
          "HIGH_PRIORITY": "The high priority queue."
        },
        "enum": [
          "NORMAL_PRIORITY",
          "HIGH_PRIORITY"
        ]
      },
      "QueueStats": {
        "type": "object",
        "properties": {
          "outbound_size": {
            "description": "The current size of the App's MT queue.",
            "type": "integer",
            "format": "int64",
            "readOnly": true
          },
          "outbound_limit": {
            "description": "The limit of the App's MT queue. The default limit is 500000 messages.",
            "type": "integer",
            "format": "int64",
            "readOnly": true
          }
        }
      },
      "RateLimits": {
        "type": "object",
        "properties": {
          "inbound": {
            "description": "The number of inbound messages/events we process per second,\nfrom underlying channels to the app.  The default rate limit is 25.",
            "type": "integer",
            "format": "int64",
            "readOnly": true
          },
          "outbound": {
            "description": "The number of messages/events we process per second, from the\napp to the underlying channels. Note that underlying channels may have other\nrate limits.  The default rate limit is 25.",
            "type": "integer",
            "format": "int64",
            "readOnly": true
          },
          "webhooks": {
            "description": "The rate limit of callbacks sent to the webhooks registered\nfor the app. Note that if you have multiple webhooks with shared triggers,\nmultiple callbacks will be sent out for each triggering event. The default rate limit is 25.",
            "type": "integer",
            "format": "int64",
            "readOnly": true
          }
        }
      },
      "Reason": {
        "type": "object",
        "properties": {
          "code": {
            "$ref": "#/components/schemas/ReasonCode"
          },
          "description": {
            "description": "A textual description of the reason.",
            "type": "string"
          },
          "sub_code": {
            "$ref": "#/components/schemas/ReasonSubCode"
          },
          "channel_code": {
            "description": "Error code forwarded directly from the channel. Useful in case of unmapped or channel specific errors. Currently only supported on the WhatsApp channel.",
            "type": "string"
          }
        }
      },
      "ReasonCode": {
        "enum": [
          "UNKNOWN",
          "INTERNAL_ERROR",
          "RATE_LIMITED",
          "RECIPIENT_INVALID_CHANNEL_IDENTITY",
          "RECIPIENT_NOT_REACHABLE",
          "RECIPIENT_NOT_OPTED_IN",
          "OUTSIDE_ALLOWED_SENDING_WINDOW",
          "CHANNEL_FAILURE",
          "CHANNEL_BAD_CONFIGURATION",
          "CHANNEL_CONFIGURATION_MISSING",
          "MEDIA_TYPE_UNSUPPORTED",
          "MEDIA_TOO_LARGE",
          "MEDIA_NOT_REACHABLE",
          "NO_CHANNELS_LEFT",
          "TEMPLATE_NOT_FOUND",
          "TEMPLATE_INSUFFICIENT_PARAMETERS",
          "TEMPLATE_NON_EXISTING_LANGUAGE_OR_VERSION",
          "DELIVERY_TIMED_OUT",
          "DELIVERY_REJECTED_DUE_TO_POLICY",
          "CONTACT_NOT_FOUND",
          "BAD_REQUEST",
          "UNKNOWN_APP",
          "NO_CHANNEL_IDENTITY_FOR_CONTACT",
          "CHANNEL_REJECT",
          "NO_PERMISSION",
          "NO_PROFILE_AVAILABLE",
          "UNSUPPORTED_OPERATION"
        ],
        "x-enumDescriptions": {
          "UNKNOWN": "UNKNOWN is used if no other code can be used to describe the encountered error.",
          "INTERNAL_ERROR": "An internal error occurred. Please save the entire callback if you want to report an error.",
          "RATE_LIMITED": "The message or event was not sent due to rate limiting.",
          "RECIPIENT_INVALID_CHANNEL_IDENTITY": "The channel recipient identity was malformed.",
          "RECIPIENT_NOT_REACHABLE": "It was not possible to reach the contact, or channel recipient identity, on the channel.",
          "RECIPIENT_NOT_OPTED_IN": "The contact, or channel recipient identity, has not opt-ed in on the channel.",
          "OUTSIDE_ALLOWED_SENDING_WINDOW": "The allowed sending window has expired. See the channel documentation for more information about how the sending window works for the different channels.",
          "CHANNEL_FAILURE": "The channel failed to accept the message. The Conversation API performs multiple retries in case of transient errors.",
          "CHANNEL_BAD_CONFIGURATION": "The configuration of the channel for the used App is wrong. The bad configuration caused the channel to reject the message. Please see the [channel support documentation page](https://developers.sinch.com/docs/conversation/channel-support/) for how to set it up correctly.",
          "CHANNEL_CONFIGURATION_MISSING": "The configuration of the channel is missing from the used App. Please see the [channel support documentation](https://developers.sinch.com/docs/conversation/channel-support/) page for how to set it up correctly.",
          "MEDIA_TYPE_UNSUPPORTED": "Some of the referenced media files is of a unsupported media type. Please read the [channel support documentation](https://developers.sinch.com/docs/conversation/channel-support/) page to find out the limitations on media that the different channels impose.",
          "MEDIA_TOO_LARGE": "Some of the referenced media files are too large. Please read the [channel support documentation](https://developers.sinch.com/docs/conversation/channel-support/) to find out the limitations on file size that the different channels impose.",
          "MEDIA_NOT_REACHABLE": "The provided media link was not accessible from the Conversation API or from the underlying channels. Please make sure that the media file is accessible.",
          "NO_CHANNELS_LEFT": "No channels to try to send the message to. This error will occur if one attempts to send a message to a channel with no channel identities or if all applicable channels have been attempted.",
          "TEMPLATE_NOT_FOUND": "The referenced template was not found.",
          "TEMPLATE_INSUFFICIENT_PARAMETERS": "Sufficient template parameters was not given. All parameters defined in the template must be provided when sending a template message.",
          "TEMPLATE_NON_EXISTING_LANGUAGE_OR_VERSION": "The selected language, or version, of the referenced template did not exist. Please check the available versions and languages of the template.",
          "DELIVERY_TIMED_OUT": "The message delivery, or event delivery, failed due to a channel-imposed timeout. See the [channel support documentation](https://developers.sinch.com/docs/conversation/channel-support/) page for further details about how the different channels behave.",
          "DELIVERY_REJECTED_DUE_TO_POLICY": "The message or event was rejected by the channel due to a policy. Some channels have specific policies that must be met to send a message. See the [channel support documentation](https://developers.sinch.com/docs/conversation/channel-support/) page for more information about when this error will be triggered.",
          "CONTACT_NOT_FOUND": "The provided Contact ID did not exist.",
          "BAD_REQUEST": "Conversation API validates send requests in two different stages. The first stage is right before the message is enqueued. If this first validation fails the API responds with 400 Bad Request and the request is discarded immediately. The second validation kicks in during message processing and it normally contains channel specific validation rules. Failures during second request validation are delivered as callbacks to `MESSAGE_DELIVERY (EVENT_DELIVERY)` webhooks with ReasonCode `BAD_REQUEST`.",
          "UNKNOWN_APP": "The used App is missing. This error may occur when the app is removed during message processing.",
          "NO_CHANNEL_IDENTITY_FOR_CONTACT": "The contact has no channel identities set up, or the contact has no channels set up for the resolved channel priorities.",
          "CHANNEL_REJECT": "Generic error for channel permanently rejecting a message. Only used if no other better matching error can be used.",
          "NO_PERMISSION": "No permission to perform action.",
          "NO_PROFILE_AVAILABLE": "No available profile data for user.",
          "UNSUPPORTED_OPERATION": "Generic error for channel unsupported operations."
        },
        "type": "string"
      },
      "ReasonSubCode": {
        "enum": [
          "UNSPECIFIED_SUB_CODE",
          "ATTACHMENT_REJECTED",
          "MEDIA_TYPE_UNDETERMINED",
          "INACTIVE_SENDER"
        ],
        "x-enumDescriptions": {
          "UNSPECIFIED_SUB_CODE": "UNSPECIFIED_SUB_CODE is used if no other sub code can be used to describe the encountered error.",
          "ATTACHMENT_REJECTED": "The message attachment was rejected by the channel due to a policy. Some channels have specific policies that must be met to receive an attachment.",
          "MEDIA_TYPE_UNDETERMINED": "The specified media urls media type could not be determined.",
          "INACTIVE_SENDER": "The used credentials for the underlying channel is inactivated and not allowed to send or receive messages."
        },
        "type": "string"
      },
      "Recipient": {
        "description": "Identifies the recipient.",
        "allOf": [
          {
            "$ref": "#/components/schemas/RecipientBase"
          }
        ]
      },
      "RecipientRequest": {
        "description": "Identifies the recipient. If [Dispatch Mode](https://developers.sinch.com/docs/conversation/processing-modes/) is used, you must use the `identified_by` field.",
        "allOf": [
          {
            "$ref": "#/components/schemas/RecipientBase"
          }
        ]
      },
      "RecipientBase": {
        "type": "object",
        "oneOf": [
          {
            "$ref": "#/components/schemas/IdentifiedByField"
          },
          {
            "$ref": "#/components/schemas/ContactIDField"
          }
        ]
      },
      "ReplyToField": {
        "description": "If the contact message was a response to a previous App message then this field contains information about that.",
        "type": "object",
        "title": "Reply To",
        "properties": {
          "reply_to": {
            "title": "Reply To",
            "type": "object",
            "required": [
              "message_id"
            ],
            "properties": {
              "message_id": {
                "type": "string",
                "description": "Required. The Id of the message that this is a response to"
              }
            }
          }
        }
      },
      "RetentionPolicy": {
        "type": "object",
        "description": "The retention policy configured for the app. For more information about retention policies, see [Retention Policy](https://developers.sinch.com/docs/conversation/keyconcepts/#retention-policy).",
        "title": "Retention policy for messages and conversations",
        "properties": {
          "retention_type": {
            "$ref": "#/components/schemas/RetentionPolicyType"
          },
          "ttl_days": {
            "description": "Optional. The days before a message or conversation is eligible for deletion.\nDefault value is 180. The ttl_days value has no effect when retention_type\nis `PERSIST_RETENTION_POLICY`. The valid values for this field are [1 - 3650].\nNote that retention cleanup job runs once every twenty-four hours\nwhich can lead to delay i.e., messages and conversations are not deleted on\nthe minute they become eligible for deletion.",
            "type": "integer",
            "default": 180,
            "format": "int64"
          }
        }
      },
      "RetentionPolicyType": {
        "enum": [
          "MESSAGE_EXPIRE_POLICY",
          "CONVERSATION_EXPIRE_POLICY",
          "PERSIST_RETENTION_POLICY"
        ],
        "x-enumDescriptions": {
          "MESSAGE_EXPIRE_POLICY": "The default retention policy where messages older than ttl_days are automatically deleted from Conversation API database.",
          "CONVERSATION_EXPIRE_POLICY": "The conversation expire policy only considers the last message in a conversation. If the last message is older that ttl_days the entire conversation is deleted. The difference with MESSAGE_EXPIRE_POLICY is that messages with accept_time older than ttl_days are persisted as long as there is a newer message in the same conversation.",
          "PERSIST_RETENTION_POLICY": "Persist policy does not delete old messages or conversations. Please note that message storage might be subject to additional charges in the future."
        },
        "type": "string",
        "default": "MESSAGE_EXPIRE_POLICY"
      },
      "DispatchRetentionPolicy": {
        "type": "object",
        "description": "The retention policy configured for messages in [Dispatch Mode](https://developers.sinch.com/docs/conversation/processing-modes/). Currently only `MESSAGE_EXPIRE_POLICY` is available. For more information about retention policies, see [Retention Policy](https://developers.sinch.com/docs/conversation/keyconcepts/#retention-policy).",
        "properties": {
          "retention_type": {
            "$ref": "#/components/schemas/DispatchRetentionPolicyType"
          },
          "ttl_days": {
            "description": "Optional. The days before a message is eligible for deletion. The valid range is `[0 - 7]`. In the case of a `0` day TTL, messages aren't stored at all.\nNote the retention cleanup job runs once every twenty-four hours, so messages are not deleted on the minute they become eligible for deletion.",
            "type": "integer",
            "default": 0,
            "format": "int64"
          }
        }
      },
      "DispatchRetentionPolicyType": {
        "x-enumDescriptions": {
          "MESSAGE_EXPIRE_POLICY": "Removes all messages, sent or received by the app, older than the TTL days specified in the policy."
        },
        "enum": [
          "MESSAGE_EXPIRE_POLICY"
        ],
        "type": "string",
        "default": "MESSAGE_EXPIRE_POLICY"
      },
      "MessageSource": {
        "description": "Specifies the message source for which the request will be processed. Used for operations on messages in Dispatch Mode. For more information, see [Processing Modes](https://developers.sinch.com/docs/conversation/processing-modes/).",
        "type": "string",
        "enum": [
          "CONVERSATION_SOURCE",
          "DISPATCH_SOURCE"
        ],
        "default": "CONVERSATION_SOURCE",
        "x-enumDescriptions": {
          "CONVERSATION_SOURCE": "The default messages source. Retrieves messages sent in the `CONVERSATION` processing mode, which associates the messages with a specific conversation and contact.",
          "DISPATCH_SOURCE": "Retrieves messages sent in the `DISPATCH` processing mode. These types of messages are not associated with any conversation or contact."
        }
      },
      "ProcessingMode": {
        "description": "Whether or not Conversation API should store contacts and conversations for the app. For more information, see [Processing Modes](https://developers.sinch.com/docs/conversation/processing-modes/).",
        "enum": [
          "CONVERSATION",
          "DISPATCH"
        ],
        "x-enumDescriptions": {
          "CONVERSATION": "Creates contacts and conversations automatically when a message is sent or received and there's no existing contact or active conversation.",
          "DISPATCH": "The default Processing Mode. Does not associate messages with contacts and conversations. This processing mode is mostly intended for unidirectional high volume SMS use cases. The lack of contacts and conversations limits some API features as related data won't be queryable in the [Contact](https://developers.sinch.com/docs/conversation/api-reference/conversation/tag/Contact/) and [Conversation](https://developers.sinch.com/docs/conversation/api-reference/conversation/tag/Conversation/) APIs."
        },
        "type": "string",
        "default": "DISPATCH"
      },
      "SmartConversation": {
        "description": "This object is required for apps that subscribe to Smart Conversations features.",
        "type": "object",
        "properties": {
          "enabled": {
            "description": "Set to true to allow messages processed by this app to be analyzed by Smart Conversations.",
            "type": "boolean",
            "default": false
          }
        }
      },
      "CallbackSettings": {
        "description": "This object contains additional settings related to callback processing.",
        "type": "object",
        "properties": {
          "secret_for_overridden_callback_urls": {
            "description": "Optional. Secret can be used to sign contents of delivery receipts for a message that was sent with the default callback URL overridden (using the [`callback_url` field](https://developers.sinch.com/docs/conversation/api-reference/conversation/tag/Messages/#tag/Messages/operation/Messages_SendMessage!path=callback_url&t=request)). You can then use the secret to verify the signature.",
            "type": "string",
            "format": "password"
          }
        }
      },
      "DeliveryReportBasedFallback": {
        "description": "This object contains additional settings related to [delivery report based fallback](https://developers.sinch.com/docs/conversation/keyconcepts/#delivery-report-base-message-fallback). Note that this **paid** functionality is available for open beta testing.",
        "type": "object",
        "properties": {
          "enabled": {
            "description": "Optional. A flag specifying whether this app has enabled fallback message delivery upon no positive delivery report. This feature is applicable only to messages which are sent to a recipient with more than one channel identity. Identities must be defined on channels which support at least the 'DELIVERED' message state. **Please note that this functionality requires payment.**",
            "type": "boolean",
            "default": false
          },
          "delivery_report_waiting_time": {
            "description": "Optional. The time, in seconds, after which a message without a positive delivery report will fallback to the next channel. The valid values for this field are [60 - 259200].",
            "type": "integer",
            "format": "int32"
          }
        }
      },
      "MessageRetrySettings": {
        "description": "This object contains settings related to message retry mechanism.",
        "type": "object",
        "properties": {
          "retry_duration": {
            "description": "The maximum duration, in seconds, during which the system will retry sending a message in the event of a temporary processing failure. Time is counted after the first message processing failure. At least one retry is guaranteed. Subsequent retry instances are randomized with exponential backoff. If the next retry timestamp exceeds the configured time, one final retry will be performed on the cut-off time. The valid values for this field are [30 - 3600].",
            "type": "integer",
            "format": "int32",
            "default": 3600
          }
        }
      },
      "StaticBearerCredentialsField": {
        "type": "object",
        "title": "Static Bearer Authentication",
        "properties": {
          "static_bearer": {
            "description": "This object is required for channels which use a bearer-type of credential for authentication.",
            "type": "object",
            "required": [
              "claimed_identity",
              "token"
            ],
            "title": "Static Bearer Credentials",
            "properties": {
              "claimed_identity": {
                "description": "The claimed identity for the channel.",
                "type": "string"
              },
              "token": {
                "description": "The static bearer token for the channel.",
                "type": "string",
                "format": "password"
              }
            }
          }
        }
      },
      "StaticTokenCredentialsField": {
        "type": "object",
        "title": "Static Token Authentication",
        "properties": {
          "static_token": {
            "type": "object",
            "description": "This object is required for channels which use a static token credential for authentication.",
            "required": [
              "token"
            ],
            "title": "Static Token Credentials",
            "properties": {
              "token": {
                "description": "The static token for the channel.",
                "type": "string",
                "format": "password"
              }
            }
          }
        }
      },
      "TelegramCredentialsField": {
        "type": "object",
        "title": "Telegram",
        "properties": {
          "telegram_credentials": {
            "type": "object",
            "title": "Telegram Credentials",
            "required": [
              "token"
            ],
            "description": "If you are including the Telegram Bot channel in the `channel_identifier` property, you must include this object.",
            "properties": {
              "token": {
                "type": "string",
                "description": "The token for the Telegram bot to which you are connecting.",
                "example": "{{TELEGRAM_BOT_TOKEN}}",
                "format": "password"
              }
            }
          }
        }
      },
      "LineCredentialsField": {
        "type": "object",
        "title": "LINE",
        "properties": {
          "line_credentials": {
            "type": "object",
            "title": "LINE Credentials",
            "required": [
              "token",
              "secret"
            ],
            "description": "If the `channel` property is set to `LINE` for this entry of the `channel_credentials` array, you must include either the `line_credentials` object or the `line_enterprise_credentials` object in the entry as well.",
            "properties": {
              "token": {
                "type": "string",
                "description": "The token for the LINE channel to which you are connecting.",
                "example": "{{LINE_TOKEN}}"
              },
              "secret": {
                "type": "string",
                "description": "The secret for the LINE channel to which you are connecting.",
                "format": "password",
                "example": "{{LINE_SECRET}}"
              },
              "is_default": {
                "type": "boolean",
                "description": "When an app contains multiple LINE or LINE Enterprise credentials, one of the credentials needs to be defined as the default. Setting this property to `true` marks the corresponding credentials as the default credentials.",
                "default": false
              }
            }
          }
        }
      },
      "LineEnterpriseCredentials": {
        "type": "object",
        "title": "LINE Credentials",
        "required": [
          "token",
          "secret"
        ],
        "properties": {
          "token": {
            "type": "string",
            "description": "The token for the LINE channel to which you are connecting.",
            "example": "{{LINE_TOKEN}}"
          },
          "secret": {
            "type": "string",
            "description": "The secret for the LINE channel to which you are connecting.",
            "format": "password",
            "example": "{{LINE_SECRET}}"
          }
        }
      },
      "LineCredentialsJapanField": {
        "type": "object",
        "title": "LINE Credentials Japan",
        "properties": {
          "line_japan": {
            "$ref": "#/components/schemas/LineEnterpriseCredentials"
          }
        }
      },
      "LineCredentialsThailandField": {
        "type": "object",
        "title": "LINE Credentials Thailand",
        "properties": {
          "line_thailand": {
            "$ref": "#/components/schemas/LineEnterpriseCredentials"
          }
        }
      },
      "LineEnterpriseCredentialsField": {
        "type": "object",
        "title": "LINE Enterprise",
        "properties": {
          "line_enterprise_credentials": {
            "type": "object",
            "title": "LINE Enterprise Credentials",
            "description": "If the `channel` property is set to `LINE` for this entry of the `channel_credentials` array, you must include either the `line_credentials` object or the `line_enterprise_credentials` object in the entry as well.",
            "allOf": [
              {
                "oneOf": [
                  {
                    "$ref": "#/components/schemas/LineCredentialsJapanField"
                  },
                  {
                    "$ref": "#/components/schemas/LineCredentialsThailandField"
                  }
                ]
              },
              {
                "type": "object",
                "properties": {
                  "is_default": {
                    "type": "boolean",
                    "description": "When an app contains multiple LINE or LINE Enterprise credentials, one of the credentials needs to be defined as the default. Setting this property to `true` marks the corresponding credentials as the default credentials.",
                    "default": false
                  }
                }
              }
            ]
          }
        }
      },
      "WeChatCredentialsField": {
        "type": "object",
        "title": "WeChat",
        "properties": {
          "wechat_credentials": {
            "type": "object",
            "title": "WeChat Credentials",
            "required": [
              "app_id",
              "app_secret",
              "token",
              "aes_key"
            ],
            "description": "If you are including the WeChat channel in the `channel_identifier` property, you must include this object.",
            "properties": {
              "app_id": {
                "type": "string",
                "description": "The AppID(Developer ID) for the WeChat channel to which you are connecting.",
                "example": "{{WECHAT_APPID}}"
              },
              "app_secret": {
                "type": "string",
                "description": "The AppSecret(Developer Password) for the WeChat channel to which you are connecting.",
                "format": "password",
                "example": "{{WECHAT_APPSECRET}}"
              },
              "token": {
                "type": "string",
                "description": "The Token for the WeChat channel to which you are connecting.",
                "example": "{{WECHAT_TOKEN}}"
              },
              "aes_key": {
                "type": "string",
                "description": "The Encoding AES Key for the WeChat channel to which you are connecting.",
                "example": "{{WECHAT_AESKEY}}"
              }
            }
          }
        }
      },
      "InstagramCredentialsField": {
        "type": "object",
        "title": "Instagram",
        "properties": {
          "instagram_credentials": {
            "type": "object",
            "title": "Instagram Credentials",
            "required": [
              "token"
            ],
            "description": "If you are including the INSTAGRAM channel in the `channel_identifier` property, you must include this object.",
            "properties": {
              "token": {
                "type": "string",
                "description": "The static token.",
                "format": "password"
              },
              "business_account_id": {
                "type": "string",
                "description": "Required if using the Sinch Facebook App."
              }
            }
          }
        }
      },
      "AppleBcCredentialsField": {
        "type": "object",
        "title": "Apple Business Chat",
        "properties": {
          "applebc_credentials": {
            "type": "object",
            "title": "Apple Business Chat Credentials",
            "required": [
              "business_chat_account_id"
            ],
            "description": "If you are including the AppleBC channel in the `channel_identifier` property, you must include this object.",
            "properties": {
              "business_chat_account_id": {
                "type": "string",
                "description": "The ID that identifies a Business Chat Account (BCA)."
              },
              "merchant_id": {
                "type": "string",
                "description": "Merchant ID, required if our client wants to use Apple Pay."
              },
              "apple_pay_certificate_reference": {
                "type": "string",
                "description": "Certificate reference, required if our client wants to use Apple Pay."
              },
              "apple_pay_certificate_password": {
                "type": "string",
                "format": "password",
                "description": "Certificate password, required if our client wants to use Apple Pay."
              }
            }
          }
        }
      },
      "KakaoTalkChatCredentialsField": {
        "type": "object",
        "title": "KakaoTalkChat",
        "properties": {
          "kakaotalkchat_credentials": {
            "type": "object",
            "title": "KakaoTalkChat Credentials",
            "required": [
              "kakaotalk_plus_friend_id"
            ],
            "description": "If you are including the KakaoTalkChat channel in the `channel_identifier` property, you must include this object.",
            "properties": {
              "kakaotalk_plus_friend_id": {
                "type": "string",
                "description": "Kakaotalk Plus friend ID."
              },
              "api_key": {
                "type": "string",
                "description": "InfoBank API KEY."
              }
            }
          }
        }
      },
      "TemplateMessageField": {
        "type": "object",
        "description": "Message referring to predefined template",
        "title": "Template Message",
        "properties": {
          "template_message": {
            "type": "object",
            "title": "Template Message",
            "properties": {
              "channel_template": {
                "description": "Optional. Channel specific template reference with parameters per channel.\nThe channel template if exists overrides the omnichannel template.\nAt least one of `channel_template` or `omni_template` needs to be present.\nThe key in the map must point to a valid conversation channel as\ndefined by the enum ConversationChannel.",
                "type": "object",
                "additionalProperties": {
                  "$ref": "#/components/schemas/TemplateReference"
                }
              },
              "omni_template": {
                "$ref": "#/components/schemas/TemplateReferenceWithVersion"
              }
            }
          }
        }
      },
      "TemplateReferenceField": {
        "type": "object",
        "title": "Template (Reference)",
        "properties": {
          "template_reference": {
            "$ref": "#/components/schemas/TemplateReferenceWithVersion"
          }
        }
      },
      "TemplateReferenceWithVersion": {
        "type": "object",
        "allOf": [
          {
            "required": [
              "version"
            ]
          },
          {
            "$ref": "#/components/schemas/TemplateReference"
          }
        ]
      },
      "TemplateReference": {
        "type": "object",
        "title": "Template reference with concrete parameter values",
        "description": "The referenced template can be an omnichannel template stored in Conversation API Template Store as an AppMessage. You may also reference external channel-specific templates, such as a WhatsApp Business Template. Note that channel-specific template references are not supported when populating the `explicit_channel_omni_message` field.",
        "required": [
          "template_id"
        ],
        "properties": {
          "version": {
            "type": "string",
            "description": "Used to specify what version of a template to use. Required when using `omni_channel_override` and `omni_template` fields.\nThis will be used in conjunction with `language_code`. Note that, when referencing omni-channel templates using the [Sinch Customer Dashboard](https://dashboard.sinch.com/), the latest version of a given omni-template can be identified by populating this field with `latest`."
          },
          "language_code": {
            "description": "The BCP-47 language code, such as `en_US` or `sr_Latn`.\nFor more information, see http://www.unicode.org/reports/tr35/#Unicode_locale_identifier. English is the default `language_code`.\nNote that, while many API calls involving templates accept either the dashed format (`en-US`) or the underscored format (`en_US`), some channel specific templates (for example, WhatsApp channel-specific templates) only accept the underscored format. Note that this field is required for WhatsApp channel-specific templates.",
            "type": "string"
          },
          "parameters": {
            "description": "Required if the template has parameters. Concrete values must\nbe present for all defined parameters\nin the template. Parameters can be different for\ndifferent versions and/or languages of the template.",
            "type": "object",
            "additionalProperties": {
              "type": "string"
            }
          },
          "template_id": {
            "description": "The ID of the template. Note that, in the case of WhatsApp channel-specific templates, this field must be populated by the name of the template.",
            "type": "string"
          }
        }
      },
      "TextMessageField": {
        "type": "object",
        "title": "Text",
        "description": "A message containing only text.",
        "properties": {
          "text_message": {
            "type": "object",
            "title": "Text Message",
            "required": [
              "text"
            ],
            "properties": {
              "text": {
                "description": "The text to be sent.",
                "type": "string"
              }
            }
          }
        }
      },
      "UrlMessageField": {
        "description": "A generic URL message.",
        "type": "object",
        "title": "URL",
        "properties": {
          "url_message": {
            "title": "URL Message",
            "type": "object",
            "required": [
              "title",
              "url"
            ],
            "properties": {
              "title": {
                "description": "The title shown close to the URL. The title can be clickable in some cases.",
                "type": "string"
              },
              "url": {
                "description": "The url to show.",
                "type": "string"
              }
            }
          }
        }
      },
      "CalendarMessageField": {
        "description": "Message containing details about a calendar event.",
        "type": "object",
        "title": "Calendar",
        "properties": {
          "calendar_message": {
            "title": "Calendar message",
            "type": "object",
            "required": [
              "title",
              "event_start",
              "event_end",
              "event_title",
              "fallback_url"
            ],
            "properties": {
              "title": {
                "description": "The title is shown close to the button that leads to open a user calendar.",
                "type": "string"
              },
              "event_start": {
                "description": "The timestamp defines start of a calendar event.",
                "type": "string",
                "format": "date-time",
                "example": "2025-11-30T10:00:00Z"
              },
              "event_end": {
                "description": "The timestamp defines end of a calendar event.",
                "type": "string",
                "format": "date-time",
                "example": "2025-11-30T11:00:00Z"
              },
              "event_title": {
                "description": "Title of a calendar event.",
                "type": "string"
              },
              "event_description": {
                "description": "Description of a calendar event.",
                "type": "string"
              },
              "fallback_url": {
                "description": "The URL that is opened when the user cannot open a calendar event directly or channel does not have support for this type.",
                "type": "string"
              }
            }
          }
        }
      },
      "ShareLocationMessageField": {
        "description": "Message requesting location from a user.",
        "type": "object",
        "title": "Request location",
        "properties": {
          "share_location_message": {
            "title": "Share Location Message",
            "type": "object",
            "required": [
              "title",
              "fallback_url"
            ],
            "properties": {
              "title": {
                "description": "The title is shown close to the button that leads to open a map to share a location.",
                "type": "string"
              },
              "fallback_url": {
                "description": "The URL that is opened when channel does not have support for this type.",
                "type": "string"
              }
            }
          }
        }
      },
      "ChoiceMessagePropertiesField": {
        "type": "object",
        "title": "Properties",
        "description": "Additional properties for the message.",
        "properties": {
          "message_properties": {
            "type": "object",
            "properties": {
              "whatsapp_footer": {
                "description": "Optional. Sets the text for the footer of a WhatsApp reply button or URL button message. Ignored for other channels.",
                "type": "string"
              }
            }
          }
        }
      },
      "Webhook": {
        "description": "Represents a destination for receiving callbacks from the Conversation API.",
        "type": "object",
        "title": "Webhook",
        "required": [
          "target"
        ],
        "properties": {
          "app_id": {
            "description": "The app that this webhook belongs to.",
            "type": "string"
          },
          "client_credentials": {
            "$ref": "#/components/schemas/ClientCredentials"
          },
          "id": {
            "description": "The ID of the webhook.",
            "type": "string",
            "readOnly": true
          },
          "secret": {
            "description": "Optional secret be used to sign contents of webhooks sent by the Conversation API.\nYou can then use the secret to verify the signature.",
            "type": "string",
            "format": "password"
          },
          "target": {
            "description": "The target url where events should be sent to.\nMaximum URL length is 742.\nThe conversation-api.*.sinch.com subdomains are forbidden.",
            "type": "string"
          },
          "target_type": {
            "$ref": "#/components/schemas/WebhookTargetType"
          },
          "triggers": {
            "description": "An array of triggers that should trigger the webhook and result in an\nevent being sent to the target url.\nRefer to the list of [Webhook Triggers](https://developers.sinch.com/docs/conversation/callbacks/#webhook-triggers)\nfor a complete list.",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/WebhookTrigger"
            }
          }
        }
      },
      "Identity": {
        "description": "Represents a identity from the Conversation API.",
        "type": "object",
        "title": "Identity",
        "required": [
          "identity"
        ],
        "properties": {
          "identity": {
            "description": "The identity from Conversation API.",
            "type": "string"
          }
        }
      },
      "AuditRecord": {
        "description": "Represents a consent audit record from the Conversation API.",
        "type": "object",
        "title": "AuditRecord",
        "required": [
          "operation",
          "origin",
          "list_type",
          "project_id",
          "app_id",
          "datetime"
        ],
        "properties": {
          "origin": {
            "description": "The origin from the opt-out or opt-in. This could be the Batch API or an MO (when matched with an end-user MO).",
            "type": "string",
            "enum": [
              "ORIGIN_API",
              "ORIGIN_MO"
            ],
            "x-enumDescriptions": {
              "ORIGIN_API": "The opt-in or opt-out came from the API.",
              "ORIGIN_MO": "The opt-in or optout came from an MO."
            }
          },
          "operation": {
            "description": "The operation that the audit record refers to. Can be INSERT, UPDATE or DELETE.",
            "type": "string",
            "enum": [
              "OPERATION_INSERT",
              "OPERATION_UPDATE",
              "OPERATION_DELETE"
            ],
            "x-enumDescriptions": {
              "OPERATION_INSERT": "The Insert operation",
              "OPERATION_UPDATE": "The Update operation",
              "OPERATION_DELETE": "THe Delete operation"
            }
          },
          "list_type": {
            "allOf": [
              {
                "description": "The list type of the consent list the audit record refers to."
              },
              {
                "$ref": "#/components/schemas/ConsentsListType"
              }
            ]
          },
          "project_id": {
            "description": "The project ID associated with the consent list the audit record refers to.",
            "type": "string"
          },
          "app_id": {
            "description": "The app ID associated with the consent list the audit record refers to.",
            "type": "string"
          },
          "datetime": {
            "description": "Datetime of when the consent list audit record happened.",
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "WebhookTargetType": {
        "type": "string",
        "default": "DISMISS",
        "x-enumDescriptions": {
          "DISMISS": "Events won't be sent.",
          "HTTP": "Events will be sent to an HTTP target."
        },
        "enum": [
          "DISMISS",
          "HTTP"
        ]
      },
      "WebhookTrigger": {
        "description": "Each webhook can subscribe to one or more of the following triggers",
        "type": "string",
        "example": "MESSAGE_DELIVERY",
        "x-enumDescriptions": {
          "UNSPECIFIED_TRIGGER": "Using this value will cause errors.",
          "MESSAGE_DELIVERY": "Subscribe to delivery receipts for a message sent.",
          "EVENT_DELIVERY": "Subscribe to delivery receipts for a event sent.",
          "MESSAGE_INBOUND": "Subscribe to inbound messages from end users on the underlying channels.",
          "EVENT_INBOUND": "Subscribe to inbound events from end users on the underlying channels.",
          "CONVERSATION_START": "Subscribe to an event that is triggered when a new conversation has been started.",
          "CONVERSATION_STOP": "Subscribe to an event that is triggered when a active conversation has been stopped.",
          "CONTACT_CREATE": "Subscribe to an event that is triggered when a new contact has been created.",
          "CONTACT_DELETE": "Subscribe to an event that is triggered when a contact has been deleted.",
          "CONTACT_MERGE": "Subscribe to an event that is triggered when a two contacts are merged.",
          "CONTACT_UPDATE": "Subscribe to an event that is triggered when a contact is updated.",
          "UNSUPPORTED": "Subscribe to callbacks that are not natively supported by the Conversation API.",
          "OPT_IN": "Subscribe to opt_ins.",
          "OPT_OUT": "Subscribe to opt_outs.",
          "CAPABILITY": "Subscribe to see get capability results.",
          "CONVERSATION_DELETE": "Subscribe to get an event when a conversation is deleted.",
          "CONTACT_IDENTITIES_DUPLICATION": "Subscribe to get an event when contact identity duplications are found during message or event processing.",
          "CHANNEL_EVENT": "Subscribe to direct channel event.",
          "SMART_CONVERSATION": "Subscribe to [Smart conversation analysis](https://developers.sinch.com/docs/smart-conversations).",
          "MESSAGE_INBOUND_SMART_CONVERSATION_REDACTION": "Subscribe to [analysis](https://developers.sinch.com/docs/smart-conversations) for messages from end-users.",
          "RECORD_NOTIFICATION": "Subscribe to Record Notifications.",
          "MESSAGE_SUBMIT": "Subscribe to message submit Notifications."
        },
        "enum": [
          "UNSPECIFIED_TRIGGER",
          "MESSAGE_DELIVERY",
          "EVENT_DELIVERY",
          "MESSAGE_INBOUND",
          "EVENT_INBOUND",
          "CONVERSATION_START",
          "CONVERSATION_STOP",
          "CONTACT_CREATE",
          "CONTACT_DELETE",
          "CONTACT_MERGE",
          "CONTACT_UPDATE",
          "UNSUPPORTED",
          "OPT_IN",
          "OPT_OUT",
          "CAPABILITY",
          "CONVERSATION_DELETE",
          "CONTACT_IDENTITIES_DUPLICATION",
          "CHANNEL_EVENT",
          "SMART_CONVERSATION",
          "MESSAGE_INBOUND_SMART_CONVERSATION_REDACTION",
          "RECORD_NOTIFICATION",
          "MESSAGE_SUBMIT"
        ]
      },
      "ConversationMessagesView": {
        "type": "string",
        "default": "WITH_METADATA",
        "x-enumDescriptions": {
          "WITH_METADATA": "View the message with metadata.",
          "WITHOUT_METADATA": "View the message without metadata."
        },
        "enum": [
          "WITH_METADATA",
          "WITHOUT_METADATA"
        ]
      },
      "ListAppsResponse": {
        "type": "object",
        "properties": {
          "apps": {
            "description": "List of apps belonging to a specific project ID.",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AppResponse"
            }
          }
        }
      },
      "ListContactsResponse": {
        "type": "object",
        "properties": {
          "contacts": {
            "description": "List of contacts belonging to the specified project.",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Contact"
            }
          },
          "next_page_token": {
            "description": "Token that should be included in the next list contacts request to\nfetch the next page.",
            "type": "string"
          }
        }
      },
      "ListConversationsResponse": {
        "type": "object",
        "properties": {
          "conversations": {
            "description": "List of conversations matching the search query.",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Conversation"
            },
            "readOnly": true
          },
          "next_page_token": {
            "type": "string",
            "description": "Token that should be included in the next request to fetch the next page."
          },
          "total_size": {
            "type": "integer",
            "format": "int32"
          }
        }
      },
      "ListMessagesByChannelIdentityRequest": {
        "type": "object",
        "description": "Request body for listing messages by channel identity. NOTE: You can use either contact_ids OR channel_identities, but not both in the same request.",
        "properties": {
          "channel_identities": {
            "description": "Optional. Filter messages by `channel_identity`.",
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "contact_ids": {
            "description": "Optional. Resource name (id) of the contact. In case the messages source is set to `CONVERSATION_SOURCE`: Can list last messages by contact_id. In case the messages source is set to `DISPATCH_SOURCE`: The field is unsupported and cannot be set.",
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "app_id": {
            "description": "Optional. Resource name (id) of the app.",
            "type": "string"
          },
          "messages_source": {
            "$ref": "#/components/schemas/MessageSource"
          },
          "page_size": {
            "description": "Optional. Maximum number of messages to fetch. Defaults to 10 and the maximum is 1000.",
            "type": "integer",
            "format": "int32",
            "default": 10
          },
          "page_token": {
            "description": "Optional. Next page token previously returned if any.",
            "type": "string"
          },
          "view": {
            "allOf": [
              {
                "description": "Optional. Specifies the representation in which messages should be returned. Default to `WITH_METADATA`.",
                "default": "WITH_METADATA"
              },
              {
                "$ref": "#/components/schemas/ConversationMessagesView"
              }
            ]
          },
          "start_time": {
            "description": "Optional. Only fetch messages with `accept_time` after this date.",
            "type": "string",
            "format": "date-time"
          },
          "end_time": {
            "description": "Optional. Only fetch messages with `accept_time` before this date.",
            "type": "string",
            "format": "date-time"
          },
          "channel": {
            "allOf": [
              {
                "description": "Optional. Only fetch messages from the `channel`."
              },
              {
                "$ref": "#/components/schemas/ConversationChannel"
              }
            ]
          },
          "direction": {
            "allOf": [
              {
                "description": "Optional. Only fetch messages with the specified `direction`. If direction is not specified, it will list both TO_APP and TO_CONTACT messages.",
                "example": "TO_CONTACT"
              },
              {
                "$ref": "#/components/schemas/ConversationDirection"
              }
            ]
          }
        }
      },
      "ListMessagesResponse": {
        "type": "object",
        "properties": {
          "messages": {
            "description": "List of messages associated to the referenced conversation.",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ConversationMessage"
            },
            "readOnly": true
          },
          "next_page_token": {
            "type": "string",
            "description": "Token that should be included in the next request to fetch the next page."
          }
        }
      },
      "ListWebhooksResponse": {
        "type": "object",
        "properties": {
          "webhooks": {
            "type": "array",
            "description": "List of webhooks belonging to a specific project ID and app ID",
            "items": {
              "$ref": "#/components/schemas/Webhook"
            }
          }
        }
      },
      "GetIdentitiesFromConsentResponse": {
        "type": "object",
        "properties": {
          "identities": {
            "type": "array",
            "description": "List of identities belonging to a specific project ID, app ID, and list type",
            "items": {
              "$ref": "#/components/schemas/Identity"
            }
          },
          "next_page_token": {
            "description": "Token for the next page of the search, to be used in the next call.",
            "type": "string"
          }
        }
      },
      "GetAuditRecordsFromConsentResponse": {
        "type": "object",
        "properties": {
          "identity": {
            "$ref": "#/components/schemas/Identity"
          },
          "audit_records": {
            "type": "array",
            "description": "List of audit records associated with the given identity",
            "items": {
              "$ref": "#/components/schemas/AuditRecord"
            }
          }
        }
      },
      "MergeContactRequest": {
        "type": "object",
        "required": [
          "source_id"
        ],
        "properties": {
          "source_id": {
            "description": "Required. The ID of the contact that should be removed.",
            "type": "string"
          },
          "strategy": {
            "$ref": "#/components/schemas/ConversationMergeStrategy"
          }
        }
      },
      "GetChannelProfileRequest": {
        "type": "object",
        "required": [
          "app_id",
          "recipient",
          "channel"
        ],
        "properties": {
          "app_id": {
            "type": "string",
            "description": "The ID of the app.",
            "example": "{APP_ID}"
          },
          "recipient": {
            "$ref": "#/components/schemas/Recipient"
          },
          "channel": {
            "$ref": "#/components/schemas/GetChannelProfileConversationChannel"
          }
        }
      },
      "GetChannelProfileResponse": {
        "type": "object",
        "properties": {
          "profile_name": {
            "type": "string",
            "description": "The profile name.",
            "example": "John Doe"
          }
        }
      },
      "QueryCapability": {
        "type": "object",
        "required": [
          "app_id",
          "recipient"
        ],
        "properties": {
          "app_id": {
            "description": "The ID of the app to use for capability lookup.",
            "type": "string",
            "example": "{APP_ID}"
          },
          "recipient": {
            "$ref": "#/components/schemas/Recipient"
          },
          "request_id": {
            "type": "string",
            "description": "ID for the asynchronous response, will be generated if not set.\nCurrently this field is not used for idempotency."
          }
        }
      },
      "QueryCapabilityResponse": {
        "description": "An CapabilityResponse contains the identity of the recipient for which\nwill be perform a capability lookup.",
        "type": "object",
        "title": "Represents an explicit Capability registration",
        "properties": {
          "app_id": {
            "description": "The ID of the app to use for capability lookup.",
            "type": "string"
          },
          "recipient": {
            "$ref": "#/components/schemas/Recipient"
          },
          "request_id": {
            "type": "string",
            "description": "ID for the asynchronous response, will be generated if not set."
          }
        }
      },
      "SendEventRequest": {
        "type": "object",
        "required": [
          "app_id",
          "recipient",
          "event"
        ],
        "properties": {
          "app_id": {
            "description": "The ID of the app sending the event.",
            "type": "string"
          },
          "callback_url": {
            "description": "Overwrites the default callback url for delivery receipts for this message\nThe REST URL should be of the form: `http://host[:port]/path`",
            "type": "string"
          },
          "channel_priority_order": {
            "description": "Optional. A single element array that dictates on what channel should\nthe Conversation API try to send the event.\nIt overrides any default set on the contact. Providing more than one\noption has no effect.",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ConversationChannel"
            }
          },
          "event": {
            "$ref": "#/components/schemas/AppEventField"
          },
          "event_metadata": {
            "description": "Optional. Eventual metadata that should be associated to the event.",
            "type": "string"
          },
          "queue": {
            "$ref": "#/components/schemas/MessageQueue"
          },
          "recipient": {
            "$ref": "#/components/schemas/RecipientRequest"
          }
        }
      },
      "SendEventResponse": {
        "type": "object",
        "properties": {
          "accepted_time": {
            "description": "Accepted timestamp.",
            "type": "string",
            "format": "date-time",
            "readOnly": true
          },
          "event_id": {
            "description": "Event id.",
            "type": "string",
            "readOnly": true
          }
        }
      },
      "SendMessageRequest": {
        "type": "object",
        "description": "This is the request body for sending a message. `app_id`, `recipient`, and `message` are all required fields.",
        "required": [
          "app_id",
          "recipient",
          "message"
        ],
        "properties": {
          "app_id": {
            "description": "The ID of the app sending the message.",
            "type": "string",
            "example": "{APP_ID}"
          },
          "callback_url": {
            "description": "Overwrites the default callback url for delivery receipts for this message.\nNote that you may [define a `secret_for_overridden_callback_urls` at the app level](https://developers.sinch.com/docs/conversation/api-reference/conversation/tag/App/#tag/App/operation/App_UpdateApp!path=callback_settings/secret_for_overridden_callback_urls&t=request); this secret will be used to sign the contents of delivery receipts when the default callback URL is overridden by this property. The REST URL should be of the form: `http://host[:port]/path`",
            "type": "string"
          },
          "channel_priority_order": {
            "description": "Explicitly define the channels and order in which they are tried when sending the message. All channels provided in this field must be configured in the corresponding Conversation API app, or the request will be rejected.\nWhich channels the API will try and their priority is defined by:\n1. `channel_priority_order` if available.\n2. `recipient.identified_by.channel_identities` if available.\n3. When recipient is a `contact_id`:\n    - if a conversation with the contact exists: the active channel of the conversation is tried first.\n    - the existing channels for the contact are ordered by contact channel preferences if given.\n    - lastly the existing channels for the contact are ordered by the app priority.",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ConversationChannel"
            }
          },
          "channel_properties": {
            "description": "Channel-specific properties.\nThe key in the map must point to a valid channel property key as\ndefined by the enum ChannelPropertyKeys.\nThe maximum allowed property value length is 1024 characters.",
            "type": "object",
            "additionalProperties": {
              "type": "string"
            }
          },
          "message": {
            "$ref": "#/components/schemas/AppMessage"
          },
          "message_metadata": {
            "description": "Metadata that should be associated with the message.\nReturned in the `metadata` field of a [Message Delivery Receipt](https://developers.sinch.com/docs/conversation/callbacks/#message-delivery-receipt). Up to 1024 characters long.",
            "type": "string"
          },
          "conversation_metadata": {
            "description": "Metadata that will be associated with the conversation in `CONVERSATION` mode and with the specified recipient identities in `DISPATCH` mode.\nThis metadata will be propagated on MO callbacks associated\nwith the respective conversation or user identity. Up to 2048 characters long.\nNote that the MO callback will always use the last metadata available.\nImportant notes:\n\n - If you send a message with the `conversation_metadata` field populated, and then send another message without populating the `conversation_metadata` field, the original metadata will continue be propagated on the related MO callbacks.\n - If you send a message with the `conversation_metadata` field populated, and then send another message with a different value for `conversation_metadata` in the same conversation, the latest metadata value overwrites the existing one. So, future MO callbacks will include the new metadata.\n - The `conversation_metadata` only accepts json objects.\n - If you send a message in `DISPATCH` mode while the [retention period](https://developers.sinch.com/docs/conversation/api-reference/conversation/tag/App/#tag/App/operation/App_CreateApp!path=dispatch_retention_policy/ttl_days&t=request) of the app is set to 0 (note that this value is set to 0 by default), the `conversation_metadata` field will not be retained.\n\nCurrently only returned in the `message_metadata` field of an [Inbound Message](https://developers.sinch.com/docs/conversation/callbacks/#inbound-message) callback.",
            "type": "object"
          },
          "queue": {
            "$ref": "#/components/schemas/MessageQueue"
          },
          "recipient": {
            "$ref": "#/components/schemas/RecipientRequest"
          },
          "ttl": {
            "description": "The timeout allotted for sending the message, expressed in seconds.\nPassed to channels which support it and\nemulated by the Conversation API for channels without ttl support\nbut with message retract/unsend functionality.\nChannel failover will not be performed for messages with an expired TTL.\nThe format is an integer with the suffix `s` (for seconds).\nValid integer range is 3 to 315,576,000,000 (inclusive).\nExample values include `10s` (10 seconds) and `86400s` (24 hours).",
            "type": "string"
          },
          "processing_strategy": {
            "$ref": "#/components/schemas/ProcessingStrategy"
          },
          "correlation_id": {
            "type": "string",
            "description": "An arbitrary identifier that will be propagated to callbacks related to this message,\nincluding MO messages from the recipient. The `correlation_id` is associated with the conversation in `CONVERSATION` mode and with the specified recipient identities in `DISPATCH` mode. The MO callbacks will always include the last `correlation_id` available,\n(which is similar to how the `conversation_metadata` property functions).\nUp to 128 characters long.\nImportant note: If you send a message in `DISPATCH` mode while the [retention period](https://developers.sinch.com/docs/conversation/api-reference/conversation/tag/App/#tag/App/operation/App_CreateApp!path=dispatch_retention_policy/ttl_days&t=request) of the app is set to 0 (note that this value is set to 0 by default), the `correlation_id` field will not be retained."
          },
          "conversation_metadata_update_strategy": {
            "$ref": "#/components/schemas/MetadataUpdateStrategy"
          },
          "message_content_type": {
            "$ref": "#/components/schemas/MessageContentType"
          }
        }
      },
      "MessageContentType": {
        "description": "This field classifies the message content for use with Sinch's [consent management functionality](https://developers.sinch.com/docs/conversation/consent-management/). Note that this field is currently only used with Sinch's consent management functionality, and is not referenced elsewhere by the Conversation API.",
        "type": "string",
        "x-enumDescriptions": {
          "CONTENT_UNKNOWN": "The default content type, when the content is not clearly defined, can be any type of content.",
          "CONTENT_MARKETING": "Type that indicates that the content is related to Marketing, like marketing campaign messages.",
          "CONTENT_NOTIFICATION": "Type that indicates that the content is related to Notifications, like charges and alerts."
        },
        "default": "CONTENT_UNKNOWN",
        "enum": [
          "CONTENT_UNKNOWN",
          "CONTENT_MARKETING",
          "CONTENT_NOTIFICATION"
        ]
      },
      "ProcessingStrategy": {
        "description": "Overrides the app's [Processing Mode](https://developers.sinch.com/docs/conversation/processing-modes/). Default value is `DEFAULT`.",
        "enum": [
          "DEFAULT",
          "DISPATCH_ONLY"
        ],
        "x-enumDescriptions": {
          "DEFAULT": "The request will inherit the app's configured processing mode.",
          "DISPATCH_ONLY": "Forces the request to be processed in dispatch mode (without storing contacts and conversations), regardless of the app's configured processing mode. Please note that user replies will still be processed in the app's default processing mode and that the `conversation_metadata` and `correlation_id` fields are not supported when using this option with an app in `CONVERSATION` mode."
        },
        "type": "string",
        "default": "DEFAULT"
      },
      "MetadataUpdateStrategy": {
        "enum": [
          "REPLACE",
          "MERGE_PATCH"
        ],
        "description": "Update strategy for the `conversation_metadata` field. Only supported in `CONVERSATION` processing mode.",
        "x-enumDescriptions": {
          "REPLACE": "The default strategy. Replaces the whole `conversation_metadata` field with the new value provided.",
          "MERGE_PATCH": "Patches the `conversation_metadata` field with the patch provided according to RFC 7386."
        },
        "type": "string",
        "default": "REPLACE"
      },
      "SendMessageResponse": {
        "type": "object",
        "properties": {
          "accepted_time": {
            "description": "Timestamp when the Conversation API accepted the message for delivery to the referenced contact.",
            "type": "string",
            "format": "date-time",
            "readOnly": true
          },
          "message_id": {
            "description": "The ID of the message.",
            "type": "string",
            "readOnly": true
          }
        }
      },
      "TranscodeMessageRequest": {
        "type": "object",
        "required": [
          "app_id",
          "app_message",
          "channels"
        ],
        "properties": {
          "app_id": {
            "description": "The ID of the app used to transcode the message.",
            "type": "string"
          },
          "app_message": {
            "$ref": "#/components/schemas/AppMessage"
          },
          "channels": {
            "description": "The list of channels for which the message shall be transcoded to.",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ConversationChannel"
            }
          },
          "from": {
            "description": "Optional.",
            "type": "string"
          },
          "to": {
            "description": "Optional.",
            "type": "string"
          }
        }
      },
      "TranscodeMessageResponse": {
        "type": "object",
        "properties": {
          "transcoded_message": {
            "description": "The transcoded message for the different channels.\nThe keys in the map correspond to channel names, as defined by the type\nConversationChannel.",
            "type": "object",
            "additionalProperties": {
              "type": "string"
            },
            "readOnly": true
          }
        }
      },
      "NameInfo": {
        "type": "object",
        "title": "Name of the contact",
        "description": "Name information of the contact.",
        "required": [
          "full_name"
        ],
        "properties": {
          "full_name": {
            "description": "Full name of the contact",
            "type": "string"
          },
          "first_name": {
            "description": "First name.",
            "type": "string"
          },
          "last_name": {
            "description": "Last name.",
            "type": "string"
          },
          "middle_name": {
            "description": "Middle name.",
            "type": "string"
          },
          "prefix": {
            "description": "Prefix before the name. e.g. Mr, Mrs, Dr etc.",
            "type": "string"
          },
          "suffix": {
            "description": "Suffix after the name.",
            "type": "string"
          }
        }
      },
      "PhoneNumberInfo": {
        "type": "object",
        "title": "Phone number",
        "description": "Phone numbers of the contact.",
        "required": [
          "phone_number"
        ],
        "properties": {
          "phone_number": {
            "description": "Phone number with country code included.",
            "type": "string"
          },
          "type": {
            "description": "Phone number type, e.g. WORK or HOME.",
            "type": "string"
          }
        }
      },
      "AddressInfo": {
        "type": "object",
        "title": "Address information",
        "description": "Physical addresses of the contact.",
        "properties": {
          "city": {
            "description": "City Name",
            "type": "string"
          },
          "country": {
            "description": "Country Name",
            "type": "string"
          },
          "state": {
            "description": "Name of a state or region of a country.",
            "type": "string"
          },
          "zip": {
            "description": "Zip/postal code",
            "type": "string"
          },
          "type": {
            "description": "Address type, e.g. WORK or HOME",
            "type": "string"
          },
          "country_code": {
            "description": "Two letter country code.",
            "type": "string"
          }
        }
      },
      "EmailInfo": {
        "type": "object",
        "title": "Email information",
        "description": "Email addresses of the contact.",
        "required": [
          "email_address"
        ],
        "properties": {
          "email_address": {
            "description": "Email address.",
            "type": "string"
          },
          "type": {
            "description": "Email address type. e.g. WORK or HOME.",
            "type": "string"
          }
        }
      },
      "OrganizationInfo": {
        "type": "object",
        "title": "Organization information",
        "description": "Organization information of the contact.",
        "properties": {
          "company": {
            "description": "Company name",
            "type": "string"
          },
          "department": {
            "description": "Department at the company",
            "type": "string"
          },
          "title": {
            "description": "Corporate title, e.g. Software engineer",
            "type": "string"
          }
        }
      },
      "UrlInfo": {
        "type": "object",
        "title": "URL Info",
        "description": "A URL/website",
        "required": [
          "url"
        ],
        "properties": {
          "url": {
            "description": "The URL to be referenced",
            "type": "string"
          },
          "type": {
            "description": "Optional. URL type, e.g. Org or Social",
            "type": "string"
          }
        }
      },
      "ContactInfoMessageField": {
        "type": "object",
        "description": "Message containing contact information.",
        "title": "Contact Info",
        "properties": {
          "contact_info_message": {
            "title": "Contact Info Message",
            "type": "object",
            "required": [
              "name",
              "phone_numbers"
            ],
            "properties": {
              "name": {
                "$ref": "#/components/schemas/NameInfo"
              },
              "phone_numbers": {
                "description": "Phone numbers of the contact",
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/PhoneNumberInfo"
                }
              },
              "addresses": {
                "description": "Physical addresses of the contact",
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/AddressInfo"
                }
              },
              "email_addresses": {
                "description": "Email addresses of the contact",
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/EmailInfo"
                }
              },
              "organization": {
                "$ref": "#/components/schemas/OrganizationInfo"
              },
              "urls": {
                "description": "URLs/websites associated with the contact",
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/UrlInfo"
                }
              },
              "birthday": {
                "description": "Date of birth in YYYY-MM-DD format.",
                "type": "string"
              }
            }
          }
        }
      },
      "ChannelIntegrationStatus": {
        "description": "Status of the channel credentials integration",
        "x-enumDescriptions": {
          "PENDING": "Initial status when the channel has been activated in the front-end.",
          "ACTIVE": "Credentials have been successfully validated and exchanged for a long-lived token. This status is used by default for channels in which the credential can't be validated.",
          "FAILING": "Failed to validate credentials and acquire a long-lived token."
        },
        "default": "PENDING",
        "type": "string",
        "enum": [
          "PENDING",
          "ACTIVE",
          "FAILING"
        ]
      },
      "ChannelIntegrationState": {
        "type": "object",
        "title": "Channel Integration State",
        "description": "State of the channel credentials integration.",
        "required": [
          "status"
        ],
        "properties": {
          "status": {
            "$ref": "#/components/schemas/ChannelIntegrationStatus"
          },
          "description": {
            "description": "Description in case the integration fails",
            "type": "string"
          }
        }
      },
      "ConversationEventBase": {
        "type": "object",
        "title": "Conversation Event",
        "description": "Common properties to ConversationEvent management",
        "allOf": [
          {
            "$ref": "#/components/schemas/AppEventField"
          },
          {
            "type": "object",
            "properties": {
              "conversation_id": {
                "type": "string",
                "description": "Optional. The ID of the event's conversation. Will not be present for apps in Dispatch Mode."
              },
              "contact_id": {
                "type": "string",
                "description": "Optional. The ID of the contact. Will not be present for apps in Dispatch Mode."
              },
              "channel_identity": {
                "$ref": "#/components/schemas/ChannelIdentity"
              },
              "accept_time": {
                "type": "string",
                "format": "date-time",
                "description": "The processed time of the message in UTC timezone. Must be less than current_time and greater than (current_time - 30 days)."
              },
              "processing_mode": {
                "$ref": "#/components/schemas/ProcessingMode"
              }
            }
          }
        ]
      },
      "ConversationEvent": {
        "type": "object",
        "title": "Conversation Event",
        "description": "An event on a particular channel.",
        "required": [
          "id",
          "channel_identity",
          "processing_mode"
        ],
        "allOf": [
          {
            "$ref": "#/components/schemas/ConversationEventBase"
          },
          {
            "type": "object",
            "properties": {
              "direction": {
                "$ref": "#/components/schemas/ConversationDirection"
              },
              "id": {
                "type": "string",
                "description": "The ID of the event."
              }
            }
          }
        ]
      },
      "InjectConversationEventRequest": {
        "description": "Inject Event request",
        "type": "object",
        "title": "Inject event request",
        "required": [
          "accept_time"
        ],
        "allOf": [
          {
            "$ref": "#/components/schemas/ConversationEventBase"
          }
        ]
      },
      "ContactEventField": {
        "type": "object",
        "title": "Contact Event Type",
        "properties": {
          "contact_event": {
            "$ref": "#/components/schemas/ContactEvent"
          }
        }
      },
      "ContactMessageEventField": {
        "type": "object",
        "title": "Contact Message Event Type",
        "properties": {
          "contact_message_event": {
            "$ref": "#/components/schemas/ContactMessageEvent"
          }
        }
      },
      "CommentEventField": {
        "type": "object",
        "title": "Comment Event Type",
        "properties": {
          "comment_event": {
            "$ref": "#/components/schemas/CommentEvent"
          }
        }
      },
      "PaymentStatusUpdateEvent": {
        "type": "object",
        "title": "Payment Status Update Event",
        "description": "Message specific only for Payments feature to reflect current state of particular Payment Flow.",
        "properties": {
          "reference_id": {
            "type": "string",
            "description": "This is the partner supplied ID to identify the order for payments"
          },
          "payment_status": {
            "$ref": "#/components/schemas/PaymentStatus"
          },
          "payment_transaction_status": {
            "$ref": "#/components/schemas/PaymentTransactionStatus"
          },
          "payment_transaction_id": {
            "type": "string",
            "description": "Unique id of the transaction for which one of the transaction payment_transaction_status is present in event."
          }
        }
      },
      "PaymentStatus": {
        "description": "Status reflecting how payment flow goes",
        "x-enumDescriptions": {
          "PAYMENT_STATUS_UNKNOWN": "The status value was not set. Treat it as null or not present field.",
          "PAYMENT_STATUS_NEW": "The partner sent an order_details message but the user didn't start a payment yet.",
          "PAYMENT_STATUS_PENDING": "The user started the payment process and the payment object was created.",
          "PAYMENT_STATUS_CAPTURED": "The payment was captured.",
          "PAYMENT_STATUS_CANCELED": "The payment was canceled by the user and no retry is possible.",
          "PAYMENT_STATUS_FAILED": "The payment attempt failed but the user can retry."
        },
        "enum": [
          "PAYMENT_STATUS_UNKNOWN",
          "PAYMENT_STATUS_NEW",
          "PAYMENT_STATUS_PENDING",
          "PAYMENT_STATUS_CAPTURED",
          "PAYMENT_STATUS_CANCELED",
          "PAYMENT_STATUS_FAILED"
        ],
        "default": "PAYMENT_STATUS_UNKNOWN",
        "type": "string"
      },
      "PaymentTransactionStatus": {
        "description": "Group of statuses of the user-initiated transaction changes.",
        "x-enumDescriptions": {
          "PAYMENT_STATUS_TRANSACTION_UNKNOWN": "The transaction status value was not set. Treat it as null or not present field.",
          "PAYMENT_STATUS_TRANSACTION_PENDING": "The transaction has started.",
          "PAYMENT_STATUS_TRANSACTION_FAILED": "Transaction failed.",
          "PAYMENT_STATUS_TRANSACTION_SUCCESS": "Transaction completed successfully.",
          "PAYMENT_STATUS_TRANSACTION_CANCELED": "Transaction got cancelled."
        },
        "default": "PAYMENT_STATUS_TRANSACTION_UNKNOWN",
        "type": "string",
        "enum": [
          "PAYMENT_STATUS_TRANSACTION_UNKNOWN",
          "PAYMENT_STATUS_TRANSACTION_PENDING",
          "PAYMENT_STATUS_TRANSACTION_FAILED",
          "PAYMENT_STATUS_TRANSACTION_SUCCESS",
          "PAYMENT_STATUS_TRANSACTION_CANCELED"
        ]
      },
      "ListEventsResponse": {
        "type": "object",
        "properties": {
          "events": {
            "description": "List of ConversationsEvents.",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ConversationEvent"
            },
            "readOnly": true
          },
          "next_page_token": {
            "type": "string",
            "description": "Token that should be included in the next request to fetch the next page."
          }
        }
      },
      "ListRecentConversationsResponse": {
        "type": "object",
        "properties": {
          "conversations": {
            "description": "List of recent conversations",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ConversationRecentMessage"
            }
          },
          "next_page_token": {
            "type": "string",
            "description": "Token that should be included in the next request to fetch the next page."
          },
          "total_size": {
            "type": "integer",
            "format": "int32"
          }
        }
      },
      "ConversationRecentMessage": {
        "type": "object",
        "properties": {
          "conversation": {
            "$ref": "#/components/schemas/Conversation"
          },
          "last_message": {
            "$ref": "#/components/schemas/ConversationMessage"
          }
        }
      },
      "InjectEventRequest": {
        "type": "object",
        "title": "Inject Event Request",
        "properties": {
          "event": {
            "$ref": "#/components/schemas/InjectConversationEventRequest"
          }
        }
      },
      "InjectEventResponse": {
        "type": "object",
        "properties": {
          "event_id": {
            "type": "string",
            "description": "Event id."
          },
          "accepted_time": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "UpdateMessageMetadataRequest": {
        "type": "object",
        "title": "Update message request",
        "required": [
          "metadata"
        ],
        "properties": {
          "metadata": {
            "type": "string"
          }
        }
      },
      "OmniMessageOverride": {
        "oneOf": [
          {
            "$ref": "#/components/schemas/TextMessageField"
          },
          {
            "$ref": "#/components/schemas/MediaMessageField"
          },
          {
            "$ref": "#/components/schemas/TemplateReferenceField"
          },
          {
            "$ref": "#/components/schemas/ChoiceMessageField"
          },
          {
            "$ref": "#/components/schemas/CardMessageField"
          },
          {
            "$ref": "#/components/schemas/CarouselMessageField"
          },
          {
            "$ref": "#/components/schemas/LocationMessageField"
          },
          {
            "$ref": "#/components/schemas/ContactInfoMessageField"
          },
          {
            "$ref": "#/components/schemas/ListMessageField"
          }
        ]
      },
      "ChannelSpecificMessage": {
        "type": "object",
        "title": "Channel specific message",
        "description": "A message containing a channel specific message (not supported by OMNI types).",
        "required": [
          "message_type",
          "message"
        ],
        "properties": {
          "message_type": {
            "type": "string",
            "x-enumDescriptions": {
              "FLOWS": "The WhatsApp Flows message type.",
              "ORDER_DETAILS": "The WhatsApp order details message type.",
              "ORDER_STATUS": "The WhatsApp order status message type.",
              "COMMERCE": "KakaoTalk commerce channel specific message type",
              "CAROUSEL_COMMERCE": "KakaoTalk carousel commerce channel specific message type",
              "NOTIFICATION_MESSAGE_TEMPLATE": "LINE notification message template type"
            },
            "description": "The type of the channel specific message.",
            "enum": [
              "FLOWS",
              "ORDER_DETAILS",
              "ORDER_STATUS",
              "COMMERCE",
              "CAROUSEL_COMMERCE",
              "NOTIFICATION_MESSAGE_TEMPLATE"
            ]
          },
          "message": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/FlowChannelSpecificMessage"
              },
              {
                "$ref": "#/components/schemas/PaymentOrderDetailsChannelSpecificMessage"
              },
              {
                "$ref": "#/components/schemas/PaymentOrderStatusChannelSpecificMessage"
              },
              {
                "$ref": "#/components/schemas/KakaoTalkCommerceChannelSpecificMessage"
              },
              {
                "$ref": "#/components/schemas/KakaoTalkCarouselCommerceChannelSpecificMessage"
              },
              {
                "$ref": "#/components/schemas/LineNotificationMessageTemplateChannelSpecificMessage"
              }
            ]
          }
        }
      },
      "ChannelSpecificContactMessage": {
        "type": "object",
        "title": "Channel Specific Message",
        "description": "A contact message containing a channel specific message (not supported by OMNI types).",
        "required": [
          "message_type",
          "message"
        ],
        "properties": {
          "channel_specific_message": {
            "type": "object",
            "properties": {
              "message_type": {
                "type": "string",
                "description": "The message type.",
                "enum": [
                  "nfm_reply"
                ],
                "x-enumDescriptions": {
                  "nfm_reply": "The `nfm_reply` message type."
                }
              },
              "message": {
                "description": "The message content.",
                "oneOf": [
                  {
                    "$ref": "#/components/schemas/WhatsAppInteractiveNfmReplyChannelSpecificContactMessage"
                  }
                ]
              }
            },
            "example": {
              "nfm_reply": {
                "summary": "WhatsApp NFM Reply Channel Specific Contact Message Example",
                "value": {
                  "channel_specific_message": {
                    "message_type": "nfm_reply",
                    "message": {
                      "type": "nfm_reply",
                      "nfm_reply": {
                        "name": "flow",
                        "response_json": "{\"flow_token\": \"<FLOW_TOKEN>\", \"optional_param1\": \"<value1>\", \"optional_param2\": \"<value2>\"}",
                        "body": "Sent"
                      }
                    }
                  }
                }
              }
            }
          }
        }
      },
      "ChannelSpecificCommonProps": {
        "type": "object",
        "properties": {
          "header": {
            "description": "The header of the interactive message.",
            "type": "object",
            "oneOf": [
              {
                "$ref": "#/components/schemas/WhatsAppInteractiveTextHeader"
              },
              {
                "$ref": "#/components/schemas/WhatsAppInteractiveImageHeader"
              },
              {
                "$ref": "#/components/schemas/WhatsAppInteractiveDocumentHeader"
              },
              {
                "$ref": "#/components/schemas/WhatsAppInteractiveVideoHeader"
              }
            ],
            "discriminator": {
              "propertyName": "type",
              "mapping": {
                "text": "#/components/schemas/WhatsAppInteractiveTextHeader",
                "image": "#/components/schemas/WhatsAppInteractiveImageHeader",
                "document": "#/components/schemas/WhatsAppInteractiveDocumentHeader",
                "video": "#/components/schemas/WhatsAppInteractiveVideoHeader"
              }
            }
          },
          "body": {
            "$ref": "#/components/schemas/WhatsAppInteractiveBody"
          },
          "footer": {
            "$ref": "#/components/schemas/WhatsAppInteractiveFooter"
          }
        }
      },
      "FlowChannelSpecificMessage": {
        "allOf": [
          {
            "$ref": "#/components/schemas/ChannelSpecificCommonProps"
          },
          {
            "type": "object",
            "title": "WhatsApp Flow channel specific message",
            "description": "A message type for sending WhatsApp Flows.",
            "required": [
              "flow_id",
              "flow_cta"
            ],
            "properties": {
              "flow_id": {
                "type": "string",
                "description": "ID of the Flow."
              },
              "flow_token": {
                "type": "string",
                "description": "Generated token which is an identifier."
              },
              "flow_mode": {
                "type": "string",
                "description": "The mode in which the flow is.",
                "default": "published",
                "enum": [
                  "draft",
                  "published"
                ],
                "x-enumDescriptions": {
                  "draft": "The flow is in draft mode.",
                  "published": "The flow is published."
                }
              },
              "flow_cta": {
                "type": "string",
                "description": "Text which is displayed on the Call To Action button (20 characters maximum, emoji not supported)."
              },
              "flow_action": {
                "type": "string",
                "default": "navigate",
                "enum": [
                  "navigate",
                  "data_exchange"
                ],
                "x-enumDescriptions": {
                  "navigate": "The navigate flow action.",
                  "data_exchange": "The data exchange flow action."
                }
              },
              "flow_action_payload": {
                "type": "object",
                "properties": {
                  "screen": {
                    "type": "string",
                    "description": "The ID of the screen displayed first. This must be an entry screen."
                  },
                  "data": {
                    "type": "object",
                    "description": "Data for the first screen."
                  }
                }
              }
            }
          }
        ]
      },
      "PaymentOrderDetailsChannelSpecificMessage": {
        "allOf": [
          {
            "$ref": "#/components/schemas/ChannelSpecificCommonProps"
          },
          {
            "type": "object",
            "title": "WhatsApp Payment Order Details channel specific message.",
            "description": "A message type for sending WhatsApp Payment Requests.",
            "required": [
              "payment"
            ],
            "properties": {
              "payment": {
                "type": "object",
                "description": "The payment order details content.",
                "required": [
                  "type",
                  "reference_id",
                  "type_of_goods",
                  "total_amount_value",
                  "order"
                ],
                "properties": {
                  "type": {
                    "type": "string",
                    "description": "The country/currency associated with the payment message.",
                    "enum": [
                      "br",
                      "sg"
                    ],
                    "x-enumDescriptions": {
                      "br": "Brazil",
                      "sg": "Singapore"
                    }
                  },
                  "reference_id": {
                    "type": "string",
                    "description": "Unique reference ID."
                  },
                  "type_of_goods": {
                    "type": "string",
                    "description": "The type of good associated with this order.",
                    "enum": [
                      "digital-goods",
                      "physical-goods"
                    ],
                    "x-enumDescriptions": {
                      "digital-goods": "Digital goods.",
                      "physical-goods": "Physical goods."
                    }
                  },
                  "payment_settings": {
                    "deprecated": true,
                    "description": "The payment settings. Use `payment_buttons` in place of this deprecated field.",
                    "oneOf": [
                      {
                        "$ref": "#/components/schemas/WhatsAppPaymentSettingsPix"
                      },
                      {
                        "$ref": "#/components/schemas/WhatsAppPaymentSettingsPaymentLink"
                      },
                      {
                        "$ref": "#/components/schemas/WhatsAppPaymentSettingsBoleto"
                      }
                    ]
                  },
                  "payment_buttons": {
                    "type": "array",
                    "description": "Array of payment buttons (1 to 2 items).",
                    "minItems": 1,
                    "maxItems": 2,
                    "items": {
                      "$ref": "#/components/schemas/WhatsAppPaymentButton"
                    }
                  },
                  "total_amount_value": {
                    "type": "integer",
                    "description": "Integer representing the total amount of the transaction."
                  },
                  "order": {
                    "type": "object",
                    "description": "The payment order.",
                    "required": [
                      "items",
                      "subtotal_value",
                      "tax_value"
                    ],
                    "properties": {
                      "catalog_id": {
                        "type": "string",
                        "description": "Unique ID of the Facebook catalog being used by the business."
                      },
                      "expiration_time": {
                        "type": "string",
                        "description": "UTC timestamp indicating when the order should expire.\nThe timestamp must be given in seconds.\nThe minimum threshold for the timestamp is 300 seconds."
                      },
                      "expiration_description": {
                        "type": "string",
                        "description": "Description of the expiration."
                      },
                      "subtotal_value": {
                        "type": "integer",
                        "description": "Value representing the subtotal amount of this order."
                      },
                      "tax_value": {
                        "type": "integer",
                        "description": "Value representing the tax amount for this order."
                      },
                      "tax_description": {
                        "type": "string",
                        "description": "Description of the tax for this order."
                      },
                      "shipping_value": {
                        "type": "integer",
                        "description": "Value representing the shipping amount for this order."
                      },
                      "shipping_description": {
                        "type": "string",
                        "description": "Shipping description for this order."
                      },
                      "discount_value": {
                        "type": "integer",
                        "description": "Value of the discount for this order."
                      },
                      "discount_description": {
                        "type": "string",
                        "description": "Description of the discount for this order."
                      },
                      "discount_program_name": {
                        "type": "string",
                        "description": "Discount program name for this order."
                      },
                      "items": {
                        "type": "array",
                        "description": "The items list for this order.",
                        "items": {
                          "type": "object",
                          "required": [
                            "retailer_id",
                            "name",
                            "amount_value",
                            "quantity"
                          ],
                          "properties": {
                            "retailer_id": {
                              "type": "string",
                              "description": "Unique ID of the retailer."
                            },
                            "name": {
                              "type": "string",
                              "description": "Item's name as displayed to the user."
                            },
                            "amount_value": {
                              "type": "integer",
                              "description": "Price per item."
                            },
                            "quantity": {
                              "type": "integer",
                              "description": "Number of items in this order."
                            },
                            "sale_amount_value": {
                              "type": "integer",
                              "description": "Discounted price per item."
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        ]
      },
      "WhatsAppPaymentSettingsPix": {
        "type": "object",
        "deprecated": true,
        "required": [
          "dynamic_pix"
        ],
        "properties": {
          "dynamic_pix": {
            "type": "object",
            "description": "The dynamic Pix payment settings.",
            "required": [
              "code",
              "merchant_name",
              "key",
              "key_type"
            ],
            "properties": {
              "code": {
                "type": "string",
                "description": "The dynamic Pix code to be used by the buyer to pay."
              },
              "merchant_name": {
                "type": "string",
                "description": "Account holder name."
              },
              "key": {
                "type": "string",
                "description": "Pix key."
              },
              "key_type": {
                "type": "string",
                "description": "Pix key type.",
                "enum": [
                  "CPF",
                  "CNPJ",
                  "EMAIL",
                  "PHONE",
                  "EVP"
                ],
                "x-enumDescriptions": {
                  "CPF": "The CPF key type.",
                  "CNPJ": "The CNPJ key type.",
                  "EMAIL": "The EMAIL key type.",
                  "PHONE": "The PHONE key type.",
                  "EVP": "The EVP key type."
                }
              }
            }
          }
        }
      },
      "WhatsAppPaymentSettingsPaymentLink": {
        "type": "object",
        "deprecated": true,
        "required": [
          "payment_link"
        ],
        "properties": {
          "payment_link": {
            "type": "object",
            "description": "The payment link payment settings.",
            "required": [
              "uri"
            ],
            "properties": {
              "uri": {
                "type": "string",
                "description": "The payment link to be used by the buyer to pay."
              }
            }
          }
        }
      },
      "WhatsAppPaymentSettingsBoleto": {
        "type": "object",
        "deprecated": true,
        "required": [
          "boleto"
        ],
        "properties": {
          "boleto": {
            "type": "object",
            "description": "The Boleto payment settings.",
            "required": [
              "digitable_line"
            ],
            "properties": {
              "digitable_line": {
                "type": "string",
                "description": "The Boleto digitable line which will be copied to the clipboard when the user taps the Boleto button."
              }
            }
          }
        }
      },
      "WhatsAppPaymentButton": {
        "description": "WhatsApp Payment Button",
        "oneOf": [
          {
            "$ref": "#/components/schemas/WhatsAppPaymentSettingsButtonPix"
          },
          {
            "$ref": "#/components/schemas/WhatsAppPaymentSettingsButtonPaymentLink"
          },
          {
            "$ref": "#/components/schemas/WhatsAppPaymentSettingsButtonBoleto"
          }
        ],
        "discriminator": {
          "propertyName": "type",
          "mapping": {
            "pix_dynamic_code": "#/components/schemas/WhatsAppPaymentSettingsButtonPix",
            "payment_link": "#/components/schemas/WhatsAppPaymentSettingsButtonPaymentLink",
            "boleto": "#/components/schemas/WhatsAppPaymentSettingsButtonBoleto"
          }
        }
      },
      "WhatsAppPaymentSettingsButtonPix": {
        "type": "object",
        "description": "The dynamic Pix payment settings button.",
        "required": [
          "type",
          "code",
          "merchant_name",
          "key",
          "key_type"
        ],
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "pix_dynamic_code"
            ],
            "x-enumDescriptions": {
              "pix_dynamic_code": "The dynamic Pix code button identifier"
            }
          },
          "code": {
            "type": "string",
            "description": "The dynamic Pix code to be used by the buyer to pay."
          },
          "merchant_name": {
            "type": "string",
            "description": "Account holder name."
          },
          "key": {
            "type": "string",
            "description": "Pix key."
          },
          "key_type": {
            "type": "string",
            "description": "Pix key type.",
            "enum": [
              "CPF",
              "CNPJ",
              "EMAIL",
              "PHONE",
              "EVP"
            ],
            "x-enumDescriptions": {
              "CPF": "The CPF key type.",
              "CNPJ": "The CNPJ key type.",
              "EMAIL": "The EMAIL key type.",
              "PHONE": "The PHONE key type.",
              "EVP": "The EVP key type."
            }
          }
        }
      },
      "WhatsAppPaymentSettingsButtonPaymentLink": {
        "type": "object",
        "description": "The payment link payment settings.",
        "required": [
          "type",
          "uri"
        ],
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "payment_link"
            ],
            "x-enumDescriptions": {
              "payment_link": "The payment link button identifier"
            }
          },
          "uri": {
            "type": "string",
            "description": "The payment link to be used by the buyer to pay."
          }
        }
      },
      "WhatsAppPaymentSettingsButtonBoleto": {
        "type": "object",
        "description": "The Boleto payment settings.",
        "required": [
          "type",
          "digitable_line"
        ],
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "boleto"
            ],
            "x-enumDescriptions": {
              "boleto": "The Boleto button identifier"
            }
          },
          "digitable_line": {
            "type": "string",
            "description": "The Boleto digitable line which will be copied to the clipboard when the user taps the Boleto button."
          }
        }
      },
      "PaymentOrderStatusChannelSpecificMessage": {
        "allOf": [
          {
            "$ref": "#/components/schemas/ChannelSpecificCommonProps"
          },
          {
            "type": "object",
            "title": "WhatsApp Payment Order Status channel specific message.",
            "description": "A message type for sending WhatsApp Payment Status Requests.",
            "required": [
              "payment"
            ],
            "properties": {
              "payment": {
                "type": "object",
                "description": "The payment order status message content",
                "required": [
                  "reference_id",
                  "order"
                ],
                "properties": {
                  "reference_id": {
                    "type": "string",
                    "description": "Unique ID used to query the current payment status."
                  },
                  "order": {
                    "type": "object",
                    "description": "The payment order.",
                    "required": [
                      "status"
                    ],
                    "properties": {
                      "status": {
                        "type": "string",
                        "description": "The new payment message status.",
                        "enum": [
                          "pending",
                          "processing",
                          "partially-shipped",
                          "shipped",
                          "completed",
                          "canceled"
                        ],
                        "x-enumDescriptions": {
                          "pending": "The order is pending.",
                          "processing": "The order is processing.",
                          "partially-shipped": "A portion of the order has been shipped.",
                          "shipped": "The order has been shipped.",
                          "completed": "The order is complete.",
                          "canceled": "The order was canceled."
                        }
                      },
                      "description": {
                        "type": "string",
                        "description": "The description of payment message status update (120 characters maximum)."
                      }
                    }
                  }
                }
              }
            }
          }
        ]
      },
      "WhatsAppInteractiveBody": {
        "type": "object",
        "description": "Body of the interactive message.",
        "required": [
          "text"
        ],
        "properties": {
          "text": {
            "type": "string",
            "description": "The content of the message (1024 characters maximum). Emojis and Markdown are supported."
          }
        }
      },
      "WhatsAppInteractiveTextHeader": {
        "type": "object",
        "description": "Header of the interactive message with text.",
        "required": [
          "type",
          "text"
        ],
        "properties": {
          "type": {
            "type": "string",
            "x-enumDescriptions": {
              "text": "The text of the header."
            },
            "enum": [
              "text"
            ]
          },
          "text": {
            "type": "string",
            "description": "Text for the header. Formatting allows emojis, but not Markdown."
          }
        }
      },
      "WhatsAppInteractiveImageHeader": {
        "type": "object",
        "description": "Header of the interactive message with image.",
        "required": [
          "type",
          "image"
        ],
        "properties": {
          "type": {
            "type": "string",
            "x-enumDescriptions": {
              "image": "The image associated with the header."
            },
            "enum": [
              "image"
            ]
          },
          "image": {
            "$ref": "#/components/schemas/WhatsAppInteractiveHeaderMedia"
          }
        }
      },
      "WhatsAppInteractiveDocumentHeader": {
        "type": "object",
        "description": "Header of the interactive message with document.",
        "required": [
          "type",
          "document"
        ],
        "properties": {
          "type": {
            "type": "string",
            "x-enumDescriptions": {
              "document": "The document associated with the header."
            },
            "enum": [
              "document"
            ]
          },
          "document": {
            "$ref": "#/components/schemas/WhatsAppInteractiveHeaderMedia"
          }
        }
      },
      "WhatsAppInteractiveVideoHeader": {
        "type": "object",
        "description": "Header of the interactive message with video.",
        "required": [
          "type",
          "video"
        ],
        "properties": {
          "type": {
            "type": "string",
            "x-enumDescriptions": {
              "video": "The video associated with the header."
            },
            "enum": [
              "video"
            ]
          },
          "video": {
            "$ref": "#/components/schemas/WhatsAppInteractiveHeaderMedia"
          }
        }
      },
      "WhatsAppInteractiveHeaderMedia": {
        "type": "object",
        "description": "Media object for the header.",
        "required": [
          "link"
        ],
        "properties": {
          "link": {
            "type": "string",
            "description": "URL for the media."
          }
        }
      },
      "WhatsAppInteractiveFooter": {
        "type": "object",
        "description": "Footer of the interactive message.",
        "required": [
          "text"
        ],
        "properties": {
          "text": {
            "type": "string",
            "description": "The footer content (60 characters maximum). Emojis, Markdown and links are supported."
          }
        }
      },
      "WhatsAppInteractiveNfmReplyChannelSpecificContactMessage": {
        "type": "object",
        "title": "WhatsApp Interactive Nfm Reply Channel Specific Contact Message",
        "description": "A WhatsApp interactive contact message containing the nfm_reply.",
        "required": [
          "type",
          "nfm_reply"
        ],
        "properties": {
          "type": {
            "type": "string",
            "description": "The interactive message type.",
            "default": "nfm_reply",
            "x-enumDescriptions": {
              "nfm_reply": "The interactive nfm reply type."
            },
            "enum": [
              "nfm_reply"
            ]
          },
          "nfm_reply": {
            "$ref": "#/components/schemas/WhatsAppInteractiveNfmReply"
          }
        }
      },
      "WhatsAppInteractiveNfmReply": {
        "type": "object",
        "title": "Nfm Reply",
        "description": "The interactive nfm reply message.",
        "required": [
          "name",
          "response_json",
          "body"
        ],
        "properties": {
          "name": {
            "type": "string",
            "description": "The nfm reply message type.",
            "x-enumDescriptions": {
              "flow": "The WhatsApp flow nfm reply message type.",
              "address_message": "The address nfm reply message type."
            },
            "enum": [
              "flow",
              "address_message"
            ]
          },
          "response_json": {
            "type": "string",
            "description": "The JSON specific data."
          },
          "body": {
            "type": "string",
            "description": "The message body."
          }
        }
      },
      "KakaoTalkButton": {
        "type": "object",
        "properties": {
          "type": {
            "description": "Button type",
            "type": "string"
          },
          "name": {
            "description": "Text displayed on the button",
            "type": "string",
            "maxLength": 8
          }
        },
        "required": [
          "type",
          "name"
        ]
      },
      "KakaoTalkWebLinkButton": {
        "title": "KakaoTalk Web Link Button",
        "description": "A button that opens a web link.",
        "allOf": [
          {
            "$ref": "#/components/schemas/KakaoTalkButton"
          },
          {
            "type": "object",
            "properties": {
              "type": {
                "enum": [
                  "WL"
                ]
              },
              "link_mo": {
                "type": "string",
                "description": "URL opened on a mobile device"
              },
              "link_pc": {
                "type": "string",
                "description": "URL opened on a desktop device"
              }
            },
            "required": [
              "link_mo"
            ]
          }
        ]
      },
      "KakaoTalkAppLinkButton": {
        "title": "KakaoTalk App Link Button",
        "description": "A button that opens an app link (e.g. call button)",
        "allOf": [
          {
            "$ref": "#/components/schemas/KakaoTalkButton"
          },
          {
            "type": "object",
            "properties": {
              "type": {
                "enum": [
                  "AL"
                ]
              },
              "scheme_ios": {
                "type": "string",
                "description": "App link opened on an iOS device (e.g. `tel://PHONE_NUMBER`)"
              },
              "scheme_android": {
                "type": "string",
                "description": "App link opened on an Android device (e.g. `tel://PHONE_NUMBER`)"
              }
            },
            "required": [
              "scheme_ios",
              "scheme_android"
            ]
          }
        ]
      },
      "KakaoTalkBotKeywordButton": {
        "title": "KakaoTalk Bot Keyword Button",
        "description": "A button that sends a keyword specified in `name` property",
        "allOf": [
          {
            "$ref": "#/components/schemas/KakaoTalkButton"
          },
          {
            "type": "object",
            "properties": {
              "type": {
                "enum": [
                  "BK"
                ]
              }
            }
          }
        ]
      },
      "KakaoTalkChannelSpecificMessage": {
        "type": "object",
        "properties": {
          "push_alarm": {
            "type": "boolean",
            "default": true,
            "description": "Set to `true` if a push alarm should be sent to a device."
          },
          "adult": {
            "type": "boolean",
            "default": false,
            "description": "Set to `true` if a message contains adult content. Set to `false` by default."
          }
        }
      },
      "KakaoTalkRegularPriceCommerce": {
        "description": "Information about a product with regular price",
        "type": "object",
        "properties": {
          "type": {
            "enum": [
              "REGULAR_PRICE_COMMERCE"
            ],
            "x-enumDescriptions": {
              "REGULAR_PRICE_COMMERCE": "Commerce with regular price"
            }
          },
          "title": {
            "description": "Product title",
            "type": "string",
            "maxLength": 30
          },
          "regular_price": {
            "description": "Regular price of the product",
            "type": "integer",
            "minimum": 0,
            "maximum": 99999999
          }
        },
        "required": [
          "type",
          "title",
          "regular_price"
        ]
      },
      "KakaoTalkDiscountFixedCommerce": {
        "description": "Information about a product with fixed discount",
        "allOf": [
          {
            "$ref": "#/components/schemas/KakaoTalkRegularPriceCommerce"
          },
          {
            "type": "object",
            "properties": {
              "type": {
                "enum": [
                  "FIXED_DISCOUNT_COMMERCE"
                ],
                "x-enumDescriptions": {
                  "FIXED_DISCOUNT_COMMERCE": "Commerce with fixed discount"
                }
              },
              "discount_price": {
                "description": "Discounted price of the product",
                "type": "integer",
                "minimum": 0,
                "maximum": 99999999
              },
              "discount_fixed": {
                "description": "Fixed discount",
                "type": "integer",
                "minimum": 0,
                "maximum": 999999
              }
            },
            "required": [
              "discount_price",
              "discount_fixed"
            ]
          }
        ]
      },
      "KakaoTalkDiscountRateCommerce": {
        "description": "Information about a product with discount rate",
        "allOf": [
          {
            "$ref": "#/components/schemas/KakaoTalkRegularPriceCommerce"
          },
          {
            "type": "object",
            "properties": {
              "type": {
                "enum": [
                  "PERCENTAGE_DISCOUNT_COMMERCE"
                ],
                "x-enumDescriptions": {
                  "PERCENTAGE_DISCOUNT_COMMERCE": "Commerce with percentage discount"
                }
              },
              "discount_price": {
                "description": "Discounted price of the product",
                "type": "integer",
                "minimum": 0,
                "maximum": 99999999
              },
              "discount_rate": {
                "description": "Discount rate (%)",
                "type": "integer",
                "minimum": 0,
                "maximum": 100
              }
            },
            "required": [
              "discount_price",
              "discount_rate"
            ]
          }
        ]
      },
      "KakaoTalkCoupon": {
        "properties": {
          "type": {
            "description": "Coupon type",
            "type": "string"
          },
          "description": {
            "description": "Coupon description",
            "type": "string",
            "maxLength": 12
          },
          "link_mo": {
            "description": "Coupon URL opened on a mobile device",
            "type": "string"
          },
          "link_pc": {
            "description": "Coupon URL opened on a desktop device",
            "type": "string"
          },
          "scheme_android": {
            "description": "Channel coupon URL (format: `alimtalk=coupon://...`)",
            "type": "string"
          },
          "scheme_ios": {
            "description": "Channel coupon URL (format: `alimtalk=coupon://...`)",
            "type": "string"
          }
        },
        "required": [
          "type"
        ]
      },
      "KakaoTalkFixedDiscountCoupon": {
        "title": "KakaoTalk fixed discount coupon",
        "description": "<p>Fixed discount coupon with with the following title: \"<code>discount_fixed</code> 원 할인 쿠폰\" (translates to: \"<code>discount_fixed</code> won discount coupon\")</p>\n<p><b>One of the following fields is required: <code>link_mo</code>, <code>scheme_android</code>, <code>scheme_ios</code></b></p>",
        "allOf": [
          {
            "$ref": "#/components/schemas/KakaoTalkCoupon"
          },
          {
            "type": "object",
            "properties": {
              "type": {
                "enum": [
                  "FIXED_DISCOUNT_COUPON"
                ]
              },
              "discount_fixed": {
                "description": "Fixed discount",
                "type": "integer",
                "minimum": 0,
                "maximum": 999999
              }
            },
            "required": [
              "discount_fixed"
            ]
          }
        ]
      },
      "KakaoTalkDiscountRateCoupon": {
        "title": "KakaoTalk discount rate coupon",
        "description": "<p>Percentage discount coupon with the following title: \"<code>discount_rate</code>% 할인 쿠폰\" (translates to: \"<code>discount_rate</code>% discount coupon\")</p>\n<p><b>One of the following fields is required: <code>link_mo</code>, <code>scheme_android</code>, <code>scheme_ios</code></b></p>",
        "allOf": [
          {
            "$ref": "#/components/schemas/KakaoTalkCoupon"
          },
          {
            "type": "object",
            "properties": {
              "type": {
                "enum": [
                  "PERCENTAGE_DISCOUNT_COUPON"
                ]
              },
              "discount_rate": {
                "description": "Discount rate (%)",
                "type": "integer",
                "minimum": 0,
                "maximum": 100
              }
            },
            "required": [
              "discount_rate"
            ]
          }
        ]
      },
      "KakaoTalkShippingDiscountCoupon": {
        "title": "KakaoTalk shipping discount coupon",
        "description": "<p>Shipping discount coupon with with the following title: \"배송비 할인 쿠폰\" (translates to: \"shipping fee discount coupon\")</p> <p><b>One of the following fields is required: <code>link_mo</code>, <code>scheme_android</code>, <code>scheme_ios</code></b></p>\n",
        "allOf": [
          {
            "$ref": "#/components/schemas/KakaoTalkCoupon"
          },
          {
            "type": "object",
            "properties": {
              "type": {
                "enum": [
                  "SHIPPING_DISCOUNT_COUPON"
                ]
              }
            }
          }
        ]
      },
      "KakaoTalkFreeCoupon": {
        "title": "KakaoTalk free coupon",
        "description": "<p>Free coupon with the following title: \"<code>title</code> 무료 쿠폰\" (translates to: \"<code>title</code> free coupon\")</p>\n<p><b>One of the following fields is required: <code>link_mo</code>, <code>scheme_android</code>, <code>scheme_ios</code></b></p>",
        "allOf": [
          {
            "$ref": "#/components/schemas/KakaoTalkCoupon"
          },
          {
            "type": "object",
            "properties": {
              "type": {
                "enum": [
                  "FREE_COUPON"
                ]
              },
              "title": {
                "description": "Coupon title",
                "type": "string",
                "maxLength": 7
              }
            },
            "required": [
              "title"
            ]
          }
        ]
      },
      "KakaoTalkUpCoupon": {
        "title": "KakaoTalk UP coupon",
        "description": "<p>UP coupon with the following title: \"<code>title</code> UP 쿠폰\" (translates to: \"<code>title</code> UP coupon\")</p>\n<p><b>One of the following fields is required: <code>link_mo</code>, <code>scheme_android</code>, <code>scheme_ios</code></b></p>",
        "allOf": [
          {
            "$ref": "#/components/schemas/KakaoTalkCoupon"
          },
          {
            "type": "object",
            "properties": {
              "type": {
                "enum": [
                  "UP_COUPON"
                ]
              },
              "title": {
                "description": "Coupon title",
                "type": "string",
                "maxLength": 7
              }
            },
            "required": [
              "title"
            ]
          }
        ]
      },
      "KakaoTalkCommerceMessage": {
        "type": "object",
        "title": "KakaoTalk commerce message",
        "description": "A message type for sending KakaoTalk commerce messages",
        "properties": {
          "buttons": {
            "description": "Buttons list",
            "type": "array",
            "minItems": 1,
            "maxItems": 2,
            "items": {
              "oneOf": [
                {
                  "$ref": "#/components/schemas/KakaoTalkWebLinkButton"
                },
                {
                  "$ref": "#/components/schemas/KakaoTalkAppLinkButton"
                },
                {
                  "$ref": "#/components/schemas/KakaoTalkBotKeywordButton"
                }
              ]
            }
          },
          "additional_content": {
            "description": "Additional information",
            "type": "string",
            "maxLength": 34
          },
          "image": {
            "description": "Product image",
            "type": "object",
            "properties": {
              "image_url": {
                "type": "string",
                "description": "URL to the product image"
              },
              "image_link": {
                "type": "string",
                "description": "URL opened when a user clicks on the image"
              }
            },
            "required": [
              "image_url"
            ]
          },
          "commerce": {
            "description": "Product information",
            "oneOf": [
              {
                "$ref": "#/components/schemas/KakaoTalkRegularPriceCommerce"
              },
              {
                "$ref": "#/components/schemas/KakaoTalkDiscountFixedCommerce"
              },
              {
                "$ref": "#/components/schemas/KakaoTalkDiscountRateCommerce"
              }
            ]
          },
          "coupon": {
            "description": "Discount coupon",
            "oneOf": [
              {
                "$ref": "#/components/schemas/KakaoTalkFixedDiscountCoupon"
              },
              {
                "$ref": "#/components/schemas/KakaoTalkDiscountRateCoupon"
              },
              {
                "$ref": "#/components/schemas/KakaoTalkShippingDiscountCoupon"
              },
              {
                "$ref": "#/components/schemas/KakaoTalkFreeCoupon"
              },
              {
                "$ref": "#/components/schemas/KakaoTalkUpCoupon"
              }
            ]
          }
        },
        "required": [
          "image",
          "commerce",
          "buttons"
        ]
      },
      "KakaoTalkCarouselCommerceChannelSpecificMessage": {
        "allOf": [
          {
            "$ref": "#/components/schemas/KakaoTalkChannelSpecificMessage"
          },
          {
            "type": "object",
            "title": "KakaoTalk carousel commerce channel specific message",
            "description": "A message type for sending KakaoTalk carousel commerce messages",
            "properties": {
              "carousel": {
                "description": "Carousel content",
                "type": "object",
                "properties": {
                  "head": {
                    "description": "Carousel introduction",
                    "type": "object",
                    "properties": {
                      "header": {
                        "description": "Carousel introduction title",
                        "type": "string",
                        "maxLength": 20
                      },
                      "content": {
                        "description": "Carousel introduction description",
                        "type": "string",
                        "maxLength": 50
                      },
                      "image_url": {
                        "description": "URL to the image displayed in the introduction",
                        "type": "string"
                      },
                      "link_mo": {
                        "description": "URL opened on a mobile device",
                        "type": "string"
                      },
                      "link_pc": {
                        "description": "URL opened on a desktop device",
                        "type": "string"
                      },
                      "scheme_ios": {
                        "description": "App link opened on an iOS device (e.g. `tel://PHONE_NUMBER`)",
                        "type": "string"
                      },
                      "scheme_android": {
                        "description": "App link opened on an Android device (e.g. `tel://PHONE_NUMBER`)",
                        "type": "string"
                      }
                    },
                    "required": [
                      "header",
                      "content",
                      "image_url"
                    ]
                  },
                  "list": {
                    "description": "List of carousel cards",
                    "type": "array",
                    "minItems": 2,
                    "maxItems": 10,
                    "items": {
                      "$ref": "#/components/schemas/KakaoTalkCommerceMessage"
                    }
                  },
                  "tail": {
                    "description": "\"More\" button",
                    "type": "object",
                    "properties": {
                      "link_mo": {
                        "description": "URL opened on a mobile device",
                        "type": "string"
                      },
                      "link_pc": {
                        "description": "URL opened on a desktop device",
                        "type": "string"
                      },
                      "scheme_ios": {
                        "description": "App link opened on an iOS device (e.g. `tel://PHONE_NUMBER`)",
                        "type": "string"
                      },
                      "scheme_android": {
                        "description": "App link opened on an Android device (e.g. `tel://PHONE_NUMBER`)",
                        "type": "string"
                      }
                    },
                    "required": [
                      "link_mo"
                    ]
                  }
                },
                "required": [
                  "list"
                ]
              }
            },
            "required": [
              "carousel"
            ]
          }
        ]
      },
      "KakaoTalkCommerceChannelSpecificMessage": {
        "allOf": [
          {
            "$ref": "#/components/schemas/KakaoTalkChannelSpecificMessage"
          },
          {
            "$ref": "#/components/schemas/KakaoTalkCommerceMessage"
          },
          {
            "type": "object",
            "title": "KakaoTalk commerce channel specific message",
            "description": "A message type for sending KakaoTalk commerce messages"
          }
        ]
      },
      "LineNotificationMessageTemplateEmphasizedItem": {
        "type": "object",
        "description": "Template emphasized item",
        "required": [
          "item_key",
          "content"
        ],
        "properties": {
          "item_key": {
            "description": "Item key. See [LINE documentation](https://developers.line.biz/en/docs/partner-docs/line-notification-messages/template/?r=jp#items) for available keys",
            "type": "string"
          },
          "content": {
            "description": "Item value",
            "type": "string",
            "maxLength": 15
          }
        }
      },
      "LineNotificationMessageTemplateItem": {
        "type": "object",
        "description": "Template item",
        "required": [
          "item_key",
          "content"
        ],
        "properties": {
          "item_key": {
            "description": "Item key. See [LINE documentation](https://developers.line.biz/en/docs/partner-docs/line-notification-messages/template/?r=jp#items) for available keys",
            "type": "string"
          },
          "content": {
            "description": "Item value",
            "type": "string",
            "maxLength": 300
          }
        }
      },
      "LineNotificationMessageTemplateButton": {
        "type": "object",
        "description": "Template button",
        "required": [
          "button_key",
          "url"
        ],
        "properties": {
          "button_key": {
            "type": "string",
            "description": "Button key. See [LINE documentation](https://developers.line.biz/en/docs/partner-docs/line-notification-messages/template/?r=jp#buttons) for available keys"
          },
          "url": {
            "type": "string",
            "maxLength": 1000,
            "description": "Button URL"
          }
        }
      },
      "LineNotificationMessageTemplateBody": {
        "type": "object",
        "description": "Template body",
        "properties": {
          "emphasized_item": {
            "$ref": "#/components/schemas/LineNotificationMessageTemplateEmphasizedItem"
          },
          "items": {
            "type": "array",
            "description": "List of template items",
            "items": {
              "$ref": "#/components/schemas/LineNotificationMessageTemplateItem"
            },
            "maxItems": 15
          },
          "buttons": {
            "type": "array",
            "description": "List of template buttons",
            "items": {
              "$ref": "#/components/schemas/LineNotificationMessageTemplateButton"
            },
            "maxItems": 2
          }
        }
      },
      "LineNotificationMessageTemplateChannelSpecificMessage": {
        "type": "object",
        "title": "LINE notification message (template) channel specific message",
        "description": "A message type for sending LINE notification messages (template)",
        "required": [
          "template_key"
        ],
        "properties": {
          "template_key": {
            "description": "Template key. See [LINE documentation](https://developers.line.biz/en/docs/partner-docs/line-notification-messages/template/?r=jp#templates) for available keys",
            "type": "string"
          },
          "body": {
            "$ref": "#/components/schemas/LineNotificationMessageTemplateBody"
          }
        }
      },
      "ProjectSettings": {
        "type": "object",
        "title": "Project Settings",
        "description": "Project-level settings, including contact management options.",
        "properties": {
          "project_id": {
            "type": "string",
            "description": "The unique ID of the project.",
            "example": "56bbb185-c7ea-48fb-ad97-638a0dc5eed7"
          },
          "settings": {
            "type": "object",
            "description": "The settings object containing contact settings.",
            "properties": {
              "contact_settings": {
                "$ref": "#/components/schemas/ContactSettings"
              }
            }
          }
        }
      },
      "ProjectSettingsRequest": {
        "type": "object",
        "title": "Project Settings Request",
        "description": "Request body for creating or updating project settings.",
        "properties": {
          "contact_settings": {
            "$ref": "#/components/schemas/ContactSettings"
          }
        }
      },
      "ContactSettings": {
        "type": "object",
        "title": "Contact Settings",
        "description": "Settings related to contact management for the project.",
        "properties": {
          "unified_contact_id_enabled": {
            "type": "boolean",
            "description": "Enables the Unified Contact ID feature. When enabled, contacts with the same phone number across SMS, RCS, and MMS channels are treated as a single entity. [See the documentation](https://developers.sinch.com/docs/conversation/unified-contact-id/) for details and requirements.\n",
            "example": true
          }
        }
      },
      "CallbackEventCommon": {
        "type": "object",
        "required": [
          "app_id",
          "project_id"
        ],
        "properties": {
          "app_id": {
            "description": "Id of the subscribed app.",
            "type": "string"
          },
          "accepted_time": {
            "description": "Timestamp marking when the channel callback was accepted/received by the Conversation API.",
            "type": "string",
            "format": "date"
          },
          "event_time": {
            "description": "Timestamp of the event as provided by the underlying channels.",
            "type": "string",
            "format": "date"
          },
          "project_id": {
            "description": "The project ID of the app which has subscribed for the callback.",
            "type": "string"
          },
          "message_metadata": {
            "description": "Context-dependent metadata. Refer to specific callback's documentation for exact information provided.",
            "type": "string"
          },
          "correlation_id": {
            "description": "The value provided in field correlation_id of a send message request.",
            "type": "string"
          }
        }
      },
      "MessageInboundEvent": {
        "type": "object",
        "description": "This callback delivers contact (end-user) messages to the API clients.",
        "allOf": [
          {
            "$ref": "#/components/schemas/CallbackEventCommon"
          },
          {
            "type": "object",
            "properties": {
              "message": {
                "$ref": "#/components/schemas/MessageInboundEventItem"
              }
            }
          }
        ]
      },
      "MessageInboundSmartConversationRedactionEvent": {
        "type": "object",
        "description": "This callback delivers contact (end-user) messages to the API clients. The content of the message goes through an A.I. analysis and is redacted if required.",
        "allOf": [
          {
            "$ref": "#/components/schemas/CallbackEventCommon"
          },
          {
            "type": "object",
            "properties": {
              "message_redaction": {
                "$ref": "#/components/schemas/MessageInboundEventItem"
              }
            }
          }
        ]
      },
      "MessageInboundEventItem": {
        "type": "object",
        "properties": {
          "id": {
            "description": "The message ID.",
            "type": "string"
          },
          "direction": {
            "description": "The direction of the message, it's always TO_APP for contact messages.",
            "type": "string",
            "x-enumDescriptions": {
              "TO_APP": "A message sent to a Conversation API app."
            },
            "enum": [
              "TO_APP"
            ]
          },
          "contact_message": {
            "$ref": "#/components/schemas/ContactMessage"
          },
          "channel_identity": {
            "$ref": "#/components/schemas/ChannelIdentity"
          },
          "conversation_id": {
            "description": "The ID of the conversation this message is part of. Will be empty if processing_mode is DISPATCH.",
            "type": "string"
          },
          "contact_id": {
            "description": "The ID of the contact. Will be empty if processing_mode is DISPATCH.",
            "type": "string"
          },
          "metadata": {
            "description": "Usually, metadata specific to the underlying channel is provided in this field. Refer to the individual channels' documentation for more information (for example, SMS delivery receipts). Note that, for Choice message responses, this field is populated with the value of the message_metadata field of the corresponding Send message request.",
            "type": "string"
          },
          "accept_time": {
            "description": "Timestamp marking when the channel callback was received by the Conversation API.",
            "type": "string",
            "format": "date"
          },
          "sender_id": {
            "description": "The sender ID to which the contact sent the message, if applicable. For example, originator msisdn/short code for SMS and MMS.",
            "type": "string"
          },
          "processing_mode": {
            "$ref": "#/components/schemas/ProcessingMode"
          },
          "injected": {
            "description": "Flag for whether this message was injected.",
            "type": "boolean"
          }
        }
      },
      "MessageSubmitEvent": {
        "description": "This callback provides a notification to the API clients that the corresponding app message was submitted to a channel. This notification is created before any confirmation from Delivery Receipts.",
        "allOf": [
          {
            "$ref": "#/components/schemas/CallbackEventCommon"
          },
          {
            "type": "object",
            "properties": {
              "message_submit_notification": {
                "type": "object",
                "properties": {
                  "message_id": {
                    "description": "The ID of the app message.",
                    "type": "string"
                  },
                  "conversation_id": {
                    "description": "The ID of the conversation the app message is part of. Will be empty if processing_mode is DISPATCH.",
                    "type": "string"
                  },
                  "channel_identity": {
                    "$ref": "#/components/schemas/ChannelIdentity"
                  },
                  "contact_id": {
                    "description": "The ID of the contact. Will be empty if processing_mode is DISPATCH.",
                    "type": "string"
                  },
                  "submitted_message": {
                    "$ref": "#/components/schemas/AppMessage"
                  },
                  "metadata": {
                    "description": "Metadata specified in the message_metadata field of a Send Message request, if any.",
                    "type": "string"
                  },
                  "processing_mode": {
                    "$ref": "#/components/schemas/ProcessingMode"
                  }
                }
              }
            }
          }
        ]
      },
      "MessageDeliveryReceiptEvent": {
        "description": "This callback notifies the API clients about status changes of already sent app message.",
        "allOf": [
          {
            "$ref": "#/components/schemas/CallbackEventCommon"
          },
          {
            "type": "object",
            "properties": {
              "message_delivery_report": {
                "type": "object",
                "properties": {
                  "message_id": {
                    "description": "The ID of the app message.",
                    "type": "string"
                  },
                  "conversation_id": {
                    "description": "The ID of the conversation the app message is part of. Will be empty if processing_mode is DISPATCH.",
                    "type": "string"
                  },
                  "status": {
                    "$ref": "#/components/schemas/DeliveryStatus"
                  },
                  "channel_identity": {
                    "$ref": "#/components/schemas/ChannelIdentity"
                  },
                  "contact_id": {
                    "description": "The ID of the contact. Will be empty if processing_mode is DISPATCH.",
                    "type": "string"
                  },
                  "reason": {
                    "$ref": "#/components/schemas/Reason"
                  },
                  "metadata": {
                    "description": "Metadata specified in the message_metadata field of a Send Message request, if any.",
                    "type": "string"
                  },
                  "processing_mode": {
                    "$ref": "#/components/schemas/ProcessingMode"
                  }
                }
              }
            }
          }
        ]
      },
      "DeliveryStatus": {
        "description": "Shows the status of the message or event delivery",
        "type": "string",
        "x-enumDescriptions": {
          "QUEUED_ON_CHANNEL": "The message has been queued on the corresponding Conversation API channel.",
          "DELIVERED": "The message has been delivered.",
          "READ": "The message has been read.",
          "FAILED": "Message delivery failed.",
          "SWITCHING_CHANNEL": "The Conversation API app is switch to a different channel to deliver the message."
        },
        "enum": [
          "QUEUED_ON_CHANNEL",
          "DELIVERED",
          "READ",
          "FAILED",
          "SWITCHING_CHANNEL"
        ]
      },
      "EventInbound": {
        "allOf": [
          {
            "$ref": "#/components/schemas/CallbackEventCommon"
          },
          {
            "type": "object",
            "properties": {
              "event": {
                "type": "object",
                "properties": {
                  "id": {
                    "description": "The event ID.",
                    "type": "string"
                  },
                  "direction": {
                    "description": "The direction of the event. It's always TO_APP for contact events.",
                    "type": "string",
                    "x-enumDescriptions": {
                      "TO_APP": "An event sent to a Conversation API app."
                    },
                    "enum": [
                      "TO_APP"
                    ]
                  },
                  "contact_event": {
                    "$ref": "#/components/schemas/ContactEvent"
                  },
                  "contact_message_event": {
                    "$ref": "#/components/schemas/ContactMessageEvent"
                  },
                  "channel_identity": {
                    "$ref": "#/components/schemas/ChannelIdentity"
                  },
                  "contact_id": {
                    "description": "The ID of the contact. Will be empty if processing_mode is DISPATCH.",
                    "type": "string"
                  },
                  "conversation_id": {
                    "description": "The ID of the conversation this event is part of. Will be empty if processing_mode is DISPATCH.",
                    "type": "string"
                  },
                  "accept_time": {
                    "description": "Timestamp marking when the channel callback was received by the Conversation API.",
                    "type": "string",
                    "format": "date-time"
                  },
                  "processing_mode": {
                    "$ref": "#/components/schemas/ProcessingMode"
                  }
                }
              }
            }
          }
        ]
      },
      "ContactEvent": {
        "title": "Contact Event",
        "description": "Message originating from a contact",
        "type": "object",
        "oneOf": [
          {
            "$ref": "#/components/schemas/ComposingEventField"
          },
          {
            "$ref": "#/components/schemas/ComposingEndEventField"
          },
          {
            "$ref": "#/components/schemas/ConversationDeletedEventField"
          },
          {
            "$ref": "#/components/schemas/CommentEventField"
          },
          {
            "$ref": "#/components/schemas/GenericEventField"
          }
        ]
      },
      "CommentEvent": {
        "description": "Object which contains information of a comment made by an user outside of the main conversation context. Currently only supported on Instagram channel, see Instagram Private Replies for more details",
        "type": "object",
        "required": [
          "text"
        ],
        "properties": {
          "id": {
            "description": "Event's ID",
            "type": "string"
          },
          "text": {
            "description": "Comment's text",
            "type": "string"
          },
          "comment_type": {
            "description": "Either LIVE or FEED. Indicates the type of media on which the comment was made.",
            "type": "string",
            "x-enumDescriptions": {
              "FEED": "A comment was made on a Feed post.",
              "LIVE": "A comment was made during a Live."
            },
            "enum": [
              "FEED",
              "LIVE"
            ]
          },
          "commented_on": {
            "description": "Instagram's URL of the live broadcast or the post on which the comment was made (permalink).",
            "type": "string"
          },
          "user": {
            "description": "Username of the account that commented in the live broadcast or post.",
            "type": "string"
          }
        }
      },
      "ShortLinkActivatedEvent": {
        "description": "Object reflecting an event that is created when a contact visits a shortlink. Currently, this is only supported for the Messenger and Instagram channels. See [Shortlink Activated Event](https://developers.sinch.com/docs/conversation/callbacks/#shortlink-activated-event) for more details.",
        "type": "object",
        "properties": {
          "payload": {
            "type": "string",
            "description": "Refers to the payload previously configured to be sent in the postback."
          },
          "title": {
            "type": "string",
            "description": "Only relevant for the Instagram channel."
          },
          "ref": {
            "type": "string",
            "description": "The ref parameter from the shortlink the user visited."
          },
          "source": {
            "type": "string",
            "description": "Defaults to \"SHORTLINK\" for this type of event."
          },
          "type": {
            "type": "string",
            "description": "The identifier for the referral. For Instagram and Messenger shortlinks, this is always set to \"OPEN_THREAD\"."
          },
          "existing_thread": {
            "type": "boolean",
            "description": "Set to true if target channel's conversation thread already existed at the moment the shortlink was visited. Set to false if a new conversation thread began when the shortlink was visited."
          }
        }
      },
      "ReactionAction": {
        "description": "Type of action",
        "type": "string",
        "x-enumDescriptions": {
          "REACTION_ACTION_UNKNOWN": "Unrecognized type of action",
          "REACTION_ACTION_REACT": "User placed some emoji reaction",
          "REACTION_ACTION_UNREACT": "User removed previously placed emoji reaction"
        },
        "enum": [
          "REACTION_ACTION_UNKNOWN",
          "REACTION_ACTION_REACT",
          "REACTION_ACTION_UNREACT"
        ]
      },
      "ReactionEvent": {
        "description": "Object reflecting an event that is created when a contact reacts/unreacts with an emoji to a particular MT message. Currently, this is only supported for the Messenger and Instagram channels. See [Reaction Event](https://developers.sinch.com/docs/conversation/callbacks/#reaction-event) for more details.",
        "type": "object",
        "required": [
          "emoji",
          "action",
          "message_id"
        ],
        "properties": {
          "emoji": {
            "description": "Indicates that an emoji reaction was placed on a message. This value is the string representation of the emoji.\nFor example: \"&#2764&#FE0F\"",
            "type": "string"
          },
          "action": {
            "$ref": "#/components/schemas/ReactionAction"
          },
          "message_id": {
            "description": "The ID of the MT message that this reaction is associated with.",
            "type": "string"
          },
          "reaction_category": {
            "description": "If present, represents the grouping of emojis.\nExample values: \"smile\", \"angry\", \"sad\", \"wow\", \"love\", \"like\", \"dislike\", \"other\"",
            "type": "string"
          }
        }
      },
      "ContactMessageEvent": {
        "description": "The content of the event when contact_event is not populated. Note that this object is currently only available to select customers for beta testing. Mutually exclusive with contact_event.",
        "type": "object",
        "oneOf": [
          {
            "type": "object",
            "title": "Payment Status Update",
            "properties": {
              "payment_status_update_event": {
                "$ref": "#/components/schemas/PaymentStatusUpdateEvent"
              }
            }
          },
          {
            "type": "object",
            "title": "Short Link Activated",
            "properties": {
              "shortlink_activated_event": {
                "$ref": "#/components/schemas/ShortLinkActivatedEvent"
              }
            }
          },
          {
            "type": "object",
            "title": "Reaction",
            "properties": {
              "reaction_event": {
                "$ref": "#/components/schemas/ReactionEvent"
              }
            }
          }
        ]
      },
      "EventDelivery": {
        "allOf": [
          {
            "$ref": "#/components/schemas/CallbackEventCommon"
          },
          {
            "type": "object",
            "properties": {
              "event_delivery_report": {
                "type": "object",
                "properties": {
                  "event_id": {
                    "description": "The ID of the app event.",
                    "type": "string"
                  },
                  "status": {
                    "$ref": "#/components/schemas/DeliveryStatus"
                  },
                  "channel_identity": {
                    "$ref": "#/components/schemas/ChannelIdentity"
                  },
                  "contact_id": {
                    "description": "The ID of the contact. Will be empty if processing_mode is DISPATCH.",
                    "type": "string"
                  },
                  "reason": {
                    "$ref": "#/components/schemas/Reason"
                  },
                  "metadata": {
                    "description": "Metadata specified when sending the event if any.",
                    "type": "string"
                  },
                  "processing_mode": {
                    "$ref": "#/components/schemas/ProcessingMode"
                  }
                }
              }
            }
          }
        ]
      },
      "ConversationStartEvent": {
        "description": "This callback is sent when a new conversation between the subscribed app and a contact is started.",
        "allOf": [
          {
            "$ref": "#/components/schemas/CallbackEventCommon"
          },
          {
            "type": "object",
            "properties": {
              "conversation_start_notification": {
                "$ref": "#/components/schemas/ConversationNotification"
              }
            }
          }
        ]
      },
      "ConversationStopEvent": {
        "description": "This callback is sent when a conversation between the subscribed app and a contact is stopped.",
        "allOf": [
          {
            "$ref": "#/components/schemas/CallbackEventCommon"
          },
          {
            "type": "object",
            "properties": {
              "conversation_stop_notification": {
                "$ref": "#/components/schemas/ConversationNotification"
              }
            }
          }
        ]
      },
      "ConversationDeleteEvent": {
        "description": "This callback is sent when a conversation between the subscribed app and a contact is deleted.",
        "allOf": [
          {
            "$ref": "#/components/schemas/CallbackEventCommon"
          },
          {
            "type": "object",
            "properties": {
              "conversation_delete_notification": {
                "$ref": "#/components/schemas/ConversationNotification"
              }
            }
          }
        ]
      },
      "ConversationNotification": {
        "description": "Object containing the details of the started / stopped / deleted conversation",
        "type": "object",
        "properties": {
          "conversation": {
            "$ref": "#/components/schemas/Conversation"
          }
        }
      },
      "ContactCreateEvent": {
        "description": "This callback is sent when a new contact is created.",
        "allOf": [
          {
            "$ref": "#/components/schemas/CallbackEventCommon"
          },
          {
            "type": "object",
            "properties": {
              "contact_create_notification": {
                "$ref": "#/components/schemas/ContactNotification"
              }
            }
          }
        ]
      },
      "ContactDeleteEvent": {
        "description": "This callback is sent when a new contact is deleted.",
        "allOf": [
          {
            "$ref": "#/components/schemas/CallbackEventCommon"
          },
          {
            "type": "object",
            "properties": {
              "contact_delete_notification": {
                "$ref": "#/components/schemas/ContactNotification"
              }
            }
          }
        ]
      },
      "ContactUpdateEvent": {
        "description": "This callback is sent when a new contact is updated.",
        "allOf": [
          {
            "$ref": "#/components/schemas/CallbackEventCommon"
          },
          {
            "type": "object",
            "properties": {
              "contact_update_notification": {
                "$ref": "#/components/schemas/ContactNotification"
              }
            }
          }
        ]
      },
      "ContactNotification": {
        "type": "object",
        "properties": {
          "contact": {
            "$ref": "#/components/schemas/Contact"
          }
        }
      },
      "ContactMergeEvent": {
        "description": "This callback is sent when two contacts are merged.",
        "allOf": [
          {
            "$ref": "#/components/schemas/CallbackEventCommon"
          },
          {
            "type": "object",
            "properties": {
              "contact_merge_notification": {
                "type": "object",
                "properties": {
                  "preserved_contact": {
                    "$ref": "#/components/schemas/Contact"
                  },
                  "deleted_contact": {
                    "$ref": "#/components/schemas/Contact"
                  }
                }
              }
            }
          }
        ]
      },
      "ContactIdentitiesDuplicationEvent": {
        "description": "This callback is sent when duplicates of channel identities are found between multiple contacts in the contact database during message and event processing.",
        "allOf": [
          {
            "$ref": "#/components/schemas/CallbackEventCommon"
          },
          {
            "type": "object",
            "properties": {
              "duplicated_contact_identities_notification": {
                "type": "object",
                "properties": {
                  "duplicated_identities": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "channel": {
                          "$ref": "#/components/schemas/ConversationChannel"
                        },
                        "contact_ids": {
                          "description": "List of duplicated ids in the specified channel.",
                          "type": "array",
                          "items": {
                            "type": "string"
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        ]
      },
      "CapabilityEvent": {
        "description": "This callback is used to deliver the results of the asynchronous capability checks.",
        "allOf": [
          {
            "$ref": "#/components/schemas/CallbackEventCommon"
          },
          {
            "type": "object",
            "properties": {
              "capability_notification": {
                "type": "object",
                "properties": {
                  "request_id": {
                    "description": "ID generated when submitting the capability request. Can be used to detect duplicates.",
                    "type": "string"
                  },
                  "contact_id": {
                    "description": "The ID of the contact.",
                    "type": "string"
                  },
                  "channel": {
                    "$ref": "#/components/schemas/ConversationChannel"
                  },
                  "identity": {
                    "description": "The channel identity. For example, a phone number for SMS, WhatsApp, and Viber Business.",
                    "type": "string"
                  },
                  "capability_status": {
                    "description": "Status indicating the recipient's capability on the channel.",
                    "type": "string",
                    "x-enumDescriptions": {
                      "CAPABILITY_UNKNOWN": "The channel capability for the contact is unknown due to the underlying channel not making this information available.",
                      "CAPABILITY_FULL": "The specified contact supports all the features of the channel.",
                      "CAPABILITY_PARTIAL": "The specified contact supports a subset of the channel features.",
                      "NO_CAPABILITY": "The specified contact has no capability on the channel."
                    },
                    "enum": [
                      "CAPABILITY_UNKNOWN",
                      "CAPABILITY_FULL",
                      "CAPABILITY_PARTIAL",
                      "NO_CAPABILITY"
                    ]
                  },
                  "channel_capabilities": {
                    "description": "When capability_status is set to CAPABILITY_PARTIAL, this field includes a list of the supported channel-specific capabilities reported by the channel.",
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "reason": {
                    "$ref": "#/components/schemas/Reason"
                  }
                }
              }
            }
          }
        ]
      },
      "OptInEvent": {
        "description": "This callback is used to deliver opt-in notifications from the channels.",
        "allOf": [
          {
            "$ref": "#/components/schemas/CallbackEventCommon"
          },
          {
            "type": "object",
            "properties": {
              "opt_in_notification": {
                "type": "object",
                "properties": {
                  "request_id": {
                    "description": "ID generated when making an opt-in registration request. Can be used to detect duplicates.",
                    "type": "string"
                  },
                  "contact_id": {
                    "description": "The ID of the contact which is the subject of the opt-in. Will be empty if processing_mode is DISPATCH.",
                    "type": "string"
                  },
                  "channel": {
                    "$ref": "#/components/schemas/ConversationChannel"
                  },
                  "identity": {
                    "description": "The channel identity. For example, a phone number for SMS, WhatsApp and Viber Business.",
                    "type": "string"
                  },
                  "status": {
                    "description": "Status of the opt-in registration.",
                    "type": "string",
                    "x-enumDescriptions": {
                      "OPT_IN_SUCCEEDED": "The opt-in registration succeeded.",
                      "OPT_IN_FAILED": "The opt-in registration failed.",
                      "OPT_IN_STATUS_UNSPECIFIED": "The status of the opt-in registration is unknown."
                    },
                    "enum": [
                      "OPT_IN_SUCCEEDED",
                      "OPT_IN_FAILED",
                      "OPT_IN_STATUS_UNSPECIFIED"
                    ]
                  },
                  "error_details": {
                    "description": "This field is populated if the opt-in failed.",
                    "type": "object",
                    "properties": {
                      "description": {
                        "description": "Human-readable error description.",
                        "type": "string"
                      }
                    }
                  },
                  "processing_mode": {
                    "$ref": "#/components/schemas/ProcessingMode"
                  }
                }
              }
            }
          }
        ]
      },
      "OptOutEvent": {
        "description": "This callback is used to deliver opt-out notifications from the channels.",
        "allOf": [
          {
            "$ref": "#/components/schemas/CallbackEventCommon"
          },
          {
            "type": "object",
            "properties": {
              "opt_out_notification": {
                "type": "object",
                "properties": {
                  "request_id": {
                    "description": "ID generated when making an opt-out registration request. Can be used to detect duplicates.",
                    "type": "string"
                  },
                  "contact_id": {
                    "description": "The ID of the contact which is the subject of the opt-out. Will be empty if processing_mode is DISPATCH.",
                    "type": "string"
                  },
                  "channel": {
                    "$ref": "#/components/schemas/ConversationChannel"
                  },
                  "identity": {
                    "description": "The channel identity. For example, a phone number for SMS, WhatsApp and Viber Business.",
                    "type": "string"
                  },
                  "status": {
                    "description": "Status of the opt-out registration.",
                    "type": "string",
                    "x-enumDescriptions": {
                      "OPT_OUT_SUCCEEDED": "The opt-out registration succeeded.",
                      "OPT_OUT_FAILED": "The opt-out registration failed.",
                      "OPT_OUT_STATUS_UNSPECIFIED": "The status of the opt-out registration is unknown."
                    },
                    "enum": [
                      "OPT_OUT_SUCCEEDED",
                      "OPT_OUT_FAILED",
                      "OPT_OUT_STATUS_UNSPECIFIED"
                    ]
                  },
                  "error_details": {
                    "description": "This field is populated if the opt-out failed.",
                    "type": "object",
                    "properties": {
                      "description": {
                        "description": "Human-readable error description.",
                        "type": "string"
                      }
                    }
                  },
                  "processing_mode": {
                    "$ref": "#/components/schemas/ProcessingMode"
                  }
                }
              }
            }
          }
        ]
      },
      "ChannelEvent": {
        "description": "This callback is used to deliver notifications regarding channel-specific information and updates. For example, if your are using the WhatsApp channel of the Conversation API, and your quality rating has been changed to GREEN, a POST would be made to the CHANNEL_EVENT webhook.",
        "allOf": [
          {
            "$ref": "#/components/schemas/CallbackEventCommon"
          },
          {
            "type": "object",
            "properties": {
              "channel_event_notification": {
                "properties": {
                  "channel_event": {
                    "type": "object",
                    "properties": {
                      "channel": {
                        "$ref": "#/components/schemas/ConversationChannel"
                      },
                      "event_type": {
                        "description": "The type of event being reported.",
                        "type": "string"
                      },
                      "additional_data": {
                        "description": "An object containing additional information regarding the event. The contents of the object depend on the channel and the event_type.",
                        "type": "object"
                      }
                    }
                  }
                }
              }
            }
          }
        ]
      },
      "UnsupportedCallbackEvent": {
        "description": "Some of the callbacks received from the underlying channels might be specific to a single channel or may not have a proper mapping in Conversation API yet.",
        "allOf": [
          {
            "$ref": "#/components/schemas/CallbackEventCommon"
          },
          {
            "type": "object",
            "properties": {
              "unsupported_callback": {
                "properties": {
                  "channel": {
                    "$ref": "#/components/schemas/ConversationChannel"
                  },
                  "payload": {
                    "description": "Normally a JSON payload as sent by the channel.",
                    "type": "string"
                  },
                  "processing_mode": {
                    "$ref": "#/components/schemas/ProcessingMode"
                  },
                  "id": {
                    "description": "The message ID.",
                    "type": "string"
                  },
                  "contact_id": {
                    "description": "The ID of the contact. This field is blank if not supported.",
                    "type": "string"
                  },
                  "conversation_id": {
                    "description": "The ID of the conversation this message is part of. This field is blank if not supported.",
                    "type": "string"
                  },
                  "channel_identity": {
                    "$ref": "#/components/schemas/ChannelIdentity"
                  }
                }
              }
            }
          }
        ]
      },
      "SmartConversationsEvent": {
        "description": "When using the Smart Conversations functionality, Machine Learning and Artificial Intelligence analyses are delivered through specific callbacks on the Conversation API.",
        "allOf": [
          {
            "$ref": "#/components/schemas/CallbackEventCommon"
          },
          {
            "type": "object",
            "properties": {
              "smart_conversation_notification": {
                "type": "object",
                "properties": {
                  "contact_id": {
                    "description": "The unique ID of the contact that sent the message.",
                    "type": "string"
                  },
                  "channel_identity": {
                    "description": "The channel-specific identifier for the contact.",
                    "type": "string"
                  },
                  "channel": {
                    "$ref": "#/components/schemas/ConversationChannel"
                  },
                  "message_id": {
                    "description": "The unique ID of the corresponding message.",
                    "type": "string"
                  },
                  "conversation_id": {
                    "description": "The ID of the conversation the app message is part of.",
                    "type": "string"
                  },
                  "analysis_results": {
                    "$ref": "#/components/schemas/AnalysisResult"
                  }
                }
              }
            }
          }
        ]
      },
      "AnalysisResult": {
        "description": "The analysis provided by the Smart Conversations machine learning engine(s). The contents of the object are determined by the functionalities that are enabled for your solution.",
        "type": "object",
        "properties": {
          "ml_sentiment_result": {
            "description": "An array that contains the analyses of the sentiments of the corresponding messages.",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/MachineLearningSentimentResult"
            }
          },
          "ml_nlu_result": {
            "description": "An array that contains the analyses of the intentions of, and entities within, the corresponding messages.",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/MachineLearningNLUResult"
            }
          },
          "ml_image_recognition_result": {
            "description": "An array that contains the image recognition analyses of the images identified in the corresponding messages.",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/MachineLearningImageRecognitionResult"
            }
          },
          "ml_pii_result": {
            "description": "An array that contains the PII analysis of the corresponding messages.",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/MachineLearningPIIResult"
            }
          },
          "ml_offensive_analysis_result": {
            "$ref": "#/components/schemas/MachineLearningOffensiveAnalysisResult"
          }
        }
      },
      "Sentiment": {
        "description": "The most probable sentiment of the analyzed text.",
        "type": "string",
        "x-enumDescriptions": {
          "positive": "The sentiment of the text is most likely positive.",
          "negative": "The sentiment of the text is most likely negative.",
          "neutral": "The sentiment of the text is most likely neutral."
        },
        "enum": [
          "positive",
          "negative",
          "neutral"
        ]
      },
      "MachineLearningSentimentResult": {
        "type": "object",
        "properties": {
          "message": {
            "description": "The message text that was analyzed.",
            "type": "string"
          },
          "results": {
            "description": "An array of JSON objects made up of sentiment and score pairs, where the score represents the likelihood that the message communicates the corresponding sentiment.",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SentimentResult"
            }
          }
        },
        "allOf": [
          {
            "$ref": "#/components/schemas/SentimentResult"
          }
        ]
      },
      "SentimentResult": {
        "type": "object",
        "properties": {
          "sentiment": {
            "$ref": "#/components/schemas/Sentiment"
          },
          "score": {
            "description": "The likelihood that the assigned sentiment represents the emotional context of the analyzed text. 1 is the maximum value, representing the highest likelihood that the message text matches the sentiment, and 0 is the minimum value, representing the lowest likelihood that the message text matches the sentiment.",
            "type": "number",
            "format": "float"
          }
        }
      },
      "MachineLearningNLUResult": {
        "type": "object",
        "properties": {
          "message": {
            "description": "The message text that was analyzed.",
            "type": "string"
          },
          "results": {
            "description": "An array of JSON objects made up of intent and score pairs, where the score represents the likelihood that the message has the corresponding intent.",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/IntentResult"
            }
          }
        },
        "allOf": [
          {
            "$ref": "#/components/schemas/IntentResult"
          }
        ]
      },
      "IntentResult": {
        "type": "object",
        "properties": {
          "intent": {
            "description": "The most probable intent of the analyzed text. For example, chitchat.greeting, chitchat.bye, chitchat.compliment, chitchat.how_are_you, or general.yes_or_agreed.",
            "type": "string"
          },
          "score": {
            "description": "The likelihood that the assigned intent represents the purpose of the analyzed text. 1 is the maximum value, representing the highest likelihood that the message text matches the intent, and 0 is the minimum value, representing the lowest likelihood that the message text matches the intent.",
            "type": "number",
            "format": "float"
          }
        }
      },
      "MachineLearningImageRecognitionResult": {
        "type": "object",
        "properties": {
          "url": {
            "description": "The URL of the image that was processed.",
            "type": "string"
          },
          "document_image_classification": {
            "$ref": "#/components/schemas/DocumentImageClassification"
          },
          "optical_character_recognition": {
            "$ref": "#/components/schemas/OpticalCharacterRecognition"
          },
          "document_field_classification": {
            "$ref": "#/components/schemas/DocumentFieldClassification"
          }
        }
      },
      "DocumentImageClassification": {
        "description": "An object that identifies a document type within the image, along with a confidence level for that document type.",
        "type": "object",
        "properties": {
          "doc_type": {
            "description": "The document type that the analyzed image most likely contains.",
            "type": "string"
          },
          "confidence": {
            "description": "The likelihood that the analyzed image contains the assigned document type. 1 is the maximum value, representing the highest likelihood that the analyzed image contains the assigned document type, and 0 is the minimum value, representing the lowest likelihood that the analyzed image contains the assigned document type.",
            "type": "number",
            "format": "float"
          }
        }
      },
      "OpticalCharacterRecognition": {
        "description": "An object containing a result array that reports the machine learning engine's character extraction results.",
        "type": "object",
        "properties": {
          "result": {
            "description": "The result of the OCR process.",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/OpticalCharacterRecognitionData"
            }
          }
        }
      },
      "OpticalCharacterRecognitionData": {
        "type": "object",
        "properties": {
          "data": {
            "description": "The data array contains the string(s) identified in one section of an analyzed image.",
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        }
      },
      "DocumentFieldClassification": {
        "description": "An object containing a result object that reports on all identified fields, as well as the values assigned to those fields.",
        "type": "object",
        "properties": {
          "result": {
            "description": "The result of the Document Field Classification process",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/DocumentFieldClassificationData"
            }
          }
        }
      },
      "DocumentFieldClassificationData": {
        "type": "object",
        "additionalProperties": {
          "type": "object",
          "properties": {
            "data": {
              "description": "The data array contains the string(s) assigned to the corresponding document field.",
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          }
        }
      },
      "MachineLearningPIIResult": {
        "description": "An object that contains the PII analysis of the corresponding messages.",
        "type": "object",
        "properties": {
          "message": {
            "description": "The message text that was analyzed.",
            "type": "string"
          },
          "masked": {
            "description": "The redacted message text in which sensitive information was replaced with appropriate masks. A MISC mask is applied to a term that has been identified as PII, but with low confidence regarding which type of mask to assign.",
            "type": "string"
          }
        }
      },
      "MachineLearningOffensiveAnalysisResult": {
        "description": "An array that contains the analyses of the offenses of the corresponding messages.",
        "type": "array",
        "items": {
          "$ref": "#/components/schemas/OffensiveAnalysis"
        }
      },
      "OffensiveAnalysis": {
        "type": "object",
        "properties": {
          "message": {
            "description": "Either the message text or the URL of the image that was analyzed.",
            "type": "string"
          },
          "url": {
            "description": "URL of the image that was analyzed.",
            "type": "string"
          },
          "evaluation": {
            "description": "A label, either SAFE or UNSAFE, that classifies the analyzed content.",
            "type": "string",
            "x-enumDescriptions": {
              "SAFE": "The analysis of the content indicates that it is most likely safe.",
              "UNSAFE": "The analysis of the content indicates that it is most likely unsafe."
            },
            "enum": [
              "SAFE",
              "UNSAFE"
            ]
          },
          "score": {
            "description": "The likelihood that the assigned evaluation represents the analyzed message correctly. 1 is the maximum value, representing the highest likelihood that the content of the message matches the evaluation. 0 is the minimum value, representing the lowest likelihood that the content of the message matches the evaluation.",
            "type": "number",
            "format": "float"
          }
        }
      },
      "RecordNotificationEvent": {
        "required": [
          "entityId",
          "recordStatus",
          "processingMode"
        ],
        "allOf": [
          {
            "$ref": "#/components/schemas/CallbackEventCommon"
          },
          {
            "type": "object",
            "properties": {
              "record_notification": {
                "type": "object",
                "properties": {
                  "entity_id": {
                    "description": "The ID of the entity.",
                    "type": "string"
                  },
                  "record_status": {
                    "description": "Record status for a specific entity",
                    "type": "string",
                    "x-enumDescriptions": {
                      "RECORD_STATUS_UNSPECIFIED": "The record status is unknown.",
                      "EVENT_RECORD_STORED": "The record for the entity has been stored."
                    },
                    "enum": [
                      "RECORD_STATUS_UNSPECIFIED",
                      "EVENT_RECORD_STORED"
                    ]
                  },
                  "channel_identity": {
                    "$ref": "#/components/schemas/ChannelIdentity"
                  },
                  "contact_id": {
                    "description": "The ID of the contact. Will not be present for apps in Dispatch Mode.",
                    "type": "string"
                  },
                  "conversation_id": {
                    "description": "The ID of the conversation. Will not be present for apps in Dispatch Mode.",
                    "type": "string"
                  },
                  "reason": {
                    "$ref": "#/components/schemas/Reason"
                  },
                  "processing_mode": {
                    "$ref": "#/components/schemas/ProcessingMode"
                  }
                }
              }
            }
          }
        ]
      },
      "ConversationWebhookEvent": {
        "type": "object",
        "oneOf": [
          {
            "$ref": "#/components/schemas/MessageInboundEvent"
          },
          {
            "$ref": "#/components/schemas/MessageInboundSmartConversationRedactionEvent"
          },
          {
            "$ref": "#/components/schemas/MessageSubmitEvent"
          },
          {
            "$ref": "#/components/schemas/MessageDeliveryReceiptEvent"
          },
          {
            "$ref": "#/components/schemas/EventInbound"
          },
          {
            "$ref": "#/components/schemas/EventDelivery"
          },
          {
            "$ref": "#/components/schemas/ConversationStartEvent"
          },
          {
            "$ref": "#/components/schemas/ConversationStopEvent"
          },
          {
            "$ref": "#/components/schemas/ConversationDeleteEvent"
          },
          {
            "$ref": "#/components/schemas/ContactCreateEvent"
          },
          {
            "$ref": "#/components/schemas/ContactDeleteEvent"
          },
          {
            "$ref": "#/components/schemas/ContactMergeEvent"
          },
          {
            "$ref": "#/components/schemas/ContactUpdateEvent"
          },
          {
            "$ref": "#/components/schemas/ContactIdentitiesDuplicationEvent"
          },
          {
            "$ref": "#/components/schemas/CapabilityEvent"
          },
          {
            "$ref": "#/components/schemas/OptInEvent"
          },
          {
            "$ref": "#/components/schemas/OptOutEvent"
          },
          {
            "$ref": "#/components/schemas/ChannelEvent"
          },
          {
            "$ref": "#/components/schemas/SmartConversationsEvent"
          },
          {
            "$ref": "#/components/schemas/RecordNotificationEvent"
          },
          {
            "$ref": "#/components/schemas/UnsupportedCallbackEvent"
          }
        ]
      }
    },
    "securitySchemes": {
      "Basic": {
        "type": "http",
        "scheme": "basic",
        "description": "For more information about basic authentication, see [Basic Authentication](https://developers.sinch.com/docs/conversation/api-reference/#authentication)."
      },
      "oAuth2": {
        "type": "oauth2",
        "description": "The user name and password are your client_id and key_secret from the [Access keys sections](https://dashboard.sinch.com/settings/access-keys)",
        "flows": {
          "clientCredentials": {
            "tokenUrl": "https://auth.sinch.com/oauth2/token",
            "scopes": {}
          }
        }
      }
    }
  },
  "x-readme": {
    "proxy-enabled": true,
    "samples-enabled": true
  }
}