How do you create, retrieve, and update content blocks via the Content Builder API?
Suggested answer
The Content Builder REST API uses the /asset/v1/content/assets endpoint:
Create: POST /asset/v1/content/assets with body containing name, assetType.id (e.g., 220 for HTML block), content (the HTML string), and optionally customerKey and category.id (folder).
Retrieve: GET /asset/v1/content/assets/{id} or search using GET /asset/v1/content/assets?$filter=name%20eq%20'MyBlock'.
Update: PATCH /asset/v1/content/assets/{id} with only the changed fields.
Delete: DELETE /asset/v1/content/assets/{id}.
Asset type IDs: 4 = webpage, 5 = webtemplate, 196 = template, 207 = HTML email, 220 = HTML content block, 230 = text content block.
Practice content for interview preparation; not an official vendor answer. Verify details against current product documentation.
Community comments (0)
No comments yet.
Sign in or create a free account to add a comment. Comments are moderated before they appear.