Update a Blog
Updates a blog post. Send the full post each time: every field below is overwritten, and the stream, plan and tag lists replace the current ones.
POST
/admin/blog/{blogId}Update a Blog
curl --request POST \
--url 'https://<your-api-host>/nuSource/api/v1/admin/blog/{blogId}' \
--header 'APIKEY: <your-api-key>' \
--header 'ORGID: <your-org-id>' \
--form 'JSONString={"blog_title":"Test Blog","blog_content":"<p>sadasdas<br>adsdas</p>","blog_excerpt":"asdasdas","blog_meta_title":"Test Blog","blog_meta_desc":"asdasdas","blog_url_slug":"test-blog","visibility_option":0,"blog_status":2,"is_featured":0,"is_promoted":0,"author_user_id":"7098852","stream_ids":["684","1251"],"subscription_plan_ids":[],"tag_ids":[]}'{
"code": 200,
"message": "Blog updated successfully."
}Access: Institute admins, plus custom roles that can manage blogs.
Request body: form-data with one field, JSONString, containing this JSON. Images go as separate file fields.
Path parameters
Blog ID.
Body
JSONStringPost title.
Full post content. External images are copied into Edmingle. Empty content fails with "Please provide blog content.".
Short summary shown in listings.
SEO title.
SEO description.
URL slug, unique within your institute ("Slug already getting used." otherwise).
1 Public, 2 Private (hidden from the public listing), 3 Logged-in learners only.1 marks the post as featured.1 marks the post as promoted.blog_statusinteger
1 Draft, 2 Published (default).publish_dateUnix timestamp
Publish time. Defaults to now when published, empty for drafts.
author_user_idinteger
User shown as the author.
Categories (streams) of your institute. Unknown IDs fail with "One or more invalid institution stream ids provided.".
Subscription plans of your organization that unlock the post.
Blog tags of your organization.
blog_imagefile
Banner image. JPEG, PNG, GIF or WebP, up to 1 MB.
featured_imagefile
Featured (thumbnail) image. JPEG, PNG, GIF or WebP, up to 1 MB.
remove_blog_imageinteger
1 removes the current banner image (when no new one is uploaded).remove_featured_imageinteger
1 removes the current featured image (when no new one is uploaded).Response
codeinteger
Example:
200Notes: publish_date resets to now if you leave it out on a published post. Errors: "Slug already getting used.", "Please provide blog content.", and the invalid-ID errors for streams, plans and tags. Rate limit: 30 requests per 1 minute; going over locks you out for 30 minutes.