API Documentation
posts/create
Creates a new post.
- Public access is only supported when creating comments from authenticated users.
- If you are authenticating a user, you cannot pass any of the author_ parameters.
- If you specify ``state``, ``ip_address`, or ``date`` you must be a moderator.
- If you specify ``state`` it will skip any pre-approval validation.
Anonymous comments are allowed under two conditions:
1. You're using legacy auth, and your secret key
2. You're using your public key, you've come from a verified referrer, you're unauthenticated,
and the forum you're attempting to create the post on is listed in the applications trusted forums.
To create an anonymous comment, simply pass author_email and author_name, and optionally
the author_url parameter.
URL
https://disqus.com/api/3.0/posts/create.json
Accessibility
public key, secret key
Supported request methods
POST
Supported formats
json, jsonp
Requires authentication
no
Rate limited
inherits global rate limit
Arguments
Required
-
message
Optional
-
rating
Defaults to
null
Minimum value of 1
Maximum value of 5 -
parent
Defaults to
null
Looks up a post by ID
-
thread
Defaults to
null
Looks up a thread by ID
-
author_email
Defaults to
null
Email address (defined by RFC 5322)
-
author_name
Defaults to
null
-
state
Defaults to
null
Choices: unapproved, approved, spam, killed
-
author_url
Defaults to
null
URL (defined by RFC 3986)
-
date
Defaults to
null
Unix timestamp (or ISO datetime standard)
-
ip_address
Defaults to
null
IP address (defined by RFC 5322)
Example Responses
POST message=Hello+There&thread=1
{ "code":0, "response":{ "isJuliaFlagged":true, "isFlagged":false, "forum":"bobross", "parent":null, "author":{ "username":"disqus_api", "about":"", "name":"disqus_api", "url":"", "isFollowing":false, "isFollowedBy":false, "profileUrl":"http://disqus.com/disqus_api/", "avatar":{ "permalink":"http://disqus.com/api/users/avatars/disqus_api.jpg", "cache":"http://mediacdn.disqus.com/1091/images/noavatar92.png" }, "id":"1", "isAnonymous":false, "email":"example@disqus.com" }, "media":[], "isApproved":true, "dislikes":0, "raw_message":"Hello There", "id":"4", "thread":"1", "points":0, "createdAt":"2011-11-02T02:22:51", "isEdited":false, "message":"Hello There", "isHighlighted":false, "ipAddress":"127.0.0.1", "isSpam":false, "isDeleted":false, "likes":0 } }