{"command":{"effect":"write","timeoutSeconds":30,"inputSchema":{"type":"object","description":"You can reply to a conversation with a message from an admin or on behalf of a contact, or with a note for admins.\n\n{% admonition type=\"warning\" name=\"Bot replies to inbound email\" %}\nBy default, bot or Operator replies to an inbound email conversation aren't sent to your customer. The reply is stored as an unnotifiable bot comment, and no `seen` receipt is generated until an email is actually delivered.\n\nTo send these replies as outbound emails, reach out to your accounts team to enable the email-reply feature flag for your workspace.\n{% /admonition %}\n\n{% admonition type=\"info\" name=\"Managing a conversation\" %}\nTo close, open, snooze or assign a conversation, use [Manage a conversation](/docs/references/rest-api/api.intercom.io/conversations/manageconversation).\n{% /admonition %}","properties":{"headers":{"type":"object","properties":{"Intercom-Version":{"$ref":"#/definitions/intercom_version","enum":["2.17"]}},"required":[],"additionalProperties":false},"path":{"type":"object","properties":{"conversation_id":{"type":"string","examples":["123 or \"last\""],"description":"The Intercom provisioned identifier for the conversation, or the string `last` to use the most recent conversation of a contact. With `last`, also send the contact's `intercom_user_id`, `user_id` or `email` in the request body, whatever type of request you send. A contact that can't be found returns a `404` error, and a contact with no conversations returns a `422` error."}},"required":["conversation_id"],"additionalProperties":false},"body":{"$ref":"#/definitions/reply_conversation_request","examples":[{"message_type":"comment","type":"user","intercom_user_id":"6762f1571bb69f9f2193bbbb","body":"Thanks again :)"}]}},"required":["path"],"additionalProperties":false,"definitions":{"intercom_version":{"description":"Intercom API version.</br>If you omit the header, the API uses the version set in your app package, and 1.0 if none is set.","type":"string","enum":["1.0","1.1","1.2","1.3","1.4","2.0","2.1","2.2","2.3","2.4","2.5","2.6","2.7","2.8","2.9","2.10","2.11","2.12","2.13","2.14","2.15","2.16","2.17"],"examples":["2.17"]},"reply_conversation_request":{"oneOf":[{"$ref":"#/definitions/contact_reply_conversation_request"},{"$ref":"#/definitions/admin_reply_conversation_request"},{"$ref":"#/definitions/bot_reply_conversation_request"}]},"contact_reply_conversation_request":{"title":"Contact Reply","oneOf":[{"$ref":"#/definitions/contact_reply_intercom_user_id_request"},{"$ref":"#/definitions/contact_reply_email_request"},{"$ref":"#/definitions/contact_reply_user_id_request"}]},"admin_reply_conversation_request":{"title":"Admin Reply","type":"object","description":"Payload of the request to reply on behalf of an admin","properties":{"message_type":{"type":"string","enum":["comment","note","quick_reply"],"examples":["comment"]},"type":{"type":"string","enum":["admin"],"examples":["admin"]},"body":{"type":"string","description":"The text body of the reply. Notes accept some HTML formatting. Must be present for comment and note message types.","examples":["Hello there!"]},"admin_id":{"type":"string","description":"The id of the admin who is authoring the comment.","examples":["3156780"]},"created_at":{"type":"integer","description":"The time the reply was created. If not provided, the current time will be used.","examples":[1590000000]},"reply_options":{"title":"Quick Reply Options","type":"array","description":"The quick reply options to display to the end user. Must be present for quick_reply message types.","items":{"$ref":"#/definitions/quick_reply_option"}},"attachment_urls":{"type":"array","description":"A list of image URLs that will be added as attachments. You can include up to 10 URLs.","items":{"type":"string","format":"uri"},"maxItems":10},"attachment_files":{"type":"array","description":"A list of files that will be added as attachments. You can include up to 10 files","items":{"$ref":"#/definitions/conversation_attachment_files"},"maxItems":10},"skip_notifications":{"type":"boolean","description":"Option to disable notifications when replying to a conversation.","examples":[true]},"assignee_id":{"type":"string","description":"The `id` of the admin or team to assign the conversation to with this reply.","examples":["4324241"]},"skip_reopen":{"type":"boolean","default":false,"description":"When true, a reply that assigns the conversation (a `comment` with `assignee_id`) doesn't reopen or unsnooze it. A plain `comment` still reopens a closed conversation. Available from API version 2.17.","examples":[true]}},"required":["message_type","type","admin_id"]},"bot_reply_conversation_request":{"title":"Bot Reply","type":"object","description":"Payload of the request to reply on behalf of a bot","properties":{"message_type":{"type":"string","enum":["comment","note","quick_reply"],"examples":["comment"]},"type":{"type":"string","enum":["bot"],"examples":["bot"]},"bot_id":{"type":"string","description":"The id of the bot that is authoring the reply. A bot that doesn't exist returns a `404` error.","examples":["3156780"]},"body":{"type":"string","description":"The text body of the reply. Must be present for comment and note message types.","examples":["Hello there!"]},"created_at":{"type":"integer","description":"The time the reply was created. If not provided, the current time will be used.","examples":[1590000000]},"reply_options":{"title":"Quick Reply Options","type":"array","description":"The quick reply options to display to the end user. Must be present for quick_reply message types.","items":{"$ref":"#/definitions/quick_reply_option"}},"attachment_urls":{"type":"array","description":"A list of image URLs that will be added as attachments. You can include up to 10 URLs.","items":{"type":"string","format":"uri"},"maxItems":10},"skip_notifications":{"type":"boolean","description":"Option to disable notifications when replying to a conversation. Available from API version 2.15.","examples":[true]}},"required":["message_type","type","bot_id"]},"contact_reply_intercom_user_id_request":{"title":"Intercom User ID","type":"object","description":"Payload of the request to reply on behalf of a contact using their `intercom_user_id`","allOf":[{"$ref":"#/definitions/contact_reply_base_request"}],"properties":{"intercom_user_id":{"type":"string","description":"The identifier for the contact as given by Intercom."},"attachment_files":{"type":"array","description":"A list of files that will be added as attachments.","items":{"$ref":"#/definitions/conversation_attachment_files"}}},"required":["intercom_user_id"]},"contact_reply_email_request":{"title":"Email","type":"object","description":"Payload of the request to reply on behalf of a contact using their `email`","properties":{"email":{"type":"string","description":"The email you have defined for the user."},"attachment_files":{"type":"array","description":"A list of files that will be added as attachments.","items":{"$ref":"#/definitions/conversation_attachment_files"}}},"allOf":[{"$ref":"#/definitions/contact_reply_base_request"}],"required":["email"]},"contact_reply_user_id_request":{"title":"User ID","type":"object","description":"Payload of the request to reply on behalf of a contact using their `user_id`","allOf":[{"$ref":"#/definitions/contact_reply_base_request"}],"properties":{"user_id":{"type":"string","description":"The external_id you have defined for the contact."},"attachment_files":{"type":"array","description":"A list of files that will be added as attachments. You can include up to 10 files.","items":{"$ref":"#/definitions/conversation_attachment_files"},"maxItems":10}},"required":["user_id"]},"quick_reply_option":{"title":"Quick Reply Option","type":"object","properties":{"text":{"type":"string","description":"The text to display in this quick reply option."},"uuid":{"type":"string","format":"uuid","description":"A unique identifier for this quick reply option. This value will be available within the metadata of the comment conversation part that is created when a user clicks on this reply option."}},"required":["text","uuid"]},"conversation_attachment_files":{"title":"Conversation attachment files","type":"object","description":"Properties of the attachment files in a conversation part","properties":{"content_type":{"type":"string","description":"The content type of the file","examples":["application/json"]},"data":{"type":"string","description":"The base64 encoded file data.","examples":["ewogICJ0ZXN0IjogMQp9"]},"name":{"type":"string","description":"The name of the file.","examples":["test.json"]}}},"contact_reply_base_request":{"title":"Contact Reply Base Object","type":"object","properties":{"message_type":{"type":"string","enum":["comment"]},"type":{"type":"string","enum":["user"]},"body":{"type":"string","description":"The text body of the comment. Required unless the reply includes attachments. Always required when replying to a ticket."},"created_at":{"type":"integer","description":"The time the reply was created. If not provided, the current time will be used.","examples":[1590000000]},"attachment_urls":{"title":"Attachment URLs","type":"array","description":"A list of image URLs that will be added as attachments. You can include up to 10 URLs.","items":{"type":"string","format":"uri"},"maxItems":10},"reply_options":{"title":"Contact Quick Reply","type":"array","description":"The quick reply selection the contact wishes to respond with. These map to buttons displayed in the Messenger UI if sent by a bot, or the reply options sent by an Admin via the API.","items":{"title":"Quick Reply Option","type":"object","properties":{"text":{"type":"string","description":"The text of the chosen reply option."},"uuid":{"type":"string","format":"uuid","description":"The unique identifier for the quick reply option selected."}},"required":["text","uuid"]}}},"required":["message_type","type"]}}},"name":"Reply to a conversation","id":"intercom.replyconversation","example":{"path":{"conversation_id":"123 or \"last\""}},"maxRequests":1,"summary":false}}