Docs home

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
blogIdintegerrequired
Blog ID.
BodyJSONString
blog_titlestringrequired
Post title.
blog_contentstring (HTML)required
Full post content. External images are copied into Edmingle. Empty content fails with "Please provide blog content.".
blog_excerptstringrequired
Short summary shown in listings.
blog_meta_titlestringrequired
SEO title.
blog_meta_descstringrequired
SEO description.
blog_url_slugstringrequired
URL slug, unique within your institute ("Slug already getting used." otherwise).
visibility_optionintegerrequired
1 Public, 2 Private (hidden from the public listing), 3 Logged-in learners only.
is_promotedintegerrequired
1 marks the post as promoted.
1 Draft, 2 Published (default).
publish_dateUnix timestamp
Publish time. Defaults to now when published, empty for drafts.
User shown as the author.
stream_idsarray of integersYes (send [] if none)
Categories (streams) of your institute. Unknown IDs fail with "One or more invalid institution stream ids provided.".
subscription_plan_idsarray of integersYes (send [] if none)
Subscription plans of your organization that unlock the post.
tag_idsarray of integersYes (send [] if none)
Blog tags of your organization.
Banner image. JPEG, PNG, GIF or WebP, up to 1 MB.
1 removes the current banner image (when no new one is uploaded).
Response200application/json
codeinteger
Example: 200
messagestring
"Blog updated successfully."
Example: Blog updated successfully.

Notes: 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.

Updated yesterday

Ask AI