TagMangoTagMango Docs
Community

Edit a post in a community channel

PATCH
/api/v1/external/community/channels/{channelId}/posts/{postId}

Edit a post's caption, channels, or comment/like visibility settings. Media, polls, reposts, and scheduling are not editable through this endpoint or the dashboard it mirrors — they're fixed once the post is created. A post that has a poll can never be edited through this endpoint at all, even to change its caption or channels — there's no dashboard entry point for it either.

Every field is optional, but at least one must be given. Fields you omit are left completely unchanged — including postSettings sub-fields: send only the sub-field(s) you want to change, any you omit keep their current stored value rather than resetting to false.

channels replaces the full list of channels this post is published to, and must be non-empty when given — a post must always belong to at least one channel. Every channel must belong to this creator, or the whole request is rejected (no partial update). Removing a channel deletes this post from it, along with that channel's engagement history for this post (likes, comments, views) — this cannot be undone. Adding a channel publishes this post there fresh, starting at zero engagement.

Always acts as the creator: there is no concept of an individual acting fan/UAM user for an API-key request, so this can edit any post in the creator's channels regardless of who originally authored it.

The response contains one channel-post item per channel the post ends up on after the edit — the same complete field shape returned by the list, get, and create operations.

Fails with a 400 if no field is given, if caption is given as an empty string, if channels is given as an empty array, or if the post has a poll.

External access policy

An API key and an authorized white-label host are required. Both tier and plan requirements are enforced.

These requirements apply to the white-label creator for backend-to-backend access. TagMango platform access is not supported.

  • Plans: Unrestricted.

  • Tiers: Unrestricted.

AuthorizationBearer <token>

In: header

Path Parameters

channelId*string

Id of the community channel the post belongs to

postId*string

Id of the post to edit — this is the channel-post id (the top-level _id from the listing/get-one response), not the nested post._id. The same post published to several channels has a different id in each one; always use the id returned for this specific channel, not one from another channel it also appears in. A caption/postSettings edit still applies everywhere the post is published, not just to this one channel-post record — there is no per-channel version of the caption or comment/like visibility settings. Media, polls, and reposts are not editable through this endpoint at all, and a post that has a poll cannot be edited here even to change its caption.

Header Parameters

x-whitelabel-host*string

Host name of the dashboard, ex: mydomain.tagmango.com

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

curl -X PATCH "https://api-prod-new.tagmango.com/api/v1/external/community/channels/61e97c146cf2b4d8c68f3a40/posts/61e97c146cf2b4d8c68f3a4a" \  -H "x-whitelabel-host: string" \  -H "Content-Type: application/json" \  -d '{}'
[
  {
    "_id": "string",
    "postedBy": "string",
    "channel": "string",
    "isPinned": false,
    "isHidden": false,
    "pinnedNumber": 0,
    "pinnedAt": "2019-08-24T14:15:22Z",
    "totalViews": 0,
    "totalLikes": 0,
    "totalComments": 0,
    "totalParentComments": 0,
    "totalRepost": 0,
    "totalPollVotes": 0,
    "pollVotesPerOption": {
      "1": 12,
      "2": 8
    },
    "scheduleAt": "2019-08-24T14:15:22Z",
    "updatedAt": "2019-08-24T14:15:22Z",
    "createdAt": "2019-08-24T14:15:22Z",
    "post": {
      "_id": "string",
      "creator": "string",
      "caption": "string",
      "layoutType": "string",
      "mediaContent": [
        {
          "_id": "string",
          "contentType": "string",
          "contentUrl": "string",
          "asset": "string",
          "thumbnail": "string",
          "compressedVideoUrl": "string",
          "compressedVideoUrlDash": "string",
          "compressedVideoUrlHls": "string",
          "isCompressDone": true,
          "isCompressError": true,
          "compressErrorDescription": "string",
          "compressErrorDescriptionWarnings": "string",
          "transcodingJob": "string",
          "fileKey": "string",
          "fileSize": 0,
          "fileName": "string"
        }
      ],
      "postRefContentTypes": [
        "string"
      ],
      "postSettings": {
        "disableComment": false,
        "hideComment": false,
        "hideLikes": false
      },
      "isDeleted": true,
      "scheduleAt": "2019-08-24T14:15:22Z",
      "updatedAt": "2019-08-24T14:15:22Z",
      "createdAt": "2019-08-24T14:15:22Z",
      "channels": [
        {
          "name": "My Awesome Channel",
          "description": "This channel is about...",
          "communityProfilePicture": "https://example.com/image.jpg",
          "communityProfilePictureType": "image",
          "_id": "string"
        }
      ],
      "postedBy": {
        "name": "John Doe",
        "profilePicUrl": "https://linktoprofilepic.com/pic.jpg",
        "isBlockedFromCommunityEngagement": false,
        "_id": "string",
        "isModerator": true
      },
      "poll": {
        "_id": "string",
        "creator": "string",
        "question": "string",
        "description": "string",
        "pollOptions": [
          {
            "optionContent": "string",
            "optionNumber": 0,
            "optionId": "string"
          }
        ],
        "pollStartAt": "2019-08-24T14:15:22Z",
        "pollEndAt": "2019-08-24T14:15:22Z",
        "isResultVisibleToMembers": true,
        "allowVoteChange": true,
        "createdAt": "2019-08-24T14:15:22Z",
        "updatedAt": "2019-08-24T14:15:22Z"
      },
      "postRef": {
        "_id": "string",
        "creator": "string",
        "caption": "string",
        "layoutType": "string",
        "mediaContent": [
          {
            "_id": "string",
            "contentType": "string",
            "contentUrl": "string",
            "asset": "string",
            "thumbnail": "string",
            "compressedVideoUrl": "string",
            "compressedVideoUrlDash": "string",
            "compressedVideoUrlHls": "string",
            "isCompressDone": true,
            "isCompressError": true,
            "compressErrorDescription": "string",
            "compressErrorDescriptionWarnings": "string",
            "transcodingJob": "string",
            "fileKey": "string",
            "fileSize": 0,
            "fileName": "string"
          }
        ],
        "postRefContentTypes": [
          "string"
        ],
        "postSettings": {
          "disableComment": false,
          "hideComment": false,
          "hideLikes": false
        },
        "isDeleted": true,
        "scheduleAt": "2019-08-24T14:15:22Z",
        "updatedAt": "2019-08-24T14:15:22Z",
        "createdAt": "2019-08-24T14:15:22Z",
        "channels": [
          {
            "name": "My Awesome Channel",
            "description": "This channel is about...",
            "communityProfilePicture": "https://example.com/image.jpg",
            "communityProfilePictureType": "image",
            "_id": "string"
          }
        ],
        "postedBy": {
          "name": "John Doe",
          "profilePicUrl": "https://linktoprofilepic.com/pic.jpg",
          "isBlockedFromCommunityEngagement": false,
          "_id": "string",
          "isModerator": true
        },
        "tqConnectShoutout": {
          "createdAt": "2024-11-04T13:05:43.799Z",
          "updatedAt": "2024-11-04T13:05:43.799Z",
          "_id": "507f1f77bcf86cd799439011",
          "creator": "507f1f77bcf86cd799439012",
          "description": "Outstanding performance on the Q3 project! Your innovative approach to solving the technical challenges and your dedication to helping the team meet deadlines was truly exceptional. Thank you for being such an inspiring colleague.",
          "category": {
            "id": "professional",
            "name": "Professional Excellence",
            "logo": "💼"
          },
          "coverImage": "https://s3.amazonaws.com/bucket/shoutouts/cover-image-123.jpg",
          "visibility": "profile-only",
          "from": {
            "name": "John Doe",
            "profilePicUrl": "https://linktoprofilepic.com/pic.jpg",
            "_id": "string"
          },
          "to": {
            "name": "John Doe",
            "profilePicUrl": "https://linktoprofilepic.com/pic.jpg",
            "_id": "string"
          },
          "channels": [
            {
              "name": "My Awesome Channel",
              "_id": "string"
            }
          ]
        }
      },
      "tqConnectShoutout": {
        "createdAt": "2024-11-04T13:05:43.799Z",
        "updatedAt": "2024-11-04T13:05:43.799Z",
        "_id": "507f1f77bcf86cd799439011",
        "creator": "507f1f77bcf86cd799439012",
        "description": "Outstanding performance on the Q3 project! Your innovative approach to solving the technical challenges and your dedication to helping the team meet deadlines was truly exceptional. Thank you for being such an inspiring colleague.",
        "category": {
          "id": "professional",
          "name": "Professional Excellence",
          "logo": "💼"
        },
        "coverImage": "https://s3.amazonaws.com/bucket/shoutouts/cover-image-123.jpg",
        "visibility": "profile-only",
        "from": {
          "name": "John Doe",
          "profilePicUrl": "https://linktoprofilepic.com/pic.jpg",
          "_id": "string"
        },
        "to": {
          "name": "John Doe",
          "profilePicUrl": "https://linktoprofilepic.com/pic.jpg",
          "_id": "string"
        },
        "channels": [
          {
            "name": "My Awesome Channel",
            "_id": "string"
          }
        ]
      }
    },
    "isLiked": true,
    "votedOption": "string"
  }
]
{
  "code": 400,
  "type": "Bad Request",
  "statusMessage": "BAD_REQUEST",
  "success": false,
  "message": "Invalid request",
  "result": "Invalid request"
}
{
  "code": 401,
  "type": "Unauthorized",
  "statusMessage": "UNAUTHORIZED",
  "message": "Invalid token",
  "result": "Invalid token",
  "success": false
}
{
  "code": 403,
  "type": "Forbidden",
  "statusMessage": "FORBIDDEN",
  "errorCode": "CHANNEL_POST_ACCESS_FORBIDDEN",
  "message": "A `userId` was provided, but that member has no active subscription or badge granting access to this channel (or the channel is hidden). Distinct from the 401 returned for an invalid/missing API key.",
  "result": "A `userId` was provided, but that member has no active subscription or badge granting access to this channel (or the channel is hidden). Distinct from the 401 returned for an invalid/missing API key.",
  "success": false
}

{
  "code": 404,
  "type": "Not Found",
  "statusMessage": "NOT_FOUND",
  "errorCode": "CHANNEL_POST_CHANNEL_NOT_FOUND",
  "message": "The channel does not exist, is archived, or the community feature is not active for this creator.",
  "result": "The channel does not exist, is archived, or the community feature is not active for this creator.",
  "success": false
}

{
  "code": 429,
  "type": "Too Many Requests",
  "statusMessage": "TOO_MANY_REQUESTS",
  "message": "Request limit exceeded. try after 10 seconds",
  "result": "Request limit exceeded. try after 10 seconds",
  "success": false
}