Chilkat Online Tools

unicodeC / Salesforce Platform APIs / Feed Elements, Batch Post

Back to Collection Items

#include <C_CkHttpW.h>
#include <C_CkJsonObjectW.h>
#include <C_CkHttpResponseW.h>
#include <C_CkStringBuilderW.h>

void ChilkatSample(void)
    {
    HCkHttpW http;
    BOOL success;
    HCkJsonObjectW json;
    HCkHttpResponseW resp;
    HCkStringBuilderW sbResponseBody;
    HCkJsonObjectW jResp;
    int respStatusCode;
    const wchar_t *AdditionalLabel;
    const wchar_t *CommunityNickname;
    const wchar_t *CompanyName;
    const wchar_t *DisplayName;
    const wchar_t *FirstName;
    const wchar_t *Id;
    BOOL IsActive;
    BOOL IsInThisCommunity;
    const wchar_t *LastName;
    const wchar_t *Color;
    const wchar_t *LargeIconUrl;
    const wchar_t *MediumIconUrl;
    const wchar_t *SmallIconUrl;
    const wchar_t *SvgIconUrl;
    const wchar_t *MySubscription;
    const wchar_t *Name;
    const wchar_t *Message;
    const wchar_t *FullEmailPhotoUrl;
    const wchar_t *LargePhotoUrl;
    const wchar_t *MediumPhotoUrl;
    const wchar_t *PhotoVersionId;
    const wchar_t *SmallPhotoUrl;
    const wchar_t *StandardEmailPhotoUrl;
    const wchar_t *v_Url;
    const wchar_t *Reputation;
    const wchar_t *Title;
    const wchar_t *v_Type;
    const wchar_t *ActorUrl;
    const wchar_t *UserType;
    BOOL IsRichText;
    const wchar_t *Text;
    BOOL IsBookmarkedByCurrentUser;
    BOOL IsLikedByCurrentUser;
    const wchar_t *LikesMessage;
    const wchar_t *MyLike;
    int CurrentPageToken;
    const wchar_t *CurrentPageUrl;
    const wchar_t *NextPageToken;
    const wchar_t *NextPageUrl;
    const wchar_t *PreviousPageToken;
    const wchar_t *PreviousPageUrl;
    int Total;
    BOOL CanContextUserUpdateIsClosed;
    BOOL IsClosed;
    const wchar_t *PageCurrentPageToken;
    const wchar_t *PageCurrentPageUrl;
    const wchar_t *PageNextPageToken;
    const wchar_t *PageNextPageUrl;
    const wchar_t *PagePreviousPageToken;
    const wchar_t *PagePreviousPageUrl;
    int PageTotal;
    BOOL IsEditRestricted;
    const wchar_t *IsEditableByMeUrl;
    const wchar_t *LastEditedBy;
    const wchar_t *LastEditedDate;
    int LatestRevision;
    const wchar_t *RelativeLastEditedDate;
    int Count;
    BOOL IsMutedByMe;
    BOOL IsReadByMe;
    const wchar_t *LastReadDateByMe;
    const wchar_t *FeedEntityStatus;
    BOOL IsApprovableByMe;
    BOOL CanAssignTopics;
    int DownVoteCount;
    const wchar_t *MyVote;
    int UpVoteCount;
    const wchar_t *ApplicationName;
    const wchar_t *ApplicationUrl;
    const wchar_t *CreatedDate;
    BOOL v_Event;
    const wchar_t *FeedElementType;
    BOOL HasVerifiedComment;
    const wchar_t *HeaderIsRichText;
    const wchar_t *HeaderText;
    const wchar_t *resultId;
    BOOL IsDeleteRestricted;
    BOOL IsSharable;
    const wchar_t *ModifiedDate;
    const wchar_t *OriginalFeedItem;
    const wchar_t *OriginalFeedItemActor;
    const wchar_t *Label;
    const wchar_t *LabelPlural;
    const wchar_t *ParentId;
    const wchar_t *MotifColor;
    const wchar_t *MotifLargeIconUrl;
    const wchar_t *MotifMediumIconUrl;
    const wchar_t *MotifSmallIconUrl;
    const wchar_t *MotifSvgIconUrl;
    const wchar_t *ParentMySubscription;
    const wchar_t *ParentName;
    const wchar_t *ParentType;
    const wchar_t *ParentUrl;
    const wchar_t *PhotoUrl;
    const wchar_t *RelativeCreatedDate;
    const wchar_t *resultType;
    const wchar_t *resultUrl;
    const wchar_t *Visibility;
    int statusCode;
    const wchar_t *ParentAdditionalLabel;
    const wchar_t *ParentCommunityNickname;
    const wchar_t *ParentCompanyName;
    const wchar_t *ParentDisplayName;
    const wchar_t *ParentFirstName;
    BOOL ParentIsActive;
    BOOL ParentIsInThisCommunity;
    const wchar_t *ParentLastName;
    const wchar_t *OutOfOfficeMessage;
    const wchar_t *PhotoFullEmailPhotoUrl;
    const wchar_t *PhotoLargePhotoUrl;
    const wchar_t *PhotoMediumPhotoUrl;
    const wchar_t *PhotoPhotoVersionId;
    const wchar_t *PhotoSmallPhotoUrl;
    const wchar_t *PhotoStandardEmailPhotoUrl;
    const wchar_t *ParentReputation;
    const wchar_t *ParentTitle;
    const wchar_t *ParentUserType;
    int j;
    int count_j;
    const wchar_t *text;
    const wchar_t *v_type;
    const wchar_t *motifColor;
    const wchar_t *motifLargeIconUrl;
    const wchar_t *motifMediumIconUrl;
    const wchar_t *motifSmallIconUrl;
    const wchar_t *motifSvgIconUrl;
    const wchar_t *referenceId;
    const wchar_t *referenceUrl;
    const wchar_t *errorCode;
    const wchar_t *message;
    BOOL hasErrors;
    int i;
    int count_i;

    // This example assumes the Chilkat API to have been previously unlocked.
    // See Global Unlock Sample for sample code.

    http = CkHttpW_Create();

    // Use this online tool to generate code from sample JSON: Generate Code to Create JSON

    // The following JSON is sent in the request body.

    // {
    //   "inputs": [
    //     {
    //       "richInput": {
    //         "subjectId": "<USER_GROUP_RECORD_ID>",
    //         "body": {
    //           "messageSegments": [
    //             {
    //               "type": "Text",
    //               "text": "Post Number 1"
    //             }
    //           ]
    //         },
    //         "capabilities": {
    //           "files": {
    //             "items": [
    //               {
    //                 "id": "<FILE_ID>"
    //               }
    //             ]
    //           }
    //         },
    //         "feedElementType": "FeedItem"
    //       }
    //     },
    //     {
    //       "richInput": {
    //         "subjectId": "<USER_GROUP_RECORD_ID>",
    //         "body": {
    //           "messageSegments": [
    //             {
    //               "type": "Text",
    //               "text": "Post Number 2"
    //             }
    //           ]
    //         },
    //         "feedElementType": "FeedItem"
    //       }
    //     },
    //     {
    //       "richInput": {
    //         "subjectId": "me",
    //         "body": {
    //           "messageSegments": [
    //             {
    //               "type": "Text",
    //               "text": "Post Number 3 with Inline"
    //             },
    //             {
    //               "type": "InlineImage",
    //               "fileId": "<FILE_ID>",
    //               "altText": "Test Inline"
    //             }
    //           ]
    //         },
    //         "feedElementType": "FeedItem"
    //       }
    //     }
    //   ]
    // }

    json = CkJsonObjectW_Create();
    CkJsonObjectW_UpdateString(json,L"inputs[0].richInput.subjectId",L"<USER_GROUP_RECORD_ID>");
    CkJsonObjectW_UpdateString(json,L"inputs[0].richInput.body.messageSegments[0].type",L"Text");
    CkJsonObjectW_UpdateString(json,L"inputs[0].richInput.body.messageSegments[0].text",L"Post Number 1");
    CkJsonObjectW_UpdateString(json,L"inputs[0].richInput.capabilities.files.items[0].id",L"<FILE_ID>");
    CkJsonObjectW_UpdateString(json,L"inputs[0].richInput.feedElementType",L"FeedItem");
    CkJsonObjectW_UpdateString(json,L"inputs[1].richInput.subjectId",L"<USER_GROUP_RECORD_ID>");
    CkJsonObjectW_UpdateString(json,L"inputs[1].richInput.body.messageSegments[0].type",L"Text");
    CkJsonObjectW_UpdateString(json,L"inputs[1].richInput.body.messageSegments[0].text",L"Post Number 2");
    CkJsonObjectW_UpdateString(json,L"inputs[1].richInput.feedElementType",L"FeedItem");
    CkJsonObjectW_UpdateString(json,L"inputs[2].richInput.subjectId",L"me");
    CkJsonObjectW_UpdateString(json,L"inputs[2].richInput.body.messageSegments[0].type",L"Text");
    CkJsonObjectW_UpdateString(json,L"inputs[2].richInput.body.messageSegments[0].text",L"Post Number 3 with Inline");
    CkJsonObjectW_UpdateString(json,L"inputs[2].richInput.body.messageSegments[1].type",L"InlineImage");
    CkJsonObjectW_UpdateString(json,L"inputs[2].richInput.body.messageSegments[1].fileId",L"<FILE_ID>");
    CkJsonObjectW_UpdateString(json,L"inputs[2].richInput.body.messageSegments[1].altText",L"Test Inline");
    CkJsonObjectW_UpdateString(json,L"inputs[2].richInput.feedElementType",L"FeedItem");

    // Adds the "Authorization: Bearer <access_token>" header.
    CkHttpW_putAuthToken(http,L"<access_token>");
    CkHttpW_SetRequestHeader(http,L"Content-Type",L"application/json");

    resp = CkHttpW_PostJson3(http,L"https://domain.com/services/data/v{{version}}/chatter/feed-elements/batch",L"application/json",json);
    if (CkHttpW_getLastMethodSuccess(http) == FALSE) {
        wprintf(L"%s\n",CkHttpW_lastErrorText(http));
        CkHttpW_Dispose(http);
        CkJsonObjectW_Dispose(json);
        return;
    }

    sbResponseBody = CkStringBuilderW_Create();
    CkHttpResponseW_GetBodySb(resp,sbResponseBody);

    jResp = CkJsonObjectW_Create();
    CkJsonObjectW_LoadSb(jResp,sbResponseBody);
    CkJsonObjectW_putEmitCompact(jResp,FALSE);

    wprintf(L"Response Body:\n");
    wprintf(L"%s\n",CkJsonObjectW_emit(jResp));

    respStatusCode = CkHttpResponseW_getStatusCode(resp);
    wprintf(L"Response Status Code = %d\n",respStatusCode);
    if (respStatusCode >= 400) {
        wprintf(L"Response Header:\n");
        wprintf(L"%s\n",CkHttpResponseW_header(resp));
        wprintf(L"Failed.\n");
        CkHttpResponseW_Dispose(resp);
        CkHttpW_Dispose(http);
        CkJsonObjectW_Dispose(json);
        CkStringBuilderW_Dispose(sbResponseBody);
        CkJsonObjectW_Dispose(jResp);
        return;
    }

    CkHttpResponseW_Dispose(resp);

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

    // {
    //   "hasErrors": true,
    //   "results": [
    //     {
    //       "result": {
    //         "actor": {
    //           "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"
    //         },
    //         "body": {
    //           "isRichText": false,
    //           "messageSegments": [
    //             {
    //               "text": "Post Number 1",
    //               "type": "Text"
    //             }
    //           ],
    //           "text": "Post Number 1"
    //         },
    //         "capabilities": {
    //           "associatedActions": {
    //             "platformActionGroups": [
    //             ]
    //           },
    //           "bookmarks": {
    //             "isBookmarkedByCurrentUser": false
    //           },
    //           "chatterLikes": {
    //             "isLikedByCurrentUser": false,
    //             "likesMessage": null,
    //             "myLike": null,
    //             "page": {
    //               "currentPageToken": 0,
    //               "currentPageUrl": "/services/data/v58.0/chatter/feed-elements/0D5.../capabilities/chatter-likes/items",
    //               "items": [
    //               ],
    //               "nextPageToken": null,
    //               "nextPageUrl": null,
    //               "previousPageToken": null,
    //               "previousPageUrl": null,
    //               "total": 0
    //             }
    //           },
    //           "close": {
    //             "canContextUserUpdateIsClosed": true,
    //             "isClosed": false
    //           },
    //           "comments": {
    //             "page": {
    //               "currentPageToken": null,
    //               "currentPageUrl": "/services/data/v58.0/chatter/feed-elements/0D5.../capabilities/comments/items",
    //               "items": [
    //               ],
    //               "nextPageToken": null,
    //               "nextPageUrl": null,
    //               "previousPageToken": null,
    //               "previousPageUrl": null,
    //               "total": 0
    //             }
    //           },
    //           "edit": {
    //             "isEditRestricted": false,
    //             "isEditableByMeUrl": "/services/data/v58.0/chatter/feed-elements/0D5.../capabilities/edit/is-editable-by-me",
    //             "lastEditedBy": null,
    //             "lastEditedDate": null,
    //             "latestRevision": 1,
    //             "relativeLastEditedDate": null
    //           },
    //           "interactions": {
    //             "count": 0
    //           },
    //           "mute": {
    //             "isMutedByMe": false
    //           },
    //           "readBy": {
    //             "isReadByMe": true,
    //             "lastReadDateByMe": "2023-11-22T11:11:25.000Z",
    //             "page": {
    //               "currentPageToken": null,
    //               "currentPageUrl": "/services/data/v58.0/chatter/feed-elements/0D5.../capabilities/read-by/items?pageSize=3",
    //               "items": [
    //               ],
    //               "nextPageToken": null,
    //               "nextPageUrl": null,
    //               "previousPageToken": null,
    //               "previousPageUrl": null,
    //               "total": 0
    //             }
    //           },
    //           "status": {
    //             "feedEntityStatus": "Published",
    //             "isApprovableByMe": true
    //           },
    //           "topics": {
    //             "canAssignTopics": true,
    //             "items": [
    //             ]
    //           },
    //           "upDownVote": {
    //             "downVoteCount": 0,
    //             "myVote": "None",
    //             "upVoteCount": 0
    //           }
    //         },
    //         "clientInfo": {
    //           "applicationName": "Postman Playground",
    //           "applicationUrl": null
    //         },
    //         "createdDate": "2023-11-22T11:11:25.000Z",
    //         "event": false,
    //         "feedElementType": "FeedItem",
    //         "hasVerifiedComment": false,
    //         "header": {
    //           "isRichText": null,
    //           "messageSegments": [
    //             {
    //               "motif": {
    //                 "color": "1B96FF",
    //                 "largeIconUrl": "/img/icon/profile64.png",
    //                 "mediumIconUrl": "/img/icon/profile32.png",
    //                 "smallIconUrl": "/img/icon/profile16.png",
    //                 "svgIconUrl": null
    //               },
    //               "reference": {
    //                 "id": "005...",
    //                 "url": "/services/data/v58.0/chatter/users/005..."
    //               },
    //               "text": "Name",
    //               "type": "EntityLink"
    //             }
    //           ],
    //           "text": "Name"
    //         },
    //         "id": "0D5...",
    //         "isDeleteRestricted": false,
    //         "isSharable": false,
    //         "modifiedDate": "2023-11-22T11:11:25.000Z",
    //         "originalFeedItem": null,
    //         "originalFeedItemActor": null,
    //         "parent": {
    //           "entityLabel": {
    //             "label": "Account",
    //             "labelPlural": "Accounts"
    //           },
    //           "id": "001...",
    //           "motif": {
    //             "color": "5867E8",
    //             "largeIconUrl": "/img/icon/accounts64.png",
    //             "mediumIconUrl": "/img/icon/accounts32.png",
    //             "smallIconUrl": "/img/icon/accounts16.png",
    //             "svgIconUrl": null
    //           },
    //           "mySubscription": null,
    //           "name": "Burlington Textiles Corp of America",
    //           "type": "Account",
    //           "url": "/services/data/v58.0/chatter/records/001..."
    //         },
    //         "photoUrl": "https://<my_domain>/profilephoto/729.../T",
    //         "relativeCreatedDate": "Just now",
    //         "type": "TextPost",
    //         "url": "/services/data/v58.0/chatter/feed-elements/0D5...",
    //         "visibility": "InternalUsers"
    //       },
    //       "statusCode": 201
    //     },
    //     {
    //       "result": {
    //         "actor": {
    //           "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"
    //         },
    //         "body": {
    //           "isRichText": false,
    //           "messageSegments": [
    //             {
    //               "text": "Post Number 2",
    //               "type": "Text"
    //             }
    //           ],
    //           "text": "Post Number 2"
    //         },
    //         "capabilities": {
    //           "associatedActions": {
    //             "platformActionGroups": [
    //             ]
    //           },
    //           "bookmarks": {
    //             "isBookmarkedByCurrentUser": false
    //           },
    //           "chatterLikes": {
    //             "isLikedByCurrentUser": false,
    //             "likesMessage": null,
    //             "myLike": null,
    //             "page": {
    //               "currentPageToken": 0,
    //               "currentPageUrl": "/services/data/v58.0/chatter/feed-elements/0D5.../capabilities/chatter-likes/items",
    //               "items": [
    //               ],
    //               "nextPageToken": null,
    //               "nextPageUrl": null,
    //               "previousPageToken": null,
    //               "previousPageUrl": null,
    //               "total": 0
    //             }
    //           },
    //           "close": {
    //             "canContextUserUpdateIsClosed": true,
    //             "isClosed": false
    //           },
    //           "comments": {
    //             "page": {
    //               "currentPageToken": null,
    //               "currentPageUrl": "/services/data/v58.0/chatter/feed-elements/0D5.../capabilities/comments/items",
    //               "items": [
    //               ],
    //               "nextPageToken": null,
    //               "nextPageUrl": null,
    //               "previousPageToken": null,
    //               "previousPageUrl": null,
    //               "total": 0
    //             }
    //           },
    //           "edit": {
    //             "isEditRestricted": false,
    //             "isEditableByMeUrl": "/services/data/v58.0/chatter/feed-elements/0D5.../capabilities/edit/is-editable-by-me",
    //             "lastEditedBy": null,
    //             "lastEditedDate": null,
    //             "latestRevision": 1,
    //             "relativeLastEditedDate": null
    //           },
    //           "interactions": {
    //             "count": 0
    //           },
    //           "mute": {
    //             "isMutedByMe": false
    //           },
    //           "readBy": {
    //             "isReadByMe": true,
    //             "lastReadDateByMe": "2023-11-22T11:11:25.000Z",
    //             "page": {
    //               "currentPageToken": null,
    //               "currentPageUrl": "/services/data/v58.0/chatter/feed-elements/0D5.../capabilities/read-by/items?pageSize=3",
    //               "items": [
    //               ],
    //               "nextPageToken": null,
    //               "nextPageUrl": null,
    //               "previousPageToken": null,
    //               "previousPageUrl": null,
    //               "total": 0
    //             }
    //           },
    //           "status": {
    //             "feedEntityStatus": "Published",
    //             "isApprovableByMe": true
    //           },
    //           "topics": {
    //             "canAssignTopics": true,
    //             "items": [
    //             ]
    //           },
    //           "upDownVote": {
    //             "downVoteCount": 0,
    //             "myVote": "None",
    //             "upVoteCount": 0
    //           }
    //         },
    //         "clientInfo": {
    //           "applicationName": "Postman Playground",
    //           "applicationUrl": null
    //         },
    //         "createdDate": "2023-11-22T11:11:25.000Z",
    //         "event": false,
    //         "feedElementType": "FeedItem",
    //         "hasVerifiedComment": false,
    //         "header": {
    //           "isRichText": null,
    //           "messageSegments": [
    //             {
    //               "motif": {
    //                 "color": "1B96FF",
    //                 "largeIconUrl": "/img/icon/profile64.png",
    //                 "mediumIconUrl": "/img/icon/profile32.png",
    //                 "smallIconUrl": "/img/icon/profile16.png",
    //                 "svgIconUrl": null
    //               },
    //               "reference": {
    //                 "id": "005...",
    //                 "url": "/services/data/v58.0/chatter/users/005..."
    //               },
    //               "text": "Name",
    //               "type": "EntityLink"
    //             }
    //           ],
    //           "text": "Name"
    //         },
    //         "id": "0D5...",
    //         "isDeleteRestricted": false,
    //         "isSharable": true,
    //         "modifiedDate": "2023-11-22T11:11:25.000Z",
    //         "originalFeedItem": null,
    //         "originalFeedItemActor": null,
    //         "parent": {
    //           "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"
    //         },
    //         "photoUrl": "https://<my_domain>/profilephoto/729.../T",
    //         "relativeCreatedDate": "Just now",
    //         "type": "TextPost",
    //         "url": "/services/data/v58.0/chatter/feed-elements/0D5...",
    //         "visibility": "AllUsers"
    //       },
    //       "statusCode": 201
    //     },
    //     {
    //       "result": [
    //         {
    //           "errorCode": "INVALID_MARKUP",
    //           "message": "Error while parsing Rich Text Content: The value of attribute "src" associated with an element type "img" must not contain the '<' character."
    //         }
    //       ],
    //       "statusCode": 400
    //     }
    //   ]
    // }

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

    // Chilkat functions returning "const char *" return a pointer to temporary internal memory owned and managed by Chilkat.

    hasErrors = CkJsonObjectW_BoolOf(jResp,L"hasErrors");
    i = 0;
    count_i = CkJsonObjectW_SizeOfArray(jResp,L"results");
    while (i < count_i) {
        CkJsonObjectW_putI(jResp,i);
        AdditionalLabel = CkJsonObjectW_stringOf(jResp,L"results[i].result.actor.additionalLabel");
        CommunityNickname = CkJsonObjectW_stringOf(jResp,L"results[i].result.actor.communityNickname");
        CompanyName = CkJsonObjectW_stringOf(jResp,L"results[i].result.actor.companyName");
        DisplayName = CkJsonObjectW_stringOf(jResp,L"results[i].result.actor.displayName");
        FirstName = CkJsonObjectW_stringOf(jResp,L"results[i].result.actor.firstName");
        Id = CkJsonObjectW_stringOf(jResp,L"results[i].result.actor.id");
        IsActive = CkJsonObjectW_BoolOf(jResp,L"results[i].result.actor.isActive");
        IsInThisCommunity = CkJsonObjectW_BoolOf(jResp,L"results[i].result.actor.isInThisCommunity");
        LastName = CkJsonObjectW_stringOf(jResp,L"results[i].result.actor.lastName");
        Color = CkJsonObjectW_stringOf(jResp,L"results[i].result.actor.motif.color");
        LargeIconUrl = CkJsonObjectW_stringOf(jResp,L"results[i].result.actor.motif.largeIconUrl");
        MediumIconUrl = CkJsonObjectW_stringOf(jResp,L"results[i].result.actor.motif.mediumIconUrl");
        SmallIconUrl = CkJsonObjectW_stringOf(jResp,L"results[i].result.actor.motif.smallIconUrl");
        SvgIconUrl = CkJsonObjectW_stringOf(jResp,L"results[i].result.actor.motif.svgIconUrl");
        MySubscription = CkJsonObjectW_stringOf(jResp,L"results[i].result.actor.mySubscription");
        Name = CkJsonObjectW_stringOf(jResp,L"results[i].result.actor.name");
        Message = CkJsonObjectW_stringOf(jResp,L"results[i].result.actor.outOfOffice.message");
        FullEmailPhotoUrl = CkJsonObjectW_stringOf(jResp,L"results[i].result.actor.photo.fullEmailPhotoUrl");
        LargePhotoUrl = CkJsonObjectW_stringOf(jResp,L"results[i].result.actor.photo.largePhotoUrl");
        MediumPhotoUrl = CkJsonObjectW_stringOf(jResp,L"results[i].result.actor.photo.mediumPhotoUrl");
        PhotoVersionId = CkJsonObjectW_stringOf(jResp,L"results[i].result.actor.photo.photoVersionId");
        SmallPhotoUrl = CkJsonObjectW_stringOf(jResp,L"results[i].result.actor.photo.smallPhotoUrl");
        StandardEmailPhotoUrl = CkJsonObjectW_stringOf(jResp,L"results[i].result.actor.photo.standardEmailPhotoUrl");
        v_Url = CkJsonObjectW_stringOf(jResp,L"results[i].result.actor.photo.url");
        Reputation = CkJsonObjectW_stringOf(jResp,L"results[i].result.actor.reputation");
        Title = CkJsonObjectW_stringOf(jResp,L"results[i].result.actor.title");
        v_Type = CkJsonObjectW_stringOf(jResp,L"results[i].result.actor.type");
        ActorUrl = CkJsonObjectW_stringOf(jResp,L"results[i].result.actor.url");
        UserType = CkJsonObjectW_stringOf(jResp,L"results[i].result.actor.userType");
        IsRichText = CkJsonObjectW_BoolOf(jResp,L"results[i].result.body.isRichText");
        Text = CkJsonObjectW_stringOf(jResp,L"results[i].result.body.text");
        IsBookmarkedByCurrentUser = CkJsonObjectW_BoolOf(jResp,L"results[i].result.capabilities.bookmarks.isBookmarkedByCurrentUser");
        IsLikedByCurrentUser = CkJsonObjectW_BoolOf(jResp,L"results[i].result.capabilities.chatterLikes.isLikedByCurrentUser");
        LikesMessage = CkJsonObjectW_stringOf(jResp,L"results[i].result.capabilities.chatterLikes.likesMessage");
        MyLike = CkJsonObjectW_stringOf(jResp,L"results[i].result.capabilities.chatterLikes.myLike");
        CurrentPageToken = CkJsonObjectW_IntOf(jResp,L"results[i].result.capabilities.chatterLikes.page.currentPageToken");
        CurrentPageUrl = CkJsonObjectW_stringOf(jResp,L"results[i].result.capabilities.chatterLikes.page.currentPageUrl");
        NextPageToken = CkJsonObjectW_stringOf(jResp,L"results[i].result.capabilities.chatterLikes.page.nextPageToken");
        NextPageUrl = CkJsonObjectW_stringOf(jResp,L"results[i].result.capabilities.chatterLikes.page.nextPageUrl");
        PreviousPageToken = CkJsonObjectW_stringOf(jResp,L"results[i].result.capabilities.chatterLikes.page.previousPageToken");
        PreviousPageUrl = CkJsonObjectW_stringOf(jResp,L"results[i].result.capabilities.chatterLikes.page.previousPageUrl");
        Total = CkJsonObjectW_IntOf(jResp,L"results[i].result.capabilities.chatterLikes.page.total");
        CanContextUserUpdateIsClosed = CkJsonObjectW_BoolOf(jResp,L"results[i].result.capabilities.close.canContextUserUpdateIsClosed");
        IsClosed = CkJsonObjectW_BoolOf(jResp,L"results[i].result.capabilities.close.isClosed");
        PageCurrentPageToken = CkJsonObjectW_stringOf(jResp,L"results[i].result.capabilities.comments.page.currentPageToken");
        PageCurrentPageUrl = CkJsonObjectW_stringOf(jResp,L"results[i].result.capabilities.comments.page.currentPageUrl");
        PageNextPageToken = CkJsonObjectW_stringOf(jResp,L"results[i].result.capabilities.comments.page.nextPageToken");
        PageNextPageUrl = CkJsonObjectW_stringOf(jResp,L"results[i].result.capabilities.comments.page.nextPageUrl");
        PagePreviousPageToken = CkJsonObjectW_stringOf(jResp,L"results[i].result.capabilities.comments.page.previousPageToken");
        PagePreviousPageUrl = CkJsonObjectW_stringOf(jResp,L"results[i].result.capabilities.comments.page.previousPageUrl");
        PageTotal = CkJsonObjectW_IntOf(jResp,L"results[i].result.capabilities.comments.page.total");
        IsEditRestricted = CkJsonObjectW_BoolOf(jResp,L"results[i].result.capabilities.edit.isEditRestricted");
        IsEditableByMeUrl = CkJsonObjectW_stringOf(jResp,L"results[i].result.capabilities.edit.isEditableByMeUrl");
        LastEditedBy = CkJsonObjectW_stringOf(jResp,L"results[i].result.capabilities.edit.lastEditedBy");
        LastEditedDate = CkJsonObjectW_stringOf(jResp,L"results[i].result.capabilities.edit.lastEditedDate");
        LatestRevision = CkJsonObjectW_IntOf(jResp,L"results[i].result.capabilities.edit.latestRevision");
        RelativeLastEditedDate = CkJsonObjectW_stringOf(jResp,L"results[i].result.capabilities.edit.relativeLastEditedDate");
        Count = CkJsonObjectW_IntOf(jResp,L"results[i].result.capabilities.interactions.count");
        IsMutedByMe = CkJsonObjectW_BoolOf(jResp,L"results[i].result.capabilities.mute.isMutedByMe");
        IsReadByMe = CkJsonObjectW_BoolOf(jResp,L"results[i].result.capabilities.readBy.isReadByMe");
        LastReadDateByMe = CkJsonObjectW_stringOf(jResp,L"results[i].result.capabilities.readBy.lastReadDateByMe");
        PageCurrentPageToken = CkJsonObjectW_stringOf(jResp,L"results[i].result.capabilities.readBy.page.currentPageToken");
        PageCurrentPageUrl = CkJsonObjectW_stringOf(jResp,L"results[i].result.capabilities.readBy.page.currentPageUrl");
        PageNextPageToken = CkJsonObjectW_stringOf(jResp,L"results[i].result.capabilities.readBy.page.nextPageToken");
        PageNextPageUrl = CkJsonObjectW_stringOf(jResp,L"results[i].result.capabilities.readBy.page.nextPageUrl");
        PagePreviousPageToken = CkJsonObjectW_stringOf(jResp,L"results[i].result.capabilities.readBy.page.previousPageToken");
        PagePreviousPageUrl = CkJsonObjectW_stringOf(jResp,L"results[i].result.capabilities.readBy.page.previousPageUrl");
        PageTotal = CkJsonObjectW_IntOf(jResp,L"results[i].result.capabilities.readBy.page.total");
        FeedEntityStatus = CkJsonObjectW_stringOf(jResp,L"results[i].result.capabilities.status.feedEntityStatus");
        IsApprovableByMe = CkJsonObjectW_BoolOf(jResp,L"results[i].result.capabilities.status.isApprovableByMe");
        CanAssignTopics = CkJsonObjectW_BoolOf(jResp,L"results[i].result.capabilities.topics.canAssignTopics");
        DownVoteCount = CkJsonObjectW_IntOf(jResp,L"results[i].result.capabilities.upDownVote.downVoteCount");
        MyVote = CkJsonObjectW_stringOf(jResp,L"results[i].result.capabilities.upDownVote.myVote");
        UpVoteCount = CkJsonObjectW_IntOf(jResp,L"results[i].result.capabilities.upDownVote.upVoteCount");
        ApplicationName = CkJsonObjectW_stringOf(jResp,L"results[i].result.clientInfo.applicationName");
        ApplicationUrl = CkJsonObjectW_stringOf(jResp,L"results[i].result.clientInfo.applicationUrl");
        CreatedDate = CkJsonObjectW_stringOf(jResp,L"results[i].result.createdDate");
        v_Event = CkJsonObjectW_BoolOf(jResp,L"results[i].result.event");
        FeedElementType = CkJsonObjectW_stringOf(jResp,L"results[i].result.feedElementType");
        HasVerifiedComment = CkJsonObjectW_BoolOf(jResp,L"results[i].result.hasVerifiedComment");
        HeaderIsRichText = CkJsonObjectW_stringOf(jResp,L"results[i].result.header.isRichText");
        HeaderText = CkJsonObjectW_stringOf(jResp,L"results[i].result.header.text");
        resultId = CkJsonObjectW_stringOf(jResp,L"results[i].result.id");
        IsDeleteRestricted = CkJsonObjectW_BoolOf(jResp,L"results[i].result.isDeleteRestricted");
        IsSharable = CkJsonObjectW_BoolOf(jResp,L"results[i].result.isSharable");
        ModifiedDate = CkJsonObjectW_stringOf(jResp,L"results[i].result.modifiedDate");
        OriginalFeedItem = CkJsonObjectW_stringOf(jResp,L"results[i].result.originalFeedItem");
        OriginalFeedItemActor = CkJsonObjectW_stringOf(jResp,L"results[i].result.originalFeedItemActor");
        Label = CkJsonObjectW_stringOf(jResp,L"results[i].result.parent.entityLabel.label");
        LabelPlural = CkJsonObjectW_stringOf(jResp,L"results[i].result.parent.entityLabel.labelPlural");
        ParentId = CkJsonObjectW_stringOf(jResp,L"results[i].result.parent.id");
        MotifColor = CkJsonObjectW_stringOf(jResp,L"results[i].result.parent.motif.color");
        MotifLargeIconUrl = CkJsonObjectW_stringOf(jResp,L"results[i].result.parent.motif.largeIconUrl");
        MotifMediumIconUrl = CkJsonObjectW_stringOf(jResp,L"results[i].result.parent.motif.mediumIconUrl");
        MotifSmallIconUrl = CkJsonObjectW_stringOf(jResp,L"results[i].result.parent.motif.smallIconUrl");
        MotifSvgIconUrl = CkJsonObjectW_stringOf(jResp,L"results[i].result.parent.motif.svgIconUrl");
        ParentMySubscription = CkJsonObjectW_stringOf(jResp,L"results[i].result.parent.mySubscription");
        ParentName = CkJsonObjectW_stringOf(jResp,L"results[i].result.parent.name");
        ParentType = CkJsonObjectW_stringOf(jResp,L"results[i].result.parent.type");
        ParentUrl = CkJsonObjectW_stringOf(jResp,L"results[i].result.parent.url");
        PhotoUrl = CkJsonObjectW_stringOf(jResp,L"results[i].result.photoUrl");
        RelativeCreatedDate = CkJsonObjectW_stringOf(jResp,L"results[i].result.relativeCreatedDate");
        resultType = CkJsonObjectW_stringOf(jResp,L"results[i].result.type");
        resultUrl = CkJsonObjectW_stringOf(jResp,L"results[i].result.url");
        Visibility = CkJsonObjectW_stringOf(jResp,L"results[i].result.visibility");
        statusCode = CkJsonObjectW_IntOf(jResp,L"results[i].statusCode");
        ParentAdditionalLabel = CkJsonObjectW_stringOf(jResp,L"results[i].result.parent.additionalLabel");
        ParentCommunityNickname = CkJsonObjectW_stringOf(jResp,L"results[i].result.parent.communityNickname");
        ParentCompanyName = CkJsonObjectW_stringOf(jResp,L"results[i].result.parent.companyName");
        ParentDisplayName = CkJsonObjectW_stringOf(jResp,L"results[i].result.parent.displayName");
        ParentFirstName = CkJsonObjectW_stringOf(jResp,L"results[i].result.parent.firstName");
        ParentIsActive = CkJsonObjectW_BoolOf(jResp,L"results[i].result.parent.isActive");
        ParentIsInThisCommunity = CkJsonObjectW_BoolOf(jResp,L"results[i].result.parent.isInThisCommunity");
        ParentLastName = CkJsonObjectW_stringOf(jResp,L"results[i].result.parent.lastName");
        OutOfOfficeMessage = CkJsonObjectW_stringOf(jResp,L"results[i].result.parent.outOfOffice.message");
        PhotoFullEmailPhotoUrl = CkJsonObjectW_stringOf(jResp,L"results[i].result.parent.photo.fullEmailPhotoUrl");
        PhotoLargePhotoUrl = CkJsonObjectW_stringOf(jResp,L"results[i].result.parent.photo.largePhotoUrl");
        PhotoMediumPhotoUrl = CkJsonObjectW_stringOf(jResp,L"results[i].result.parent.photo.mediumPhotoUrl");
        PhotoPhotoVersionId = CkJsonObjectW_stringOf(jResp,L"results[i].result.parent.photo.photoVersionId");
        PhotoSmallPhotoUrl = CkJsonObjectW_stringOf(jResp,L"results[i].result.parent.photo.smallPhotoUrl");
        PhotoStandardEmailPhotoUrl = CkJsonObjectW_stringOf(jResp,L"results[i].result.parent.photo.standardEmailPhotoUrl");
        PhotoUrl = CkJsonObjectW_stringOf(jResp,L"results[i].result.parent.photo.url");
        ParentReputation = CkJsonObjectW_stringOf(jResp,L"results[i].result.parent.reputation");
        ParentTitle = CkJsonObjectW_stringOf(jResp,L"results[i].result.parent.title");
        ParentUserType = CkJsonObjectW_stringOf(jResp,L"results[i].result.parent.userType");
        j = 0;
        count_j = CkJsonObjectW_SizeOfArray(jResp,L"results[i].result.body.messageSegments");
        while (j < count_j) {
            CkJsonObjectW_putJ(jResp,j);
            text = CkJsonObjectW_stringOf(jResp,L"results[i].result.body.messageSegments[j].text");
            v_type = CkJsonObjectW_stringOf(jResp,L"results[i].result.body.messageSegments[j].type");
            j = j + 1;
        }

        j = 0;
        count_j = CkJsonObjectW_SizeOfArray(jResp,L"results[i].result.capabilities.associatedActions.platformActionGroups");
        while (j < count_j) {
            CkJsonObjectW_putJ(jResp,j);
            j = j + 1;
        }

        j = 0;
        count_j = CkJsonObjectW_SizeOfArray(jResp,L"results[i].result.capabilities.chatterLikes.page.items");
        while (j < count_j) {
            CkJsonObjectW_putJ(jResp,j);
            j = j + 1;
        }

        j = 0;
        count_j = CkJsonObjectW_SizeOfArray(jResp,L"results[i].result.capabilities.comments.page.items");
        while (j < count_j) {
            CkJsonObjectW_putJ(jResp,j);
            j = j + 1;
        }

        j = 0;
        count_j = CkJsonObjectW_SizeOfArray(jResp,L"results[i].result.capabilities.readBy.page.items");
        while (j < count_j) {
            CkJsonObjectW_putJ(jResp,j);
            j = j + 1;
        }

        j = 0;
        count_j = CkJsonObjectW_SizeOfArray(jResp,L"results[i].result.capabilities.topics.items");
        while (j < count_j) {
            CkJsonObjectW_putJ(jResp,j);
            j = j + 1;
        }

        j = 0;
        count_j = CkJsonObjectW_SizeOfArray(jResp,L"results[i].result.header.messageSegments");
        while (j < count_j) {
            CkJsonObjectW_putJ(jResp,j);
            motifColor = CkJsonObjectW_stringOf(jResp,L"results[i].result.header.messageSegments[j].motif.color");
            motifLargeIconUrl = CkJsonObjectW_stringOf(jResp,L"results[i].result.header.messageSegments[j].motif.largeIconUrl");
            motifMediumIconUrl = CkJsonObjectW_stringOf(jResp,L"results[i].result.header.messageSegments[j].motif.mediumIconUrl");
            motifSmallIconUrl = CkJsonObjectW_stringOf(jResp,L"results[i].result.header.messageSegments[j].motif.smallIconUrl");
            motifSvgIconUrl = CkJsonObjectW_stringOf(jResp,L"results[i].result.header.messageSegments[j].motif.svgIconUrl");
            referenceId = CkJsonObjectW_stringOf(jResp,L"results[i].result.header.messageSegments[j].reference.id");
            referenceUrl = CkJsonObjectW_stringOf(jResp,L"results[i].result.header.messageSegments[j].reference.url");
            text = CkJsonObjectW_stringOf(jResp,L"results[i].result.header.messageSegments[j].text");
            v_type = CkJsonObjectW_stringOf(jResp,L"results[i].result.header.messageSegments[j].type");
            j = j + 1;
        }

        j = 0;
        count_j = CkJsonObjectW_SizeOfArray(jResp,L"results[i].result");
        while (j < count_j) {
            CkJsonObjectW_putJ(jResp,j);
            errorCode = CkJsonObjectW_stringOf(jResp,L"results[i].result[j].errorCode");
            message = CkJsonObjectW_stringOf(jResp,L"results[i].result[j].message");
            j = j + 1;
        }

        i = i + 1;
    }



    CkHttpW_Dispose(http);
    CkJsonObjectW_Dispose(json);
    CkStringBuilderW_Dispose(sbResponseBody);
    CkJsonObjectW_Dispose(jResp);

    }

Curl Command

curl -X POST
	-H "Authorization: Bearer <access_token>"
	-H "Content-Type: application/json"
	-d '{
    "inputs": [
        {
            "richInput": {
                "subjectId": "<USER_GROUP_RECORD_ID>",
                "body": {
                    "messageSegments": [
                        {
                            "type": "Text",
                            "text": "Post Number 1"
                        }
                    ]
                },
                "capabilities": {
                    "files": {
                        "items": [
                            {
                                "id": "<FILE_ID>"
                            }
                        ]
                    }
                },
                "feedElementType": "FeedItem"
            }
        },
        {
            "richInput": {
                "subjectId": "<USER_GROUP_RECORD_ID>",
                "body": {
                    "messageSegments": [
                        {
                            "type": "Text",
                            "text": "Post Number 2"
                        }
                    ]
                },
                "feedElementType": "FeedItem"
            }
        },
        {
            "richInput": {
                "subjectId": "me",
                "body": {
                    "messageSegments": [
                        {
                            "type": "Text",
                            "text": "Post Number 3 with Inline"
                        },
                        {
                            "type": "InlineImage",
                            "fileId": "<FILE_ID>",
                            "altText": "Test Inline"
                        }
                    ]
                },
                "feedElementType": "FeedItem"
            }
        }
    ]
}'
https://domain.com/services/data/v{{version}}/chatter/feed-elements/batch

Postman Collection Item JSON

{
  "name": "Feed Elements, Batch Post",
  "event": [
    {
      "listen": "prerequest",
      "script": {
        "exec": [
          ""
        ],
        "type": "text/javascript"
      }
    },
    {
      "listen": "test",
      "script": {
        "exec": [
          ""
        ],
        "type": "text/javascript"
      }
    }
  ],
  "request": {
    "method": "POST",
    "header": [
      {
        "key": "Content-Type",
        "value": "application/json"
      }
    ],
    "body": {
      "mode": "raw",
      "raw": "{\n    \"inputs\": [\n        {\n            \"richInput\": {\n                \"subjectId\": \"<USER_GROUP_RECORD_ID>\",\n                \"body\": {\n                    \"messageSegments\": [\n                        {\n                            \"type\": \"Text\",\n                            \"text\": \"Post Number 1\"\n                        }\n                    ]\n                },\n                \"capabilities\": {\n                    \"files\": {\n                        \"items\": [\n                            {\n                                \"id\": \"<FILE_ID>\"\n                            }\n                        ]\n                    }\n                },\n                \"feedElementType\": \"FeedItem\"\n            }\n        },\n        {\n            \"richInput\": {\n                \"subjectId\": \"<USER_GROUP_RECORD_ID>\",\n                \"body\": {\n                    \"messageSegments\": [\n                        {\n                            \"type\": \"Text\",\n                            \"text\": \"Post Number 2\"\n                        }\n                    ]\n                },\n                \"feedElementType\": \"FeedItem\"\n            }\n        },\n        {\n            \"richInput\": {\n                \"subjectId\": \"me\",\n                \"body\": {\n                    \"messageSegments\": [\n                        {\n                            \"type\": \"Text\",\n                            \"text\": \"Post Number 3 with Inline\"\n                        },\n                        {\n                            \"type\": \"InlineImage\",\n                            \"fileId\": \"<FILE_ID>\",\n                            \"altText\": \"Test Inline\"\n                        }\n                    ]\n                },\n                \"feedElementType\": \"FeedItem\"\n            }\n        }\n    ]\n}",
      "options": {
        "raw": {
          "language": "json"
        }
      }
    },
    "url": {
      "raw": "{{_endpoint}}/services/data/v{{version}}/chatter/feed-elements/batch",
      "host": [
        "{{_endpoint}}"
      ],
      "path": [
        "services",
        "data",
        "v{{version}}",
        "chatter",
        "feed-elements",
        "batch"
      ]
    },
    "description": "Post a batch of up to 500 feed elements.\n\nhttps://developer.salesforce.com/docs/atlas.en-us.chatterapi.meta/chatterapi/connect_resources_feed_element_batch_post.htm"
  },
  "response": [
    {
      "name": "Successful Feed Elements, Batch Post",
      "originalRequest": {
        "method": "POST",
        "header": [
          {
            "key": "Content-Type",
            "value": "application/json"
          }
        ],
        "body": {
          "mode": "raw",
          "raw": "{\n    \"inputs\": [\n        {\n            \"richInput\": {\n                \"subjectId\": \"0012o00003PK8DSAA1\",\n                \"body\": {\n                    \"messageSegments\": [\n                        {\n                            \"type\": \"Text\",\n                            \"text\": \"Post Number 1\"\n                        }\n                    ]\n                },\n                \"feedElementType\": \"FeedItem\"\n            }\n        },\n        {\n            \"richInput\": {\n                \"subjectId\": \"0052o00000DOJ1PAAX\",\n                \"body\": {\n                    \"messageSegments\": [\n                        {\n                            \"type\": \"Text\",\n                            \"text\": \"Post Number 2\"\n                        }\n                    ]\n                },\n                \"feedElementType\": \"FeedItem\"\n            }\n        },\n        {\n            \"richInput\": {\n                \"subjectId\": \"me\",\n                \"body\": {\n                    \"messageSegments\": [\n                        {\n                            \"type\": \"Text\",\n                            \"text\": \"Post Number 3 with Inline\"\n                        },\n                        {\n                            \"type\": \"InlineImage\",\n                            \"fileId\": \"<FILE_ID>\",\n                            \"altText\": \"Test Inline\"\n                        }\n                    ]\n                },\n                \"feedElementType\": \"FeedItem\"\n            }\n        }\n    ]\n}",
          "options": {
            "raw": {
              "language": "json"
            }
          }
        },
        "url": {
          "raw": "{{_endpoint}}/services/data/v{{version}}/chatter/feed-elements/batch",
          "host": [
            "{{_endpoint}}"
          ],
          "path": [
            "services",
            "data",
            "v{{version}}",
            "chatter",
            "feed-elements",
            "batch"
          ]
        }
      },
      "status": "OK",
      "code": 200,
      "_postman_previewlanguage": "json",
      "header": [
        {
          "key": "Date",
          "value": "Wed, 22 Nov 2023 11:11:25 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    \"hasErrors\": true,\n    \"results\": [\n        {\n            \"result\": {\n                \"actor\": {\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                \"body\": {\n                    \"isRichText\": false,\n                    \"messageSegments\": [\n                        {\n                            \"text\": \"Post Number 1\",\n                            \"type\": \"Text\"\n                        }\n                    ],\n                    \"text\": \"Post Number 1\"\n                },\n                \"capabilities\": {\n                    \"associatedActions\": {\n                        \"platformActionGroups\": []\n                    },\n                    \"bookmarks\": {\n                        \"isBookmarkedByCurrentUser\": false\n                    },\n                    \"chatterLikes\": {\n                        \"isLikedByCurrentUser\": false,\n                        \"likesMessage\": null,\n                        \"myLike\": null,\n                        \"page\": {\n                            \"currentPageToken\": 0,\n                            \"currentPageUrl\": \"/services/data/v58.0/chatter/feed-elements/0D5.../capabilities/chatter-likes/items\",\n                            \"items\": [],\n                            \"nextPageToken\": null,\n                            \"nextPageUrl\": null,\n                            \"previousPageToken\": null,\n                            \"previousPageUrl\": null,\n                            \"total\": 0\n                        }\n                    },\n                    \"close\": {\n                        \"canContextUserUpdateIsClosed\": true,\n                        \"isClosed\": false\n                    },\n                    \"comments\": {\n                        \"page\": {\n                            \"currentPageToken\": null,\n                            \"currentPageUrl\": \"/services/data/v58.0/chatter/feed-elements/0D5.../capabilities/comments/items\",\n                            \"items\": [],\n                            \"nextPageToken\": null,\n                            \"nextPageUrl\": null,\n                            \"previousPageToken\": null,\n                            \"previousPageUrl\": null,\n                            \"total\": 0\n                        }\n                    },\n                    \"edit\": {\n                        \"isEditRestricted\": false,\n                        \"isEditableByMeUrl\": \"/services/data/v58.0/chatter/feed-elements/0D5.../capabilities/edit/is-editable-by-me\",\n                        \"lastEditedBy\": null,\n                        \"lastEditedDate\": null,\n                        \"latestRevision\": 1,\n                        \"relativeLastEditedDate\": null\n                    },\n                    \"interactions\": {\n                        \"count\": 0\n                    },\n                    \"mute\": {\n                        \"isMutedByMe\": false\n                    },\n                    \"readBy\": {\n                        \"isReadByMe\": true,\n                        \"lastReadDateByMe\": \"2023-11-22T11:11:25.000Z\",\n                        \"page\": {\n                            \"currentPageToken\": null,\n                            \"currentPageUrl\": \"/services/data/v58.0/chatter/feed-elements/0D5.../capabilities/read-by/items?pageSize=3\",\n                            \"items\": [],\n                            \"nextPageToken\": null,\n                            \"nextPageUrl\": null,\n                            \"previousPageToken\": null,\n                            \"previousPageUrl\": null,\n                            \"total\": 0\n                        }\n                    },\n                    \"status\": {\n                        \"feedEntityStatus\": \"Published\",\n                        \"isApprovableByMe\": true\n                    },\n                    \"topics\": {\n                        \"canAssignTopics\": true,\n                        \"items\": []\n                    },\n                    \"upDownVote\": {\n                        \"downVoteCount\": 0,\n                        \"myVote\": \"None\",\n                        \"upVoteCount\": 0\n                    }\n                },\n                \"clientInfo\": {\n                    \"applicationName\": \"Postman Playground\",\n                    \"applicationUrl\": null\n                },\n                \"createdDate\": \"2023-11-22T11:11:25.000Z\",\n                \"event\": false,\n                \"feedElementType\": \"FeedItem\",\n                \"hasVerifiedComment\": false,\n                \"header\": {\n                    \"isRichText\": null,\n                    \"messageSegments\": [\n                        {\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                            \"reference\": {\n                                \"id\": \"005...\",\n                                \"url\": \"/services/data/v58.0/chatter/users/005...\"\n                            },\n                            \"text\": \"Name\",\n                            \"type\": \"EntityLink\"\n                        }\n                    ],\n                    \"text\": \"Name\"\n                },\n                \"id\": \"0D5...\",\n                \"isDeleteRestricted\": false,\n                \"isSharable\": false,\n                \"modifiedDate\": \"2023-11-22T11:11:25.000Z\",\n                \"originalFeedItem\": null,\n                \"originalFeedItemActor\": null,\n                \"parent\": {\n                    \"entityLabel\": {\n                        \"label\": \"Account\",\n                        \"labelPlural\": \"Accounts\"\n                    },\n                    \"id\": \"001...\",\n                    \"motif\": {\n                        \"color\": \"5867E8\",\n                        \"largeIconUrl\": \"/img/icon/accounts64.png\",\n                        \"mediumIconUrl\": \"/img/icon/accounts32.png\",\n                        \"smallIconUrl\": \"/img/icon/accounts16.png\",\n                        \"svgIconUrl\": null\n                    },\n                    \"mySubscription\": null,\n                    \"name\": \"Burlington Textiles Corp of America\",\n                    \"type\": \"Account\",\n                    \"url\": \"/services/data/v58.0/chatter/records/001...\"\n                },\n                \"photoUrl\": \"https://<my_domain>/profilephoto/729.../T\",\n                \"relativeCreatedDate\": \"Just now\",\n                \"type\": \"TextPost\",\n                \"url\": \"/services/data/v58.0/chatter/feed-elements/0D5...\",\n                \"visibility\": \"InternalUsers\"\n            },\n            \"statusCode\": 201\n        },\n        {\n            \"result\": {\n                \"actor\": {\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                \"body\": {\n                    \"isRichText\": false,\n                    \"messageSegments\": [\n                        {\n                            \"text\": \"Post Number 2\",\n                            \"type\": \"Text\"\n                        }\n                    ],\n                    \"text\": \"Post Number 2\"\n                },\n                \"capabilities\": {\n                    \"associatedActions\": {\n                        \"platformActionGroups\": []\n                    },\n                    \"bookmarks\": {\n                        \"isBookmarkedByCurrentUser\": false\n                    },\n                    \"chatterLikes\": {\n                        \"isLikedByCurrentUser\": false,\n                        \"likesMessage\": null,\n                        \"myLike\": null,\n                        \"page\": {\n                            \"currentPageToken\": 0,\n                            \"currentPageUrl\": \"/services/data/v58.0/chatter/feed-elements/0D5.../capabilities/chatter-likes/items\",\n                            \"items\": [],\n                            \"nextPageToken\": null,\n                            \"nextPageUrl\": null,\n                            \"previousPageToken\": null,\n                            \"previousPageUrl\": null,\n                            \"total\": 0\n                        }\n                    },\n                    \"close\": {\n                        \"canContextUserUpdateIsClosed\": true,\n                        \"isClosed\": false\n                    },\n                    \"comments\": {\n                        \"page\": {\n                            \"currentPageToken\": null,\n                            \"currentPageUrl\": \"/services/data/v58.0/chatter/feed-elements/0D5.../capabilities/comments/items\",\n                            \"items\": [],\n                            \"nextPageToken\": null,\n                            \"nextPageUrl\": null,\n                            \"previousPageToken\": null,\n                            \"previousPageUrl\": null,\n                            \"total\": 0\n                        }\n                    },\n                    \"edit\": {\n                        \"isEditRestricted\": false,\n                        \"isEditableByMeUrl\": \"/services/data/v58.0/chatter/feed-elements/0D5.../capabilities/edit/is-editable-by-me\",\n                        \"lastEditedBy\": null,\n                        \"lastEditedDate\": null,\n                        \"latestRevision\": 1,\n                        \"relativeLastEditedDate\": null\n                    },\n                    \"interactions\": {\n                        \"count\": 0\n                    },\n                    \"mute\": {\n                        \"isMutedByMe\": false\n                    },\n                    \"readBy\": {\n                        \"isReadByMe\": true,\n                        \"lastReadDateByMe\": \"2023-11-22T11:11:25.000Z\",\n                        \"page\": {\n                            \"currentPageToken\": null,\n                            \"currentPageUrl\": \"/services/data/v58.0/chatter/feed-elements/0D5.../capabilities/read-by/items?pageSize=3\",\n                            \"items\": [],\n                            \"nextPageToken\": null,\n                            \"nextPageUrl\": null,\n                            \"previousPageToken\": null,\n                            \"previousPageUrl\": null,\n                            \"total\": 0\n                        }\n                    },\n                    \"status\": {\n                        \"feedEntityStatus\": \"Published\",\n                        \"isApprovableByMe\": true\n                    },\n                    \"topics\": {\n                        \"canAssignTopics\": true,\n                        \"items\": []\n                    },\n                    \"upDownVote\": {\n                        \"downVoteCount\": 0,\n                        \"myVote\": \"None\",\n                        \"upVoteCount\": 0\n                    }\n                },\n                \"clientInfo\": {\n                    \"applicationName\": \"Postman Playground\",\n                    \"applicationUrl\": null\n                },\n                \"createdDate\": \"2023-11-22T11:11:25.000Z\",\n                \"event\": false,\n                \"feedElementType\": \"FeedItem\",\n                \"hasVerifiedComment\": false,\n                \"header\": {\n                    \"isRichText\": null,\n                    \"messageSegments\": [\n                        {\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                            \"reference\": {\n                                \"id\": \"005...\",\n                                \"url\": \"/services/data/v58.0/chatter/users/005...\"\n                            },\n                            \"text\": \"Name\",\n                            \"type\": \"EntityLink\"\n                        }\n                    ],\n                    \"text\": \"Name\"\n                },\n                \"id\": \"0D5...\",\n                \"isDeleteRestricted\": false,\n                \"isSharable\": true,\n                \"modifiedDate\": \"2023-11-22T11:11:25.000Z\",\n                \"originalFeedItem\": null,\n                \"originalFeedItemActor\": null,\n                \"parent\": {\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                \"photoUrl\": \"https://<my_domain>/profilephoto/729.../T\",\n                \"relativeCreatedDate\": \"Just now\",\n                \"type\": \"TextPost\",\n                \"url\": \"/services/data/v58.0/chatter/feed-elements/0D5...\",\n                \"visibility\": \"AllUsers\"\n            },\n            \"statusCode\": 201\n        },\n        {\n            \"result\": [\n                {\n                    \"errorCode\": \"INVALID_MARKUP\",\n                    \"message\": \"Error while parsing Rich Text Content: The value of attribute &quot;src&quot; associated with an element type &quot;img&quot; must not contain the &#39;&lt;&#39; character.\"\n                }\n            ],\n            \"statusCode\": 400\n        }\n    ]\n}"
    }
  ]
}