---
title: POST /v3/publishing-events/{publishing_event_id}/publishing-metadata
slug: content-marketing-platform/api/post-v3publishing-eventspublishingeventidpublishing-metadata
docTags: 
createdAt: 2026-10-01T18:51:26.265Z
---

{
  "id": "daMm7_oC0H4o3tym4HMRI",
  "type": "api-oas-v2",
  "data": {
    "method": "POST",
    "url": "https://api.cmp.optimizely.com/v3/publishing-events/{publishing_event_id}/publishing-metadata",
    "servers": [
      {
        "url": "https://api.cmp.optimizely.com/v3/publishing-events/{publishing_event_id}/publishing-metadata",
        "description": "v3 version of Optimizely CMP Open API"
      }
    ],
    "name": "POST /v3/publishing-events/{publishing_event_id}/publishing-metadata",
    "description": "Create asset metadata in bulk.",
    "contentType": "application/json",
    "request": {
      "pathParameters": [
        {
          "kind": "required",
          "name": "publishing_event_id",
          "type": "string",
          "example": "1d9d8aeca10811ebbc640242ac12001b",
          "description": "Unique identifier of the publishing event"
        }
      ],
      "headerParameters": [
        {
          "name": "accept",
          "type": "string",
          "kind": "optional",
          "description": "Generated from available response content types",
          "enum": [
            "application/json"
          ],
          "default": "application/json"
        }
      ],
      "queryParameters": [],
      "bodyDataParameters": [
        {
          "kind": "required",
          "name": "body",
          "type": "object",
          "description": "Payload to create publishing metadata for all assets in a publishing event",
          "customType": "PublishingEventMetadataBulkCreateRequest",
          "schema": [
            {
              "name": "data",
              "kind": "required",
              "type": "array",
              "description": "List publishing metadata to be posted",
              "modelRef": "#/components/schemas/PublishingEventMetadataCreateRequest",
              "customType": "PublishingEventMetadataCreateRequest[]",
              "schema": [
                {
                  "name": "asset_id",
                  "kind": "required",
                  "type": "string",
                  "nullable": false,
                  "description": "Unique identifier of the asset",
                  "example": "4567m474974987479856456457"
                },
                {
                  "name": "status",
                  "kind": "required",
                  "type": "string<published | unpublished | synced | failed>",
                  "nullable": false,
                  "description": "Publishing status of the asset",
                  "example": "published",
                  "enum": [
                    "published",
                    "unpublished",
                    "synced",
                    "failed"
                  ]
                },
                {
                  "name": "status_message",
                  "kind": "optional",
                  "type": "string",
                  "nullable": false,
                  "description": "Any message patched by the integrator about the asset's status",
                  "example": "This asset is in review"
                },
                {
                  "name": "locale",
                  "kind": "optional",
                  "type": "string",
                  "nullable": false,
                  "description": "The locale to which the asset is being published",
                  "example": "en"
                },
                {
                  "name": "public_url",
                  "kind": "optional",
                  "type": "string",
                  "nullable": false,
                  "description": "public url of asset",
                  "example": "https://example.com/test"
                },
                {
                  "name": "publishing_destination_updated_at",
                  "kind": "optional",
                  "type": "string<date-time>",
                  "nullable": false,
                  "description": "Timestamp of when the publishing destination of the asset was updated",
                  "example": "2019-10-06T13:15:30Z",
                  "format": "date-time"
                }
              ]
            }
          ],
          "modelRef": "#/components/schemas/PublishingEventMetadataBulkCreateRequest",
          "isExpanded": true
        }
      ],
      "formDataParameters": [],
      "oAuthParameters": [
        {
          "id": "OAuth2",
          "name": "OAuth2",
          "kind": "optional",
          "type": "oauth2",
          "oauth2Flows": {
            "clientCredentials": {
              "tokenUrl": "https://accounts.cmp.optimizely.com/o/oauth2/v1/token",
              "scopes": {}
            },
            "authorizationCode": {
              "authorizationUrl": "https://accounts.cmp.optimizely.com/o/oauth2/v1/auth",
              "tokenUrl": "https://accounts.cmp.optimizely.com/o/oauth2/v1/token",
              "scopes": {
                "openid": "Grants the ability to receive a unique identifier for the user.",
                "profile": "Grants access to user profile information.",
                "offline_access": "Grants the ability to refresh access_token using the refresh token even when user is not present (not logged in)."
              }
            }
          },
          "requiredScopes": [
            "openid",
            "profile",
            "offline_access"
          ]
        }
      ],
      "cookieParameters": []
    },
    "responses": [
      {
        "statusCode": "200",
        "description": "Fetched all publishing metadata associated with the publishing event",
        "jsonExample": "",
        "isExpanded": true,
        "schema": [
          {
            "kind": "optional",
            "type": "object",
            "description": "",
            "customType": "PublishingEventMetadataBulkCreateResponse",
            "schema": [
              {
                "name": "data",
                "kind": "required",
                "type": "array",
                "description": "List of successfully posted publishing metadata",
                "modelRef": "#/components/schemas/PublishingEventMetadataResponse",
                "customType": "PublishingEventMetadataResponse[]",
                "schema": [
                  {
                    "name": "id",
                    "kind": "required",
                    "type": "string",
                    "nullable": false,
                    "description": "Unique identifier of publishing metadata",
                    "example": "5ebcd5644967474414564"
                  },
                  {
                    "name": "asset_id",
                    "kind": "required",
                    "type": "string",
                    "nullable": false,
                    "description": "Unique identifier of asset",
                    "example": "4567m74974987479856456456"
                  },
                  {
                    "name": "asset_type",
                    "kind": "required",
                    "type": "string<article | image | video | raw_file | structured_content>",
                    "nullable": false,
                    "description": "Type of the asset",
                    "example": "article",
                    "enum": [
                      "article",
                      "image",
                      "video",
                      "raw_file",
                      "structured_content"
                    ]
                  },
                  {
                    "name": "status",
                    "kind": "required",
                    "type": "string<published | unpublished | synced | failed | >",
                    "nullable": true,
                    "description": "Publishing status of the asset",
                    "example": "published",
                    "enum": [
                      "published",
                      "unpublished",
                      "synced",
                      "failed",
                      "null"
                    ]
                  },
                  {
                    "name": "status_message",
                    "kind": "required",
                    "type": "string",
                    "nullable": true,
                    "description": "Any message patched by the integrator about the asset's status",
                    "example": "This asset is in review"
                  },
                  {
                    "name": "locale",
                    "kind": "required",
                    "type": "string",
                    "nullable": true,
                    "description": "The locale to which the asset is being published.",
                    "example": "en"
                  },
                  {
                    "name": "public_url",
                    "kind": "required",
                    "type": "string",
                    "nullable": true,
                    "description": "Public URL of the asset",
                    "example": "https://example.com/test"
                  },
                  {
                    "name": "publishing_destination_updated_at",
                    "kind": "required",
                    "type": "string<date-time>",
                    "nullable": true,
                    "description": "Timestamp of when the publishing destination of the asset was updated",
                    "example": "2019-10-06T13:15:30Z",
                    "format": "date-time"
                  },
                  {
                    "name": "links",
                    "kind": "required",
                    "type": "object",
                    "description": "Meta links",
                    "example": "",
                    "schema": [
                      {
                        "name": "self",
                        "kind": "required",
                        "type": "string",
                        "description": "URL of the publishing metadata",
                        "example": "https://api.cmp.optimizely.com/v3/publishing-events/1d9d8aeca10811ebbc640242ac12001b/assets/1d9d8aeca10811ebbc640242ac12003c/publishing-metadata/5ebcd5644967474414564"
                      },
                      {
                        "name": "publishing_event",
                        "kind": "required",
                        "type": "string",
                        "description": "URL of the publishing event",
                        "example": "https://api.cmp.optimizely.com/v3/publishing-events/1d9d8aeca10811ebbc640242ac12001b"
                      },
                      {
                        "name": "asset",
                        "kind": "required",
                        "type": "string",
                        "description": "URL of the asset",
                        "example": "https://api.cmp.optimizely.com/v3/articles/4567m474974987479856456456"
                      }
                    ]
                  }
                ]
              },
              {
                "name": "errors",
                "kind": "required",
                "type": "array",
                "description": "List of errors of assets for which publishing metadata failed to post",
                "example": "",
                "itemType": "object",
                "customType": "object[]",
                "schema": [
                  {
                    "name": "error_code",
                    "kind": "required",
                    "type": "string<canonical-link-error | unknown-asset | metadata-exists | duplicate-metadata | invalid-status | missing-public-url | public-url-not-allowed | domain-not-whitelisted | missing-publishing-destination-updated-at | publishing-destination-updated-at-not-allowed | missing-locale | locale-not-allowed>",
                    "nullable": false,
                    "description": "Custom error code",
                    "example": "canonical-link-error",
                    "enum": [
                      "canonical-link-error",
                      "unknown-asset",
                      "metadata-exists",
                      "duplicate-metadata",
                      "invalid-status",
                      "missing-public-url",
                      "public-url-not-allowed",
                      "domain-not-whitelisted",
                      "missing-publishing-destination-updated-at",
                      "publishing-destination-updated-at-not-allowed",
                      "missing-locale",
                      "locale-not-allowed"
                    ]
                  },
                  {
                    "name": "asset_id",
                    "kind": "required",
                    "type": "string",
                    "nullable": false,
                    "description": "Unique identifier of the asset that failed to update its publishing metadata",
                    "example": "4567m474974987479856456457"
                  },
                  {
                    "name": "locale",
                    "kind": "required",
                    "type": "string",
                    "nullable": true,
                    "description": "locale of the asset",
                    "example": "en"
                  },
                  {
                    "name": "message",
                    "kind": "required",
                    "type": "string",
                    "description": "Description of the error",
                    "example": "A canonical URL already exists for the task article '5e46456144645674564456'"
                  }
                ]
              }
            ],
            "modelRef": "#/components/schemas/PublishingEventMetadataBulkCreateResponse",
            "isExpanded": true
          }
        ]
      },
      {
        "statusCode": "400",
        "description": "Client error",
        "jsonExample": "",
        "isExpanded": true,
        "schema": [
          {
            "kind": "optional",
            "type": "object",
            "example": "{\"message\":\"Unsupported arguments: a,b,c\"}",
            "description": "Error payload",
            "customType": "Error",
            "schema": [
              {
                "name": "message",
                "kind": "required",
                "type": "string",
                "description": "Message describing the error",
                "example": "Not found"
              },
              {
                "name": "errors",
                "kind": "optional",
                "type": "map",
                "description": "Additional information",
                "example": "",
                "customType": "map<string, string>",
                "schema": []
              }
            ],
            "modelRef": "#/components/schemas/Error",
            "isExpanded": true
          }
        ]
      },
      {
        "statusCode": "401",
        "description": "Authorization error",
        "jsonExample": "",
        "isExpanded": true,
        "schema": [
          {
            "kind": "optional",
            "type": "object",
            "example": "{\"message\":\"Unauthorized\"}",
            "description": "Error payload",
            "customType": "Error",
            "schema": [
              {
                "name": "message",
                "kind": "required",
                "type": "string",
                "description": "Message describing the error",
                "example": "Not found"
              },
              {
                "name": "errors",
                "kind": "optional",
                "type": "map",
                "description": "Additional information",
                "example": "",
                "customType": "map<string, string>",
                "schema": []
              }
            ],
            "modelRef": "#/components/schemas/Error",
            "isExpanded": true
          }
        ]
      },
      {
        "statusCode": "403",
        "description": "Permission error",
        "jsonExample": "",
        "isExpanded": true,
        "schema": [
          {
            "kind": "optional",
            "type": "object",
            "example": "{\"message\":\"You do not have the permission to perform this operation\"}",
            "description": "Error payload",
            "customType": "Error",
            "schema": [
              {
                "name": "message",
                "kind": "required",
                "type": "string",
                "description": "Message describing the error",
                "example": "Not found"
              },
              {
                "name": "errors",
                "kind": "optional",
                "type": "map",
                "description": "Additional information",
                "example": "",
                "customType": "map<string, string>",
                "schema": []
              }
            ],
            "modelRef": "#/components/schemas/Error",
            "isExpanded": true
          }
        ]
      },
      {
        "statusCode": "404",
        "description": "Not found error",
        "jsonExample": "",
        "isExpanded": true,
        "schema": [
          {
            "kind": "optional",
            "type": "object",
            "example": "{\"message\":\"Resource not found\"}",
            "description": "Error payload",
            "customType": "Error",
            "schema": [
              {
                "name": "message",
                "kind": "required",
                "type": "string",
                "description": "Message describing the error",
                "example": "Not found"
              },
              {
                "name": "errors",
                "kind": "optional",
                "type": "map",
                "description": "Additional information",
                "example": "",
                "customType": "map<string, string>",
                "schema": []
              }
            ],
            "modelRef": "#/components/schemas/Error",
            "isExpanded": true
          }
        ]
      }
    ],
    "hasXCodeSamples": false,
    "examples": {
      "languages": [
        {
          "id": "uqsfzImBlX3IFtewBXtlv",
          "language": "curl",
          "label": "cURL",
          "code": "curl --request POST \\\n     --url https://api.cmp.optimizely.com/v3/publishing-events/{publishing_event_id}/publishing-metadata \\\n     --header 'accept: application/json' \\\n     --header 'content-type: application/json' \\\n     --data '{\n     \"data\": [\n     {\n     \"asset_id\": \"4567m474974987479856456457\",\n     \"status\": \"published\"\n     }\n     ]\n     }'"
        },
        {
          "id": "xWb8uHCGpHGDvGYRG9I2k",
          "language": "javascript",
          "label": "javascript",
          "code": "var myHeaders = new Headers();\nmyHeaders.append(\"accept\", \"application/json\");\nmyHeaders.append(\"content-type\", \"application/json\");\n\nvar raw = JSON.stringify({\n   \"data\": [\n      {\n         \"asset_id\": \"4567m474974987479856456457\",\n         \"status\": \"published\"\n      }\n   ]\n});\n\nvar requestOptions = {\n   method: 'POST',\n   headers: myHeaders,\n   body: raw,\n   redirect: 'follow'\n};\n\nfetch(\"https://api.cmp.optimizely.com/v3/publishing-events/{publishing_event_id}/publishing-metadata\", requestOptions)\n   .then(response => response.text())\n   .then(result => console.log(result))\n   .catch(error => console.log('error', error));"
        },
        {
          "id": "alB1Q1xDL2-K545wfmVtg",
          "language": "ruby",
          "label": "Ruby",
          "code": "require \"uri\"\nrequire \"json\"\nrequire \"net/http\"\n\nurl = URI(\"https://api.cmp.optimizely.com/v3/publishing-events/{publishing_event_id}/publishing-metadata\")\n\nhttps = Net::HTTP.new(url.host, url.port)\nhttps.use_ssl = true\n\nrequest = Net::HTTP::Post.new(url)\nrequest[\"accept\"] = \"application/json\"\nrequest[\"content-type\"] = \"application/json\"\nrequest.body = JSON.dump({\n   \"data\": [\n      {\n         \"asset_id\": \"4567m474974987479856456457\",\n         \"status\": \"published\"\n      }\n   ]\n})\n\nresponse = https.request(request)\nputs response.read_body\n"
        },
        {
          "id": "1JdAv2ck8K3kbf5yeJYW6",
          "language": "python",
          "label": "Python",
          "code": "import requests\nimport json\n\nurl = \"https://api.cmp.optimizely.com/v3/publishing-events/{publishing_event_id}/publishing-metadata\"\n\npayload = json.dumps({\n   \"data\": [\n      {\n         \"asset_id\": \"4567m474974987479856456457\",\n         \"status\": \"published\"\n      }\n   ]\n})\nheaders = {\n   'accept': 'application/json',\n   'content-type': 'application/json'\n}\n\nresponse = requests.request(\"POST\", url, headers=headers, data=payload)\n\nprint(response.text)\n"
        }
      ],
      "selectedLanguageId": "uqsfzImBlX3IFtewBXtlv"
    },
    "results": {
      "languages": [
        {
          "id": "response-0-200",
          "language": "200",
          "code": "// Fetched all publishing metadata associated with the publishing event\n{\n  \"data\": [\n    {\n      \"id\": \"5ebcd5644967474414564\",\n      \"asset_id\": \"4567m74974987479856456456\",\n      \"asset_type\": \"article\",\n      \"status\": \"published\",\n      \"status_message\": \"This asset is in review\",\n      \"locale\": \"en\",\n      \"public_url\": \"https://example.com/test\",\n      \"publishing_destination_updated_at\": \"2019-10-06T13:15:30Z\",\n      \"links\": {\n        \"self\": \"https://api.cmp.optimizely.com/v3/publishing-events/1d9d8aeca10811ebbc640242ac12001b/assets/1d9d8aeca10811ebbc640242ac12003c/publishing-metadata/5ebcd5644967474414564\",\n        \"publishing_event\": \"https://api.cmp.optimizely.com/v3/publishing-events/1d9d8aeca10811ebbc640242ac12001b\",\n        \"asset\": \"https://api.cmp.optimizely.com/v3/articles/4567m474974987479856456456\"\n      }\n    }\n  ],\n  \"errors\": [\n    {\n      \"error_code\": \"canonical-link-error\",\n      \"asset_id\": \"4567m474974987479856456457\",\n      \"locale\": \"en\",\n      \"message\": \"A canonical URL already exists for the task article '5e46456144645674564456'\"\n    }\n  ]\n}"
        },
        {
          "id": "response-1-400",
          "language": "400",
          "code": "// Client error\n{\n  \"message\": \"Not found\",\n  \"errors\": \"\"\n}"
        },
        {
          "id": "response-2-401",
          "language": "401",
          "code": "// Authorization error\n{\n  \"message\": \"Not found\",\n  \"errors\": \"\"\n}"
        },
        {
          "id": "response-3-403",
          "language": "403",
          "code": "// Permission error\n{\n  \"message\": \"Not found\",\n  \"errors\": \"\"\n}"
        },
        {
          "id": "response-4-404",
          "language": "404",
          "code": "// Not found error\n{\n  \"message\": \"Not found\",\n  \"errors\": \"\"\n}"
        }
      ],
      "selectedLanguageId": "response-0-200"
    }
  },
  "children": [
    {
      "text": ""
    }
  ]
}