Download OpenAPI specification:Download
Using this REST API, you can create and manage content templates and fragments, which are entities that allow you to easily reuse custom content across Journey Optimizer campaigns and journeys. To learn more about content templates and fragments, refer to Journey Optimizer documentation.
This API could be used for creating a new content template
subType field is only supported for content template with code channel
API to create a new Content Template.
Resource successfully created
Bad Request
Not Authorized
Forbidden
{- "name": "Cyber Monday Sale - Header !!",
- "description": "Cyber Monday Sale - Header Banner!!",
- "templateType": "html",
- "channels": [
- "email"
], - "source": {
- "origin": "ajo",
- "metadata": { }
}, - "subType": "HTML",
- "template": {
- "html": "<html> Hi {{profile.person.name}} its a great day to shop !! </html>",
- "editorContext": { }
}
}
{- "path": "/templates",
- "request-id": [
- "9db4dd09-455f-44eb-a0e3-aca3342745d2"
], - "title": "Error Title",
- "status": 0,
- "report": {
- "tenantInfo": {
- "sandboxName": "cjm-team",
- "sandboxId": "70f58060-5d47-11ea-bdff-a5384333ff34",
- "imsOrgId": "745F37C35E4B776E0A49421B@AdobeOrg"
}, - "additionalContext": {
- "detailedMessage": "templates"
}
}, - "error-chain": [
- {
- "serviceId": "contentservice",
- "errorCode": "CJMMAS-*",
- "invokingServiceId": "cjm-content-service",
- "unixTimeStampMs": 1610446917396
}
]
}
Content Template Listing API response.
Bad Request
Not Authorized
Forbidden
{- "_page": {
- "orderBy": "-modifiedAt",
- "start": "eyJtb2RpZmllZEF0IjoxNjA2OTc2NzI3NTQ5fQ==",
- "next": "eyJtb2RpZmllZEF0IjoxNjA2OTc2NzI3NTQ5fQ==",
- "count": 10
}, - "items": [
- {
- "subType": "HTML",
- "id": "b6d70a45-a149-453b-85ba-809a5d40066d",
- "name": "Cyber Monday Sale - Header !!",
- "description": "Cyber Monday Sale - Header Banner!!",
- "templateType": "html",
- "channels": "email",
- "labels": [
- "custom/sensitive-data"
], - "source": {
- "origin": "ajo",
- "metadata": { }
}, - "createdAt": "2016-08-29T09:12:33.001Z",
- "createdBy": "4c0190e5d702748f0931@AdobeId",
- "modifiedAt": "2016-08-29T09:12:33.001Z",
- "modifiedBy": "4c0190e5d702748f0931@AdobeId",
- "self": {
- "href": "/templates/b6d70a45-a149-453b-85ba-809a5d40066d"
}
}
], - "_links": {
- "next": {
- "href": "/templates?start=eyJtb2RpZmllZEF0IjoxNjA2OTc2NzI3NTQ5fQ==&limit=20&orderBy=%2BmodifiedAt"
}, - "page": {
- "href": "/templates?orderBy={orderBy}&start={start}&limit={limit}"
}
}
}
Fetch Content template detail with given id.
Successful operation
Bad Request
Not Authorized
Forbidden
Resource Not found
{- "id": "b6d70a45-a149-453b-85ba-809a5d40066d",
- "name": "Cyber Monday Sale - Header !!",
- "description": "Cyber Monday Sale - Header Banner!!",
- "templateType": "html",
- "channels": "email",
- "labels": [
- "custom/sensitive-data"
], - "source": {
- "origin": "ajo",
- "metadata": { }
}, - "subType": "HTML",
- "createdAt": "2016-08-29T09:12:33.001Z",
- "createdBy": "4c0190e5d702748f0931@AdobeId",
- "modifiedAt": "2016-08-29T09:12:33.001Z",
- "modifiedBy": "4c0190e5d702748f0931@AdobeId",
- "template": {
- "html": "<html> Hi {{profile.person.name}} its a great day to shop !! </html>",
- "editorContext": { }
}
}
API to update Content Template By Id.
subType field is only supported for content template with code channel
New/Updated Content Template Payload.
No content
Bad Request
Not Authorized
Forbidden
Resource Not found
Conflict
{- "name": "Cyber Monday Sale - Header !!",
- "description": "Cyber Monday Sale - Header Banner!!",
- "templateType": "html",
- "channels": [
- "email"
], - "source": {
- "origin": "ajo",
- "metadata": { }
}, - "subType": "HTML",
- "template": {
- "html": "<html> Hi {{profile.person.name}} its a great day to shop !! </html>",
- "editorContext": { }
}
}
{- "path": "/templates",
- "request-id": [
- "9db4dd09-455f-44eb-a0e3-aca3342745d2"
], - "title": "Error Title",
- "status": 0,
- "report": {
- "tenantInfo": {
- "sandboxName": "cjm-team",
- "sandboxId": "70f58060-5d47-11ea-bdff-a5384333ff34",
- "imsOrgId": "745F37C35E4B776E0A49421B@AdobeOrg"
}, - "additionalContext": {
- "detailedMessage": "templates"
}
}, - "error-chain": [
- {
- "serviceId": "contentservice",
- "errorCode": "CJMMAS-*",
- "invokingServiceId": "cjm-content-service",
- "unixTimeStampMs": 1610446917396
}
]
}
Delete Content Template by Id.
No content
Bad Request
Not Authorized
Forbidden
Resource Not found
{- "path": "/templates",
- "request-id": [
- "9db4dd09-455f-44eb-a0e3-aca3342745d2"
], - "title": "Error Title",
- "status": 0,
- "report": {
- "tenantInfo": {
- "sandboxName": "cjm-team",
- "sandboxId": "70f58060-5d47-11ea-bdff-a5384333ff34",
- "imsOrgId": "745F37C35E4B776E0A49421B@AdobeOrg"
}, - "additionalContext": {
- "detailedMessage": "templates"
}
}, - "error-chain": [
- {
- "serviceId": "contentservice",
- "errorCode": "CJMMAS-*",
- "invokingServiceId": "cjm-content-service",
- "unixTimeStampMs": 1610446917396
}
]
}
Patch Content Template with given id. Expects Patch request in JSON-patch format (RFC 6902)
JSON Patch guidelines Supported paths are ["/name", "/description" ]
Successful operation
Bad Request
Not Authorized
Forbidden
Resource Not found
Conflict
[- {
- "op": "add",
- "path": "string",
- "value": { },
- "from": "string"
}
]
{- "path": "/templates",
- "request-id": [
- "9db4dd09-455f-44eb-a0e3-aca3342745d2"
], - "title": "Error Title",
- "status": 0,
- "report": {
- "tenantInfo": {
- "sandboxName": "cjm-team",
- "sandboxId": "70f58060-5d47-11ea-bdff-a5384333ff34",
- "imsOrgId": "745F37C35E4B776E0A49421B@AdobeOrg"
}, - "additionalContext": {
- "detailedMessage": "templates"
}
}, - "error-chain": [
- {
- "serviceId": "contentservice",
- "errorCode": "CJMMAS-*",
- "invokingServiceId": "cjm-content-service",
- "unixTimeStampMs": 1610446917396
}
]
}
This API could be used for creating a new content fragment
new fragment
Resource successfully created
Bad Request
Not Authorized
Forbidden
{- "name": "Cyber Monday Sale - Header !!",
- "description": "Cyber Monday Sale - Header Banner!!",
- "type": "html",
- "channels": [
- "email"
], - "source": {
- "origin": "ajo",
- "metadata": { }
}, - "fragment": {
- "content": "<div> Hi {{profile.person.name}} its a great day to shop !! </div>",
- "editorContext": { }
}
}
{- "path": "/templates",
- "request-id": [
- "9db4dd09-455f-44eb-a0e3-aca3342745d2"
], - "title": "Error Title",
- "status": 0,
- "report": {
- "tenantInfo": {
- "sandboxName": "cjm-team",
- "sandboxId": "70f58060-5d47-11ea-bdff-a5384333ff34",
- "imsOrgId": "745F37C35E4B776E0A49421B@AdobeOrg"
}, - "additionalContext": {
- "detailedMessage": "templates"
}
}, - "error-chain": [
- {
- "serviceId": "contentservice",
- "errorCode": "CJMMAS-*",
- "invokingServiceId": "cjm-content-service",
- "unixTimeStampMs": 1610446917396
}
]
}
Content Fragment Listing API response.
Bad Request
Not Authorized
Forbidden
{- "_page": {
- "orderBy": "-modifiedAt",
- "start": "eyJtb2RpZmllZEF0IjoxNjA2OTc2NzI3NTQ5fQ==",
- "next": "eyJtb2RpZmllZEF0IjoxNjA2OTc2NzI3NTQ5fQ==",
- "count": 10
}, - "items": [
- {
- "id": "b6d70a45-a149-453b-85ba-809a5d40066d",
- "name": "Cyber Monday Sale - Header !!",
- "description": "Cyber Monday Sale - Header Banner!!",
- "type": "html",
- "status": "DRAFT",
- "channels": "email",
- "labels": [
- "custom/sensitive-data"
], - "source": {
- "origin": "ajo",
- "metadata": { }
}, - "createdAt": "2016-08-29T09:12:33.001Z",
- "createdBy": "4c0190e5d702748f0931@AdobeId",
- "modifiedAt": "2016-08-29T09:12:33.001Z",
- "modifiedBy": "4c0190e5d702748f0931@AdobeId",
- "self": {
- "href": "/fragments/b6d70a45-a149-453b-85ba-809a5d40066d"
}
}
], - "_links": {
- "next": {
- "href": "/fragments?start=eyJtb2RpZmllZEF0IjoxNjA2OTc2NzI3NTQ5fQ==&limit=20&orderBy=%2BmodifiedAt"
}, - "page": {
- "href": "/fragments?orderBy={orderBy}&start={start}&limit={limit}"
}
}
}
Fetch Content Fragment detail by Id.
Successful operation
Bad Request
Not Authorized
Forbidden
Resource Not found
{- "id": "b6d70a45-a149-453b-85ba-809a5d40066d",
- "name": "Cyber Monday Sale - Header !!",
- "description": "Cyber Monday Sale - Header Banner!!",
- "type": "html",
- "status": "DRAFT",
- "channels": "email",
- "labels": [
- "custom/sensitive-data"
], - "source": {
- "origin": "ajo",
- "metadata": { }
}, - "createdAt": "2016-08-29T09:12:33.001Z",
- "createdBy": "4c0190e5d702748f0931@AdobeId",
- "modifiedAt": "2016-08-29T09:12:33.001Z",
- "modifiedBy": "4c0190e5d702748f0931@AdobeId",
- "fragment": {
- "content": "<div> Hi {{profile.person.name}} its a great day to shop !! </div>",
- "editorContext": { }
}
}
API to update Content Fragment By Id.
New/Updated Content Fragment Payload.
No content
Bad Request
Not Authorized
Forbidden
Resource Not found
Conflict
{- "name": "Cyber Monday Sale - Header !!",
- "description": "Cyber Monday Sale - Header Banner!!",
- "type": "html",
- "channels": [
- "email"
], - "source": {
- "origin": "ajo",
- "metadata": { }
}, - "fragment": {
- "content": "<div> Hi {{profile.person.name}} its a great day to shop !! </div>",
- "editorContext": { }
}
}
{- "path": "/templates",
- "request-id": [
- "9db4dd09-455f-44eb-a0e3-aca3342745d2"
], - "title": "Error Title",
- "status": 0,
- "report": {
- "tenantInfo": {
- "sandboxName": "cjm-team",
- "sandboxId": "70f58060-5d47-11ea-bdff-a5384333ff34",
- "imsOrgId": "745F37C35E4B776E0A49421B@AdobeOrg"
}, - "additionalContext": {
- "detailedMessage": "templates"
}
}, - "error-chain": [
- {
- "serviceId": "contentservice",
- "errorCode": "CJMMAS-*",
- "invokingServiceId": "cjm-content-service",
- "unixTimeStampMs": 1610446917396
}
]
}
Patch fragment with given id. Expects Patch request in JSON-patch format (RFC 6902)
Path supported: "/name", "/description"
No content
Bad Request
Not Authorized
Forbidden
Resource Not found
[- {
- "op": "add",
- "path": "string",
- "value": { },
- "from": "string"
}
]
{- "path": "/templates",
- "request-id": [
- "9db4dd09-455f-44eb-a0e3-aca3342745d2"
], - "title": "Error Title",
- "status": 0,
- "report": {
- "tenantInfo": {
- "sandboxName": "cjm-team",
- "sandboxId": "70f58060-5d47-11ea-bdff-a5384333ff34",
- "imsOrgId": "745F37C35E4B776E0A49421B@AdobeOrg"
}, - "additionalContext": {
- "detailedMessage": "templates"
}
}, - "error-chain": [
- {
- "serviceId": "contentservice",
- "errorCode": "CJMMAS-*",
- "invokingServiceId": "cjm-content-service",
- "unixTimeStampMs": 1610446917396
}
]
}
API to publish fragment.
Publishing a content fragment will freeze the content of the fragment. Notably, it is a pre-requisite to publish a fragment before activating / publishing a campaign / journey. Fragment Publication is an async process under the hood which can take a few seconds. The status of the fragment publication can be fetched by lastPublicationStatus API whereas the content of the last successful publication of a fragment can be fetched by the liveFragment API.
publish request body
Request successfuly accepted
Bad Request
Not Authorized
Forbidden
{- "fragmentId": "b6d70a45-a149-453b-85ba-809a5d40066d"
}
{- "path": "/templates",
- "request-id": [
- "9db4dd09-455f-44eb-a0e3-aca3342745d2"
], - "title": "Error Title",
- "status": 0,
- "report": {
- "tenantInfo": {
- "sandboxName": "cjm-team",
- "sandboxId": "70f58060-5d47-11ea-bdff-a5384333ff34",
- "imsOrgId": "745F37C35E4B776E0A49421B@AdobeOrg"
}, - "additionalContext": {
- "detailedMessage": "templates"
}
}, - "error-chain": [
- {
- "serviceId": "contentservice",
- "errorCode": "CJMMAS-*",
- "invokingServiceId": "cjm-content-service",
- "unixTimeStampMs": 1610446917396
}
]
}
Fetch content of fragment's last successful publication. A fragment can have multiple publications. A publication can either be successful, in progress or can error out. This API will be responsible for fetching the content of the last successful publication for a fragment.
Successful operation
Bad Request
Not Authorized
Forbidden
Resource Not found
{- "type": "html",
- "fragment": {
- "content": "<div> Hi {{profile.person.name}} its a great day to shop !! </div>"
}
}
Fetch the status of last publication request for a content fragment by Id. A fragment can have multiple publications. A publication can either be successful, in progress or can error out. This API will be responsible for fetching the status of the last issued publication request for a fragment.
Successful operation
Bad Request
Not Authorized
Forbidden
Resource Not found
{- "status": "complete",
- "errors": [
- {
- "path": "/templates",
- "request-id": [
- "9db4dd09-455f-44eb-a0e3-aca3342745d2"
], - "title": "Error Title",
- "status": 0,
- "report": {
- "tenantInfo": {
- "sandboxName": "cjm-team",
- "sandboxId": "70f58060-5d47-11ea-bdff-a5384333ff34",
- "imsOrgId": "745F37C35E4B776E0A49421B@AdobeOrg"
}, - "additionalContext": {
- "detailedMessage": "templates"
}
}, - "error-chain": [
- {
- "serviceId": "contentservice",
- "errorCode": "CJMMAS-*",
- "invokingServiceId": "cjm-content-service",
- "unixTimeStampMs": 1610446917396
}
]
}
]
}