{"command":{"effect":"write","timeoutSeconds":30,"inputSchema":{"type":"object","description":"You can create a conversation that has been initiated by a contact (ie. user or lead).\nThe conversation can be an in-app message only.\n\n{% admonition type=\"info\" name=\"Sending for visitors\" %}\nYou can also send a message from a visitor by specifying their `id` value in the `from` field, along with a `type` field value of `lead`.\nThis visitor will be automatically converted to a contact with a lead role once the conversation is created.\n{% /admonition %}\n\nThis will return the Message model that has been created.\n\n","properties":{"headers":{"type":"object","properties":{"Intercom-Version":{"$ref":"#/definitions/intercom_version","enum":["2.17"]}},"required":[],"additionalProperties":false},"body":{"$ref":"#/definitions/create_conversation_request","examples":[{"from":{"type":"user","id":"6762f11b1bb69f9f2193bba3"},"body":"Hello there"}]}},"required":[],"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"]},"create_conversation_request":{"description":"Conversations are how you can communicate with users in Intercom. They are created when a contact replies to an outbound message, or when one admin directly sends a message to a single contact.","type":"object","title":"Create Conversation Request Payload","properties":{"from":{"type":"object","properties":{"type":{"type":"string","enum":["lead","user"],"description":"The role associated to the contact - user or lead.","examples":["user"]},"id":{"type":"string","description":"The identifier for the contact which is given by Intercom. Provide one of `id`, `user_id` or `email`. If you send more than one, `id` is used first, then `user_id`.","minLength":24,"maxLength":24,"examples":["536e564f316c83104c000020"]},"user_id":{"type":"string","description":"The external identifier you gave the user. Matches users only; for a lead, use `id` or `email`.","examples":["25"]},"email":{"type":"string","description":"The contact's email. Matches a user or a lead, depending on `type`. Used only when `user_id` isn't sent. If several leads share the email and it's the only identifier sent, the request fails with `multiple_users`; use `id` instead.","examples":["joe@example.com"]}},"required":["type"]},"body":{"type":"string","description":"The content of the message. HTML is not supported.","examples":["Hello"]},"subject":{"type":"string","description":"The title of the email. Only applicable if the message type is email.","examples":["Thanks for everything"]},"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},"created_at":{"type":"integer","format":"date-time","description":"The time the conversation was created as a UTC Unix timestamp. If not provided, the current time will be used. This field is only recommneded for migrating past conversations from another source into Intercom.","examples":[1671028894]},"brand_id":{"type":"string","description":"The unique identifier of the brand to associate with this conversation.","examples":["123"]}},"required":["from","body"]}}},"name":"Creates a conversation","id":"intercom.createconversation","example":{},"maxRequests":1,"summary":false}}