Messages

Manage messages in a specific campaign conversation.

Available methods

    • POST /conversations/{conversation_id}/messages Post a new conversation message

      Post a new conversation message

      POST /conversations/{conversation_id}/messages

      Post a new message to a conversation.

      Path parameters

      conversation_id The unique id for the conversation.

      Request body parameters

      from_email Type: String Title: From Email Read only: false A label representing the email of the sender of this message
      subject Type: String Title: Subject Read only: false The subject of this message
      message Type: String Title: Message Read only: false The plain-text content of the message
      read Type: Boolean Title: Read Read only: false Whether this message has been marked as read

      Response body parameters

      id Type: String Title: ID Read only: true A string that uniquely identifies this message
      conversation_id Type: String Title: Conversation ID Read only: true A string that identifies this message’s conversation
      list_id Type: Integer Title: Campaign ID Read only: true The unique identifier of the list for this conversation.
      from_label Type: String Title: From Label Read only: true A label representing the sender of this message
      from_email Type: String Title: From Email Read only: false A label representing the email of the sender of this message
      subject Type: String Title: Subject Read only: false The subject of this message
      message Type: String Title: Message Read only: false The plain-text content of the message
      read Type: Boolean Title: Read Read only: false Whether this message has been marked as read
      timestamp Type: String Title: Timestamp Read only: true The date and time the message was either sent or received.
      _links Type: Array Title: Links Read only: true A list of link types and descriptions for the API schema documents.
      Show properties
      rel Type: String Title: Rel Read only: true As with an HTML ‘rel’ attribute, this describes the type of link.
      href Type: String Title: Href Read only: true This property contains a fully-qualified URL that can be called to retrieve the linked resource or perform the linked action.
      method Type: String Title: Method Read only: true The HTTP method that should be used when accessing the URL defined in ‘href’.
      Possible Values:
      • GET
      • POST
      • PUT
      • PATCH
      • DELETE
      • OPTIONS
      • HEAD
      targetSchema Type: String Title: Target Schema Read only: true For GETs, this is a URL representing the schema that the response should conform to.
      schema Type: String Title: Schema Read only: true For HTTP methods that can receive bodies (POST and PUT), this is a URL representing the schema that the body should conform to.

      Example request

      
      curl --request POST \
      --url 'https://usX.api.mailchimp.com/3.0/conversations/fa8c387539/messages' \
      --user 'anystring:apikey' \
      --header 'content-type: application/json' \
      --data '{"from_email": "urist.mcvankab@freddiesjokes.com", "read": false, "message": "I love Freddie'\''s jokes!"}' \
      --include
                                      

      Example response

      
      HTTP/1.1 200 OK
      Server: nginx
      Content-Type: application/json; charset=utf-8
      Content-Length: 794
      Vary: Accept-Encoding
      X-Request-Id: 48fba83b-d996-46c6-97b5-956ec9fc19e8
      Link: <https://api.mailchimp.com/schema/3.0/Conversations/Messages/Instance.json>; rel="describedBy"
      Date: Tue, 15 Sep 2015 20:41:53 GMT
      Connection: keep-alive
      
      
      {
        "id": "d7cd9cd4b8",
        "conversation_id": "fa8c387539",
        "list_id": 790425,
        "from_label": "Freddie Jokes (freddie@freddiesjokes.com)",
        "from_email": "urist.mcvankab@freddiesjokes.com",
        "subject": "",
        "message": "I love Freddie's jokes!",
        "read": false,
        "timestamp": "2015-09-15 20:41:53",
        "_links": [
          {
            "rel": "self",
            "href": "https://usX.api.mailchimp.com/3.0/conversations/fa8c387539/messages/d7cd9cd4b8",
            "method": "GET",
            "targetSchema": "https://api.mailchimp.com/schema/3.0/Conversations/Messages/Instance.json"
          },
          {
            "rel": "parent",
            "href": "https://usX.api.mailchimp.com/3.0/conversations/fa8c387539/messages",
            "method": "GET",
            "targetSchema": "https://api.mailchimp.com/schema/3.0/Conversations/Messages/Collection.json",
            "schema": "https://api.mailchimp.com/schema/3.0/CollectionLinks/Conversations/Messages.json"
          }
        ]
      }
                                      

      Error response

      type Type: String Title: Problem Type Read only: false An absolute URI that identifies the problem type. When dereferenced, it should provide human-readable documentation for the problem type.
      title Type: String Title: Error Title Read only: false A short, human-readable summary of the problem type. It shouldn’t change based on the occurrence of the problem, except for purposes of localization.
      status Type: Integer Title: HTTP Status Code Read only: false The HTTP status code (RFC2616, Section 6) generated by the origin server for this occurrence of the problem.
      detail Type: String Title: Error Message Read only: false A human-readable explanation specific to this occurrence of the problem. Learn more about errors.
      instance Type: String Title: Instance ID Read only: false A string that identifies this specific occurrence of the problem. Please provide this ID when contacting support.
    • Get conversation messages

      GET /conversations/{conversation_id}/messages

      Get messages from a specific conversation.

      Path parameters

      conversation_id The unique id for the conversation.

      Query string parameters

      fields Type: Array Title: Fields Read only: false A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.
      exclude_fields Type: Array Title: Exclude Fields Read only: false A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.
      is_read Type: String Title: Is Read Read only: false Whether a conversation message has been marked as read.
      Possible Values:
      • true
      • false
      before_timestamp Type: String Title: Before Timestamp Read only: false Restrict the response to messages created before the set time. We recommend ISO 8601 time format: 2015-10-21T15:41:36+00:00.
      since_timestamp Type: String Title: Since Timestamp Read only: false Restrict the response to messages created after the set time. We recommend ISO 8601 time format: 2015-10-21T15:41:36+00:00.

      Response body parameters

      conversation_messages Type: Array Title: Conversation Messages Read only: false An array of objects, each representing a conversation messages resources.
      Show properties
      id Type: String Title: ID Read only: true A string that uniquely identifies this message
      conversation_id Type: String Title: Conversation ID Read only: true A string that identifies this message’s conversation
      list_id Type: Integer Title: Campaign ID Read only: true The unique identifier of the list for this conversation.
      from_label Type: String Title: From Label Read only: true A label representing the sender of this message
      from_email Type: String Title: From Email Read only: false A label representing the email of the sender of this message
      subject Type: String Title: Subject Read only: false The subject of this message
      message Type: String Title: Message Read only: false The plain-text content of the message
      read Type: Boolean Title: Read Read only: false Whether this message has been marked as read
      timestamp Type: String Title: Timestamp Read only: true The date and time the message was either sent or received.
      _links Type: Array Title: Links Read only: true A list of link types and descriptions for the API schema documents.
      Show properties
      rel Type: String Title: Rel Read only: true As with an HTML ‘rel’ attribute, this describes the type of link.
      href Type: String Title: Href Read only: true This property contains a fully-qualified URL that can be called to retrieve the linked resource or perform the linked action.
      method Type: String Title: Method Read only: true The HTTP method that should be used when accessing the URL defined in ‘href’.
      Possible Values:
      • GET
      • POST
      • PUT
      • PATCH
      • DELETE
      • OPTIONS
      • HEAD
      targetSchema Type: String Title: Target Schema Read only: true For GETs, this is a URL representing the schema that the response should conform to.
      schema Type: String Title: Schema Read only: true For HTTP methods that can receive bodies (POST and PUT), this is a URL representing the schema that the body should conform to.
      conversation_id Type: String Title: Conversation ID Read only: false A string that identifies this conversation.
      total_items Type: Integer Title: Item Count Read only: false The total number of items matching the query regardless of pagination.
      _links Type: Array Title: Links Read only: true A list of link types and descriptions for the API schema documents.
      Show properties
      rel Type: String Title: Rel Read only: true As with an HTML ‘rel’ attribute, this describes the type of link.
      href Type: String Title: Href Read only: true This property contains a fully-qualified URL that can be called to retrieve the linked resource or perform the linked action.
      method Type: String Title: Method Read only: true The HTTP method that should be used when accessing the URL defined in ‘href’.
      Possible Values:
      • GET
      • POST
      • PUT
      • PATCH
      • DELETE
      • OPTIONS
      • HEAD
      targetSchema Type: String Title: Target Schema Read only: true For GETs, this is a URL representing the schema that the response should conform to.
      schema Type: String Title: Schema Read only: true For HTTP methods that can receive bodies (POST and PUT), this is a URL representing the schema that the body should conform to.

      Example request

      
      curl --request GET \
      --url 'https://usX.api.mailchimp.com/3.0/conversations/fa8c387539/messages' \
      --user 'anystring:apikey' \
      --include
                                      

      Example response

      
      HTTP/1.1 200 OK
      Server: nginx
      Content-Type: application/json; charset=utf-8
      Content-Length: 4218
      Vary: Accept-Encoding
      X-Request-Id: 2d553790-2ee4-4bd9-b16d-05cbc5e7acb6
      Link: <https://api.mailchimp.com/schema/3.0/Conversations/Messages/Collection.json>; rel="describedBy"
      Date: Tue, 15 Sep 2015 19:44:56 GMT
      Connection: keep-alive
      
      
      {
        "conversation_messages": [
          {
            "id": "fa8c387539",
            "conversation_id": "363a443a3f",
            "list_id": 790425,
            "from_label": "freddie@freddiesjokes.com",
            "from_email": "freddie@freddiesjokes.com",
            "subject": "Re: I have a rice crispy treat watermelon farm.",
            "message": "We&#39;re so glad you like it! Stay tuned for his next joke coming Monday.",
            "read": true,
            "timestamp": "2015-09-15 19:17:59",
            "_links": [
              {
                "rel": "self",
                "href": "https://usX.api.mailchimp.com/3.0/conversations/363a443a3f/messages/fa8c387539",
                "method": "GET",
                "targetSchema": "https://api.mailchimp.com/schema/3.0/Conversations/Messages/Instance.json"
              },
              {
                "rel": "parent",
                "href": "https://usX.api.mailchimp.com/3.0/conversations/363a443a3f/messages",
                "method": "GET",
                "targetSchema": "https://api.mailchimp.com/schema/3.0/Conversations/Messages/Collection.json",
                "schema": "https://api.mailchimp.com/schema/3.0/CollectionLinks/Conversations/Messages.json"
              }
            ]
          },
          {
            "id": "363a443a3f",
            "conversation_id": "363a443a3f",
            "list_id": 790425,
            "from_label": "urist.mcvankab@freddiesjokes.com",
            "from_email": "urist.mcvankab@freddiesjokes.com",
            "subject": "Re: I have a rice crispy treat watermelon farm.",
            "message": "I love this joke! Freddie is the funniest!!\n\n-Urist",
            "read": true,
            "timestamp": "2015-09-15 19:17:19",
            "_links": [
              {
                "rel": "self",
                "href": "https://usX.api.mailchimp.com/3.0/conversations/363a443a3f/messages/363a443a3f",
                "method": "GET",
                "targetSchema": "https://api.mailchimp.com/schema/3.0/Conversations/Messages/Instance.json"
              },
              {
                "rel": "parent",
                "href": "https://usX.api.mailchimp.com/3.0/conversations/363a443a3f/messages",
                "method": "GET",
                "targetSchema": "https://api.mailchimp.com/schema/3.0/Conversations/Messages/Collection.json",
                "schema": "https://api.mailchimp.com/schema/3.0/CollectionLinks/Conversations/Messages.json"
              }
            ]
          }
        ],
        "total_items": 2,
        "_links": [
          {
            "rel": "self",
            "href": "https://usX.api.mailchimp.com/3.0/conversations/fa8c387539/messages",
            "method": "GET",
            "targetSchema": "https://api.mailchimp.com/schema/3.0/Conversations/Messages/Collection.json",
            "schema": "https://api.mailchimp.com/schema/3.0/CollectionLinks/Conversations/Messages.json"
          },
          {
            "rel": "parent",
            "href": "https://usX.api.mailchimp.com/3.0/conversations/fa8c387539",
            "method": "GET",
            "targetSchema": "https://api.mailchimp.com/schema/3.0/Conversations/Instance.json"
          },
          {
            "rel": "create",
            "href": "https://usX.api.mailchimp.com/3.0/conversations/fa8c387539/messages",
            "method": "POST",
            "schema": "https://api.mailchimp.com/schema/3.0/Conversations/Messages/Instance.json"
          }
        ]
      }
                                      

      Error response

      type Type: String Title: Problem Type Read only: false An absolute URI that identifies the problem type. When dereferenced, it should provide human-readable documentation for the problem type.
      title Type: String Title: Error Title Read only: false A short, human-readable summary of the problem type. It shouldn’t change based on the occurrence of the problem, except for purposes of localization.
      status Type: Integer Title: HTTP Status Code Read only: false The HTTP status code (RFC2616, Section 6) generated by the origin server for this occurrence of the problem.
      detail Type: String Title: Error Message Read only: false A human-readable explanation specific to this occurrence of the problem. Learn more about errors.
      instance Type: String Title: Instance ID Read only: false A string that identifies this specific occurrence of the problem. Please provide this ID when contacting support.

      Get a specific conversation message

      GET /conversations/{conversation_id}/messages/{message_id}

      Get an individual message in a conversation.

      Path parameters

      conversation_id The unique id for the conversation.
      message_id The unique id for the conversation message.

      Query string parameters

      fields Type: Array Title: Fields Read only: false A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.
      exclude_fields Type: Array Title: Exclude Fields Read only: false A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.

      Response body parameters

      id Type: String Title: ID Read only: true A string that uniquely identifies this message
      conversation_id Type: String Title: Conversation ID Read only: true A string that identifies this message’s conversation
      list_id Type: Integer Title: Campaign ID Read only: true The unique identifier of the list for this conversation.
      from_label Type: String Title: From Label Read only: true A label representing the sender of this message
      from_email Type: String Title: From Email Read only: false A label representing the email of the sender of this message
      subject Type: String Title: Subject Read only: false The subject of this message
      message Type: String Title: Message Read only: false The plain-text content of the message
      read Type: Boolean Title: Read Read only: false Whether this message has been marked as read
      timestamp Type: String Title: Timestamp Read only: true The date and time the message was either sent or received.
      _links Type: Array Title: Links Read only: true A list of link types and descriptions for the API schema documents.
      Show properties
      rel Type: String Title: Rel Read only: true As with an HTML ‘rel’ attribute, this describes the type of link.
      href Type: String Title: Href Read only: true This property contains a fully-qualified URL that can be called to retrieve the linked resource or perform the linked action.
      method Type: String Title: Method Read only: true The HTTP method that should be used when accessing the URL defined in ‘href’.
      Possible Values:
      • GET
      • POST
      • PUT
      • PATCH
      • DELETE
      • OPTIONS
      • HEAD
      targetSchema Type: String Title: Target Schema Read only: true For GETs, this is a URL representing the schema that the response should conform to.
      schema Type: String Title: Schema Read only: true For HTTP methods that can receive bodies (POST and PUT), this is a URL representing the schema that the body should conform to.

      Example request

      
      curl --request GET \
      --url 'https://usX.api.mailchimp.com/3.0/conversations/fa8c387539/messages/d7cd9cd4b8' \
      --user 'anystring:apikey' \
      --include
                                      

      Example response

      
      HTTP/1.1 200 OK
      Server: nginx
      Content-Type: application/json; charset=utf-8
      Content-Length: 793
      Vary: Accept-Encoding
      X-Request-Id: 450b13ab-c9e4-42b6-af41-8d726906187a
      Link: <https://api.mailchimp.com/schema/3.0/Conversations/Messages/Instance.json>; rel="describedBy"
      Date: Tue, 15 Sep 2015 20:48:03 GMT
      Connection: keep-alive
      
      
      {
        "id": "d7cd9cd4b8",
        "conversation_id": "fa8c387539",
        "list_id": 790425,
        "from_label": "Freddie Jokes (freddie@freddiesjokes.com)",
        "from_email": "urist.mcvankab@freddiesjokes.com",
        "subject": "",
        "message": "I love Freddie's jokes!",
        "read": true,
        "timestamp": "2015-09-15 20:41:53",
        "_links": [
          {
            "rel": "self",
            "href": "https://usX.api.mailchimp.com/3.0/conversations/fa8c387539/messages/d7cd9cd4b8",
            "method": "GET",
            "targetSchema": "https://api.mailchimp.com/schema/3.0/Conversations/Messages/Instance.json"
          },
          {
            "rel": "parent",
            "href": "https://usX.api.mailchimp.com/3.0/conversations/fa8c387539/messages",
            "method": "GET",
            "targetSchema": "https://api.mailchimp.com/schema/3.0/Conversations/Messages/Collection.json",
            "schema": "https://api.mailchimp.com/schema/3.0/CollectionLinks/Conversations/Messages.json"
          }
        ]
      }
                                      

      Error response

      type Type: String Title: Problem Type Read only: false An absolute URI that identifies the problem type. When dereferenced, it should provide human-readable documentation for the problem type.
      title Type: String Title: Error Title Read only: false A short, human-readable summary of the problem type. It shouldn’t change based on the occurrence of the problem, except for purposes of localization.
      status Type: Integer Title: HTTP Status Code Read only: false The HTTP status code (RFC2616, Section 6) generated by the origin server for this occurrence of the problem.
      detail Type: String Title: Error Message Read only: false A human-readable explanation specific to this occurrence of the problem. Learn more about errors.
      instance Type: String Title: Instance ID Read only: false A string that identifies this specific occurrence of the problem. Please provide this ID when contacting support.