API docs

Edit content

Updates only the fields you send. Fields you don't send are left as they are.

Version: v1

04 Edit content

4.1 Description

PUT/contents/{id}

Only the six fields in the table below can be changed. Other values are ignored without error, so the idempotency identifier (external_id) and content type (content_type) can't be changed with this call. If none of the six fields are sent, the response is 400.

hashtags · platform_metadata · metadata are replaced as a whole. If you send only part, the rest is lost, so fetch the current value first, edit it, and send it back in full.

The shape of platform_metadata and the allowed channel keys are the same as described in POST /contents. The thing to watch here is full replacement.

Written on one line, it's {"platform_metadata": {"youtube": {"title": "유튜브용"}, "instagram": {"body": "인스타용"}}}. If you send {"platform_metadata": {"youtube": {"title": "새 제목"}}} here to change only YouTube, the Instagram part is lost. Edit the value you got from GET /contents first and send it back in full.

4.2 Parameters

Update content parameters
NameCategoryDescription
workspaceRequiredWorkspace code
titleOptionalShared title. 1 to 500 characters
bodyOptionalShared body or description. Up to 10000 characters
hashtagsOptionalShared hashtags. Up to 60 strings, each up to 100 characters. Replaced as a whole
languageOptionalLanguage code (e.g. ko · en-US)
platform_metadataOptionalPer-platform title and body overrides. Keys are channel keys; values are objects containing title · body. Must be an object, not an array, and is replaced as a whole
metadataOptionalExtended metadata from the production system. Must be an object, not an array, and is replaced as a whole

4.3 Request

Terminal — bash
curl -X PUT https://moacast.com/api/moacast/v1/contents/{id} \
  -H 'Authorization: Bearer <ACCESS_TOKEN>' \
  -H 'Content-Type: application/json' \
  -d '{"workspace":"a1b2c3d4"}'

4.4 Success response

Response — JSON
{
    "result": "SUCCESS",
    "result_code": 0,
    "message": "콘텐츠를 수정했습니다.",
    "data": {
        "content": {
            "id": 12,
            "title": "9월 넷째 주 요약 (수정)",
            "language": "ko",
            "hashtags": [
                "주간요약"
            ],
            "publications": []
        }
    }
}

4.5 Field

Update content fields
FieldTypeDescription
contentobjectThe updated content. Same shape as one entry of GET /contents

4.6 Failed

Update content failures
CodeHTTPWhen
9912400workspace was not provided
1004400A value doesn't meet the rules, or no editable field was sent
1001401Header is missing or the token is invalid
1002403The workspace is suspended
1003403A write call made with a session, but the request didn't originate from this site
2000404The workspace doesn't exist, or the content can't be found
5000503The content store isn't ready

The response is the content re-read after the write. It doesn't echo back the values you sent.