Type post

Discussion

This type represents the intersection of the Question and Answer types.

It's used in cases where it would be beneficial to mix questions and answers in a response.

The upvoted and downvoted fields can only be queried for with an access_token with the private_info scope.

Fields

body
string
unchanged in unsafe filters

body_markdown 2.2
string

comment_count 2.2
integer

comments
an array of comments
may be absent

creation_date

down_vote_count
integer

downvoted 2.2
boolean private_info

last_activity_date

last_edit_date

last_editor 2.2

link 2.1
string

post_id
integer, refers to a post

post_type
one of question, or answer

score
integer

share_link 2.2
string
unchanged in unsafe filters

title 2.2
string

up_vote_count
integer

upvoted 2.2
boolean private_info

Fields marked with are included in the default filter, those marked with are excluded in the default filter.

Examples

Question

{"owner":{"reputation":9001,"user_id":1,"user_type":"registered","accept_rate":55,"profile_image":"https://www.gravatar.com/avatar/a007be5a61f6aa8f3e85ae2fc18dd66e?d=identicon&r=PG","display_name":"Example User","link":"http://example.stackexchange.com/users/1/example-user"},"down_vote_count":2,"up_vote_count":7,"score":5,"last_edit_date":1406499483,"last_activity_date":1406521083,"creation_date":1406456283,"post_type":"question","post_id":1,"body":"question body"}

Answer

{"owner":{"reputation":9001,"user_id":1,"user_type":"registered","accept_rate":55,"profile_image":"https://www.gravatar.com/avatar/a007be5a61f6aa8f3e85ae2fc18dd66e?d=identicon&r=PG","display_name":"Example User","link":"http://example.stackexchange.com/users/1/example-user"},"down_vote_count":2,"up_vote_count":7,"score":5,"last_edit_date":1406499483,"last_activity_date":1406521083,"creation_date":1406456283,"post_type":"answer","post_id":1,"body":"answer body"}

Methods That Return This Type