Docs home

Create Blog

Creates a blog post in the organization in your `ORGID` header. New posts go to the end of the display order.

POST/admin/blog
Create Blog
curl --request POST \
  --url 'https://<your-api-host>/nuSource/api/v1/admin/blog' \
  --header 'APIKEY: <your-api-key>' \
  --header 'ORGID: <your-org-id>' \
  --form 'featured_image=' \
  --form 'JSONString={"blog_title":"Sample blog","blog_content":"<p>Sample blog testing</p>","blog_excerpt":"Test","blog_meta_title":"Sample blog","blog_meta_desc":"Test","blog_url_slug":"sample-blog","visibility_option":0,"blog_status":2,"is_featured":1,"is_promoted":0,"author_user_id":null,"stream_ids":[],"subscription_plan_ids":[],"tag_ids":[]}'
{
  "code": 200,
  "message": "Blog created successfully."
}

Access: Institute admins and tutors, plus custom roles that can manage blogs.

Request body: form-data with one field, JSONString, containing this JSON. Images go as separate file fields.

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.
Response200application/json
codeinteger
Example: 200
messagestring
"Blog created successfully."
Example: Blog created successfully.

Notes: minutes_read and the public preview (first part of the post) are worked out from blog_content. Errors: "Please provide slug.", "Slug already getting used.", 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