Chilkat Online Tools

SQL Server / Salesforce Platform APIs / User Messages, General

Back to Collection Items

-- Important: See this note about string length limitations for strings returned by sp_OAMethod calls.
--
CREATE PROCEDURE ChilkatSample
AS
BEGIN
    DECLARE @hr int
    DECLARE @iTmp0 int
    -- Important: Do not use nvarchar(max).  See the warning about using nvarchar(max).
    DECLARE @sTmp0 nvarchar(4000)
    -- This example assumes the Chilkat API to have been previously unlocked.
    -- See Global Unlock Sample for sample code.

    DECLARE @http int
    EXEC @hr = sp_OACreate 'Chilkat_9_5_0.Http', @http OUT
    IF @hr <> 0
    BEGIN
        PRINT 'Failed to create ActiveX component'
        RETURN
    END

    DECLARE @success int

    -- Adds the "Authorization: Bearer <access_token>" header.
    EXEC sp_OASetProperty @http, 'AuthToken', '<access_token>'

    DECLARE @resp int
    EXEC sp_OAMethod @http, 'QuickRequest', @resp OUT, 'POST', 'message&recipients=<USER1_ID>,<USER2_ID>'
    EXEC sp_OAGetProperty @http, 'LastMethodSuccess', @iTmp0 OUT
    IF @iTmp0 = 0
      BEGIN
        EXEC sp_OAGetProperty @http, 'LastErrorText', @sTmp0 OUT
        PRINT @sTmp0
        EXEC @hr = sp_OADestroy @http
        RETURN
      END

    DECLARE @sbResponseBody int
    EXEC @hr = sp_OACreate 'Chilkat_9_5_0.StringBuilder', @sbResponseBody OUT

    EXEC sp_OAMethod @resp, 'GetBodySb', @success OUT, @sbResponseBody

    DECLARE @jResp int
    EXEC @hr = sp_OACreate 'Chilkat_9_5_0.JsonObject', @jResp OUT

    EXEC sp_OAMethod @jResp, 'LoadSb', @success OUT, @sbResponseBody
    EXEC sp_OASetProperty @jResp, 'EmitCompact', 0


    PRINT 'Response Body:'
    EXEC sp_OAMethod @jResp, 'Emit', @sTmp0 OUT
    PRINT @sTmp0

    DECLARE @respStatusCode int
    EXEC sp_OAGetProperty @resp, 'StatusCode', @respStatusCode OUT

    PRINT 'Response Status Code = ' + @respStatusCode
    IF @respStatusCode >= 400
      BEGIN

        PRINT 'Response Header:'
        EXEC sp_OAGetProperty @resp, 'Header', @sTmp0 OUT
        PRINT @sTmp0

        PRINT 'Failed.'
        EXEC @hr = sp_OADestroy @resp

        EXEC @hr = sp_OADestroy @http
        EXEC @hr = sp_OADestroy @sbResponseBody
        EXEC @hr = sp_OADestroy @jResp
        RETURN
      END
    EXEC @hr = sp_OADestroy @resp

    -- Sample JSON response:
    -- (Sample code for parsing the JSON response is shown below)

    -- {
    --   "body": {
    --     "isRichText": null,
    --     "messageSegments": [
    --     ],
    --     "text": "This is a private message"
    --   },
    --   "conversationId": "03M...",
    --   "conversationUrl": "/services/data/v58.0/chatter/users/me/conversations/03M...",
    --   "id": "03J...",
    --   "recipients": [
    --     {
    --       "additionalLabel": null,
    --       "communityNickname": "automatedprocess",
    --       "companyName": "Salesforce",
    --       "displayName": "Automated Process",
    --       "firstName": "Automated",
    --       "id": "005...",
    --       "isActive": true,
    --       "isInThisCommunity": true,
    --       "lastName": "Process",
    --       "motif": {
    --         "color": "1B96FF",
    --         "largeIconUrl": "/img/icon/profile64.png",
    --         "mediumIconUrl": "/img/icon/profile32.png",
    --         "smallIconUrl": "/img/icon/profile16.png",
    --         "svgIconUrl": null
    --       },
    --       "mySubscription": null,
    --       "name": "Automated Process",
    --       "outOfOffice": {
    --         "message": ""
    --       },
    --       "photo": {
    --         "fullEmailPhotoUrl": "https://<my_domain>/img/userprofile/default_profile_200_v2.png?fromEmail=1",
    --         "largePhotoUrl": "https://<my_domain>/profilephoto/005/F",
    --         "mediumPhotoUrl": "https://<my_domain>/profilephoto/005/M",
    --         "photoVersionId": null,
    --         "smallPhotoUrl": "https://<my_domain>/profilephoto/005/T",
    --         "standardEmailPhotoUrl": "https://<my_domain>/img/userprofile/default_profile_45_v2.png?fromEmail=1",
    --         "url": "/services/data/v58.0/connect/user-profiles/005.../photo"
    --       },
    --       "reputation": null,
    --       "title": null,
    --       "type": "User",
    --       "url": "/services/data/v58.0/chatter/users/005...",
    --       "userType": "System"
    --     },
    --     {
    --       "additionalLabel": null,
    --       "communityNickname": "User1696423780773910041",
    --       "companyName": "Salesforce",
    --       "displayName": "Name",
    --       "firstName": "FirstName",
    --       "id": "005...",
    --       "isActive": true,
    --       "isInThisCommunity": true,
    --       "lastName": "Name",
    --       "motif": {
    --         "color": "1B96FF",
    --         "largeIconUrl": "/img/icon/profile64.png",
    --         "mediumIconUrl": "/img/icon/profile32.png",
    --         "smallIconUrl": "/img/icon/profile16.png",
    --         "svgIconUrl": null
    --       },
    --       "mySubscription": null,
    --       "name": "Name",
    --       "outOfOffice": {
    --         "message": ""
    --       },
    --       "photo": {
    --         "fullEmailPhotoUrl": "https://<my_domain>/ncsphoto/1wsMlOd3tVC7boygqBO8wMT9KzA0D6tqzpbs-Uw0IogXzXAXaYKJnuWCNQmXymRq?fromEmail=1",
    --         "largePhotoUrl": "https://<my_domain>/profilephoto/729.../F",
    --         "mediumPhotoUrl": "https://<my_domain>/profilephoto/729.../M",
    --         "photoVersionId": "729...",
    --         "smallPhotoUrl": "https://<my_domain>/profilephoto/729.../T",
    --         "standardEmailPhotoUrl": "https://<my_domain>/ncsphoto/1wsMlOd3tVC7boygqBO8wMT9KzA0D6tqzpbs-Uw0Ioi-dtynkoFWsl46as__TDFU?fromEmail=1",
    --         "url": "/services/data/v58.0/connect/user-profiles/005.../photo"
    --       },
    --       "reputation": null,
    --       "title": null,
    --       "type": "User",
    --       "url": "/services/data/v58.0/chatter/users/005...",
    --       "userType": "Internal"
    --     }
    --   ],
    --   "sender": {
    --     "additionalLabel": null,
    --     "communityNickname": "User1696423780773910041",
    --     "companyName": "Salesforce",
    --     "displayName": "Name",
    --     "firstName": "Firstname",
    --     "id": "005...",
    --     "isActive": true,
    --     "isInThisCommunity": true,
    --     "lastName": "Name",
    --     "motif": {
    --       "color": "1B96FF",
    --       "largeIconUrl": "/img/icon/profile64.png",
    --       "mediumIconUrl": "/img/icon/profile32.png",
    --       "smallIconUrl": "/img/icon/profile16.png",
    --       "svgIconUrl": null
    --     },
    --     "mySubscription": null,
    --     "name": "Name",
    --     "outOfOffice": {
    --       "message": ""
    --     },
    --     "photo": {
    --       "fullEmailPhotoUrl": "https://<my_domain>/ncsphoto/1wsMlOd3tVC7boygqBO8wMT9KzA0D6tqzpbs-Uw0IogXzXAXaYKJnuWCNQmXymRq?fromEmail=1",
    --       "largePhotoUrl": "https://<my_domain>/profilephoto/729.../F",
    --       "mediumPhotoUrl": "https://<my_domain>/profilephoto/729.../M",
    --       "photoVersionId": "729...",
    --       "smallPhotoUrl": "https://<my_domain>/profilephoto/729.../T",
    --       "standardEmailPhotoUrl": "https://<my_domain>/ncsphoto/1wsMlOd3tVC7boygqBO8wMT9KzA0D6tqzpbs-Uw0Ioi-dtynkoFWsl46as__TDFU?fromEmail=1",
    --       "url": "/services/data/v58.0/connect/user-profiles/005.../photo"
    --     },
    --     "reputation": null,
    --     "title": null,
    --     "type": "User",
    --     "url": "/services/data/v58.0/chatter/users/005...",
    --     "userType": "Internal"
    --   },
    --   "sendingCommunity": null,
    --   "sentDate": "<datetime>",
    --   "url": "/services/data/v58.0/chatter/users/me/messages/03J..."
    -- }

    -- Sample code for parsing the JSON response...
    -- Use this online tool to generate parsing code from sample JSON: Generate JSON Parsing Code

    DECLARE @additionalLabel nvarchar(4000)

    DECLARE @communityNickname nvarchar(4000)

    DECLARE @companyName nvarchar(4000)

    DECLARE @displayName nvarchar(4000)

    DECLARE @firstName nvarchar(4000)

    DECLARE @isActive int

    DECLARE @isInThisCommunity int

    DECLARE @lastName nvarchar(4000)

    DECLARE @motifColor nvarchar(4000)

    DECLARE @motifLargeIconUrl nvarchar(4000)

    DECLARE @motifMediumIconUrl nvarchar(4000)

    DECLARE @motifSmallIconUrl nvarchar(4000)

    DECLARE @motifSvgIconUrl nvarchar(4000)

    DECLARE @mySubscription nvarchar(4000)

    DECLARE @name nvarchar(4000)

    DECLARE @outOfOfficeMessage nvarchar(4000)

    DECLARE @photoFullEmailPhotoUrl nvarchar(4000)

    DECLARE @photoLargePhotoUrl nvarchar(4000)

    DECLARE @photoMediumPhotoUrl nvarchar(4000)

    DECLARE @photoPhotoVersionId nvarchar(4000)

    DECLARE @photoSmallPhotoUrl nvarchar(4000)

    DECLARE @photoStandardEmailPhotoUrl nvarchar(4000)

    DECLARE @photoUrl nvarchar(4000)

    DECLARE @reputation nvarchar(4000)

    DECLARE @title nvarchar(4000)

    DECLARE @v_type nvarchar(4000)

    DECLARE @userType nvarchar(4000)

    DECLARE @IsRichText nvarchar(4000)
    EXEC sp_OAMethod @jResp, 'StringOf', @IsRichText OUT, 'body.isRichText'
    DECLARE @Text nvarchar(4000)
    EXEC sp_OAMethod @jResp, 'StringOf', @Text OUT, 'body.text'
    DECLARE @conversationId nvarchar(4000)
    EXEC sp_OAMethod @jResp, 'StringOf', @conversationId OUT, 'conversationId'
    DECLARE @conversationUrl nvarchar(4000)
    EXEC sp_OAMethod @jResp, 'StringOf', @conversationUrl OUT, 'conversationUrl'
    DECLARE @id nvarchar(4000)
    EXEC sp_OAMethod @jResp, 'StringOf', @id OUT, 'id'
    DECLARE @AdditionalLabel nvarchar(4000)
    EXEC sp_OAMethod @jResp, 'StringOf', @AdditionalLabel OUT, 'sender.additionalLabel'
    DECLARE @CommunityNickname nvarchar(4000)
    EXEC sp_OAMethod @jResp, 'StringOf', @CommunityNickname OUT, 'sender.communityNickname'
    DECLARE @CompanyName nvarchar(4000)
    EXEC sp_OAMethod @jResp, 'StringOf', @CompanyName OUT, 'sender.companyName'
    DECLARE @DisplayName nvarchar(4000)
    EXEC sp_OAMethod @jResp, 'StringOf', @DisplayName OUT, 'sender.displayName'
    DECLARE @FirstName nvarchar(4000)
    EXEC sp_OAMethod @jResp, 'StringOf', @FirstName OUT, 'sender.firstName'
    DECLARE @Id nvarchar(4000)
    EXEC sp_OAMethod @jResp, 'StringOf', @Id OUT, 'sender.id'
    DECLARE @IsActive int
    EXEC sp_OAMethod @jResp, 'BoolOf', @IsActive OUT, 'sender.isActive'
    DECLARE @IsInThisCommunity int
    EXEC sp_OAMethod @jResp, 'BoolOf', @IsInThisCommunity OUT, 'sender.isInThisCommunity'
    DECLARE @LastName nvarchar(4000)
    EXEC sp_OAMethod @jResp, 'StringOf', @LastName OUT, 'sender.lastName'
    DECLARE @Color nvarchar(4000)
    EXEC sp_OAMethod @jResp, 'StringOf', @Color OUT, 'sender.motif.color'
    DECLARE @LargeIconUrl nvarchar(4000)
    EXEC sp_OAMethod @jResp, 'StringOf', @LargeIconUrl OUT, 'sender.motif.largeIconUrl'
    DECLARE @MediumIconUrl nvarchar(4000)
    EXEC sp_OAMethod @jResp, 'StringOf', @MediumIconUrl OUT, 'sender.motif.mediumIconUrl'
    DECLARE @SmallIconUrl nvarchar(4000)
    EXEC sp_OAMethod @jResp, 'StringOf', @SmallIconUrl OUT, 'sender.motif.smallIconUrl'
    DECLARE @SvgIconUrl nvarchar(4000)
    EXEC sp_OAMethod @jResp, 'StringOf', @SvgIconUrl OUT, 'sender.motif.svgIconUrl'
    DECLARE @MySubscription nvarchar(4000)
    EXEC sp_OAMethod @jResp, 'StringOf', @MySubscription OUT, 'sender.mySubscription'
    DECLARE @Name nvarchar(4000)
    EXEC sp_OAMethod @jResp, 'StringOf', @Name OUT, 'sender.name'
    DECLARE @Message nvarchar(4000)
    EXEC sp_OAMethod @jResp, 'StringOf', @Message OUT, 'sender.outOfOffice.message'
    DECLARE @FullEmailPhotoUrl nvarchar(4000)
    EXEC sp_OAMethod @jResp, 'StringOf', @FullEmailPhotoUrl OUT, 'sender.photo.fullEmailPhotoUrl'
    DECLARE @LargePhotoUrl nvarchar(4000)
    EXEC sp_OAMethod @jResp, 'StringOf', @LargePhotoUrl OUT, 'sender.photo.largePhotoUrl'
    DECLARE @MediumPhotoUrl nvarchar(4000)
    EXEC sp_OAMethod @jResp, 'StringOf', @MediumPhotoUrl OUT, 'sender.photo.mediumPhotoUrl'
    DECLARE @PhotoVersionId nvarchar(4000)
    EXEC sp_OAMethod @jResp, 'StringOf', @PhotoVersionId OUT, 'sender.photo.photoVersionId'
    DECLARE @SmallPhotoUrl nvarchar(4000)
    EXEC sp_OAMethod @jResp, 'StringOf', @SmallPhotoUrl OUT, 'sender.photo.smallPhotoUrl'
    DECLARE @StandardEmailPhotoUrl nvarchar(4000)
    EXEC sp_OAMethod @jResp, 'StringOf', @StandardEmailPhotoUrl OUT, 'sender.photo.standardEmailPhotoUrl'
    DECLARE @v_Url nvarchar(4000)
    EXEC sp_OAMethod @jResp, 'StringOf', @v_Url OUT, 'sender.photo.url'
    DECLARE @Reputation nvarchar(4000)
    EXEC sp_OAMethod @jResp, 'StringOf', @Reputation OUT, 'sender.reputation'
    DECLARE @Title nvarchar(4000)
    EXEC sp_OAMethod @jResp, 'StringOf', @Title OUT, 'sender.title'
    DECLARE @v_Type nvarchar(4000)
    EXEC sp_OAMethod @jResp, 'StringOf', @v_Type OUT, 'sender.type'
    DECLARE @senderUrl nvarchar(4000)
    EXEC sp_OAMethod @jResp, 'StringOf', @senderUrl OUT, 'sender.url'
    DECLARE @UserType nvarchar(4000)
    EXEC sp_OAMethod @jResp, 'StringOf', @UserType OUT, 'sender.userType'
    DECLARE @sendingCommunity nvarchar(4000)
    EXEC sp_OAMethod @jResp, 'StringOf', @sendingCommunity OUT, 'sendingCommunity'
    DECLARE @sentDate nvarchar(4000)
    EXEC sp_OAMethod @jResp, 'StringOf', @sentDate OUT, 'sentDate'
    DECLARE @url nvarchar(4000)
    EXEC sp_OAMethod @jResp, 'StringOf', @url OUT, 'url'
    DECLARE @i int
    SELECT @i = 0
    DECLARE @count_i int
    EXEC sp_OAMethod @jResp, 'SizeOfArray', @count_i OUT, 'body.messageSegments'
    WHILE @i < @count_i
      BEGIN
        EXEC sp_OASetProperty @jResp, 'I', @i
        SELECT @i = @i + 1
      END
    SELECT @i = 0
    EXEC sp_OAMethod @jResp, 'SizeOfArray', @count_i OUT, 'recipients'
    WHILE @i < @count_i
      BEGIN
        EXEC sp_OASetProperty @jResp, 'I', @i
        EXEC sp_OAMethod @jResp, 'StringOf', @additionalLabel OUT, 'recipients[i].additionalLabel'
        EXEC sp_OAMethod @jResp, 'StringOf', @communityNickname OUT, 'recipients[i].communityNickname'
        EXEC sp_OAMethod @jResp, 'StringOf', @companyName OUT, 'recipients[i].companyName'
        EXEC sp_OAMethod @jResp, 'StringOf', @displayName OUT, 'recipients[i].displayName'
        EXEC sp_OAMethod @jResp, 'StringOf', @firstName OUT, 'recipients[i].firstName'
        EXEC sp_OAMethod @jResp, 'StringOf', @id OUT, 'recipients[i].id'
        EXEC sp_OAMethod @jResp, 'BoolOf', @isActive OUT, 'recipients[i].isActive'
        EXEC sp_OAMethod @jResp, 'BoolOf', @isInThisCommunity OUT, 'recipients[i].isInThisCommunity'
        EXEC sp_OAMethod @jResp, 'StringOf', @lastName OUT, 'recipients[i].lastName'
        EXEC sp_OAMethod @jResp, 'StringOf', @motifColor OUT, 'recipients[i].motif.color'
        EXEC sp_OAMethod @jResp, 'StringOf', @motifLargeIconUrl OUT, 'recipients[i].motif.largeIconUrl'
        EXEC sp_OAMethod @jResp, 'StringOf', @motifMediumIconUrl OUT, 'recipients[i].motif.mediumIconUrl'
        EXEC sp_OAMethod @jResp, 'StringOf', @motifSmallIconUrl OUT, 'recipients[i].motif.smallIconUrl'
        EXEC sp_OAMethod @jResp, 'StringOf', @motifSvgIconUrl OUT, 'recipients[i].motif.svgIconUrl'
        EXEC sp_OAMethod @jResp, 'StringOf', @mySubscription OUT, 'recipients[i].mySubscription'
        EXEC sp_OAMethod @jResp, 'StringOf', @name OUT, 'recipients[i].name'
        EXEC sp_OAMethod @jResp, 'StringOf', @outOfOfficeMessage OUT, 'recipients[i].outOfOffice.message'
        EXEC sp_OAMethod @jResp, 'StringOf', @photoFullEmailPhotoUrl OUT, 'recipients[i].photo.fullEmailPhotoUrl'
        EXEC sp_OAMethod @jResp, 'StringOf', @photoLargePhotoUrl OUT, 'recipients[i].photo.largePhotoUrl'
        EXEC sp_OAMethod @jResp, 'StringOf', @photoMediumPhotoUrl OUT, 'recipients[i].photo.mediumPhotoUrl'
        EXEC sp_OAMethod @jResp, 'StringOf', @photoPhotoVersionId OUT, 'recipients[i].photo.photoVersionId'
        EXEC sp_OAMethod @jResp, 'StringOf', @photoSmallPhotoUrl OUT, 'recipients[i].photo.smallPhotoUrl'
        EXEC sp_OAMethod @jResp, 'StringOf', @photoStandardEmailPhotoUrl OUT, 'recipients[i].photo.standardEmailPhotoUrl'
        EXEC sp_OAMethod @jResp, 'StringOf', @photoUrl OUT, 'recipients[i].photo.url'
        EXEC sp_OAMethod @jResp, 'StringOf', @reputation OUT, 'recipients[i].reputation'
        EXEC sp_OAMethod @jResp, 'StringOf', @title OUT, 'recipients[i].title'
        EXEC sp_OAMethod @jResp, 'StringOf', @v_type OUT, 'recipients[i].type'
        EXEC sp_OAMethod @jResp, 'StringOf', @url OUT, 'recipients[i].url'
        EXEC sp_OAMethod @jResp, 'StringOf', @userType OUT, 'recipients[i].userType'
        SELECT @i = @i + 1
      END

    EXEC @hr = sp_OADestroy @http
    EXEC @hr = sp_OADestroy @sbResponseBody
    EXEC @hr = sp_OADestroy @jResp


END
GO

Curl Command

curl -X POST
	-H "Authorization: Bearer <access_token>"
https://domain.com/services/data/v{{version}}/chatter/users/me/messages?text=This is a private message&recipients=<USER1_ID>,<USER2_ID>

Postman Collection Item JSON

{
  "name": "User Messages, General",
  "event": [
    {
      "listen": "prerequest",
      "script": {
        "exec": [
          ""
        ],
        "type": "text/javascript"
      }
    },
    {
      "listen": "test",
      "script": {
        "exec": [
          ""
        ],
        "type": "text/javascript"
      }
    }
  ],
  "request": {
    "method": "POST",
    "header": [
    ],
    "url": {
      "raw": "{{_endpoint}}/services/data/v{{version}}/chatter/users/me/messages?text=This is a private message&recipients=<USER1_ID>,<USER2_ID>",
      "host": [
        "{{_endpoint}}"
      ],
      "path": [
        "services",
        "data",
        "v{{version}}",
        "chatter",
        "users",
        "me",
        "messages"
      ],
      "query": [
        {
          "key": "text",
          "value": "This is a private message"
        },
        {
          "key": "inReplyTo",
          "value": "<MESSAGE_ID>",
          "description": "ID of an existing message that identifies which conversation this message is part of. Specify either recipients or inReplyTo. Specify one or the other, not both.",
          "disabled": true
        },
        {
          "key": "recipients",
          "value": "<USER1_ID>,<USER2_ID>",
          "description": "Comma-separated list of User IDs"
        }
      ]
    },
    "description": "Returns all the messages for all the private conversations for the context user. Also used to search across all messages and post a message.\nTo return all private conversations for the context user, see User Conversations, General.\n\nhttps://developer.salesforce.com/docs/atlas.en-us.chatterapi.meta/chatterapi/connect_resources_users_messages_general.htm"
  },
  "response": [
    {
      "name": "Successful User Messages, General",
      "originalRequest": {
        "method": "POST",
        "header": [
        ],
        "body": {
          "mode": "raw",
          "raw": ""
        },
        "url": {
          "raw": "{{_endpoint}}/services/data/v{{version}}/chatter/users/me/messages?text=This is a private message&recipients=0052o00000DKQasAAH",
          "host": [
            "{{_endpoint}}"
          ],
          "path": [
            "services",
            "data",
            "v{{version}}",
            "chatter",
            "users",
            "me",
            "messages"
          ],
          "query": [
            {
              "key": "text",
              "value": "This is a private message"
            },
            {
              "key": "inReplyTo",
              "value": "<MESSAGE_ID>",
              "description": "ID of an existing message that identifies which conversation this message is part of. Specify either recipients or inReplyTo. Specify one or the other, not both.",
              "disabled": true
            },
            {
              "key": "recipients",
              "value": "0052o00000DKQasAAH",
              "description": "Comma-separated list of User IDs"
            }
          ]
        }
      },
      "status": "Created",
      "code": 201,
      "_postman_previewlanguage": "json",
      "header": [
        {
          "key": "Date",
          "value": "Mon, 20 Nov 2023 16:22:22 GMT"
        },
        {
          "key": "Strict-Transport-Security",
          "value": "max-age=63072000; includeSubDomains"
        },
        {
          "key": "X-Content-Type-Options",
          "value": "nosniff"
        },
        {
          "key": "X-XSS-Protection",
          "value": "1; mode=block"
        },
        {
          "key": "X-Robots-Tag",
          "value": "none"
        },
        {
          "key": "Cache-Control",
          "value": "no-cache,must-revalidate,max-age=0,no-store,private"
        },
        {
          "key": "Content-Type",
          "value": "application/json;charset=UTF-8"
        },
        {
          "key": "Vary",
          "value": "Accept-Encoding"
        },
        {
          "key": "Content-Encoding",
          "value": "gzip"
        },
        {
          "key": "Transfer-Encoding",
          "value": "chunked"
        }
      ],
      "cookie": [
      ],
      "body": "{\n    \"body\": {\n        \"isRichText\": null,\n        \"messageSegments\": [],\n        \"text\": \"This is a private message\"\n    },\n    \"conversationId\": \"03M...\",\n    \"conversationUrl\": \"/services/data/v58.0/chatter/users/me/conversations/03M...\",\n    \"id\": \"03J...\",\n    \"recipients\": [\n        {\n            \"additionalLabel\": null,\n            \"communityNickname\": \"automatedprocess\",\n            \"companyName\": \"Salesforce\",\n            \"displayName\": \"Automated Process\",\n            \"firstName\": \"Automated\",\n            \"id\": \"005...\",\n            \"isActive\": true,\n            \"isInThisCommunity\": true,\n            \"lastName\": \"Process\",\n            \"motif\": {\n                \"color\": \"1B96FF\",\n                \"largeIconUrl\": \"/img/icon/profile64.png\",\n                \"mediumIconUrl\": \"/img/icon/profile32.png\",\n                \"smallIconUrl\": \"/img/icon/profile16.png\",\n                \"svgIconUrl\": null\n            },\n            \"mySubscription\": null,\n            \"name\": \"Automated Process\",\n            \"outOfOffice\": {\n                \"message\": \"\"\n            },\n            \"photo\": {\n                \"fullEmailPhotoUrl\": \"https://<my_domain>/img/userprofile/default_profile_200_v2.png?fromEmail=1\",\n                \"largePhotoUrl\": \"https://<my_domain>/profilephoto/005/F\",\n                \"mediumPhotoUrl\": \"https://<my_domain>/profilephoto/005/M\",\n                \"photoVersionId\": null,\n                \"smallPhotoUrl\": \"https://<my_domain>/profilephoto/005/T\",\n                \"standardEmailPhotoUrl\": \"https://<my_domain>/img/userprofile/default_profile_45_v2.png?fromEmail=1\",\n                \"url\": \"/services/data/v58.0/connect/user-profiles/005.../photo\"\n            },\n            \"reputation\": null,\n            \"title\": null,\n            \"type\": \"User\",\n            \"url\": \"/services/data/v58.0/chatter/users/005...\",\n            \"userType\": \"System\"\n        },\n        {\n            \"additionalLabel\": null,\n            \"communityNickname\": \"User1696423780773910041\",\n            \"companyName\": \"Salesforce\",\n            \"displayName\": \"Name\",\n            \"firstName\": \"FirstName\",\n            \"id\": \"005...\",\n            \"isActive\": true,\n            \"isInThisCommunity\": true,\n            \"lastName\": \"Name\",\n            \"motif\": {\n                \"color\": \"1B96FF\",\n                \"largeIconUrl\": \"/img/icon/profile64.png\",\n                \"mediumIconUrl\": \"/img/icon/profile32.png\",\n                \"smallIconUrl\": \"/img/icon/profile16.png\",\n                \"svgIconUrl\": null\n            },\n            \"mySubscription\": null,\n            \"name\": \"Name\",\n            \"outOfOffice\": {\n                \"message\": \"\"\n            },\n            \"photo\": {\n                \"fullEmailPhotoUrl\": \"https://<my_domain>/ncsphoto/1wsMlOd3tVC7boygqBO8wMT9KzA0D6tqzpbs-Uw0IogXzXAXaYKJnuWCNQmXymRq?fromEmail=1\",\n                \"largePhotoUrl\": \"https://<my_domain>/profilephoto/729.../F\",\n                \"mediumPhotoUrl\": \"https://<my_domain>/profilephoto/729.../M\",\n                \"photoVersionId\": \"729...\",\n                \"smallPhotoUrl\": \"https://<my_domain>/profilephoto/729.../T\",\n                \"standardEmailPhotoUrl\": \"https://<my_domain>/ncsphoto/1wsMlOd3tVC7boygqBO8wMT9KzA0D6tqzpbs-Uw0Ioi-dtynkoFWsl46as__TDFU?fromEmail=1\",\n                \"url\": \"/services/data/v58.0/connect/user-profiles/005.../photo\"\n            },\n            \"reputation\": null,\n            \"title\": null,\n            \"type\": \"User\",\n            \"url\": \"/services/data/v58.0/chatter/users/005...\",\n            \"userType\": \"Internal\"\n        }\n    ],\n    \"sender\": {\n        \"additionalLabel\": null,\n        \"communityNickname\": \"User1696423780773910041\",\n        \"companyName\": \"Salesforce\",\n        \"displayName\": \"Name\",\n        \"firstName\": \"Firstname\",\n        \"id\": \"005...\",\n        \"isActive\": true,\n        \"isInThisCommunity\": true,\n        \"lastName\": \"Name\",\n        \"motif\": {\n            \"color\": \"1B96FF\",\n            \"largeIconUrl\": \"/img/icon/profile64.png\",\n            \"mediumIconUrl\": \"/img/icon/profile32.png\",\n            \"smallIconUrl\": \"/img/icon/profile16.png\",\n            \"svgIconUrl\": null\n        },\n        \"mySubscription\": null,\n        \"name\": \"Name\",\n        \"outOfOffice\": {\n            \"message\": \"\"\n        },\n        \"photo\": {\n            \"fullEmailPhotoUrl\": \"https://<my_domain>/ncsphoto/1wsMlOd3tVC7boygqBO8wMT9KzA0D6tqzpbs-Uw0IogXzXAXaYKJnuWCNQmXymRq?fromEmail=1\",\n            \"largePhotoUrl\": \"https://<my_domain>/profilephoto/729.../F\",\n            \"mediumPhotoUrl\": \"https://<my_domain>/profilephoto/729.../M\",\n            \"photoVersionId\": \"729...\",\n            \"smallPhotoUrl\": \"https://<my_domain>/profilephoto/729.../T\",\n            \"standardEmailPhotoUrl\": \"https://<my_domain>/ncsphoto/1wsMlOd3tVC7boygqBO8wMT9KzA0D6tqzpbs-Uw0Ioi-dtynkoFWsl46as__TDFU?fromEmail=1\",\n            \"url\": \"/services/data/v58.0/connect/user-profiles/005.../photo\"\n        },\n        \"reputation\": null,\n        \"title\": null,\n        \"type\": \"User\",\n        \"url\": \"/services/data/v58.0/chatter/users/005...\",\n        \"userType\": \"Internal\"\n    },\n    \"sendingCommunity\": null,\n    \"sentDate\": \"<datetime>\",\n    \"url\": \"/services/data/v58.0/chatter/users/me/messages/03J...\"\n}"
    }
  ]
}